Class PayloadStorageConfiguration
java.lang.Object
software.amazon.payloadoffloading.PayloadStorageConfiguration
Amazon payload storage configuration options such as Amazon S3 client,
bucket name, and payload size threshold for payloads.
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncom.amazonaws.services.s3.AmazonS3Gets the Amazon S3 client which is being used for storing payloads.com.amazonaws.services.s3.model.CannedAccessControlListGets the AWS ACL to apply to the Amazon S3 putObject request.intGets the payload size threshold for storing payloads in Amazon S3.Gets the name of the S3 bucket which is being used for storing payload.com.amazonaws.services.s3.model.SSEAwsKeyManagementParamsGets the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.booleanChecks whether or not all payloads regardless of their size are being stored in Amazon S3.booleanChecks whether an ACL have been configured for storing objects in Amazon S3.booleanCheck if the support for payloads if enabled.voidsetAlwaysThroughS3(boolean alwaysThroughS3) Sets whether or not all payloads regardless of their size should be stored in Amazon S3.voidsetCannedAccessControlList(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) Configures the ACL to apply to the Amazon S3 putObject request.voidsetPayloadSizeThreshold(int payloadSizeThreshold) Sets the payload size threshold for storing payloads in Amazon S3.voidDisables support for payloads.voidsetPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Enables support for payloads .voidsetSSEAwsKeyManagementParams(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.withAlwaysThroughS3(boolean alwaysThroughS3) Sets whether or not all payloads regardless of their size should be stored in Amazon S3.withCannedAccessControlList(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) Configures the ACL to apply to the Amazon S3 putObject request.withPayloadSizeThreshold(int payloadSizeThreshold) Sets the payload size threshold for storing payloads in Amazon S3.Disables support for payload.withPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Enables support for payload.withSSEAwsKeyManagementParams(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.
-
Constructor Details
-
PayloadStorageConfiguration
public PayloadStorageConfiguration() -
PayloadStorageConfiguration
-
-
Method Details
-
setPayloadSupportEnabled
Enables support for payloads .- Parameters:
s3- Amazon S3 client which is going to be used for storing payload.s3BucketName- Name of the bucket which is going to be used for storing payload. The bucket must be already created and configured in s3.
-
withPayloadSupportEnabled
public PayloadStorageConfiguration withPayloadSupportEnabled(com.amazonaws.services.s3.AmazonS3 s3, String s3BucketName) Enables support for payload.- Parameters:
s3- Amazon S3 client which is going to be used for storing payloads.s3BucketName- Name of the bucket which is going to be used for storing payloads. The bucket must be already created and configured in s3.- Returns:
- the updated PayloadStorageConfiguration object.
-
setPayloadSupportDisabled
public void setPayloadSupportDisabled()Disables support for payloads. -
withPayloadSupportDisabled
Disables support for payload.- Returns:
- the updated PayloadStorageConfiguration object.
-
isPayloadSupportEnabled
public boolean isPayloadSupportEnabled()Check if the support for payloads if enabled.- Returns:
- true if support for payloads is enabled.
-
getAmazonS3Client
public com.amazonaws.services.s3.AmazonS3 getAmazonS3Client()Gets the Amazon S3 client which is being used for storing payloads.- Returns:
- Reference to the Amazon S3 client which is being used.
-
getS3BucketName
Gets the name of the S3 bucket which is being used for storing payload.- Returns:
- The name of the bucket which is being used.
-
getSSEAwsKeyManagementParams
public com.amazonaws.services.s3.model.SSEAwsKeyManagementParams getSSEAwsKeyManagementParams()Gets the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.- Returns:
- The S3 SSE-KMS params used for encryption.
-
setSSEAwsKeyManagementParams
public void setSSEAwsKeyManagementParams(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.- Parameters:
sseAwsKeyManagementParams- The S3 SSE-KMS params used for encryption.
-
withSSEAwsKeyManagementParams
public PayloadStorageConfiguration withSSEAwsKeyManagementParams(com.amazonaws.services.s3.model.SSEAwsKeyManagementParams sseAwsKeyManagementParams) Sets the the S3 SSE-KMS encryption params of S3 objects under configured S3 bucket name.- Parameters:
sseAwsKeyManagementParams- The S3 SSE-KMS params used for encryption.- Returns:
- the updated PayloadStorageConfiguration object
-
withPayloadSizeThreshold
Sets the payload size threshold for storing payloads in Amazon S3.- Parameters:
payloadSizeThreshold- Payload size threshold to be used for storing in Amazon S3. Default: 256KB.- Returns:
- the updated PayloadStorageConfiguration object.
-
getPayloadSizeThreshold
public int getPayloadSizeThreshold()Gets the payload size threshold for storing payloads in Amazon S3.- Returns:
- payload size threshold which is being used for storing in Amazon S3. Default: 256KB.
-
setPayloadSizeThreshold
public void setPayloadSizeThreshold(int payloadSizeThreshold) Sets the payload size threshold for storing payloads in Amazon S3.- Parameters:
payloadSizeThreshold- Payload size threshold to be used for storing in Amazon S3. Default: 256KB.
-
withAlwaysThroughS3
Sets whether or not all payloads regardless of their size should be stored in Amazon S3.- Parameters:
alwaysThroughS3- Whether or not all payloads regardless of their size should be stored in Amazon S3. Default: false- Returns:
- the updated PayloadStorageConfiguration object.
-
isAlwaysThroughS3
public boolean isAlwaysThroughS3()Checks whether or not all payloads regardless of their size are being stored in Amazon S3.- Returns:
- True if all payloads regardless of their size are being stored in Amazon S3. Default: false
-
setAlwaysThroughS3
public void setAlwaysThroughS3(boolean alwaysThroughS3) Sets whether or not all payloads regardless of their size should be stored in Amazon S3.- Parameters:
alwaysThroughS3- Whether or not all payloads regardless of their size should be stored in Amazon S3. Default: false
-
setCannedAccessControlList
public void setCannedAccessControlList(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) Configures the ACL to apply to the Amazon S3 putObject request.- Parameters:
cannedAccessControlList- The ACL to be used when storing objects in Amazon S3
-
withCannedAccessControlList
public PayloadStorageConfiguration withCannedAccessControlList(com.amazonaws.services.s3.model.CannedAccessControlList cannedAccessControlList) Configures the ACL to apply to the Amazon S3 putObject request.- Parameters:
cannedAccessControlList- The ACL to be used when storing objects in Amazon S3
-
isCannedAccessControlListDefined
public boolean isCannedAccessControlListDefined()Checks whether an ACL have been configured for storing objects in Amazon S3.- Returns:
- True if ACL is defined
-
getCannedAccessControlList
public com.amazonaws.services.s3.model.CannedAccessControlList getCannedAccessControlList()Gets the AWS ACL to apply to the Amazon S3 putObject request.- Returns:
- Amazon S3 object ACL
-