Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Tools to run EC2 Query API's against CloudStack

...

[A

...

]

...

Boto

...

Client

...

1. Installation

Use any of the following to install boto,

...

Code Block
borderStyledashed
[Credentials]
aws_access_key_id= <cloudstack_api_key>
aws_secret_access_key=  <cloudstack_secret_key>

Wiki MarkupFor more details on Boto configuration refer&nbsp;\configuration refer [1\]

3. Connection

Make an EC2 service connection against CloudStack management server. Use this connection to make any of the supported EC2 API calls,

...

For a complete list of Boto EC2 commands see attached file - EC2_API_vs_Boto_commands.xlsx.

Wiki MarkupFor details on each of the commands see \ [2\].

...

[B

...

]

...

Java

...

SDK

...

Download source from \ [3\].&nbsp;For  For general guidelines on how to use the SDK, refer \ [4\].

Below is a sample Java code that uses the SDK to make EC2 DescribeImages API call against CloudStack,

...

Note: Before running the sample, place it in the samples _folder and fill in AwsCredentials.properties with _accessKey=<cloudStack_api_key> and secretkey=<cloudstack_secret_key>unmigrated-wiki-markup

One can use the AWS Toolkit for Eclipse&nbsp;to add the AWS SDK for Java to an existing project, or create a new Java project based on the SDK&nbsp;\[5\].

Wiki Markup
*\[C\] PHP SDK{*}

for Eclipse to add the AWS SDK for Java to an existing project, or create a new Java project based on the SDK [5].

[C] PHP SDK

Download source from [6]. For general guidelines on how to use the SDK, refer [7 Wiki MarkupDownload source from \[6\].&nbsp;For general guidelines on how to use the SDK, refer \[7\].

Below is a sample PHP code that uses the SDK to make EC2 DescribeImages API call against CloudStack,

...

Note: Before running the sample in _samples folder, rename config-sample.inc.php to config.inc.php _and write into the file with ‘key’=><cloudStack_api_key> and ‘secret’=><cloudstack_secret_key>_

References

Wiki Markup\[1\]&nbsp;[ http://docs.pythonboto.org/en/latest/boto_config_tut.html|http://docs.pythonboto.org/en/latest/boto_config_tut.html]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                                       

[2]  Wiki Markup\[2\]&nbsp;[http://docs.pythonboto.org/en/latest/ref/ec2.html#module-boto.ec2.connection|http://docs.pythonboto.org/en/latest/ref/ec2.html#module-boto.ec2.connection]unmigrated-wiki-markup

\[3\]&nbsp;[http://aws.amazon.com/sdkforjava/|http://aws.amazon.com/sdkforjava/] Wiki Markup

\[4\]&nbsp;[http://aws.amazon.com/articles/3586?_encoding=UTF8&jiveRedirect=1|http://aws.amazon.com/articles/3586?_encoding=UTF8&jiveRedirect=1] Wiki Markup

\[5\]&nbsp;[http://aws.amazon.com/eclipse/|http://aws.amazon.com/eclipse/] Wiki Markup\

[6\]&nbsp;[ http://aws.amazon.com/sdkforphp/|http://aws.amazon.com/sdkforphp/]unmigrated-wiki-markup

\[7\]&nbsp;[ http://aws.amazon.com/articles/4261?_encoding=UTF8&jiveRedirect=1|http://aws.amazon.com/articles/4261?_encoding=UTF8&jiveRedirect=1]