com.amazonaws.services.ec2.util
Class S3UploadPolicy

java.lang.Object
  extended by com.amazonaws.services.ec2.util.S3UploadPolicy

public class S3UploadPolicy
extends Object

This class represents S3 upload policy. Policy string representation and signature to be used within EC2 bundling API.


Constructor Summary
S3UploadPolicy(String awsAccessKeyId, String awsSecretKey, String bucketName, String prefix, int expireInMinutes)
          Creates a new S3 upload policy object from the specified parameters.
 
Method Summary
 String getPolicySignature()
          Policy signature in base64 format Use signature generated by this method for passing to EC2 bunding calls along with policy.
 String getPolicyString()
          Base64 representation of the serialized policy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

getPolicyString

public String getPolicyString()
Base64 representation of the serialized policy. Use policy generated by this method for passing to EC2 bundling calls.

Returns:
Base64 policy

getPolicySignature

public String getPolicySignature()
Policy signature in base64 format Use signature generated by this method for passing to EC2 bunding calls along with policy.

Returns:
Base64 signature


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.