Package com.amazonaws.services.ec2.util
Class S3UploadPolicy
java.lang.Object
com.amazonaws.services.ec2.util.S3UploadPolicy
This class represents S3 upload policy. Policy string representation and
signature to be used within EC2 bundling API.
-
Constructor Summary
ConstructorsConstructorDescriptionS3UploadPolicy
(String awsAccessKeyId, String awsSecretKey, String bucketName, String prefix, int expireInMinutes) Creates a new S3 upload policy object from the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionPolicy signature in base64 format Use signature generated by this method for passing to EC2 bunding calls along with policy.Base64 representation of the serialized policy.
-
Constructor Details
-
S3UploadPolicy
public S3UploadPolicy(String awsAccessKeyId, String awsSecretKey, String bucketName, String prefix, int expireInMinutes) Creates a new S3 upload policy object from the specified parameters. Once constructed, callers can access the policy string and policy signature to use with the EC2 bundling API.- Parameters:
awsAccessKeyId
- The AWS access key ID for the S3 bucket the bundling artifacts should be stored in.awsSecretKey
- The AWS secret key for the specified access key.bucketName
- The name of the bucket to store the bundling artifacts in.prefix
- The prefix for the bundling artifacts.expireInMinutes
- The number of minutes before the upload policy expires and is unable to be used.
-
-
Method Details
-
getPolicyString
Base64 representation of the serialized policy. Use policy generated by this method for passing to EC2 bundling calls.- Returns:
- Base64 policy
-
getPolicySignature
Policy signature in base64 format Use signature generated by this method for passing to EC2 bunding calls along with policy.- Returns:
- Base64 signature
-