|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dasein.cloud.CloudProvider
org.dasein.cloud.AbstractCloud
org.dasein.cloud.aws.AWSCloud
public class AWSCloud
| Field Summary | |
|---|---|
static String |
CLOUD_FRONT_ALGORITHM
|
static String |
DSN_ACCESS_KEY
|
static String |
EC2_ALGORITHM
|
static String |
P_ACCESS
|
static String |
P_ACTION
|
static String |
P_AWS_DATE
|
static String |
P_CFAUTH
|
static String |
P_GOOG_DATE
|
static String |
P_SIGNATURE
|
static String |
P_SIGNATURE_METHOD
|
static String |
P_SIGNATURE_VERSION
|
static String |
P_TIMESTAMP
|
static String |
P_VERSION
|
static String |
PLATFORM_EC2
|
static String |
PLATFORM_VPC
|
static String |
S3_ALGORITHM
|
static String |
SIGNATURE
|
static String |
V4_ALGORITHM
|
static String |
V4_TERMINATION
|
| Constructor Summary | |
|---|---|
AWSCloud()
|
|
| Method Summary | |
|---|---|
static void |
addExtraParameters(Map<String,String> parameters,
Map<String,String> extraParameters)
|
static void |
addFilterParameters(Map<String,String> filterParameters,
int index,
String filterName,
Collection<?> filterValues)
|
static void |
addFilterParameters(Map<String,String> filterParameters,
int index,
String filterName,
Object... filterValues)
|
static void |
addIndexedParameters(Map<String,String> parameters,
String prefix,
Map<String,String> extraParameters)
Helper method for adding indexed member parameters, e.g. |
static void |
addIndexedParameters(Map<String,String> parameters,
String prefix,
String... values)
Helper method for adding indexed member parameters, e.g. |
static void |
addValueIfNotNull(Map<String,String> parameters,
String key,
String value)
Puts the given key/value into the given map only if the value is not null. |
static String |
computeSHA256Hash(String value)
|
boolean |
createTags(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
|
boolean |
createTags(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
|
void |
createTagsSynchronously(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
|
void |
createTagsSynchronously(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
|
static String |
encode(String value,
boolean encodePath)
|
static String |
escapeXml(String nonxml)
|
byte[][] |
getAccessKey(org.dasein.cloud.ProviderContext ctx)
|
AWSAdminServices |
getAdminServices()
|
String |
getAutoScaleVersion()
|
static boolean |
getBooleanValue(Node node)
Returns the boolean value of the given node. |
org.apache.http.client.HttpClient |
getClient()
|
org.apache.http.client.HttpClient |
getClient(boolean multipart)
|
String |
getCloudName()
|
String |
getCloudWatchVersion()
|
EC2ComputeServices |
getComputeServices()
|
org.dasein.cloud.ContextRequirements |
getContextRequirements()
|
RegionsAndZones |
getDataCenterServices()
|
static double |
getDoubleValue(Node node)
Returns the double value of the given node. |
EC2Provider |
getEC2Provider()
|
String |
getEc2Url()
|
String |
getEc2Url(String regionId)
|
String |
getEc2Version()
|
String |
getElbVersion()
|
static float |
getFloatValue(Node node)
Returns the float value of the given node. |
String |
getGlacierUrl()
|
AWSIdentityServices |
getIdentityServices()
|
static int |
getIntValue(Node node)
Returns the int value of the given node. |
static org.apache.log4j.Logger |
getLogger(Class<?> cls)
|
EC2NetworkServices |
getNetworkServices()
|
AWSPlatformServices |
getPlatformServices()
|
String |
getProviderName()
|
String |
getProxyHost()
|
int |
getProxyPort()
|
String |
getRdsVersion()
|
String |
getRoute53Version()
|
String |
getSdbVersion()
|
String |
getSnsVersion()
|
String |
getSqsVersion()
|
Map<String,String> |
getStandardCloudWatchParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
Map<String,String> |
getStandardParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
Map<String,String> |
getStandardParameters(org.dasein.cloud.ProviderContext ctx,
String action,
String version)
|
Map<String,String> |
getStandardRdsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
Map<String,String> |
getStandardSimpleDBParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
Map<String,String> |
getStandardSnsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
Map<String,String> |
getStandardSqsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
|
AWSCloudStorageServices |
getStorageServices()
|
static Map<String,String> |
getTagFilterParams(Map<String,String> tags)
|
static Map<String,String> |
getTagFilterParams(Map<String,String> tags,
int startingFilterIndex)
|
Map<String,String> |
getTagsFromTagSet(Node attr)
|
static String |
getTextValue(Node node)
Returns the text from the given node. |
String |
getTimestamp(long timestamp,
boolean withMillis)
|
static long |
getTimestampValue(Node node)
Gets the epoch form of the text value of the provided node. |
String |
getV4Authorization(String accessKey,
String secretKey,
String action,
String url,
String serviceId,
Map<String,String> headers,
String bodyHash)
Generates an AWS v4 signature authorization string |
String |
getV4HeaderDate(Date date)
|
static org.apache.log4j.Logger |
getWireLogger(Class<?> cls)
|
static byte[] |
HmacSHA256(String data,
byte[] key)
|
boolean |
isDebug()
|
boolean |
isEC2Supported()
|
boolean |
isVPCSupported()
|
long |
parseTime(String time)
|
boolean |
removeTags(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
|
boolean |
removeTags(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
|
void |
setTags(Node attr,
org.dasein.cloud.Taggable item)
|
String |
signAWS3(String keyId,
byte[] key,
String dateString)
|
String |
signCloudFront(String accessKey,
byte[] secretKey,
String dateString)
|
String |
signEc2(byte[] key,
String serviceUrl,
Map<String,String> parameters)
|
String |
signS3(String accessKey,
byte[] secretKey,
String action,
String hash,
String contentType,
Map<String,String> headers,
String bucket,
String object)
|
String |
signUploadPolicy(String base64Policy)
|
String |
testContext()
|
org.dasein.cloud.Tag |
toTag(Node tag)
|
| Methods inherited from class org.dasein.cloud.AbstractCloud |
|---|
getCIServices |
| Methods inherited from class org.dasein.cloud.CloudProvider |
|---|
close, connect, connect, connect, findUniqueName, getComputeCloud, getContext, hasAdminServices, hasCIServices, hasComputeServices, hasIdentityServices, hasNetworkServices, hasPlatformServices, hasStorageServices, hold, isConnected, matchesTags, release |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String P_ACCESS
public static final String P_ACTION
public static final String P_CFAUTH
public static final String P_AWS_DATE
public static final String P_GOOG_DATE
public static final String P_SIGNATURE
public static final String P_SIGNATURE_METHOD
public static final String P_SIGNATURE_VERSION
public static final String P_TIMESTAMP
public static final String P_VERSION
public static final String CLOUD_FRONT_ALGORITHM
public static final String EC2_ALGORITHM
public static final String S3_ALGORITHM
public static final String SIGNATURE
public static final String V4_ALGORITHM
public static final String V4_TERMINATION
public static final String PLATFORM_EC2
public static final String PLATFORM_VPC
public static final String DSN_ACCESS_KEY
| Constructor Detail |
|---|
public AWSCloud()
| Method Detail |
|---|
public static org.apache.log4j.Logger getLogger(Class<?> cls)
public static org.apache.log4j.Logger getWireLogger(Class<?> cls)
@Nonnull
public static String encode(@Nonnull
String value,
boolean encodePath)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalExceptionpublic static String escapeXml(String nonxml)
public static byte[] HmacSHA256(String data,
byte[] key)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public static String computeSHA256Hash(String value)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public boolean createTags(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
public boolean createTags(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
public void createTagsSynchronously(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
public void createTagsSynchronously(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
throws org.dasein.cloud.CloudException,
org.dasein.cloud.InternalException
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
public boolean removeTags(String resourceId,
org.dasein.cloud.Tag... keyValuePairs)
public boolean removeTags(String[] resourceIds,
org.dasein.cloud.Tag... keyValuePairs)
public Map<String,String> getTagsFromTagSet(Node attr)
public org.dasein.cloud.Tag toTag(@Nonnull
Node tag)
public AWSAdminServices getAdminServices()
getAdminServices in class org.dasein.cloud.AbstractCloud@Nonnull public String getCloudName()
getCloudName in class org.dasein.cloud.CloudProviderpublic EC2ComputeServices getComputeServices()
getComputeServices in class org.dasein.cloud.AbstractCloud@Nonnull public org.dasein.cloud.ContextRequirements getContextRequirements()
getContextRequirements in class org.dasein.cloud.AbstractCloudpublic byte[][] getAccessKey(org.dasein.cloud.ProviderContext ctx)
@Nonnull public RegionsAndZones getDataCenterServices()
getDataCenterServices in class org.dasein.cloud.CloudProvider@Nonnull public EC2Provider getEC2Provider()
@Nullable public String getEc2Url()
@Nullable
public String getEc2Url(@Nullable
String regionId)
public String getGlacierUrl()
throws org.dasein.cloud.InternalException,
org.dasein.cloud.CloudException
org.dasein.cloud.InternalException
org.dasein.cloud.CloudExceptionpublic String getAutoScaleVersion()
public String getCloudWatchVersion()
public String getEc2Version()
public String getElbVersion()
public String getRdsVersion()
public String getRoute53Version()
public String getSdbVersion()
public String getSnsVersion()
public String getSqsVersion()
public AWSIdentityServices getIdentityServices()
getIdentityServices in class org.dasein.cloud.AbstractCloudpublic EC2NetworkServices getNetworkServices()
getNetworkServices in class org.dasein.cloud.AbstractCloud@Nullable public AWSPlatformServices getPlatformServices()
getPlatformServices in class org.dasein.cloud.AbstractCloud@Nonnull public String getProviderName()
getProviderName in class org.dasein.cloud.CloudProvider@Nullable public String getProxyHost()
public int getProxyPort()
@Nonnull public AWSCloudStorageServices getStorageServices()
getStorageServices in class org.dasein.cloud.CloudProvider
public Map<String,String> getStandardParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardParameters(org.dasein.cloud.ProviderContext ctx,
String action,
String version)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardCloudWatchParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardRdsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardSimpleDBParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardSnsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public Map<String,String> getStandardSqsParameters(org.dasein.cloud.ProviderContext ctx,
String action)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public static void addExtraParameters(Map<String,String> parameters,
Map<String,String> extraParameters)
@Nullable
public static Map<String,String> getTagFilterParams(@Nullable
Map<String,String> tags)
@Nullable
public static Map<String,String> getTagFilterParams(@Nullable
Map<String,String> tags,
int startingFilterIndex)
public static void addFilterParameters(Map<String,String> filterParameters,
int index,
String filterName,
Collection<?> filterValues)
public static void addFilterParameters(Map<String,String> filterParameters,
int index,
String filterName,
Object... filterValues)
@Nonnull
public String getTimestamp(long timestamp,
boolean withMillis)
public long parseTime(@Nullable
String time)
throws org.dasein.cloud.CloudException
org.dasein.cloud.CloudException
public String signUploadPolicy(String base64Policy)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public String signCloudFront(String accessKey,
byte[] secretKey,
String dateString)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public String signEc2(byte[] key,
String serviceUrl,
Map<String,String> parameters)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public String signAWS3(String keyId,
byte[] key,
String dateString)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public String signS3(String accessKey,
byte[] secretKey,
String action,
String hash,
String contentType,
Map<String,String> headers,
String bucket,
String object)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
public String getV4Authorization(String accessKey,
String secretKey,
String action,
String url,
String serviceId,
Map<String,String> headers,
String bodyHash)
throws org.dasein.cloud.InternalException
accessKey - Amazon credentialsecretKey - Amazon credentialaction - the HTTP method (GET, POST, etc)url - the full URL for the request, including any query parametersserviceId - the canonical name of the service targeted in the request (e.g. "glacier")headers - map of headers of request. MUST include x-amz-date or date header.bodyHash - a hex-encoded sha256 hash of the body of the request
org.dasein.cloud.InternalExceptionpublic String getV4HeaderDate(Date date)
public String testContext()
testContext in class org.dasein.cloud.CloudProvider
public void setTags(@Nonnull
Node attr,
@Nonnull
org.dasein.cloud.Taggable item)
public static long getTimestampValue(Node node)
throws org.dasein.cloud.CloudException
node - the node to extact the value from
org.dasein.cloud.CloudExceptionpublic static String getTextValue(Node node)
node - the node to extract the value from
public static boolean getBooleanValue(Node node)
node - the node to extract the value from
public static int getIntValue(Node node)
node - the node to extract the value from
public static double getDoubleValue(Node node)
node - the node to extract the value from
public static float getFloatValue(Node node)
node - the node to extract the value from
public static void addIndexedParameters(@Nonnull
Map<String,String> parameters,
@Nonnull
String prefix,
String... values)
parameters - the existing parameters map to add toprefix - the prefix value for each parameter keyvalues - the values to add
public static void addIndexedParameters(@Nonnull
Map<String,String> parameters,
@Nonnull
String prefix,
Map<String,String> extraParameters)
parameters - the existing parameters map to add toprefix - the prefix value for each parameter keyextraParameters - the values to add
public static void addValueIfNotNull(@Nonnull
Map<String,String> parameters,
@Nonnull
String key,
String value)
parameters - the map to add tokey - the key of the valuevalue - the value to add if not nullpublic boolean isEC2Supported()
public boolean isVPCSupported()
@Nonnull
public org.apache.http.client.HttpClient getClient()
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalException
@Nonnull
public org.apache.http.client.HttpClient getClient(boolean multipart)
throws org.dasein.cloud.InternalException
org.dasein.cloud.InternalExceptionpublic boolean isDebug()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||