/** * Returns a new instance of S3FileTransferRequestParamsDto populated with all parameters, required to access an S3 bucket. * * @param storageEntity the storage entity that contains attributes to access an S3 bucket * * @return the S3FileTransferRequestParamsDto instance that can be used to access S3 bucket */ public S3FileTransferRequestParamsDto getS3BucketAccessParams(StorageEntity storageEntity) { // Get S3 bucket specific configuration settings. // Please note that since those values are required we pass a "true" flag. String s3BucketName = getStorageAttributeValueByName(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME), storageEntity, true); S3FileTransferRequestParamsDto params = getS3FileTransferRequestParamsDto(); params.setS3Endpoint(configurationHelper.getProperty(ConfigurationValue.S3_ENDPOINT)); params.setS3BucketName(s3BucketName); return params; }
/** * Returns a new instance of S3FileTransferRequestParamsDto populated with all parameters, required to access an S3 bucket. * * @param storageEntity the storage entity that contains attributes to access an S3 bucket * * @return the S3FileTransferRequestParamsDto instance that can be used to access S3 bucket */ public S3FileTransferRequestParamsDto getS3BucketAccessParams(StorageEntity storageEntity) { // Get S3 bucket specific configuration settings. // Please note that since those values are required we pass a "true" flag. String s3BucketName = getStorageAttributeValueByName(configurationHelper.getProperty(ConfigurationValue.S3_ATTRIBUTE_NAME_BUCKET_NAME), storageEntity, true); S3FileTransferRequestParamsDto params = getS3FileTransferRequestParamsDto(); params.setS3Endpoint(configurationHelper.getProperty(ConfigurationValue.S3_ENDPOINT)); params.setS3BucketName(s3BucketName); return params; }
/** * Executes S3 specific steps required for initiation of a business object data destroy. * * @param businessObjectDataDestroyDto the DTO that holds various parameters needed to initiate a business object data destroy */ void executeS3SpecificStepsImpl(BusinessObjectDataDestroyDto businessObjectDataDestroyDto) { // Create an S3 file transfer parameters DTO to access the S3 bucket. // Since the S3 key prefix represents a directory, we add a trailing '/' character to it. S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = storageHelper.getS3FileTransferRequestParamsDto(); s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataDestroyDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(businessObjectDataDestroyDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataDestroyDto.getS3KeyPrefix(), "/")); // Create an S3 file transfer parameters DTO to be used for S3 object tagging operation. S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto = storageHelper .getS3FileTransferRequestParamsDtoByRole(businessObjectDataDestroyDto.getS3ObjectTaggerRoleArn(), businessObjectDataDestroyDto.getS3ObjectTaggerRoleSessionName()); s3ObjectTaggerParamsDto.setS3Endpoint(businessObjectDataDestroyDto.getS3Endpoint()); // Get all S3 objects matching the S3 key prefix from the S3 bucket. List<S3VersionSummary> s3VersionSummaries = s3Service.listVersions(s3FileTransferRequestParamsDto); // Tag the S3 objects to initiate the deletion. s3Service.tagVersions(s3FileTransferRequestParamsDto, s3ObjectTaggerParamsDto, s3VersionSummaries, new Tag(businessObjectDataDestroyDto.getS3ObjectTagKey(), businessObjectDataDestroyDto.getS3ObjectTagValue())); }
/** * Executes S3 specific steps required for initiation of a business object data destroy. * * @param businessObjectDataDestroyDto the DTO that holds various parameters needed to initiate a business object data destroy */ void executeS3SpecificStepsImpl(BusinessObjectDataDestroyDto businessObjectDataDestroyDto) { // Create an S3 file transfer parameters DTO to access the S3 bucket. // Since the S3 key prefix represents a directory, we add a trailing '/' character to it. S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = storageHelper.getS3FileTransferRequestParamsDto(); s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataDestroyDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(businessObjectDataDestroyDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataDestroyDto.getS3KeyPrefix(), "/")); // Create an S3 file transfer parameters DTO to be used for S3 object tagging operation. S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto = storageHelper .getS3FileTransferRequestParamsDtoByRole(businessObjectDataDestroyDto.getS3ObjectTaggerRoleArn(), businessObjectDataDestroyDto.getS3ObjectTaggerRoleSessionName()); s3ObjectTaggerParamsDto.setS3Endpoint(businessObjectDataDestroyDto.getS3Endpoint()); // Get all S3 objects matching the S3 key prefix from the S3 bucket. List<S3VersionSummary> s3VersionSummaries = s3Service.listVersions(s3FileTransferRequestParamsDto); // Tag the S3 objects to initiate the deletion. s3Service.tagVersions(s3FileTransferRequestParamsDto, s3ObjectTaggerParamsDto, s3VersionSummaries, new Tag(businessObjectDataDestroyDto.getS3ObjectTagKey(), businessObjectDataDestroyDto.getS3ObjectTagValue())); }
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); finalS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setFiles(files);
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); finalS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setFiles(files);
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(businessObjectDataRestoreDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(businessObjectDataRestoreDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); finalS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/"); finalS3FileTransferRequestParamsDto.setFiles(filesToBeRestored);
s3FileTransferRequestParamsDto.setS3BucketName(s3BucketName); s3FileTransferRequestParamsDto.setS3KeyPrefix(s3KeyPrefix); s3FileTransferRequestParamsDto.setS3Endpoint(s3Endpoint);
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(S3_KEY_PREFIX + "/");
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
s3FileTransferRequestParamsDto.setS3Endpoint(storagePolicyTransitionParamsDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(storagePolicyTransitionParamsDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(storagePolicyTransitionParamsDto.getS3KeyPrefix(), "/")); .getS3FileTransferRequestParamsDtoByRole(storagePolicyTransitionParamsDto.getS3ObjectTaggerRoleArn(), storagePolicyTransitionParamsDto.getS3ObjectTaggerRoleSessionName()); s3ObjectTaggerParamsDto.setS3Endpoint(storagePolicyTransitionParamsDto.getS3Endpoint());
s3FileTransferRequestParamsDto.setS3Endpoint(storagePolicyTransitionParamsDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3BucketName(storagePolicyTransitionParamsDto.getS3BucketName()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(storagePolicyTransitionParamsDto.getS3KeyPrefix(), "/")); .getS3FileTransferRequestParamsDtoByRole(storagePolicyTransitionParamsDto.getS3ObjectTaggerRoleArn(), storagePolicyTransitionParamsDto.getS3ObjectTaggerRoleSessionName()); s3ObjectTaggerParamsDto.setS3Endpoint(storagePolicyTransitionParamsDto.getS3Endpoint());
s3FileTransferRequestParamsDto.setS3Endpoint(businessObjectDataRestoreDto.getS3Endpoint()); s3FileTransferRequestParamsDto.setS3KeyPrefix(StringUtils.appendIfMissing(businessObjectDataRestoreDto.getS3KeyPrefix(), "/"));
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3BucketName(S3_BUCKET_NAME); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(TEST_S3_KEY_PREFIX + "/"); updatedS3ObjectTaggerParamsDto.setAwsSecretKey(AWS_ASSUMED_ROLE_SECRET_KEY); updatedS3ObjectTaggerParamsDto.setSessionToken(AWS_ASSUMED_ROLE_SESSION_TOKEN); updatedS3ObjectTaggerParamsDto.setS3Endpoint(S3_ENDPOINT);
updatedS3FileTransferRequestParamsDto.setS3Endpoint(S3_ENDPOINT); updatedS3FileTransferRequestParamsDto.setS3BucketName(S3_BUCKET_NAME); updatedS3FileTransferRequestParamsDto.setS3KeyPrefix(TEST_S3_KEY_PREFIX + "/"); updatedS3ObjectTaggerParamsDto.setAwsSecretKey(AWS_ASSUMED_ROLE_SECRET_KEY); updatedS3ObjectTaggerParamsDto.setSessionToken(AWS_ASSUMED_ROLE_SESSION_TOKEN); updatedS3ObjectTaggerParamsDto.setS3Endpoint(S3_ENDPOINT);
sourceS3Endpoint = this.getS3Endpoint(); String copyS3Endpoint = ((String) strategy.copy(LocatorUtils.property(locator, "s3Endpoint", sourceS3Endpoint), sourceS3Endpoint, (this.s3Endpoint!= null))); copy.setS3Endpoint(copyS3Endpoint); } else { if (s3EndpointShouldBeCopiedAndSet == Boolean.FALSE) {