diff --git a/codegen/ec2/pom.xml b/codegen/ec2/pom.xml new file mode 100644 index 0000000000..7efa02b8eb --- /dev/null +++ b/codegen/ec2/pom.xml @@ -0,0 +1,57 @@ + + + + + jclouds-codegen-project + org.jclouds + 1.0-SNAPSHOT + ../project/pom.xml + + 4.0.0 + jclouds-codegen-ec2 + jclouds code generator for amazon ec2 + jar + jclouds code generator + + + scm:svn:http://jclouds.googlecode.com/svn/trunk/codegen/ec2 + scm:svn:https://jclouds.googlecode.com/svn/trunk/codegen/ec2 + http://jclouds.googlecode.com/svn/trunk/codegen/ec2 + + + + + ${project.groupId} + jclouds-codegen-core + ${project.version} + + + ${project.groupId} + jclouds-codegen-core + ${project.version} + test-jar + test + + + + diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/AmazonEC2QueryAPI.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/AmazonEC2QueryAPI.java new file mode 100644 index 0000000000..42fae5559d --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/AmazonEC2QueryAPI.java @@ -0,0 +1,62 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi; + +import java.util.Map; +import java.util.Set; + +/** + * + * @author Adrian Cole + */ +public class AmazonEC2QueryAPI { + private Map categories; + private Map dataTypes; + private Set see; + + public void setCategories(Map categories) { + this.categories = categories; + } + + public Map getCategories() { + return categories; + } + + public void setDataTypes(Map dataTypes) { + this.dataTypes = dataTypes; + } + + public Map getDataTypes() { + return dataTypes; + } + + public void setSee(Set see) { + this.see = see; + } + + public Set getSee() { + return see; + } + +} diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Parameter.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Category.java similarity index 62% rename from codegen/src/main/java/org/jclouds/codegen/model/Parameter.java rename to codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Category.java index 6cd95459b6..9cbd6bf184 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/Parameter.java +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Category.java @@ -21,46 +21,42 @@ * under the License. * ==================================================================== */ -package org.jclouds.codegen.model; +package org.jclouds.codegen.ec2.queryapi; + +import java.util.Map; /** * - * @author James Murty + * @author Adrian Cole */ -public class Parameter { - private String javaName; - private String name; - private String type; - private String javaType; - private String param; - private String desc; +public class Category { + private Map queries; + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("Category"); + sb.append("{queries=").append(queries); + sb.append(", name='").append(name).append('\''); + sb.append('}'); + return sb.toString(); + } + + private String name; + + public void setQueries(Map categories) { + this.queries = categories; + } + + public Map getQueries() { + return queries; + } + + public void setName(String name) { + this.name = name; + } public String getName() { return name; } - - public String getType() { - return type; - } - - public String getJavaType() { - return javaType; - } - - public String getParam() { - return param; - } - - public String getDesc() { - return desc; - } - - public void setJavaName(String javaName) { - this.javaName = javaName; - } - - public String getJavaName() { - return javaName; - } - } diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Content.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Content.java new file mode 100644 index 0000000000..6856effe7b --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Content.java @@ -0,0 +1,98 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi; + +import java.util.Map; + +/** + * + * @author Adrian Cole + */ +public class Content { + + private String constraints; + private String defaultValue; + private String desc; + private Map valueMap; + private String name; + private String optional; + private String type; + + public void setConstraints(String constraints) { + this.constraints = constraints; + } + + public String getConstraints() { + return constraints; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDesc(String desc) { + this.desc = desc; + } + + public String getDesc() { + return desc; + } + + public void setValueMap(Map valueMap) { + this.valueMap = valueMap; + } + + public Map getValueMap() { + return valueMap; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setOptional(String optional) { + this.optional = optional; + } + + public String getOptional() { + return optional; + } + + public void setType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + +} diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/DataType.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/DataType.java new file mode 100644 index 0000000000..ad15049035 --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/DataType.java @@ -0,0 +1,89 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi; + +import java.util.Set; + +public class DataType { + + private String type; + private String ancestor; + private Set see; + private String exampleCode; + private String exampleHTML; + private Set contents; + + public DataType() { + super(); + } + + public void setType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + + public void setAncestor(String ancestor) { + this.ancestor = ancestor; + } + + public String getAncestor() { + return ancestor; + } + + public void setSee(Set see) { + this.see = see; + } + + public Set getSee() { + return see; + } + + public void setExampleCode(String exampleCode) { + this.exampleCode = exampleCode; + } + + public String getExampleCode() { + return exampleCode; + } + + public void setContents(Set contents) { + this.contents = contents; + } + + public Set getContents() { + return contents; + } + + public void setExampleHTML(String exampleHTML) { + this.exampleHTML = exampleHTML; + } + + public String getExampleHTML() { + return exampleHTML; + } + +} \ No newline at end of file diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Response.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Query.java similarity index 67% rename from codegen/src/main/java/org/jclouds/codegen/model/Response.java rename to codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Query.java index fd37585217..d5fed06faa 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/Response.java +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/Query.java @@ -21,25 +21,31 @@ * under the License. * ==================================================================== */ -package org.jclouds.codegen.model; +package org.jclouds.codegen.ec2.queryapi; -import java.util.List; /** * - * @author James Murty + * @author Adrian Cole */ -public class Response extends BaseBean { - private List fields; - private List see; - - public List getFields() { - return fields; - } +public class Query extends DataType { - - public List getSee() { - return see; - } - + private String responseType; + private String description; + + public void setResponseType(String responseType) { + this.responseType = responseType; + } + + public String getResponseType() { + return responseType; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } } diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIExpectations.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIExpectations.java new file mode 100644 index 0000000000..9d22076bbc --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIExpectations.java @@ -0,0 +1,283 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi.parser; + +import java.util.Map; +import java.util.Set; + +import org.testng.v6.Sets; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; + +public class AmazonEC2QueryAPIExpectations { + protected final Set queryNames; + + public AmazonEC2QueryAPIExpectations() { + queryNames = Sets.newHashSet(); + for (Set qNames : expectedQueryNamesForCategoryName.values()) { + queryNames.addAll(qNames); + } + } + + // Please do not reformat this class, as it will not likely look as nice. + protected static final Map> expectedQueryNamesForCategoryName = new ImmutableMap.Builder>() + .put("Amazon DevPay", ImmutableSet.of("ConfirmProductInstance")).put( + "AMIs", + ImmutableSet.of("DeregisterImage", "ModifyImageAttribute", + "DescribeImageAttribute", "DescribeImages")).put( + "Availability Zones and Regions", + ImmutableSet.of("DescribeAvailabilityZones", "DescribeRegions")).put( + "Elastic Block Store", + ImmutableSet.of("DeleteVolume", "DescribeSnapshots", "DescribeVolumes", + "DetachVolume", "AttachVolume", "CreateSnapshot", "CreateVolume", + "DeleteSnapshot")).put( + "Elastic IP Addresses", + ImmutableSet.of("AllocateAddress", "DisassociateAddress", "ReleaseAddress", + "AssociateAddress", "DescribeAddresses")).put("General", + ImmutableSet.of("GetConsoleOutput")).put("Images", + ImmutableSet.of("ResetImageAttribute", "RegisterImage")).put( + "Instances", + ImmutableSet.of("TerminateInstances", "DescribeInstances", "RunInstances", + "RebootInstances")).put("Key Pairs", + ImmutableSet.of("DescribeKeyPairs", "CreateKeyPair", "DeleteKeyPair")).put( + "Monitoring", ImmutableSet.of("MonitorInstances", "UnmonitorInstances")).put( + "Reserved Instances", + ImmutableSet.of("DescribeReservedInstances", + "DescribeReservedInstancesOfferings", + "PurchaseReservedInstancesOffering")).put( + "Security Groups", + ImmutableSet.of("DescribeSecurityGroups", "AuthorizeSecurityGroupIngress", + "CreateSecurityGroup", "DeleteSecurityGroup", + "RevokeSecurityGroupIngress")).put("Windows", + ImmutableSet.of("CancelBundleTask", "DescribeBundleTasks", "BundleInstance")) + .build(); + protected static final Map> expectedFieldNamesForDataTypeName = new ImmutableMap.Builder>() + .put("ReservationSetType", ImmutableSet.of("item")).put("DeleteKeyPairResponse", + ImmutableSet.of("return", "requestId")).put( + "DescribeKeyPairsResponseInfoType", ImmutableSet.of("item")).put( + "AuthorizeSecurityGroupIngressResponse", + ImmutableSet.of("return", "requestId")).put("AttachmentSetItemResponseType", + ImmutableSet.of("device", "status", "volumeId", "instanceId", "attachTime")) + .put("DescribeAddressesResponseInfoType", ImmutableSet.of("item")).put( + "DescribeReservedInstancesResponse", + ImmutableSet.of("requestId", "reservedInstancesSet")).put( + "DescribeVolumesSetItemResponseType", + ImmutableSet.of("status", "size", "createTime", "snapshotId", + "availabilityZone", "volumeId", "attachmentSet")).put( + "LaunchPermissionItemType", ImmutableSet.of("group", "userId")).put( + "DescribeSnapshotsSetItemResponseType", + ImmutableSet.of("status", "snapshotId", "volumeId", "startTime", "progress")) + .put( + "RunningInstancesItemType", + ImmutableSet.of("dnsName", "instanceState", "launchTime", "privateDnsName", + "reason", "monitoring", "platform", "productCodes", "amiLaunchIndex", + "keyName", "ramdiskId", "kernelId", "imageId", "instanceType", + "instanceId", "placement")).put( + "DescribeReservedInstancesOfferingsResponse", + ImmutableSet.of("requestId", "reservedInstancesOfferingsSet")).put( + "BlockDeviceMappingType", ImmutableSet.of("item")).put( + "ResetImageAttributeResponse", ImmutableSet.of("requestId", "imageId")).put( + "AvailabilityZoneSetType", ImmutableSet.of("item")).put( + "RevokeSecurityGroupIngressResponse", ImmutableSet.of("return", "requestId")) + .put("ReservationInfoType", + ImmutableSet.of("groupSet", "reservationId", "instancesSet", "ownerId")).put( + "RebootInstancesResponse", ImmutableSet.of("return", "requestId")).put( + "GroupItemType", ImmutableSet.of("groupId")).put("AvailabilityZoneItemType", + ImmutableSet.of("regionName", "zoneName", "zoneState")).put( + "RunningInstancesSetType", ImmutableSet.of("item")).put( + "CreateSecurityGroupResponse", ImmutableSet.of("return", "requestId")).put( + "ReleaseAddressResponse", ImmutableSet.of("return", "requestId")).put( + "SecurityGroupItemType", + ImmutableSet.of("groupName", "ipPermissions", "groupDescription", "ownerId")) + .put("NullableAttributeValueType", ImmutableSet.of("value")).put( + "DescribeSnapshotsResponse", ImmutableSet.of("requestId", "snapshotSet")).put( + "BundleInstanceResponse", ImmutableSet.of("bundleInstanceTask", "requestId")) + .put("DescribeKeyPairsResponseItemType", ImmutableSet.of("keyName", "keyFingerprint")) + .put("BundleInstanceTasksSetType", ImmutableSet.of("bundleInstanceTask")) + .put("DescribeAddressesResponseItemType", ImmutableSet.of("publicIp", "instanceId")) + .put("MonitorInstancesResponse", ImmutableSet.of("requestId", "instancesSet")).put( + "DescribeImagesResponse", ImmutableSet.of("imagesSet", "requestId")).put( + "MonitorInstancesResponseSetItemType", + ImmutableSet.of("monitoring", "instanceId")).put( + "BundleInstanceTaskErrorType", ImmutableSet.of("code", "message")).put( + "ProductCodesSetType", ImmutableSet.of("item")).put( + "UnmonitorInstancesResponse", ImmutableSet.of("instancesSet", "requestId")) + .put( + "IpPermissionType", + ImmutableSet.of("groups", "portRange", "fromPort", "ipProtocol", "icmpPort", + "toPort", "ipRanges")).put("IpPermissionSetType", + ImmutableSet.of("item")).put("DeleteSecurityGroupResponse", + ImmutableSet.of("requestId", "return")).put( + "RunInstancesResponse", + ImmutableSet.of("instancesSet", "requesterId", "groupSet", "reservationId", + "requestId", "ownerId")).put("DeregisterImageResponse", + ImmutableSet.of("return", "requestId")).put("TerminateInstancesResponse", + ImmutableSet.of("requestId", "instancesSet")).put( + "DescribeSnapshotsSetResponseType", ImmutableSet.of("item")).put( + "DescribeReservedInstancesOfferingsResponseSetType", ImmutableSet.of("item")) + .put( + "BundleInstanceTaskType", + ImmutableSet.of("updateTime", "startTime", "progress", "instanceId", "state", + "bundleId", "storage", "error")).put( + "ConfirmProductInstanceResponse", + ImmutableSet.of("ownerId", "requestId", "return")).put( + "CreateKeyPairResponse", + ImmutableSet.of("keyName", "keyMaterial", "requestId", "keyFingerprint")).put( + "RegisterImageResponse", ImmutableSet.of("imageId", "requestId")).put( + "IpRangeSetType", ImmutableSet.of("item")).put("RegionSetType", + ImmutableSet.of("item")).put("InstanceStateType", + ImmutableSet.of("name", "code")).put( + "DescribeReservedInstancesOfferingsResponseSetItemType", + ImmutableSet.of("productDescription", "reservedInstancesOfferingId", + "usagePrice", "fixedPrice", "availabilityZone", "duration", + "instanceType")).put( + "BundleInstanceS3StorageType", + ImmutableSet.of("awsAccessKeyId", "uploadPolicy", "secret-access-key", + "bucket", "prefix", "uploadPolicySignature")).put( + "DescribeVolumesResponse", ImmutableSet.of("requestId", "volumeSet")).put( + "TerminateInstancesResponseInfoType", ImmutableSet.of("item")).put( + "DeleteSnapshotResponse", ImmutableSet.of("return", "requestId")).put( + "BundleInstanceTaskStorageType", ImmutableSet.of("S3")).put( + "DescribeAvailabilityZonesResponse", + ImmutableSet.of("requestId", "availabilityZoneInfo")).put( + "CreateVolumeResponse", + ImmutableSet.of("snapshotId", "size", "volumeId", "availabilityZone", + "requestId", "createTime", "status")).put( + "DescribeReservedInstancesResponseSetType", ImmutableSet.of("item")).put( + "DescribeAddressesResponse", ImmutableSet.of("requestId", "addressesSet")) + .put("InstanceMonitoringStateType", ImmutableSet.of("state")).put( + "DetachVolumeResponse", + ImmutableSet.of("status", "requestId", "instanceId", "volumeId", "device", + "attachTime")).put("DescribeKeyPairsResponse", + ImmutableSet.of("requestId", "keySet")).put( + "AttachVolumeResponse", + ImmutableSet.of("device", "attachTime", "requestId", "volumeId", "status", + "instanceId")).put("DescribeBundleTasksResponse", + ImmutableSet.of("bundleInstanceTasksSet", "requestId")).put( + "TerminateInstancesResponseItemType", + ImmutableSet.of("shutdownState", "previousState", "instanceId")).put( + "SecurityGroupSetType", ImmutableSet.of("item")).put( + "AttachmentSetResponseType", ImmutableSet.of("item")).put( + "DescribeImageAttributeResponse", + ImmutableSet.of("kernel", "productCodes", "requestId", "ramdisk", + "launchPermission", "blockDeviceMapping", "imageId")).put( + "PurchaseReservedInstancesOfferingResponse", + ImmutableSet.of("reservedInstancesId", "requestId")).put( + "CreateSnapshotResponse", + ImmutableSet.of("requestId", "status", "startTime", "volumeId", "snapshotId", + "progress")).put("GroupSetType", ImmutableSet.of("item")).put( + "ProductCodesSetItemType", ImmutableSet.of("productCode")).put( + "AllocateAddressResponse", ImmutableSet.of("requestId", "publicIp")).put( + "ProductCodeItemType", ImmutableSet.of("productCode")).put( + "UserIdGroupPairType", ImmutableSet.of("userId", "groupName ")).put( + "DescribeVolumesSetResponseType", ImmutableSet.of("item")).put( + "ProductCodeListType", ImmutableSet.of("item")).put("DescribeRegionsResponse", + ImmutableSet.of("requestId", "regionInfo")).put("RegionItemType", + ImmutableSet.of("regionEndpoint", "regionName")).put( + "DescribeInstancesResponse", ImmutableSet.of("requestId", "reservationSet")) + .put( + "DescribeImagesResponseItemType", + ImmutableSet.of("kernelId", "productCodes", "isPublic", "imageId", + "ramdiskId", "imageOwnerId", "platform", "imageType", "imageState", + "imageLocation", "architecture")).put("LaunchPermissionListType", + ImmutableSet.of("item")).put("BlockDeviceMappingItemType", + ImmutableSet.of("virtualName", "deviceName")).put("DeleteVolumeResponse", + ImmutableSet.of("return", "requestId")).put("DescribeImagesResponseInfoType", + ImmutableSet.of("item")).put("IpRangeItemType", ImmutableSet.of("cidrIp ")) + .put("DisassociateAddressResponse", ImmutableSet.of("requestId", "return")).put( + "UserIdGroupPairSetType", ImmutableSet.of("item")) + .put("CancelBundleTaskResponse", ImmutableSet.of("bundleInstanceTask", "requestId")) + .put("MonitorInstancesResponseSetType", ImmutableSet.of("item")).put( + "DescribeReservedInstancesResponseSetItemType", + ImmutableSet.of("state", "duration", "usagePrice", "instanceType", + "instanceCount", "productDescription", "reservedInstancesId", + "fixedPrice", "availabilityZone", "start")).put( + "DescribeSecurityGroupsResponse", + ImmutableSet.of("requestId", "securityGroupInfo")).put( + "GetConsoleOutputResponse", + ImmutableSet.of("requestId", "output", "instanceId", "timestamp")).put( + "ModifyImageAttributeResponse", ImmutableSet.of("requestId", "return")) + .put("AssociateAddressResponse", ImmutableSet.of("requestId", "publicIp", "return")) + .put("ConfirmProductInstance", ImmutableSet.of("ProductCode", "InstanceId")).put( + "DeregisterImage", ImmutableSet.of("ImageId")).put( + "ModifyImageAttribute", + ImmutableSet.of("Group.n", "UserId.n", "ImageId", "ProductCode.n", "Group.n", + "UserId.n")).put( + "DescribeImageAttribute", + ImmutableSet.of("ProductCodes", "ImageId", "Platform", "BlockDeviceMapping", + "LaunchPermission", "Ramdisk", "Kernel")).put("DescribeImages", + ImmutableSet.of("explicit", "public", "implicit")).put( + "DescribeAvailabilityZones", ImmutableSet.of("ZoneName")).put( + "DescribeRegions", ImmutableSet.of("Region.n")).put("DeleteVolume", + ImmutableSet.of("VolumeId")).put("DescribeSnapshots", + ImmutableSet.of("SnapshotId.n")).put("DescribeVolumes", + ImmutableSet.of("VolumeId")).put("DetachVolume", + ImmutableSet.of("Device", "VolumeId", "InstanceId", "Force")).put( + "AttachVolume", ImmutableSet.of("InstanceId", "Device", "VolumeId")).put( + "CreateSnapshot", ImmutableSet.of("VolumeId")).put("CreateVolume", + ImmutableSet.of("SnapshotId", "Size", "AvailabilityZone")).put( + "DeleteSnapshot", ImmutableSet.of("SnapshotId")).put("AllocateAddress", + ImmutableSet.of("AllocateAddressResponse", "requestId", "publicIp")).put( + "DisassociateAddress", ImmutableSet.of("PublicIp")).put("ReleaseAddress", + ImmutableSet.of("PublicIp")).put("AssociateAddress", + ImmutableSet.of("InstanceId", "PublicIp")).put("DescribeAddresses", + ImmutableSet.of("PublicIp.n")).put("GetConsoleOutput", + ImmutableSet.of("InstanceId")).put("ResetImageAttribute", + ImmutableSet.of("ImageId")).put("RegisterImage", + ImmutableSet.of("ImageLocation")).put("TerminateInstances", + ImmutableSet.of("InstanceId.n")).put("DescribeInstances", + ImmutableSet.of("InstanceId.n")).put( + "RunInstances", + ImmutableSet.of("Monitoring.Enabled", "Encoding", "AvailabilityZone", + "KernelId", "MaxCount", "Data", "ImageId", "InstanceType", + "MinCount", "groupId", "VirtualName", "AddressingType", "KeyName", + "DeviceName", "Version", "RamdiskId")).put("RebootInstances", + ImmutableSet.of("InstanceId.n")).put("DescribeKeyPairs", + ImmutableSet.of("KeyName.n")).put("CreateKeyPair", ImmutableSet.of("KeyName")) + .put("DeleteKeyPair", ImmutableSet.of("KeyName")).put("MonitorInstances", + ImmutableSet.of("InstanceId.n")).put("UnmonitorInstances", + ImmutableSet.of("InstanceId.n")).put("DescribeReservedInstances", + ImmutableSet.of("ReservedInstancesId.n")).put( + "DescribeReservedInstancesOfferings", + ImmutableSet.of("ProductDescription", "ReservedInstancesOfferingId", + "AvailabilityZone", "InstanceType")).put( + "PurchaseReservedInstancesOffering", + ImmutableSet.of("ReservedInstancesOfferingId.n", "InstanceCount.n")).put( + "DescribeSecurityGroups", ImmutableSet.of("GroupName.n")).put( + "AuthorizeSecurityGroupIngress", + ImmutableSet.of("GroupName", "GroupName", "UserId", "IpProtocol", "CidrIp", + "ToPort", "FromPort", "UserId")).put("CreateSecurityGroup", + ImmutableSet.of("GroupDescription", "GroupName")).put("DeleteSecurityGroup", + ImmutableSet.of("GroupName")).put( + "RevokeSecurityGroupIngress", + ImmutableSet.of("IpProtocol", "GroupName", "UserId", "CidrIp", "FromPort", + "ToPort", "GroupName", "UserId")).put("CancelBundleTask", + ImmutableSet.of("BundleId")).put("DescribeBundleTasks", + ImmutableSet.of("BundleId")).put( + "BundleInstance", + ImmutableSet.of("Storage.S3.UploadPolicy", "InstanceId", "Storage.S3.Prefix", + "Storage.S3.AWSAccessKeyId", "Storage.S3.Bucket", + "Storage.S3.UploadPolicySignature")).build(); +} \ No newline at end of file diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParser.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParser.java new file mode 100644 index 0000000000..f0752e5085 --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParser.java @@ -0,0 +1,72 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi.parser; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import org.apache.commons.io.IOUtils; +import org.jclouds.codegen.ec2.queryapi.AmazonEC2QueryAPI; + +import com.google.gson.Gson; + +/** + * Converts object models representing AWS API beans into Java classes. + *

+ * This implementation is designed to perform the following steps: + *

    + *
  • Parse the JSON object representation produced by the parse_ec2.pl perl script
  • + *
  • Convert the JSON into Java object models (@see org.jclouds.aws.codegen.models)
  • + * + * @author Adrian Cole + */ +public class AmazonEC2QueryAPIParser { + + public AmazonEC2QueryAPI parseJSONResource(String resource) { + InputStream in = AmazonEC2QueryAPI.class.getResourceAsStream(resource); + return parseJSONInputStream(in); + } + + public AmazonEC2QueryAPI parseJSONFile(File file) throws FileNotFoundException { + InputStream in = new FileInputStream(file); + return parseJSONInputStream(in); + } + + public AmazonEC2QueryAPI parseJSONInputStream(InputStream in) { + assert in != null; + Gson gson = new Gson(); + try { + AmazonEC2QueryAPIValidator validator = new AmazonEC2QueryAPIValidator(); + validator.setModel(gson.fromJson(new InputStreamReader(in), AmazonEC2QueryAPI.class)); + validator.validateCategories().validateCommands().validateDomain(); + return validator.getModel(); + } finally { + IOUtils.closeQuietly(in); + } + } + +} diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIValidator.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIValidator.java new file mode 100644 index 0000000000..b3a4f442ac --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIValidator.java @@ -0,0 +1,131 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi.parser; + +import static com.google.common.base.Preconditions.checkNotNull; +import static com.google.common.base.Preconditions.checkState; + +import java.util.Set; + +import org.jclouds.codegen.ec2.queryapi.AmazonEC2QueryAPI; +import org.jclouds.codegen.ec2.queryapi.Category; +import org.jclouds.codegen.ec2.queryapi.Content; +import org.jclouds.codegen.ec2.queryapi.DataType; +import org.jclouds.codegen.ec2.queryapi.Query; + +import com.google.common.base.Function; +import com.google.common.collect.Iterables; +import com.google.common.collect.Sets; + +public class AmazonEC2QueryAPIValidator extends AmazonEC2QueryAPIExpectations { + protected AmazonEC2QueryAPIValidator validateQueriesInCategory(String categoryName) { + for (String query : expectedQueryNamesForCategoryName.get(categoryName)) { + validateQueryInCategory(query, categoryName); + } + return this; + } + + protected AmazonEC2QueryAPIValidator validateQueryInCategory(String queryName, + String categoryName) { + Category category = getModel().getCategories().get(categoryName); + checkState(category != null, String.format("category %1$s not present", categoryName)); + Query query = category.getQueries().get(queryName); + validateTopLevelType(query); + checkState(category != null, String.format("query %1$s not present in category %2$s", + queryName, categoryName)); + checkState(query.getResponseType().equals(query.getType() + "Response"), String.format( + "Invalid responseType for %1$s [%2$s] should be %1$sResponse", queryName, query + .getResponseType())); + checkNotNull(query.getDescription(), String.format("%1$s: getDescription()", query.getType())); + + validateTopLevelType(query); + + DataType response = getModel().getDataTypes().get(query.getResponseType()); + checkNotNull(response, String.format("response %1$s not present in domain for %2$s", query + .getResponseType(), query.getType())); + checkState(query.getResponseType().equals(query.getType() + "Response")); + checkState(response.getType().equals(query.getType() + "Response")); + validateTopLevelType(response); + return validateDataType(query); + } + + protected void validateTopLevelType(DataType type) { + checkState(type.getAncestor() == null, String + .format("%1$s should not have an ancestor", type)); + checkNotNull(type.getExampleCode(), String.format("%1$s: getExampleCode()", type.getType())); + checkNotNull(type.getExampleHTML(), String.format("%1$s: getExampleHTML()", type.getType())); + } + + protected AmazonEC2QueryAPIValidator validateDataType(DataType dataType) { + checkState(dataType.getSee().size() >= 1, "see should have at least one entry"); + Set fieldNames = Sets.newTreeSet(Iterables.transform(dataType.getContents(), + new Function() { + public String apply(Content field) { + return field.getName(); + } + })); + checkState(Sets.difference(fieldNames, + expectedFieldNamesForDataTypeName.get(dataType.getType())).size() == 0, String + .format("%1$s hasn't the correct fields. has [%2$s] should have [%3$s]", dataType + .getType(), fieldNames, expectedFieldNamesForDataTypeName.get(dataType + .getType()))); + return this; + } + + private AmazonEC2QueryAPI model; + + public AmazonEC2QueryAPIValidator validateCommands() { + for (String categoryName : expectedQueryNamesForCategoryName.keySet()) { + for (String queryName : expectedQueryNamesForCategoryName.get(categoryName)) { + validateQueryInCategory(queryName, categoryName); + } + } + return this; + } + + public AmazonEC2QueryAPIValidator validateDomain() { + for (String dataTypeName : expectedFieldNamesForDataTypeName.keySet()) { + if (!this.queryNames.contains(dataTypeName)) + validateDataType(checkNotNull(getModel().getDataTypes().get(dataTypeName), dataTypeName)); + } + return this; + } + + public AmazonEC2QueryAPIValidator validateCategories() { + checkState(Sets.difference(getModel().getCategories().keySet(), + expectedQueryNamesForCategoryName.keySet()).size() == 0); + checkState(getModel().getCategories().keySet().size() == expectedQueryNamesForCategoryName + .keySet().size()); + return this; + } + + public void setModel(AmazonEC2QueryAPI model) { + this.model = model; + } + + public AmazonEC2QueryAPI getModel() { + return model; + } + +} \ No newline at end of file diff --git a/codegen/src/main/java/org/jclouds/codegen/model/BaseBean.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/AmazonEC2QueryAPITransformer.java similarity index 61% rename from codegen/src/main/java/org/jclouds/codegen/model/BaseBean.java rename to codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/AmazonEC2QueryAPITransformer.java index 246ae72e22..7f9d724e4a 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/BaseBean.java +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/AmazonEC2QueryAPITransformer.java @@ -21,41 +21,28 @@ * under the License. * ==================================================================== */ -package org.jclouds.codegen.model; +package org.jclouds.codegen.ec2.queryapi.transform; + +import org.jclouds.codegen.ec2.queryapi.AmazonEC2QueryAPI; +import org.jclouds.codegen.model.API; /** + * Converts object models representing AWS API beans into Java classes. + *

    + * This implementation is designed to perform the following steps: + *

      + *
    • Parse the JSON object representation produced by the parse_ec2.pl perl script
    • + *
    • Convert the JSON into Java object models (@see org.jclouds.aws.codegen.models)
    • * - * @author James Murty + * @author Adrian Cole */ -public abstract class BaseBean { - private String className; - private String packageName; - private String awsType; - private String javaType; - private String javaName; +public class AmazonEC2QueryAPITransformer { - public String getJavaType() { - return javaType; - } + public API transform(AmazonEC2QueryAPI amazonAPI) { + API api = new API(); - public String getClassName() { - return className; - } - - public String getPackageName() { - return packageName; - } - - public String getAwsType() { - return awsType; - } - - public void setJavaName(String javaName) { - this.javaName = javaName; + return api; } - - public String getJavaName() { - return javaName; - } - + + } diff --git a/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToField.java b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToField.java new file mode 100644 index 0000000000..fb080fd16a --- /dev/null +++ b/codegen/ec2/src/main/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToField.java @@ -0,0 +1,87 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi.transform; + +import org.jclouds.codegen.ec2.queryapi.Content; +import org.jclouds.codegen.model.Field; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Function; + +/** + * Converts object models representing AWS API beans into Java classes. + *

      + * This implementation is designed to perform the following steps: + *

        + *
      • Parse the JSON object representation produced by the parse_ec2.pl perl script
      • + *
      • Convert the JSON into Java object models (@see org.jclouds.aws.codegen.models)
      • + * + * @author Adrian Cole + */ +public class ConvertContentToField implements Function { + + public Field apply(Content from) { + Field field = new Field(); + field.setConstraints(from.getConstraints()); + field.setDefaultValue(from.getDefaultValue()); + field.setDesc(from.getDesc()); + field.setName(from.getName()); + field.setJavaName(parseJavaName(from.getName())); + field.setOptional(Boolean.parseBoolean(from.getOptional())); + field.setType(from.getType()); + field.setValueMap(from.getValueMap()); + field.setJavaType(parseJavaType(from.getType())); + return field; + } + + @VisibleForTesting + String parseJavaType(String type) { + if (type.indexOf("xsd:") >= 0) { + return parseJavaTypeForXsd(type); + } + return type; + } + + @VisibleForTesting + String parseJavaTypeForXsd(String type) { + if (type.equals("xsd:string")) { + return "String"; + } else if (type.equals("xsd:Int")) { + return "Integer"; + } else if (type.equals("xsd:boolean")) { + return "Boolean"; + } else if (type.equals("xsd:dateTime")) { + return "org.joda.time.DateTime"; + } else { + throw new IllegalArgumentException("type not supported: " + type); + } + + } + + @VisibleForTesting + String parseJavaName(String name) { + return name; + } + +} diff --git a/codegen/src/main/resources/objmodels/ec2.json b/codegen/ec2/src/main/resources/objmodels/ec2.json similarity index 90% rename from codegen/src/main/resources/objmodels/ec2.json rename to codegen/ec2/src/main/resources/objmodels/ec2.json index faa5982d3c..481c93ea3c 100644 --- a/codegen/src/main/resources/objmodels/ec2.json +++ b/codegen/ec2/src/main/resources/objmodels/ec2.json @@ -1,8 +1,1464 @@ { - "domain" : { + "categories" : { + "Instances" : { + "name" : "Instances", + "queries" : { + "TerminateInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=TerminateInstances&InstanceId.1=i-3ea74257&AuthParams", + "exampleHTML" : "

        Example Request

        This example terminates the i-3ea74257 instance.

        https://ec2.amazonaws.com/?Action=TerminateInstances&InstanceId.1=i-3ea74257&AuthParams
        \n", + "contents" : [ + { + "desc" : "Instance ID to terminate.", + "name" : "InstanceId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "TerminateInstances", + "description" : "Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call will succeed. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-TerminateInstances.html", + "DescribeInstances" + ], + "responseType" : "TerminateInstancesResponse" + }, + "DescribeInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeInstances&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes the current state of the instances owned by this user.

        https://ec2.amazonaws.com/?Action=DescribeInstances&AuthParams
        \n", + "contents" : [ + { + "desc" : "Instance IDs to describe.", + "name" : "InstanceId.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "Returns all instances." + } + ], + "type" : "DescribeInstances", + "description" : "Returns information about instances that you own.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html", + "RunInstances", + "TerminateInstances" + ], + "responseType" : "DescribeInstancesResponse" + }, + "RunInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-60a54009&MaxCount=3&MinCount=1&Placement.AvailabilityZone=us-east-1a&Monitoring.Enabled=true&AuthParams", + "exampleHTML" : "

        Example Request

        This example launches three instances of the ami-60a54009 AMI.

        https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-60a54009&MaxCount=3&MinCount=1&Placement.AvailabilityZone=us-east-1a&Monitoring.Enabled=true&AuthParams
        \n", + "contents" : [ + { + "desc" : "Unique ID of a machine image, returned by a call to ", + "name" : "ImageId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "constraints" : "Between 1 and the maximum number allowed for your account (default: 20).", + "desc" : "Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.", + "name" : "MinCount", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "20" + }, + { + "constraints" : "Between 1 and the maximum number allowed for your account (default: 20).", + "desc" : "Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.", + "name" : "MaxCount", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "20" + }, + { + "desc" : "The name of the key pair.", + "name" : "KeyName", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Name of the security group.", + "name" : "groupId", + "type" : "String", + "optional" : "true", + "defaultValue" : "default" + }, + { + "desc" : "The user data.", + "name" : "Data", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The version.", + "name" : "Version", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The encoding.", + "name" : "Encoding", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Deprecated.", + "name" : "AddressingType", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Specifies the instance type.", + "name" : "InstanceType", + "type" : "String", + "optional" : "true", + "defaultValue" : "m1.small", + "valueMap" : { + "c1.xlarge" : "c1.xlarge", + "m1.large" : "m1.large", + "m1.xlarge" : "m1.xlarge", + "c1.medium" : "c1.medium", + "m1.small" : "m1.small" + } + }, + { + "desc" : "Specifies the placement constraints (Availability Zones) for launching the instances.", + "name" : "AvailabilityZone", + "type" : "String", + "optional" : "true", + "defaultValue" : "Amazon EC2 selects an Availability Zone." + }, + { + "desc" : "The ID of the kernel with which to launch the instance.", + "name" : "KernelId", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.", + "name" : "RamdiskId", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The virtual name.", + "name" : "VirtualName", + "type" : "String", + "optional" : "true", + "defaultValue" : "None " + }, + { + "desc" : "The device name (e.g., /dev/sdh).", + "name" : "DeviceName", + "type" : "String", + "optional" : "true", + "defaultValue" : "None " + }, + { + "desc" : "Enables monitoring for the instance.", + "name" : "Monitoring.Enabled", + "type" : "Boolean", + "optional" : "true", + "defaultValue" : "Disabled" + } + ], + "type" : "RunInstances", + "description" : "Launches a specified number of instances of an AMI for which you have permissions. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html", + "DescribeInstances", + "TerminateInstances", + "AuthorizeSecurityGroupIngress", + "RevokeSecurityGroupIngress", + "DescribeSecurityGroups", + "CreateSecurityGroup", + "CreateKeyPair" + ], + "responseType" : "RunInstancesResponse" + }, + "RebootInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=RebootInstances&AuthParams", + "exampleHTML" : "

        Example Request

        This example reboots an instance.

        https://ec2.amazonaws.com/?Action=RebootInstances&AuthParams
        \n", + "contents" : [ + { + "desc" : "One or more instance IDs.", + "name" : "InstanceId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "RebootInstances", + "description" : "Requests a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instance(s). The operation will succeed if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RebootInstances.html", + "RunInstances" + ], + "responseType" : "RebootInstancesResponse" + } + } + }, + "AMIs" : { + "name" : "AMIs", + "queries" : { + "DeregisterImage" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DeregisterImage&ImageId=ami-4fa54026&AuthParams", + "exampleHTML" : "

        Example Request

        This example deregisters the ami-4fa54026 AMI.

        https://ec2.amazonaws.com/?Action=DeregisterImage&ImageId=ami-4fa54026&AuthParams
        \n", + "contents" : [ + { + "desc" : "Unique ID of the AMI which was assigned during registration. To register an AMI, use ", + "name" : "ImageId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DeregisterImage", + "description" : "Deregisters the specified AMI. Once deregistered, the AMI cannot be used to launch new instances.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html", + "RegisterImage", + "DescribeImages" + ], + "responseType" : "DeregisterImageResponse" + }, + "ModifyImageAttribute" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams", + "exampleHTML" : "

        Example Request

        This example makes this a public AMI and grants specific permissions to a user.

        https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams
        \n", + "contents" : [ + { + "desc" : "The AMI ID.", + "name" : "ImageId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "User IDs associated with the launchPermission attribute.", + "name" : "UserId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Security groups associated with the launchPermission attribute. You can specify the ", + "name" : "Group.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "User IDs associated with the launchPermission attribute.", + "name" : "UserId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Security groups associated with the launchPermission attribute. You can specify the ", + "name" : "Group.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Amazon DevPay product code. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset.", + "name" : "ProductCode.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "ModifyImageAttribute", + "description" : "Modifies an attribute of an AMI. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyImageAttribute.html", + "ResetImageAttribute", + "DescribeImageAttribute" + ], + "responseType" : "ModifyImageAttributeResponse" + }, + "DescribeImageAttribute" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=launchPermission&AuthParams", + "exampleHTML" : "

        Example Request

        This example lists the launch permissions for the ami-61a54008 AMI

        https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=launchPermission&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the AMI for which an attribute will be described.", + "name" : "ImageId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Describes the launch permissions of the AMI.", + "name" : "Attribute=launchPermission", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Describes the product code associated with the AMI.", + "name" : "Attribute=productCodes", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Describes the ID of the kernel associated with the AMI.", + "name" : "Attribute=kernel", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Describes the ID of the RAM disk associated with the AMI.", + "name" : "Attribute=ramdisk", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Describes the mapping that defines native device names to use when exposing virtual devices.", + "name" : "Attribute=blockDeviceMapping", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Describes the operating system platform.", + "name" : "Attribute=platform", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DescribeImageAttribute", + "description" : "Returns information about an attribute of an AMI. Only one attribute can be specified per call.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImageAttribute.html", + "DescribeImages", + "ModifyImageAttribute", + "ResetImageAttribute" + ], + "responseType" : "DescribeImageAttributeResponse" + }, + "DescribeImages" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeImages&ImageId.1=ami-be3adfd7&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes the ami-be3adfd7 AMI.

        https://ec2.amazonaws.com/?Action=DescribeImages&ImageId.1=ami-be3adfd7&AuthParams
        \n", + "contents" : [ + { + "name" : "public", + "optional" : "false" + }, + { + "name" : "explicit", + "optional" : "false" + }, + { + "name" : "implicit", + "optional" : "false" + } + ], + "type" : "DescribeImages", + "description" : " Returns information about AMIs, AKIs, and ARIs. This includes image type, product codes, architecture, and kernel and RAM disk IDs. Images available to you include public images, private images that you own, and private images owned by other users for which you have explicit launch permissions. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html", + "DescribeInstances", + "DescribeImageAttribute" + ], + "responseType" : "DescribeImagesResponse" + } + } + }, + "Monitoring" : { + "name" : "Monitoring", + "queries" : { + "MonitorInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=MonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams", + "exampleHTML" : "

        Example Request

        This example enables monitoring for i-43a4412a and i-23a3397d.

        https://ec2.amazonaws.com/?Action=MonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams
        \n", + "contents" : [ + { + "desc" : "Instance ID.", + "name" : "InstanceId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "MonitorInstances", + "description" : "Enables monitoring for a running instance. For more information, refer to the Amazon CloudWatch Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-MonitorInstances.html", + "UnmonitorInstances", + "RunInstances" + ], + "responseType" : "MonitorInstancesResponse" + }, + "UnmonitorInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=UnmonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams", + "exampleHTML" : "

        Example Request

        This example disables monitoring for i-43a4412a and i-23a3397d.

        https://ec2.amazonaws.com/?Action=UnmonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams
        \n", + "contents" : [ + { + "desc" : "Instance ID.", + "name" : "InstanceId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "UnmonitorInstances", + "description" : "Disables monitoring for a running instance. For more information, refer to the Amazon CloudWatch Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-UnmonitorInstances.html", + "MonitorInstances", + "RunInstances" + ], + "responseType" : "UnmonitorInstancesResponse" + } + } + }, + "Security Groups" : { + "name" : "Security Groups", + "queries" : { + "DescribeSecurityGroups" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeSecurityGroups&GroupName.1=WebServers&GroupName.2=RangedPortsBySource&AuthParams", + "exampleHTML" : "

        Example Request

        This example returns information about two security groups that are configured for the account.

        https://ec2.amazonaws.com/?Action=DescribeSecurityGroups&GroupName.1=WebServers&GroupName.2=RangedPortsBySource&AuthParams
        \n", + "contents" : [ + { + "desc" : "Name of the security group.", + "name" : "GroupName.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "Describes all groups within the account." + } + ], + "type" : "DescribeSecurityGroups", + "description" : "Returns information about security groups that you own.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html", + "CreateSecurityGroup", + "AuthorizeSecurityGroupIngress", + "RevokeSecurityGroupIngress", + "DeleteSecurityGroup" + ], + "responseType" : "DescribeSecurityGroupsResponse" + }, + "AuthorizeSecurityGroupIngress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=AuthorizeSecurityGroupIngress&GroupName=websrv\n&IpProtocol=tcp\n&FromPort=80\n&ToPort=80\n&CidrIp=205.192.0.0/16\n&AuthParams", + "exampleHTML" : "

        Example Request

        This example grants TCP port 80 access from the 205.192.0.0/16 address range to the websrv security group.

        https://ec2.amazonaws.com/?Action=AuthorizeSecurityGroupIngress&GroupName=websrv\n&IpProtocol=tcp\n&FromPort=80\n&ToPort=80\n&CidrIp=205.192.0.0/16\n&AuthParams
        \n", + "contents" : [ + { + "desc" : "AWS Access Key ID.", + "name" : "UserId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Name of the group to modify. The name must be valid and belong to the account", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "IP protocol.", + "name" : "IpProtocol", + "type" : "String", + "optional" : "false", + "defaultValue" : "None", + "valueMap" : { + "udp" : "udp", + "tcp" : "tcp", + "icmp" : "icmp" + } + }, + { + "desc" : "Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).", + "name" : "FromPort", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).", + "name" : "ToPort", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "AWS User ID of an account.", + "name" : "UserId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Name of the security group.", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "constraints" : "Valid CIDR IP address range.", + "desc" : "CIDR range.", + "name" : "CidrIp", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "AuthorizeSecurityGroupIngress", + "description" : " Adds permissions to a security group. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AuthorizeSecurityGroupIngress.html", + "CreateSecurityGroup", + "DescribeSecurityGroups", + "RevokeSecurityGroupIngress", + "DeleteSecurityGroup" + ], + "responseType" : "AuthorizeSecurityGroupIngressResponse" + }, + "CreateSecurityGroup" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateSecurityGroup&GroupName=websrv&GroupDescription='Web Servers'&AuthParams", + "exampleHTML" : "

        Example Request

        This example creates the websrv security group.

        https://ec2.amazonaws.com/?Action=CreateSecurityGroup&GroupName=websrv&GroupDescription='Web Servers'&AuthParams
        \n", + "contents" : [ + { + "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", + "desc" : "Name of the security group.", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", + "desc" : "Description of the group. This is informational only. If the description contains spaces, you must enclose it in single quotes (') or URL-encode it.", + "name" : "GroupDescription", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "CreateSecurityGroup", + "description" : "Creates a new security group. Group names must be unique per account.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSecurityGroup.html", + "RunInstances", + "DescribeSecurityGroups", + "AuthorizeSecurityGroupIngress", + "RevokeSecurityGroupIngress", + "DeleteSecurityGroup" + ], + "responseType" : "CreateSecurityGroupResponse" + }, + "DeleteSecurityGroup" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteSecurityGroup&GroupName=websrv&AuthParams", + "exampleHTML" : "

        Example Request

        This example deletes the websrv security group.

        https://ec2.amazonaws.com/?Action=DeleteSecurityGroup&GroupName=websrv&AuthParams
        \n", + "contents" : [ + { + "desc" : "Name of the security group to delete.", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DeleteSecurityGroup", + "description" : "Deletes a security group that you own.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html", + "CreateSecurityGroup", + "DescribeSecurityGroups", + "AuthorizeSecurityGroupIngress", + "RevokeSecurityGroupIngress" + ], + "responseType" : "DeleteSecurityGroupResponse" + }, + "RevokeSecurityGroupIngress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=RevokeSecurityGroupIngress&IpProtocol=tcp&FromPort=80&ToPort=80&CidrIp=205.192.0.0/16\n&AuthParams", + "exampleHTML" : "

        Example Request

        This example revokes TCP port 80 access from the 205.192.0.0/16 address range for the websrv security group.

        https://ec2.amazonaws.com/?Action=RevokeSecurityGroupIngress&IpProtocol=tcp&FromPort=80&ToPort=80&CidrIp=205.192.0.0/16\n&AuthParams
        \n", + "contents" : [ + { + "desc" : "AWS Access Key ID.", + "name" : "UserId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Name of the group to modify.", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "IP protocol.", + "name" : "IpProtocol", + "type" : "String", + "optional" : "false", + "defaultValue" : "None", + "valueMap" : { + "udp" : "udp", + "tcp" : "tcp", + "icmp" : "icmp" + } + }, + { + "desc" : "Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).", + "name" : "FromPort", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).", + "name" : "ToPort", + "type" : "Integer", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "AWS User ID of an account.", + "name" : "UserId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Name of the security group.", + "name" : "GroupName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "constraints" : "Valid CIDR IP address range.", + "desc" : "CIDR range.", + "name" : "CidrIp", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "RevokeSecurityGroupIngress", + "description" : "Revokes permissions from a security group. The permissions used to revoke must be specified using the same values used to grant the permissions. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RevokeSecurityGroupIngress.html", + "CreateSecurityGroup", + "DescribeSecurityGroups", + "AuthorizeSecurityGroupIngress", + "DeleteSecurityGroup" + ], + "responseType" : "RevokeSecurityGroupIngressResponse" + } + } + }, + "Images" : { + "name" : "Images", + "queries" : { + "ResetImageAttribute" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=ResetImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&AuthParams", + "exampleHTML" : "

        Example Request

        This example resets the launchPermission attribute.

        https://ec2.amazonaws.com/?Action=ResetImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&AuthParams
        \n", + "contents" : [ + { + "desc" : "ID of the AMI on which the attribute will be reset.", + "name" : "ImageId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "ResetImageAttribute", + "description" : "Resets an attribute of an AMI to its default value. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ResetImageAttribute.html", + "ModifyImageAttribute", + "DescribeImageAttribute" + ], + "responseType" : "ResetImageAttributeResponse" + }, + "RegisterImage" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=RegisterImage&ImageLocation=mybucket-myimage.manifest.xml&AuthParams", + "exampleHTML" : "

        Example Request

        This example registers the AMI specified in the image.manifest.xml manifest file.

        https://ec2.amazonaws.com/?Action=RegisterImage&ImageLocation=mybucket-myimage.manifest.xml&AuthParams
        \n", + "contents" : [ + { + "desc" : "Full path to your AMI manifest in Amazon S3 storage.", + "name" : "ImageLocation", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "RegisterImage", + "description" : "Registers an AMI with Amazon EC2. Images must be registered before they can be launched. To launch instances, use the RunInstances operation. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RegisterImage.html", + "DescribeImages", + "DeregisterImage" + ], + "responseType" : "RegisterImageResponse" + } + } + }, + "Availability Zones and Regions" : { + "name" : "Availability Zones and Regions", + "queries" : { + "DescribeAvailabilityZones" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&ZoneName.0=us-east-1a&ZoneName.1=us-east-1b&ZoneName.1=us-east-1c&AuthParams", + "exampleHTML" : "

        Example Request

        This example displays information about Availability Zones that are available to the account.

        https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&ZoneName.0=us-east-1a&ZoneName.1=us-east-1b&ZoneName.1=us-east-1c&AuthParams
        \n", + "contents" : [ + { + "desc" : "Availability Zone name.", + "name" : "ZoneName", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DescribeAvailabilityZones", + "description" : "Displays Availability Zones that are currently available to the account and their states.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAvailabilityZones.html", + "RunInstances", + "DescribeRegions" + ], + "responseType" : "DescribeAvailabilityZonesResponse" + }, + "DescribeRegions" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeRegions&RegionName.0=us-east-1&RegionName.1=eu-west-1&AuthParams", + "exampleHTML" : "

        Example Request

        This example displays regions that are available to the account.

        https://ec2.amazonaws.com/?Action=DescribeRegions&RegionName.0=us-east-1&RegionName.1=eu-west-1&AuthParams
        \n", + "contents" : [ + { + "desc" : "Name of a region.", + "name" : "RegionName.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "Describes all regions available to the account." + } + ], + "type" : "DescribeRegions", + "description" : "Describes regions that are currently available to the account.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeRegions.html", + "DescribeAvailabilityZones", + "RunInstances" + ], + "responseType" : "DescribeRegionsResponse" + } + } + }, + "Windows" : { + "name" : "Windows", + "queries" : { + "CancelBundleTask" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=CancelBundleTask&BundleId=bun-cla322b9&AuthParams", + "exampleHTML" : "

        Example Request

        This example cancels the bun-cla322b9 bundle task.

        https://ec2.amazonaws.com/?Action=CancelBundleTask&BundleId=bun-cla322b9&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the bundle task to cancel.", + "name" : "BundleId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "CancelBundleTask", + "description" : "Cancels an Amazon EC2 bundling operation. For more information on bundling instances, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud Getting Started Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CancelBundleTask.html", + "BundleInstance", + "DescribeBundleTasks" + ], + "responseType" : "CancelBundleTaskResponse" + }, + "DescribeBundleTasks" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeBundleTasks&bundleId.0=bun-c1a540a8&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes the status of the bun-57a5403e bundle task.

        https://ec2.amazonaws.com/?Action=DescribeBundleTasks&bundleId.0=bun-c1a540a8&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the bundle task to describe.", + "name" : "BundleId", + "type" : "String", + "optional" : "true", + "defaultValue" : "If no ID is specified, all bundle tasks are described." + } + ], + "type" : "DescribeBundleTasks", + "description" : "Describes current bundling tasks. For more information on bundling instances, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud Getting Started Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeBundleTasks.html", + "BundleInstance", + "CancelBundleTask" + ], + "responseType" : "DescribeBundleTasksResponse" + }, + "BundleInstance" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=BundleInstance&InstanceId=-i-e468cd8d\n&Storage.S3.AWSAccessKeyId=10QMXFEV71ZS32XQFTR2\n&Storage.S3.Bucket=my-bucket\n&Storage.S3.Prefix=winami\n&Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl1dfQ%3D%3D\n&Storage.S3.UploadPolicySignature=w6BZu2oxGsiiLZnoBmQSErotuMA%3D\n&AuthParams", + "exampleHTML" : "

        Example Request

        This example bundles the i-e468cd8d instance.

        https://ec2.amazonaws.com/?Action=BundleInstance&InstanceId=-i-e468cd8d\n&Storage.S3.AWSAccessKeyId=10QMXFEV71ZS32XQFTR2\n&Storage.S3.Bucket=my-bucket\n&Storage.S3.Prefix=winami\n&Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl1dfQ%3D%3D\n&Storage.S3.UploadPolicySignature=w6BZu2oxGsiiLZnoBmQSErotuMA%3D\n&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the instance to bundle.", + "name" : "InstanceId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The Access Key ID of the owner of the Amazon S3 bucket.", + "name" : "Storage.S3.AWSAccessKeyId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : " The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.", + "name" : "Storage.S3.Bucket", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Specifies the beginning of the file name of the AMI.", + "name" : "Storage.S3.Prefix", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on the user's behalf. For more information on bundling in Windows, go to the ", + "name" : "Storage.S3.UploadPolicy", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : " The signature of the Base64 encoded JSON document.", + "name" : "Storage.S3.UploadPolicySignature", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "BundleInstance", + "description" : "Bundles the Windows instance. This procedure is not applicable for Linux and UNIX instances. For more information, go to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud Getting Started Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-BundleInstance.html", + "CancelBundleTask", + "DescribeBundleTasks" + ], + "responseType" : "BundleInstanceResponse" + } + } + }, + "Amazon DevPay" : { + "name" : "Amazon DevPay", + "queries" : { + "ConfirmProductInstance" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=ConfirmProductInstance&ProductCode=774F4FF8&InstanceId=i-10a64379&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes the confirms the product code is associated with the instance.

        https://ec2.amazonaws.com/?Action=ConfirmProductInstance&ProductCode=774F4FF8&InstanceId=i-10a64379&AuthParams
        \n", + "contents" : [ + { + "desc" : "The product code to confirm.", + "name" : "ProductCode", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The instance to confirm.", + "name" : "InstanceId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "ConfirmProductInstance", + "description" : "Verifies whether a Amazon DevPay product code is associated with an instance. This can only be executed by the owner of the AMI and is useful when an AMI owner wants to verify whether a user's instance is eligible for support.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ConfirmProductInstance.html", + "DescribeInstances", + "RunInstances" + ], + "responseType" : "ConfirmProductInstanceResponse" + } + } + }, + "General" : { + "name" : "General", + "queries" : { + "GetConsoleOutput" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=GetConsoleOutput&InstanceId=i-10a64379&AuthParams", + "exampleHTML" : "

        Example Request

        This example retrieves the console output for the i-10a64379 Linux and UNIX instance.

        https://ec2.amazonaws.com/?Action=GetConsoleOutput&InstanceId=i-10a64379&AuthParams
        \n", + "contents" : [ + { + "desc" : "ID of the instance for which you want console output.", + "name" : "InstanceId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "GetConsoleOutput", + "description" : "Retrieves console output for the specified instance. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-GetConsoleOutput.html", + "RunInstances" + ], + "responseType" : "GetConsoleOutputResponse" + } + } + }, + "Reserved Instances" : { + "name" : "Reserved Instances", + "queries" : { + "DescribeReservedInstances" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeReservedInstances&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes Reserved Instances owned by the account.

        https://ec2.amazonaws.com/?Action=DescribeReservedInstances&AuthParams
        \n", + "contents" : [ + { + "desc" : "IDs of the Reserved Instance to describe.", + "name" : "ReservedInstancesId.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DescribeReservedInstances", + "description" : "Describes Reserved Instances that you purchased. For more information about Reserved Instances, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstances.html", + "PurchaseReservedInstancesOffering", + "DescribeReservedInstancesOfferings" + ], + "responseType" : "DescribeReservedInstancesResponse" + }, + "DescribeReservedInstancesOfferings" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeReservedInstancesOfferings&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes available Reserved Instance offerings.

        https://ec2.amazonaws.com/?Action=DescribeReservedInstancesOfferings&AuthParams
        \n", + "contents" : [ + { + "desc" : "ID of the Reserved Instances to describe.", + "name" : "ReservedInstancesOfferingId", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The instance type on which the Reserved Instance can be used.", + "name" : "InstanceType", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The Availability Zone in which the Reserved Instance can be used.", + "name" : "AvailabilityZone", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The Reserved Instance description.", + "name" : "ProductDescription", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DescribeReservedInstancesOfferings", + "description" : "Describes Reserved Instance offerings that are available for purchase. With Amazon EC2 Reserved Instances, you purchase the right to launch Amazon EC2 instances for a period of time (without getting insufficient capacity errors) and pay a lower usage rate for the actual time used. For more information about Reserved Instances, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html", + "PurchaseReservedInstancesOffering", + "DescribeReservedInstances" + ], + "responseType" : "DescribeReservedInstancesOfferingsResponse" + }, + "PurchaseReservedInstancesOffering" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=PurchaseReservedInstancesOffering&OfferingId.1=offering-12345678&instanceCount.1=2&AuthParams", + "exampleHTML" : "

        Example Request

        This example purchases Reserved Instances.

        https://ec2.amazonaws.com/?Action=PurchaseReservedInstancesOffering&OfferingId.1=offering-12345678&instanceCount.1=2&AuthParams
        \n", + "contents" : [ + { + "desc" : "The offering ID of the Reserved Instance to purchase.", + "name" : "ReservedInstancesOfferingId.n", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The number of Reserved Instances to purchase.", + "name" : "InstanceCount.n", + "type" : "Integer", + "optional" : "true", + "defaultValue" : "1" + } + ], + "type" : "PurchaseReservedInstancesOffering", + "description" : "Purchases a Reserved Instance for use with your account. With Amazon EC2 Reserved Instances, you purchase the right to launch Amazon EC2 instances for a period of time (without getting insufficient capacity errors) and pay a lower usage rate for the actual time used. For more information about Reserved Instances, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-PurchaseReservedInstancesOffering.html", + "DescribeReservedInstancesOfferings", + "DescribeReservedInstances" + ], + "responseType" : "PurchaseReservedInstancesOfferingResponse" + } + } + }, + "Key Pairs" : { + "name" : "Key Pairs", + "queries" : { + "DescribeKeyPairs" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeKeyPairs&KeyName.1=gsg-keypair&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes the state of the gsg-keypair key.

        https://ec2.amazonaws.com/?Action=DescribeKeyPairs&KeyName.1=gsg-keypair&AuthParams
        \n", + "contents" : [ + { + "desc" : "Key pair to describe.", + "name" : "KeyName.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "Describes all key pairs available to the account." + } + ], + "type" : "DescribeKeyPairs", + "description" : "Returns information about key pairs available to you. If you specify key pairs, information about those key pairs is returned. Otherwise, information for all registered key pairs is returned.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html", + "DescribeAvailabilityZones", + "RunInstances" + ], + "responseType" : "DescribeKeyPairsResponse" + }, + "CreateKeyPair" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateKeyPair&KeyName=gsg-keypair.&AuthParams", + "exampleHTML" : "

        Example Request

        This example creates a key pair named gsg-keypair.

        https://ec2.amazonaws.com/?Action=CreateKeyPair&KeyName=gsg-keypair.&AuthParams
        \n", + "contents" : [ + { + "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", + "desc" : "A unique name for the key pair.", + "name" : "KeyName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "CreateKeyPair", + "description" : "Creates a new 2048-bit RSA key pair with the specified name. The public key is stored by Amazon EC2 and the private key is displayed on the console. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateKeyPair.html", + "RunInstances", + "DescribeKeyPairs", + "DeleteKeyPair" + ], + "responseType" : "CreateKeyPairResponse" + }, + "DeleteKeyPair" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteKeyPair&KeyName=gsg-keypair&AuthParams", + "exampleHTML" : "

        Example Request

        This example deletes the gsg-keypair key pair.

        https://ec2.amazonaws.com/?Action=DeleteKeyPair&KeyName=gsg-keypair&AuthParams
        \n", + "contents" : [ + { + "desc" : "Name of the key pair to delete.", + "name" : "KeyName", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DeleteKeyPair", + "description" : "Deletes the specified key pair, by removing the public key from Amazon EC2. You must own the key pair.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteKeyPair.html", + "CreateKeyPair", + "DescribeKeyPairs" + ], + "responseType" : "DeleteKeyPairResponse" + } + } + }, + "Elastic IP Addresses" : { + "name" : "Elastic IP Addresses", + "queries" : { + "AllocateAddress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=AllocateAddress&AuthParams", + "exampleHTML" : "

        Example Request

        This example returns an elastic IP address for use with the account.

        https://ec2.amazonaws.com/?Action=AllocateAddress&AuthParams
        \n", + "contents" : [ + { + "desc" : "Children: requestId, publicIp", + "name" : "AllocateAddressResponse", + "type" : "AllocateAddressResponse", + "optional" : "false" + }, + { + "desc" : "Children: None", + "name" : "requestId", + "type" : "xsd:string", + "optional" : "false" + }, + { + "desc" : "Children: None", + "name" : "publicIp", + "type" : "xsd:string", + "optional" : "false" + } + ], + "type" : "AllocateAddress", + "description" : "Acquires an elastic IP address for use with your account.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AllocateAddress.html", + "DescribeAddresses", + "ReleaseAddress", + "AssociateAddress", + "DisassociateAddress" + ], + "responseType" : "AllocateAddressResponse" + }, + "DisassociateAddress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DisassociateAddress&PublicIp=67.202.55.255&AuthParams", + "exampleHTML" : "

        Example Request

        This example disassociates the 67.202.55.255 IP address from the instance to which it is assigned.

        https://ec2.amazonaws.com/?Action=DisassociateAddress&PublicIp=67.202.55.255&AuthParams
        \n", + "contents" : [ + { + "desc" : "IP address that you are disassociating from the instance.", + "name" : "PublicIp", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DisassociateAddress", + "description" : "Disassociates the specified elastic IP address from the instance to which it is assigned. This is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an error.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DisassociateAddress.html", + "AllocateAddress", + "DescribeAddresses", + "ReleaseAddress", + "AssociateAddress" + ], + "responseType" : "DisassociateAddressResponse" + }, + "ReleaseAddress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=ReleaseAddress&PublicIp=67.202.55.255&AuthParams", + "exampleHTML" : "

        Example Request

        This example releases an elastic IP address associated with the account.

        https://ec2.amazonaws.com/?Action=ReleaseAddress&PublicIp=67.202.55.255&AuthParams
        \n", + "contents" : [ + { + "desc" : "The IP address that you are releasing from your account.", + "name" : "PublicIp", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "ReleaseAddress", + "description" : "Releases an elastic IP address associated with your account.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ReleaseAddress.html", + "AllocateAddress", + "DescribeAddresses", + "AssociateAddress", + "DisassociateAddress" + ], + "responseType" : "ReleaseAddressResponse" + }, + "AssociateAddress" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=AssociateAddress\n\t\t\t\t\t\t&InstanceId=i-2ea64347\n\t\t\t\t\t\t&PublicIp=67.202.55.255\n\t\t\t\t\t\t&AuthParams", + "exampleHTML" : "

        Example Request

        This example associates an IP address with an instance.

        https://ec2.amazonaws.com/?Action=AssociateAddress\n\t\t\t\t\t\t&InstanceId=i-2ea64347\n\t\t\t\t\t\t&PublicIp=67.202.55.255\n\t\t\t\t\t\t&AuthParams
        \n", + "contents" : [ + { + "desc" : "The instance to associate with the IP address.", + "name" : "InstanceId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "IP address that you are assigning to the instance.", + "name" : "PublicIp", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "AssociateAddress", + "description" : "Associates an elastic IP address with an instance. If the IP address is currently assigned to another instance, the IP address is assigned to the new instance. This is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an error.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AssociateAddress.html", + "AllocateAddress", + "DescribeAddresses", + "ReleaseAddress", + "DisassociateAddress" + ], + "responseType" : "AssociateAddressResponse" + }, + "DescribeAddresses" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeAddresses&PublicIp.1=67.202.55.255\n&PublicIp.1=67.202.55.233&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes elastic IP addresses assigned to the account. Amazon EC2 returns 67.202.55.255 which is assigned to instance i-f15ebb98 and 67.202.55.233 which is not assigned to an instance.

        https://ec2.amazonaws.com/?Action=DescribeAddresses&PublicIp.1=67.202.55.255\n&PublicIp.1=67.202.55.233&AuthParams
        \n", + "contents" : [ + { + "desc" : "Elastic IP address to describe.", + "name" : "PublicIp.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DescribeAddresses", + "description" : "Lists elastic IP addresses assigned to your account or provides information about a specific address.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html", + "AllocateAddress", + "ReleaseAddress" + ], + "responseType" : "DescribeAddressesResponse" + } + } + }, + "Elastic Block Store" : { + "name" : "Elastic Block Store", + "queries" : { + "DeleteVolume" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteVolume&VolumeId=vol-4282672b&AuthParams", + "exampleHTML" : "

        Example Request

        This example deletes volume vol-4282672b.

        https://ec2.amazonaws.com/?Action=DeleteVolume&VolumeId=vol-4282672b&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the volume to delete. The volume remains in the ", + "name" : "VolumeId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DeleteVolume", + "description" : "Deletes an Amazon EBS volume that you own. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteVolume.html", + "CreateVolume", + "DescribeVolumes", + "AttachVolume", + "DetachVolume" + ], + "responseType" : "DeleteVolumeResponse" + }, + "DescribeSnapshots" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeSnapshots&SnapshotId=snap-78a54011&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes snapshot snap-78a54011.

        https://ec2.amazonaws.com/?Action=DescribeSnapshots&SnapshotId=snap-78a54011&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the Amazon EBS snapshot.", + "name" : "SnapshotId.n", + "type" : "String", + "optional" : "true", + "defaultValue" : "Describes all snapshots that you own." + } + ], + "type" : "DescribeSnapshots", + "description" : "Describes the status of Amazon EBS snapshots. If no snapshots are specified, Amazon EBS returns information about all snapshots owned by the account. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html", + "CreateSnapshot", + "DeleteSnapshot" + ], + "responseType" : "DescribeSnapshotsResponse" + }, + "DescribeVolumes" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeVolumes&AuthParams", + "exampleHTML" : "

        Example Request

        This example describes all volumes associated with your account.

        https://ec2.amazonaws.com/?Action=DescribeVolumes&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the volume to list.", + "name" : "VolumeId", + "type" : "String", + "optional" : "true", + "defaultValue" : "Describes all volumes that you own." + } + ], + "type" : "DescribeVolumes", + "description" : "Describes the specified Amazon EBS volumes that you own. If you do not specify one or more volume IDs, Amazon EBS describes all volumes that you own. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html", + "CreateSnapshot", + "DeleteSnapshot" + ], + "responseType" : "DescribeVolumesResponse" + }, + "DetachVolume" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DetachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509&AuthParams", + "exampleHTML" : "

        Example Request

        This example detaches volume vol-4d826724.

        https://ec2.amazonaws.com/?Action=DetachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the volume.", + "name" : "VolumeId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The ID of the instance.", + "name" : "InstanceId", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "The device name.", + "name" : "Device", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + }, + { + "desc" : "Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data. If you use this option, you must perform file system check and repair procedures.", + "name" : "Force", + "type" : "String", + "optional" : "true", + "defaultValue" : "None" + } + ], + "type" : "DetachVolume", + "description" : "Detaches an Amazon EBS volume from an instance. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DetachVolume.html", + "CreateVolume", + "DeleteVolume", + "DescribeVolumes", + "AttachVolume" + ], + "responseType" : "DetachVolumeResponse" + }, + "AttachVolume" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=AttachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509\n&Device=/dev/sdh&AuthParams", + "exampleHTML" : "

        Example Request

        This example attaches volume vol-4d826724 to instance i-6058a509 and exposes it as /dev/sdh. For information on standard storage locations, go to the Amazon Elastic Compute Cloud Developer Guide.

        https://ec2.amazonaws.com/?Action=AttachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509\n&Device=/dev/sdh&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.", + "name" : "VolumeId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.", + "name" : "InstanceId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "Specifies how the device is exposed to the instance (e.g., /dev/sdh).", + "name" : "Device", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "AttachVolume", + "description" : "Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AttachVolume.html", + "CreateVolume", + "DeleteVolume", + "DescribeVolumes", + "DetachVolume" + ], + "responseType" : "AttachVolumeResponse" + }, + "CreateSnapshot" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateSnapshot&VolumeId=vol-4d826724&AuthParams", + "exampleHTML" : "

        Example Request

        This example creates a snapshot of volume vol-4d826724.

        https://ec2.amazonaws.com/?Action=CreateSnapshot&VolumeId=vol-4d826724&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the Amazon EBS volume to take a snapshot of.", + "name" : "VolumeId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "CreateSnapshot", + "description" : "Creates a snapshot of an Amazon EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make identical copies of instance devices, and to save data before shutting down an instance. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSnapshot.html", + "DeleteSnapshot", + "DescribeSnapshots" + ], + "responseType" : "CreateSnapshotResponse" + }, + "CreateVolume" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateVolume&Size=800&AvailabilityZone=us-east-1a&AuthParams", + "exampleHTML" : "

        Example Request

        This example creates a new 800 GiB volume in Availability Zone us-east-1a.

        https://ec2.amazonaws.com/?Action=CreateVolume&Size=800&AvailabilityZone=us-east-1a&AuthParams
        \n", + "contents" : [ + { + "constraints" : "1-1024", + "desc" : "The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot.", + "name" : "Size", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The snapshot from which to create the new volume.", + "name" : "SnapshotId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + }, + { + "desc" : "The Availability Zone in which to create the new volume.", + "name" : "AvailabilityZone", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "CreateVolume", + "description" : "Creates a new Amazon EBS volume to which any Amazon EC2 instance can attach within the same Availability Zone. For more information about Amazon EBS, go to the Amazon Elastic Compute Cloud Developer Guide. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html", + "DeleteVolume", + "DescribeVolumes", + "AttachVolume", + "DetachVolume", + "DescribeAvailabilityZones" + ], + "responseType" : "CreateVolumeResponse" + }, + "DeleteSnapshot" : { + "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteSnapshot&SnapshotId.1=snap-78a54011&AuthParams", + "exampleHTML" : "

        Example Request

        This example deletes snapshot snap-78a54011.

        https://ec2.amazonaws.com/?Action=DeleteSnapshot&SnapshotId.1=snap-78a54011&AuthParams
        \n", + "contents" : [ + { + "desc" : "The ID of the Amazon EBS snapshot to delete.", + "name" : "SnapshotId", + "type" : "String", + "optional" : "false", + "defaultValue" : "None" + } + ], + "type" : "DeleteSnapshot", + "description" : "Deletes a snapshot of an Amazon EBS volume that you own. For more information, go to the Amazon Elastic Compute Cloud Developer Guide. ", + "see" : [ + "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSnapshot.html", + "CreateSnapshot", + "DescribeSnapshots" + ], + "responseType" : "DeleteSnapshotResponse" + } + } + } + }, + "dataTypes" : { "ReservationSetType" : { "ancestor" : "DescribeInstancesResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a reservation.", "name" : "item", @@ -16,9 +1472,9 @@ ] }, "DeleteKeyPairResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DeleteKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DeleteKeyPairResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -33,14 +1489,13 @@ } ], "type" : "DeleteKeyPairResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteKeyPair.html" ] }, "DescribeKeyPairsResponseInfoType" : { "ancestor" : "DescribeKeyPairsResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a key pair.", "name" : "item", @@ -54,10 +1509,11 @@ ] }, "AuthorizeSecurityGroupIngressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <AuthorizeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</AuthorizeSecurityGroupIngressResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -70,14 +1526,13 @@ } ], "type" : "AuthorizeSecurityGroupIngressResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AuthorizeSecurityGroupIngress.html" ] }, "AttachmentSetItemResponseType" : { "ancestor" : "AttachmentSetResponseType", - "fields" : [ + "contents" : [ { "desc" : "Time stamp when the association was created.", "name" : "attachTime", @@ -116,8 +1571,9 @@ }, "DescribeAddressesResponseInfoType" : { "ancestor" : "DescribeAddressesResponse", - "fields" : [ + "contents" : [ { + "desc" : "Information about an instance.", "name" : "item", "type" : "DescribeAddressesResponseItemType", "optional" : "false" @@ -129,10 +1585,11 @@ ] }, "DescribeReservedInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n 4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8\n m1.small\n us-east-1a\n 12\n 0.00\n 0.00\n 19\n m1.small offering in us-east-1a\n Active\n \n \n\t\t\t\t\t\t", "exampleHTML" : "

        Example Response

        <DescribeReservedInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <reservedInstancesSet>\n    <item>\n      <reservedInstancesId>4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8</reservedInstancesId>\n      <instanceType>m1.small</instanceType>\n      <availabilityZone>us-east-1a</availabilityZone>\n      <duration>12</duration>\n      <usagePrice>0.00</usagePrice>\n      <fixedPrice>0.00</fixedPrice>\n      <instanceCount>19</instanceCount>\n      <productDescription>m1.small offering in us-east-1a</productDescription>\n      <state>Active</state>\n    </item>\n  </reservedInstancesSet>\n\t\t\t\t\t\t</DescribeReservedInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -145,14 +1602,13 @@ } ], "type" : "DescribeReservedInstancesResponse", - "exampleCode" : "\n \n \n 4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8\n m1.small\n us-east-1a\n 12\n 0.00\n 0.00\n 19\n m1.small offering in us-east-1a\n Active\n \n \n\t\t\t\t\t\t", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstances.html" ] }, "DescribeVolumesSetItemResponseType" : { "ancestor" : "DescribeVolumesSetResponseType", - "fields" : [ + "contents" : [ { "desc" : "Attachment set.", "name" : "attachmentSet", @@ -203,13 +1659,15 @@ }, "LaunchPermissionItemType" : { "ancestor" : "LaunchPermissionListType", - "fields" : [ + "contents" : [ { + "desc" : "Security groups associated with the launchPermission attribute. You can specify the all group, which will make it a public AMI.", "name" : "group", "type" : "xsd:string", "optional" : "false" }, { + "desc" : "User IDs associated with the launchPermission attribute.", "name" : "userId", "type" : "xsd:string", "optional" : "false" @@ -222,7 +1680,7 @@ }, "DescribeSnapshotsSetItemResponseType" : { "ancestor" : "DescribeSnapshotsSetResponseType", - "fields" : [ + "contents" : [ { "desc" : "The progress of the snapshot, in percentage.", "name" : "progress", @@ -261,7 +1719,7 @@ }, "RunningInstancesItemType" : { "ancestor" : "RunningInstancesSetType", - "fields" : [ + "contents" : [ { "desc" : " The AMI launch index, which can be used to find this instance within the launch group. For more information, go to the Metadata section of the Amazon Elastic Compute Cloud Developer Guide.", "name" : "amiLaunchIndex", @@ -289,12 +1747,7 @@ { "desc" : "The current state of the instance.", "name" : "instanceState", - "valueMap" : { - "shutting-down" : "the instance is shutting down", - "terminated" : "the instance terminated", - "pending" : "the instance is in the process of launching", - "running" : "the instance launched (although it the boot process might not be complete)" - }, + "type" : "xsd:string", "optional" : "false" }, { @@ -370,10 +1823,11 @@ ] }, "DescribeReservedInstancesOfferingsResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n 4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8\n m1.small\n us-east-1a\n 12\n 0.00\n 0.00\n m1.small offering in us-east-1a\n \n \n\t\t\t\t\t\t", "exampleHTML" : "

        Example Response

        <DescribeReservedInstancesOfferingsResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <reservedInstancesOfferingsSet>\n    <item>\n      <reservedInstancesOfferingId>4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8</reservedInstancesOfferingId>\n      <instanceType>m1.small</instanceType>\n      <availabilityZone>us-east-1a</availabilityZone>\n      <duration>12</duration>\n      <fixedPrice>0.00</fixedPrice>\n      <usagePrice>0.00</usagePrice>\n      <productDescription>m1.small offering in us-east-1a</productDescription>\n    </item>\n  </reservedInstancesOfferingsSet>\n\t\t\t\t\t\t</DescribeReservedInstancesOfferingsResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -386,14 +1840,13 @@ } ], "type" : "DescribeReservedInstancesOfferingsResponse", - "exampleCode" : "\n \n \n 4b2293b4-5813-4cc8-9ce3-1957fc1dcfc8\n m1.small\n us-east-1a\n 12\n 0.00\n 0.00\n m1.small offering in us-east-1a\n \n \n\t\t\t\t\t\t", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html" ] }, "BlockDeviceMappingType" : { "ancestor" : "DescribeImageAttributeResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for one block device mapping.", "name" : "item", @@ -407,9 +1860,9 @@ ] }, "ResetImageAttributeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <ResetImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</ResetImageAttributeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Unique ID of the newly registered machine image.", "name" : "imageId", @@ -424,14 +1877,13 @@ } ], "type" : "ResetImageAttributeResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ResetImageAttribute.html" ] }, "AvailabilityZoneSetType" : { "ancestor" : "DescribeAvailabilityZonesResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for one Availability Zone.", "name" : "item", @@ -445,10 +1897,11 @@ ] }, "RevokeSecurityGroupIngressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <RevokeSecurityGroupIngressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</RevokeSecurityGroupIngressResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -461,14 +1914,13 @@ } ], "type" : "RevokeSecurityGroupIngressResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RevokeSecurityGroupIngress.html" ] }, "ReservationInfoType" : { "ancestor" : "ReservationSetType", - "fields" : [ + "contents" : [ { "desc" : "Group set. ", "name" : "groupSet", @@ -500,9 +1952,9 @@ ] }, "RebootInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <RebootInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</RebootInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -517,14 +1969,13 @@ } ], "type" : "RebootInstancesResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RebootInstances.html" ] }, "GroupItemType" : { "ancestor" : "GroupSetType", - "fields" : [ + "contents" : [ { "desc" : "Name of the security group.", "name" : "groupId", @@ -539,7 +1990,7 @@ }, "AvailabilityZoneItemType" : { "ancestor" : "AvailabilityZoneSetType", - "fields" : [ + "contents" : [ { "desc" : "Name of the region.", "name" : "regionName", @@ -566,7 +2017,7 @@ }, "RunningInstancesSetType" : { "ancestor" : "ReservationInfoType", - "fields" : [ + "contents" : [ { "desc" : "Running instance set item.", "name" : "item", @@ -580,9 +2031,9 @@ ] }, "CreateSecurityGroupResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</CreateSecurityGroupResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -597,15 +2048,14 @@ } ], "type" : "CreateSecurityGroupResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSecurityGroup.html" ] }, "ReleaseAddressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <ReleaseAddressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</ReleaseAddressResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -620,14 +2070,13 @@ } ], "type" : "ReleaseAddressResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ReleaseAddress.html" ] }, "SecurityGroupItemType" : { "ancestor" : "SecurityGroupSetType", - "fields" : [ + "contents" : [ { "desc" : "Description of the security group.", "name" : "groupDescription", @@ -660,7 +2109,7 @@ }, "NullableAttributeValueType" : { "ancestor" : "DescribeImageAttributeResponse", - "fields" : [ + "contents" : [ { "desc" : "ID of the kernel or RAM disk.", "name" : "value", @@ -674,9 +2123,9 @@ ] }, "DescribeSnapshotsResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n snap-78a54011\n vol-4d826724\n pending\n 2008-05-07T12:51:50.000Z\n 80%\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeSnapshotsResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <snapshotSet>\n    <item>\n      <snapshotId>snap-78a54011</snapshotId>\n      <volumeId>vol-4d826724</volumeId>\n      <status>pending</status>\n      <startTime>2008-05-07T12:51:50.000Z</startTime>\n      <progress>80%</progress>\n    </item>\n  </snapshotSet>\n</DescribeSnapshotsResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -691,15 +2140,14 @@ } ], "type" : "DescribeSnapshotsResponse", - "exampleCode" : "\n \n \n snap-78a54011\n vol-4d826724\n pending\n 2008-05-07T12:51:50.000Z\n 80%\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html" ] }, "BundleInstanceResponse" : { - "ancestor" : "None", + "exampleCode" : "\n bun-c1a540a8\n \n i-12345678\n bun-c1a540a8\n bundling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 70%\n \n \n my-bucket\n winami\n \n \n \n", "exampleHTML" : "

        Example Response

        <BundleInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <requestId>bun-c1a540a8</requestId>\n  <bundleInstanceTask>\n      <instanceId>i-12345678</instanceId>\n      <bundleId>bun-c1a540a8</bundleId>\n      <state>bundling</state>\n      <startTime>2008-10-07T11:41:50.000Z</startTime>\n      <updateTime>2008-10-07T11:51:50.000Z</updateTime>\n      <progress>70%</progress>\n      <storage>\n        <S3>\n          <bucket>my-bucket</bucket>\n          <prefix>winami</prefix>\n        </S3>\n      </storage>\n  </bundleInstanceTask>\n</BundleInstanceResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Bundle task.", "name" : "bundleInstanceTask", @@ -714,14 +2162,13 @@ } ], "type" : "BundleInstanceResponse", - "exampleCode" : "\n bun-c1a540a8\n \n i-12345678\n bun-c1a540a8\n bundling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 70%\n \n \n my-bucket\n winami\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-BundleInstance.html" ] }, "DescribeKeyPairsResponseItemType" : { "ancestor" : "DescribeKeyPairsResponseInfoType", - "fields" : [ + "contents" : [ { "desc" : "A SHA-1 digest of the DER encoded private key.", "name" : "keyFingerprint", @@ -742,7 +2189,7 @@ }, "BundleInstanceTasksSetType" : { "ancestor" : "DescribeBundleTasksResponse", - "fields" : [ + "contents" : [ { "desc" : "Bundle task.", "name" : "bundleInstanceTask", @@ -757,13 +2204,15 @@ }, "DescribeAddressesResponseItemType" : { "ancestor" : "DescribeAddressesResponseInfoType", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the instance.", "name" : "instanceId", "type" : "xsd:string", "optional" : "false" }, { + "desc" : "The public IP address.", "name" : "publicIp", "type" : "xsd:string", "optional" : "false" @@ -775,9 +2224,9 @@ ] }, "MonitorInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n i-43a4412a\n \n pending\n \n \n \n i-23a3397d\n \n pending\n \n \n \n", "exampleHTML" : "

        Example Response

        <MonitorInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n    <instancesSet>\n      <item>\n        <instanceId>i-43a4412a</instanceId>\n        <monitoring>\n          <state>pending</state>\n        </monitoring>\n    </item>\n    <item>\n      <instanceId>i-23a3397d</instanceId>\n        <monitoring>\n          <state>pending</state>\n        </monitoring>\n      </item>\n    </instancesSet>\n</MonitorInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Monitor instance response set.", "name" : "instancesSet", @@ -785,21 +2234,21 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" } ], "type" : "MonitorInstancesResponse", - "exampleCode" : "\n \n \n i-43a4412a\n \n pending\n \n \n \n i-23a3397d\n \n pending\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-MonitorInstances.html" ] }, "DescribeImagesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n ami-be3adfd7\n ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml\n \n available\n 206029621532\n false\n i386\n machine\n aki-4438dd2d\n ari-4538dd2c\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <imagesSet>\n    <item>\n      <imageId>ami-be3adfd7</imageId>\n      <imageLocation>ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml\n      </imageLocation>\n      <imageState>available</imageState>\n      <imageOwnerId>206029621532</imageOwnerId>\n      <isPublic>false</isPublic>\n      <architecture>i386</architecture>\n      <imageType>machine</imageType>\n      <kernelId>aki-4438dd2d</kernelId>\n      <ramdiskId>ari-4538dd2c</ramdiskId>\n    </item>\n  </imagesSet>\n</DescribeImagesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Image set.", "name" : "imagesSet", @@ -814,14 +2263,13 @@ } ], "type" : "DescribeImagesResponse", - "exampleCode" : "\n \n \n ami-be3adfd7\n ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml\n \n available\n 206029621532\n false\n i386\n machine\n aki-4438dd2d\n ari-4538dd2c\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html" ] }, "MonitorInstancesResponseSetItemType" : { "ancestor" : "MonitorInstancesResponseSetType", - "fields" : [ + "contents" : [ { "desc" : "Instance ID.", "name" : "instanceId", @@ -842,7 +2290,7 @@ }, "BundleInstanceTaskErrorType" : { "ancestor" : "BundleInstanceTaskType", - "fields" : [ + "contents" : [ { "desc" : "Error code.", "name" : "code", @@ -863,7 +2311,7 @@ }, "ProductCodesSetType" : { "ancestor" : "DescribeImagesResponseItemType", - "fields" : [ + "contents" : [ { "desc" : "Information for one product code.", "name" : "item", @@ -877,9 +2325,9 @@ ] }, "UnmonitorInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n\t \n\t i-43a4412a\n\t \n\t pending\n\t \n\t \n\t \n\t i-23a3397d\n\t \n\t pending\n\t \n\t \n \n", "exampleHTML" : "

        Example Response

        <UnmonitorInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n    <instancesSet>\n\t  <item>\n\t    <instanceId> i-43a4412a</instanceId>\n\t    <monitoring>\n\t      <state>pending</state>\n\t    </monitoring>\n\t  </item>\n\t  <item>\n\t    <instanceId>i-23a3397d</instanceId>\n\t    <monitoring>\n\t      <state>pending</state>\n\t    </monitoring>\n\t  </item>\n    </instancesSet>\n</UnmonitorInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Monitor instance response set.", "name" : "instancesSet", @@ -887,20 +2335,20 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" } ], "type" : "UnmonitorInstancesResponse", - "exampleCode" : "\n \n\t \n\t i-43a4412a\n\t \n\t pending\n\t \n\t \n\t \n\t i-23a3397d\n\t \n\t pending\n\t \n\t \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-UnmonitorInstances.html" ] }, "IpPermissionType" : { "ancestor" : "IpPermissionSetType", - "fields" : [ + "contents" : [ { "desc" : "Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).", "name" : "fromPort", @@ -951,7 +2399,7 @@ }, "IpPermissionSetType" : { "ancestor" : "AuthorizeSecurityGroupIngress", - "fields" : [ + "contents" : [ { "desc" : "Set of IP permissions.", "name" : "item", @@ -965,9 +2413,9 @@ ] }, "DeleteSecurityGroupResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DeleteSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DeleteSecurityGroupResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -982,15 +2430,14 @@ } ], "type" : "DeleteSecurityGroupResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html" ] }, "RunInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n r-47a5402e\n AIDADH4IGTRXXKCD\n \n \n default\n \n \n \n \n i-2ba64342\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 0\n m1.small\n 2007-08-07T11:51:50.000Z\n \n us-east-1b\n \n \n true\n \n\n \n \n i-2bc64242\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 1\n m1.small\n 2007-08-07T11:51:50.000Z\n \n\t\t us-east-1b\n \n \n true\n \n \n \n i-2be64332\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 2\n m1.small\n 2007-08-07T11:51:50.000Z\n \n\t\t us-east-1b\n \n \n true\n \n \n \n", "exampleHTML" : "

        Example Response

        <RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <reservationId>r-47a5402e</reservationId>\n  <ownerId>AIDADH4IGTRXXKCD</ownerId>\n  <groupSet>\n    <item>\n      <groupId>default</groupId>\n    </item>\n  </groupSet>\n  <instancesSet>\n    <item>\n      <instanceId>i-2ba64342</instanceId>\n      <imageId>ami-60a54009</imageId>\n      <instanceState>\n        <code>0</code>\n        <name>pending</name>\n      </instanceState>\n      <privateDnsName></privateDnsName>\n      <dnsName></dnsName>\n      <keyName>example-key-name</keyName>\n      <amiLaunchIndex>0</amiLaunchIndex>\n      <instanceType>m1.small</instanceType>\n      <launchTime>2007-08-07T11:51:50.000Z</launchTime>\n      <placement>\n        <availabilityZone>us-east-1b</availabilityZone>\n      </placement>\n      <monitoring>\n        <enabled>true</enabled>\n      </monitoring>\n\n    </item>\n    <item>\n      <instanceId>i-2bc64242</instanceId>\n      <imageId>ami-60a54009</imageId>\n      <instanceState>\n        <code>0</code>\n        <name>pending</name>\n      </instanceState>\n      <privateDnsName></privateDnsName>\n      <dnsName></dnsName>\n      <keyName>example-key-name</keyName>\n      <amiLaunchIndex>1</amiLaunchIndex>\n      <instanceType>m1.small</instanceType>\n      <launchTime>2007-08-07T11:51:50.000Z</launchTime>\n      <placement>\n\t\t  <availabilityZone>us-east-1b</availabilityZone>\n      </placement>\n      <monitoring>\n        <enabled>true</enabled>\n      </monitoring>\n    </item>\n    <item>\n      <instanceId>i-2be64332</instanceId>\n      <imageId>ami-60a54009</imageId>\n      <instanceState>\n        <code>0</code>\n        <name>pending</name>\n      </instanceState>\n      <privateDnsName></privateDnsName>\n      <dnsName></dnsName>\n      <keyName>example-key-name</keyName>\n      <amiLaunchIndex>2</amiLaunchIndex>\n      <instanceType>m1.small</instanceType>\n      <launchTime>2007-08-07T11:51:50.000Z</launchTime>\n      <placement>\n\t\t  <availabilityZone>us-east-1b</availabilityZone>\n      </placement>\n      <monitoring>\n        <enabled>true</enabled>\n      </monitoring>\n    </item>\n  </instancesSet>\n</RunInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Group set. ", "name" : "groupSet", @@ -1016,6 +2463,7 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -1028,15 +2476,14 @@ } ], "type" : "RunInstancesResponse", - "exampleCode" : "\n r-47a5402e\n AIDADH4IGTRXXKCD\n \n \n default\n \n \n \n \n i-2ba64342\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 0\n m1.small\n 2007-08-07T11:51:50.000Z\n \n us-east-1b\n \n \n true\n \n\n \n \n i-2bc64242\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 1\n m1.small\n 2007-08-07T11:51:50.000Z\n \n\t\t us-east-1b\n \n \n true\n \n \n \n i-2be64332\n ami-60a54009\n \n 0\n pending\n \n \n \n example-key-name\n 2\n m1.small\n 2007-08-07T11:51:50.000Z\n \n\t\t us-east-1b\n \n \n true\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html" ] }, "DeregisterImageResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DeregisterImageResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DeregisterImageResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -1051,15 +2498,14 @@ } ], "type" : "DeregisterImageResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html" ] }, "TerminateInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n i-3ea74257\n \n 32\n shutting-down\n \n \n 16\n running\n \n \n \n", "exampleHTML" : "

        Example Response

        <TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <instancesSet>\n    <item>\n      <instanceId>i-3ea74257</instanceId>\n      <shutdownState>\n        <code>32</code>\n        <name>shutting-down</name>\n      </shutdownState>\n      <previousState>\n        <code>16</code>\n        <name>running</name>\n      </previousState>\n    </item>\n  </instancesSet>\n</TerminateInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Instances set.", "name" : "instancesSet", @@ -1067,20 +2513,20 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" } ], "type" : "TerminateInstancesResponse", - "exampleCode" : "\n \n \n i-3ea74257\n \n 32\n shutting-down\n \n \n 16\n running\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-TerminateInstances.html" ] }, "DescribeSnapshotsSetResponseType" : { "ancestor" : "DescribeSnapshotsResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a snapshot.", "name" : "item", @@ -1095,7 +2541,7 @@ }, "DescribeReservedInstancesOfferingsResponseSetType" : { "ancestor" : "DescribeReservedInstancesOfferingsResponse", - "fields" : [ + "contents" : [ { "desc" : "Reserved Instance offerings set.", "name" : "item", @@ -1110,7 +2556,7 @@ }, "BundleInstanceTaskType" : { "ancestor" : "BundleInstanceResponse", - "fields" : [ + "contents" : [ { "desc" : "Identifier for this task.", "name" : "bundleId", @@ -1166,9 +2612,9 @@ ] }, "ConfirmProductInstanceResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n 254933287430\n", "exampleHTML" : "

        Example Response

        <ConfirmProductInstanceResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n  <ownerId>254933287430</ownerId>\n</ConfirmProductInstanceResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The instance owner's account ID. Only present if the product code is attached to the instance.", "name" : "ownerId", @@ -1189,15 +2635,14 @@ } ], "type" : "ConfirmProductInstanceResponse", - "exampleCode" : "\n true\n 254933287430\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ConfirmProductInstance.html" ] }, "CreateKeyPairResponse" : { - "ancestor" : "None", + "exampleCode" : "\n gsg-keypair\n 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f\n -----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp\nHungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg\n5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHVbicL5E+g45zfB95wIyywWZfeW/UUF3LpGZyq/\nebIUlq1qTbHkLbCC2r7RTn8vpQWp47BGVYGtGSBMpTRP5hnbzzuqj3itkiLHjU39S2sJCJ0TrJx5\ni8BygR4s3mHKBj8l+ePQxG1kGbF6R4yg6sECmXn17MRQVXODNHZbAgMBAAECggEAY1tsiUsIwDl5\n91CXirkYGuVfLyLflXenxfI50mDFms/mumTqloHO7tr0oriHDR5K7wMcY/YY5YkcXNo7mvUVD1pM\nZNUJs7rw9gZRTrf7LylaJ58kOcyajw8TsC4e4LPbFaHwS1d6K8rXh64o6WgW4SrsB6ICmr1kGQI7\n3wcfgt5ecIu4TZf0OE9IHjn+2eRlsrjBdeORi7KiUNC/pAG23I6MdDOFEQRcCSigCj+4/mciFUSA\nSWS4dMbrpb9FNSIcf9dcLxVM7/6KxgJNfZc9XWzUw77Jg8x92Zd0fVhHOux5IZC+UvSKWB4dyfcI\ntE8C3p9bbU9VGyY5vLCAiIb4qQKBgQDLiO24GXrIkswF32YtBBMuVgLGCwU9h9HlO9mKAc2m8Cm1\njUE5IpzRjTedc9I2qiIMUTwtgnw42auSCzbUeYMURPtDqyQ7p6AjMujp9EPemcSVOK9vXYL0Ptco\nxW9MC0dtV6iPkCN7gOqiZXPRKaFbWADp16p8UAIvS/a5XXk5jwKBgQCKkpHi2EISh1uRkhxljyWC\niDCiK6JBRsMvpLbc0v5dKwP5alo1fmdR5PJaV2qvZSj5CYNpMAy1/EDNTY5OSIJU+0KFmQbyhsbm\nrdLNLDL4+TcnT7c62/aH01ohYaf/VCbRhtLlBfqGoQc7+sAc8vmKkesnF7CqCEKDyF/dhrxYdQKB\ngC0iZzzNAapayz1+JcVTwwEid6j9JqNXbBc+Z2YwMi+T0Fv/P/hwkX/ypeOXnIUcw0Ih/YtGBVAC\nDQbsz7LcY1HqXiHKYNWNvXgwwO+oiChjxvEkSdsTTIfnK4VSCvU9BxDbQHjdiNDJbL6oar92UN7V\nrBYvChJZF7LvUH4YmVpHAoGAbZ2X7XvoeEO+uZ58/BGKOIGHByHBDiXtzMhdJr15HTYjxK7OgTZm\ngK+8zp4L9IbvLGDMJO8vft32XPEWuvI8twCzFH+CsWLQADZMZKSsBasOZ/h1FwhdMgCMcY+Qlzd4\nJZKjTSu3i7vhvx6RzdSedXEMNTZWN4qlIx3kR5aHcukCgYA9T+Zrvm1F0seQPbLknn7EqhXIjBaT\nP8TTvW/6bdPi23ExzxZn7KOdrfclYRph1LHMpAONv/x2xALIf91UB+v5ohy1oDoasL0gij1houRe\n2ERKKdwz0ZL9SWq6VTdhr/5G994CK72fy5WhyERbDjUIdHaK3M849JJuf8cSrvSb4g==\n-----END RSA PRIVATE KEY-----\n", "exampleHTML" : "

        Example Response

        <CreateKeyPairResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <keyName>gsg-keypair</keyName>\n  <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>\n  <keyMaterial>-----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp\nHungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg\n5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHVbicL5E+g45zfB95wIyywWZfeW/UUF3LpGZyq/\nebIUlq1qTbHkLbCC2r7RTn8vpQWp47BGVYGtGSBMpTRP5hnbzzuqj3itkiLHjU39S2sJCJ0TrJx5\ni8BygR4s3mHKBj8l+ePQxG1kGbF6R4yg6sECmXn17MRQVXODNHZbAgMBAAECggEAY1tsiUsIwDl5\n91CXirkYGuVfLyLflXenxfI50mDFms/mumTqloHO7tr0oriHDR5K7wMcY/YY5YkcXNo7mvUVD1pM\nZNUJs7rw9gZRTrf7LylaJ58kOcyajw8TsC4e4LPbFaHwS1d6K8rXh64o6WgW4SrsB6ICmr1kGQI7\n3wcfgt5ecIu4TZf0OE9IHjn+2eRlsrjBdeORi7KiUNC/pAG23I6MdDOFEQRcCSigCj+4/mciFUSA\nSWS4dMbrpb9FNSIcf9dcLxVM7/6KxgJNfZc9XWzUw77Jg8x92Zd0fVhHOux5IZC+UvSKWB4dyfcI\ntE8C3p9bbU9VGyY5vLCAiIb4qQKBgQDLiO24GXrIkswF32YtBBMuVgLGCwU9h9HlO9mKAc2m8Cm1\njUE5IpzRjTedc9I2qiIMUTwtgnw42auSCzbUeYMURPtDqyQ7p6AjMujp9EPemcSVOK9vXYL0Ptco\nxW9MC0dtV6iPkCN7gOqiZXPRKaFbWADp16p8UAIvS/a5XXk5jwKBgQCKkpHi2EISh1uRkhxljyWC\niDCiK6JBRsMvpLbc0v5dKwP5alo1fmdR5PJaV2qvZSj5CYNpMAy1/EDNTY5OSIJU+0KFmQbyhsbm\nrdLNLDL4+TcnT7c62/aH01ohYaf/VCbRhtLlBfqGoQc7+sAc8vmKkesnF7CqCEKDyF/dhrxYdQKB\ngC0iZzzNAapayz1+JcVTwwEid6j9JqNXbBc+Z2YwMi+T0Fv/P/hwkX/ypeOXnIUcw0Ih/YtGBVAC\nDQbsz7LcY1HqXiHKYNWNvXgwwO+oiChjxvEkSdsTTIfnK4VSCvU9BxDbQHjdiNDJbL6oar92UN7V\nrBYvChJZF7LvUH4YmVpHAoGAbZ2X7XvoeEO+uZ58/BGKOIGHByHBDiXtzMhdJr15HTYjxK7OgTZm\ngK+8zp4L9IbvLGDMJO8vft32XPEWuvI8twCzFH+CsWLQADZMZKSsBasOZ/h1FwhdMgCMcY+Qlzd4\nJZKjTSu3i7vhvx6RzdSedXEMNTZWN4qlIx3kR5aHcukCgYA9T+Zrvm1F0seQPbLknn7EqhXIjBaT\nP8TTvW/6bdPi23ExzxZn7KOdrfclYRph1LHMpAONv/x2xALIf91UB+v5ohy1oDoasL0gij1houRe\n2ERKKdwz0ZL9SWq6VTdhr/5G994CK72fy5WhyERbDjUIdHaK3M849JJuf8cSrvSb4g==\n-----END RSA PRIVATE KEY-----</keyMaterial>\n</CreateKeyPairResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "A SHA-1 digest of the DER encoded private key.", "name" : "keyFingerprint", @@ -1224,15 +2669,14 @@ } ], "type" : "CreateKeyPairResponse", - "exampleCode" : "\n gsg-keypair\n 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f\n -----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQBuLFg5ujHrtm1jnutSuoO8Xe56LlT+HM8v/xkaa39EstM3/aFxTHgElQiJLChp\nHungXQ29VTc8rc1bW0lkdi23OH5eqkMHGhvEwqa0HWASUMll4o3o/IX+0f2UcPoKCOVUR+jx71Sg\n5AU52EQfanIn3ZQ8lFW7Edp5a3q4DhjGlUKToHVbicL5E+g45zfB95wIyywWZfeW/UUF3LpGZyq/\nebIUlq1qTbHkLbCC2r7RTn8vpQWp47BGVYGtGSBMpTRP5hnbzzuqj3itkiLHjU39S2sJCJ0TrJx5\ni8BygR4s3mHKBj8l+ePQxG1kGbF6R4yg6sECmXn17MRQVXODNHZbAgMBAAECggEAY1tsiUsIwDl5\n91CXirkYGuVfLyLflXenxfI50mDFms/mumTqloHO7tr0oriHDR5K7wMcY/YY5YkcXNo7mvUVD1pM\nZNUJs7rw9gZRTrf7LylaJ58kOcyajw8TsC4e4LPbFaHwS1d6K8rXh64o6WgW4SrsB6ICmr1kGQI7\n3wcfgt5ecIu4TZf0OE9IHjn+2eRlsrjBdeORi7KiUNC/pAG23I6MdDOFEQRcCSigCj+4/mciFUSA\nSWS4dMbrpb9FNSIcf9dcLxVM7/6KxgJNfZc9XWzUw77Jg8x92Zd0fVhHOux5IZC+UvSKWB4dyfcI\ntE8C3p9bbU9VGyY5vLCAiIb4qQKBgQDLiO24GXrIkswF32YtBBMuVgLGCwU9h9HlO9mKAc2m8Cm1\njUE5IpzRjTedc9I2qiIMUTwtgnw42auSCzbUeYMURPtDqyQ7p6AjMujp9EPemcSVOK9vXYL0Ptco\nxW9MC0dtV6iPkCN7gOqiZXPRKaFbWADp16p8UAIvS/a5XXk5jwKBgQCKkpHi2EISh1uRkhxljyWC\niDCiK6JBRsMvpLbc0v5dKwP5alo1fmdR5PJaV2qvZSj5CYNpMAy1/EDNTY5OSIJU+0KFmQbyhsbm\nrdLNLDL4+TcnT7c62/aH01ohYaf/VCbRhtLlBfqGoQc7+sAc8vmKkesnF7CqCEKDyF/dhrxYdQKB\ngC0iZzzNAapayz1+JcVTwwEid6j9JqNXbBc+Z2YwMi+T0Fv/P/hwkX/ypeOXnIUcw0Ih/YtGBVAC\nDQbsz7LcY1HqXiHKYNWNvXgwwO+oiChjxvEkSdsTTIfnK4VSCvU9BxDbQHjdiNDJbL6oar92UN7V\nrBYvChJZF7LvUH4YmVpHAoGAbZ2X7XvoeEO+uZ58/BGKOIGHByHBDiXtzMhdJr15HTYjxK7OgTZm\ngK+8zp4L9IbvLGDMJO8vft32XPEWuvI8twCzFH+CsWLQADZMZKSsBasOZ/h1FwhdMgCMcY+Qlzd4\nJZKjTSu3i7vhvx6RzdSedXEMNTZWN4qlIx3kR5aHcukCgYA9T+Zrvm1F0seQPbLknn7EqhXIjBaT\nP8TTvW/6bdPi23ExzxZn7KOdrfclYRph1LHMpAONv/x2xALIf91UB+v5ohy1oDoasL0gij1houRe\n2ERKKdwz0ZL9SWq6VTdhr/5G994CK72fy5WhyERbDjUIdHaK3M849JJuf8cSrvSb4g==\n-----END RSA PRIVATE KEY-----\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateKeyPair.html" ] }, "RegisterImageResponse" : { - "ancestor" : "None", + "exampleCode" : "\n ami-61a54008\n", "exampleHTML" : "

        Example Response

        <RegisterImageResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <imageId>ami-61a54008</imageId>\n</RegisterImageResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Unique ID of the newly registered machine image.", "name" : "imageId", @@ -1247,14 +2691,13 @@ } ], "type" : "RegisterImageResponse", - "exampleCode" : "\n ami-61a54008\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RegisterImage.html" ] }, "IpRangeSetType" : { "ancestor" : "IpPermissionType", - "fields" : [ + "contents" : [ { "desc" : "Information for one IP range.", "name" : "item", @@ -1269,7 +2712,7 @@ }, "RegionSetType" : { "ancestor" : "DescribeRegionsResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a region.", "name" : "item", @@ -1284,28 +2727,28 @@ }, "InstanceStateType" : { "ancestor" : "TerminateInstancesResponseItemType", - "fields" : [ + "contents" : [ { - "desc" : "A 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented:", + "desc" : "", "name" : "code", + "optional" : "false", "valueMap" : { "32" : "shutting-down", "0" : "pending", "16" : "running", "48" : "terminated" - }, - "optional" : "false" + } }, { - "desc" : "The current state of the instance.", + "desc" : "", "name" : "name", + "optional" : "false", "valueMap" : { "shutting-down" : "the instance started shutting down", "terminated" : "the instance terminated", "pending" : "the instance is in the process of being launched", "running" : "the instance launched (although the boot process might not be completed)" - }, - "optional" : "false" + } } ], "type" : "InstanceStateType", @@ -1315,7 +2758,7 @@ }, "DescribeReservedInstancesOfferingsResponseSetItemType" : { "ancestor" : "DescribeReservedInstancesOfferingsResponseSetType", - "fields" : [ + "contents" : [ { "desc" : "The Availability Zone in which the Reserved Instance can be used.", "name" : "availabilityZone", @@ -1366,7 +2809,7 @@ }, "BundleInstanceS3StorageType" : { "ancestor" : "BundleInstanceTaskStorageType", - "fields" : [ + "contents" : [ { "desc" : "The Access Key ID of the owner of the Amazon S3 bucket.", "name" : "awsAccessKeyId", @@ -1410,9 +2853,9 @@ ] }, "DescribeVolumesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n\n \n vol-4282672b\n 800\n \n us-east-1a\n in-use\n 2008-05-07T11:51:50.000Z\n \n \n vol-4282672b\n i-6058a509\n /dev/sdh\n attached\n 2008-05-07T12:51:50.000Z\n \n \n \n", "exampleHTML" : "

        Example Response

        <DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n<volumeSet>\n  <item>\n    <volumeId>vol-4282672b</volumeId>\n    <size>800</size>\n    <snapshotId/>\n    <availabilityZone>us-east-1a</availabilityZone>\n    <status>in-use</status>\n    <createTime>2008-05-07T11:51:50.000Z</createTime>\n    <attachmentSet>\n      <item>\n        <volumeId>vol-4282672b</volumeId>\n        <instanceId>i-6058a509</instanceId>\n        <device>/dev/sdh</device>\n        <status>attached</status>\n        <attachTime>2008-05-07T12:51:50.000Z</attachTime>\n      </item>\n    </attachmentSet>\n  </item>\n</DescribeVolumesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -1427,14 +2870,13 @@ } ], "type" : "DescribeVolumesResponse", - "exampleCode" : "\n\n \n vol-4282672b\n 800\n \n us-east-1a\n in-use\n 2008-05-07T11:51:50.000Z\n \n \n vol-4282672b\n i-6058a509\n /dev/sdh\n attached\n 2008-05-07T12:51:50.000Z\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html" ] }, "TerminateInstancesResponseInfoType" : { "ancestor" : "TerminateInstancesResponse", - "fields" : [ + "contents" : [ { "desc" : "Response item.", "name" : "item", @@ -1448,9 +2890,9 @@ ] }, "DeleteSnapshotResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DeleteSnapshotResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DeleteSnapshotResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -1465,14 +2907,13 @@ } ], "type" : "DeleteSnapshotResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSnapshot.html" ] }, "BundleInstanceTaskStorageType" : { "ancestor" : "BundleInstance", - "fields" : [ + "contents" : [ { "desc" : "Amazon S3 storage location.", "name" : "S3", @@ -1486,9 +2927,9 @@ ] }, "DescribeAvailabilityZonesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n us-east-1a\n available\n \n \n us-east-1b\n available\n \n \n us-east-1c\n available\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeAvailabilityZonesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <availabilityZoneInfo>\n    <item>\n      <zoneName>us-east-1a</zoneName>\n      <zoneState>available</zoneState>\n    </item>\n    <item>\n      <zoneName>us-east-1b</zoneName>\n      <zoneState>available</zoneState>\n    </item>\n    <item>\n      <zoneName>us-east-1c</zoneName>\n      <zoneState>available</zoneState>\n    </item>\n  </availabilityZoneInfo>\n</DescribeAvailabilityZonesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Availability Zone information.", "name" : "availabilityZoneInfo", @@ -1503,15 +2944,14 @@ } ], "type" : "DescribeAvailabilityZonesResponse", - "exampleCode" : "\n \n \n us-east-1a\n available\n \n \n us-east-1b\n available\n \n \n us-east-1c\n available\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAvailabilityZones.html" ] }, "CreateVolumeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n vol-4d826724\n 800\n creating\n 2008-05-07T11:51:50.000Z\n us-east-1a\n \n", "exampleHTML" : "

        Example Response

        <CreateVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <volumeId>vol-4d826724</volumeId>\n  <size>800</size>\n  <status>creating</status>\n  <createTime>2008-05-07T11:51:50.000Z</createTime>\n  <availabilityZone>us-east-1a</availabilityZone>\n  <snapshotId></snapshotId>\n</CreateVolumeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Availability Zone in which the volume was created.", "name" : "availabilityZone", @@ -1556,14 +2996,13 @@ } ], "type" : "CreateVolumeResponse", - "exampleCode" : "\n vol-4d826724\n 800\n creating\n 2008-05-07T11:51:50.000Z\n us-east-1a\n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html" ] }, "DescribeReservedInstancesResponseSetType" : { "ancestor" : "DescribeReservedInstancesResponse", - "fields" : [ + "contents" : [ { "desc" : "Reserved Instance set.", "name" : "item", @@ -1577,29 +3016,30 @@ ] }, "DescribeAddressesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n i-f15ebb98\n 67.202.55.255\n \n \n 67.202.55.233\n \n \n\t\t\t\t\t\t", "exampleHTML" : "

        Example Response

        <DescribeAddressesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <addressesSet>\n    <item>\n      <instanceId>i-f15ebb98</instanceId>\n      <publicIp>67.202.55.255</publicIp>\n    </item>\n    <item>\n      <publicIp>67.202.55.233</publicIp>\n    </item>\n  </addressesSet>\n\t\t\t\t\t\t</DescribeAddressesResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The set of IP addresses.", "name" : "addressesSet", "type" : "DescribeAddressesResponseInfoType", "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" } ], "type" : "DescribeAddressesResponse", - "exampleCode" : "\n \n \n i-f15ebb98\n 67.202.55.255\n \n \n 67.202.55.233\n \n \n\t\t\t\t\t\t", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html" ] }, "InstanceMonitoringStateType" : { "ancestor" : "RunningInstancesItemType", - "fields" : [ + "contents" : [ { "desc" : "State of monitoring for the instance.", "name" : "state", @@ -1613,9 +3053,9 @@ ] }, "DetachVolumeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n vol-4d826724\n i-6058a509\n /dev/sdh\n detaching\n 2008-05-08T11:51:50.000Z\n", "exampleHTML" : "

        Example Response

        <DetachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <volumeId>vol-4d826724</volumeId>\n  <instanceId>i-6058a509</instanceId>\n  <device>/dev/sdh</device>\n  <status>detaching</status>\n  <attachTime>2008-05-08T11:51:50.000Z</attachTime>\n</DetachVolumeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Time stamp when the association was created.", "name" : "attachTime", @@ -1654,15 +3094,14 @@ } ], "type" : "DetachVolumeResponse", - "exampleCode" : "\n vol-4d826724\n i-6058a509\n /dev/sdh\n detaching\n 2008-05-08T11:51:50.000Z\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DetachVolume.html" ] }, "DescribeKeyPairsResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n gsg-keypair\n 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeKeyPairsResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <keySet>\n    <item>\n      <keyName>gsg-keypair</keyName>\n      <keyFingerprint>1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f</keyFingerprint>\n    </item>\n  </keySet>\n</DescribeKeyPairsResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Information for a key pair.", "name" : "keySet", @@ -1677,15 +3116,14 @@ } ], "type" : "DescribeKeyPairsResponse", - "exampleCode" : "\n \n \n gsg-keypair\n 1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html" ] }, "AttachVolumeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n vol-4d826724\n i-6058a509\n /dev/sdh\n attaching\n 2008-05-07T11:51:50.000Z\n", "exampleHTML" : "

        Example Response

        <AttachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <volumeId>vol-4d826724</volumeId>\n  <instanceId>i-6058a509</instanceId>\n  <device>/dev/sdh</device>\n  <status>attaching</status>\n  <attachTime>2008-05-07T11:51:50.000Z</attachTime>\n</AttachVolumeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Time stamp when the attachment was initiated.", "name" : "attachTime", @@ -1705,6 +3143,7 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -1723,15 +3162,14 @@ } ], "type" : "AttachVolumeResponse", - "exampleCode" : "\n vol-4d826724\n i-6058a509\n /dev/sdh\n attaching\n 2008-05-07T11:51:50.000Z\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AttachVolume.html" ] }, "DescribeBundleTasksResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n i-12345678\n bun-c1a540a8\n canceling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 20%\n \n \n my-bucket\n winami\n \n \n \n \n", "exampleHTML" : "

        Example Response

        <DescribeBundleTasksResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <bundleInstanceTasksSet>\n    <item>\n        <instanceId>i-12345678</instanceId>\n        <bundleId>bun-c1a540a8</bundleId>\n        <state>canceling</state>\n        <startTime>2008-10-07T11:41:50.000Z</startTime>\n        <updateTime>2008-10-07T11:51:50.000Z</updateTime>\n        <progress>20%</progress>\n        <storage>\n          <S3>\n            <bucket>my-bucket</bucket>\n            <prefix>winami</prefix>\n          </S3>\n        </storage>\n    </item>\n  <bundleInstanceTasksSet>\n</DescribeBundleTasksResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Bundle task set.", "name" : "bundleInstanceTasksSet", @@ -1746,14 +3184,13 @@ } ], "type" : "DescribeBundleTasksResponse", - "exampleCode" : "\n \n \n i-12345678\n bun-c1a540a8\n canceling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 20%\n \n \n my-bucket\n winami\n \n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeBundleTasks.html" ] }, "TerminateInstancesResponseItemType" : { "ancestor" : "TerminateInstancesResponseInfoType", - "fields" : [ + "contents" : [ { "desc" : "Instance ID.", "name" : "instanceId", @@ -1780,7 +3217,7 @@ }, "SecurityGroupSetType" : { "ancestor" : "DescribeSecurityGroupsResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a security group.", "name" : "item", @@ -1795,7 +3232,7 @@ }, "AttachmentSetResponseType" : { "ancestor" : "DescribeVolumesSetItemResponseType", - "fields" : [ + "contents" : [ { "desc" : "Information for a attachment set. ", "name" : "item", @@ -1809,9 +3246,9 @@ ] }, "DescribeImageAttributeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n ami-61a54008\n \n \n all\n \n \n 495219933132\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <imageId>ami-61a54008</imageId>\n  <launchPermission>\n    <item>\n      <group>all</group>\n    </item>\n    <item>\n      <userId>495219933132</userId>\n    </item>\n  </launchPermission>\n</DescribeImageAttributeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Block device mapping set.", "name" : "blockDeviceMapping", @@ -1856,16 +3293,16 @@ } ], "type" : "DescribeImageAttributeResponse", - "exampleCode" : "\n ami-61a54008\n \n \n all\n \n \n 495219933132\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImageAttribute.html" ] }, "PurchaseReservedInstancesOfferingResponse" : { - "ancestor" : "None", + "exampleCode" : "\n reservation-1001001\n\t\t\t\t\t\t", "exampleHTML" : "

        Example Response

        <PurchaseReservedInstancesOfferingResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n   <reservedInstancesId>reservation-1001001</reservedInstancesId>\n\t\t\t\t\t\t</PurchaseReservedInstancesOfferingResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -1878,15 +3315,14 @@ } ], "type" : "PurchaseReservedInstancesOfferingResponse", - "exampleCode" : "\n reservation-1001001\n\t\t\t\t\t\t", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-PurchaseReservedInstancesOffering.html" ] }, "CreateSnapshotResponse" : { - "ancestor" : "None", + "exampleCode" : "\n snap-78a54011\n vol-4d826724\n pending\n 2008-05-07T12:51:50.000Z\n 60%\n", "exampleHTML" : "

        Example Response

        <CreateSnapshotResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <snapshotId>snap-78a54011</snapshotId>\n  <volumeId>vol-4d826724</volumeId>\n  <status>pending</status>\n  <startTime>2008-05-07T12:51:50.000Z</startTime>\n  <progress>60%</progress>\n</CreateSnapshotResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The progress of the snapshot, in percentage.", "name" : "progress", @@ -1925,14 +3361,13 @@ } ], "type" : "CreateSnapshotResponse", - "exampleCode" : "\n snap-78a54011\n vol-4d826724\n pending\n 2008-05-07T12:51:50.000Z\n 60%\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSnapshot.html" ] }, "GroupSetType" : { "ancestor" : "ReservationInfoType", - "fields" : [ + "contents" : [ { "desc" : "Group set item.", "name" : "item", @@ -1947,7 +3382,7 @@ }, "ProductCodesSetItemType" : { "ancestor" : "ProductCodesSetType", - "fields" : [ + "contents" : [ { "desc" : "Product code.", "name" : "productCode", @@ -1961,30 +3396,32 @@ ] }, "AllocateAddressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n 67.202.55.255\n", "exampleHTML" : "

        Example Response

        <AllocateAddressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <publicIp>67.202.55.255</publicIp>\n</AllocateAddressResponse>
        \n", - "fields" : [ + "contents" : [ { + "desc" : "IP address for use with your account.", "name" : "publicIp", "type" : "xsd:string", "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" } ], "type" : "AllocateAddressResponse", - "exampleCode" : "\n 67.202.55.255\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AllocateAddress.html" ] }, "ProductCodeItemType" : { "ancestor" : "ProductCodeListType", - "fields" : [ + "contents" : [ { + "desc" : "Amazon DevPay product code. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset.", "name" : "productCode", "type" : "xsd:string", "optional" : "false" @@ -1997,7 +3434,7 @@ }, "UserIdGroupPairType" : { "ancestor" : "UserIdGroupPairSetType", - "fields" : [ + "contents" : [ { "desc" : "Name of the security group.", "name" : "groupName ", @@ -2018,7 +3455,7 @@ }, "DescribeVolumesSetResponseType" : { "ancestor" : "DescribeVolumesResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for a volume.", "name" : "item", @@ -2033,8 +3470,9 @@ }, "ProductCodeListType" : { "ancestor" : "DescribeImageAttributeResponse", - "fields" : [ + "contents" : [ { + "desc" : "Information for one product code.", "name" : "item", "type" : "ProductCodeItemType", "optional" : "false" @@ -2046,9 +3484,9 @@ ] }, "DescribeRegionsResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n us-east-1\n us-east-1.ec2.amazonaws.com\n \n \n eu-west-1\n eu-west-1.ec2.amazonaws.com\n \n \n", "exampleHTML" : "

        Example Response

        <DescribeRegionsResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <regionInfo>\n    <item>\n      <regionName>us-east-1</regionName>\n      <regionEndpoint>us-east-1.ec2.amazonaws.com</regionEndpoint>\n    </item>\n    <item>\n      <regionName>eu-west-1</regionName>\n      <regionUrl>eu-west-1.ec2.amazonaws.com</regionUrl>\n    </item>\n  </regionInfo>\n</DescribeRegionsResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Region set.", "name" : "regionInfo", @@ -2063,14 +3501,13 @@ } ], "type" : "DescribeRegionsResponse", - "exampleCode" : "\n \n \n us-east-1\n us-east-1.ec2.amazonaws.com\n \n \n eu-west-1\n eu-west-1.ec2.amazonaws.com\n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeRegions.html" ] }, "RegionItemType" : { "ancestor" : "RegionSetType", - "fields" : [ + "contents" : [ { "desc" : "Region service endpoint.", "name" : "regionEndpoint", @@ -2090,9 +3527,9 @@ ] }, "DescribeInstancesResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n r-44a5402d\n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n \n \n default\n \n \n \n \n i-28a64341\n ami-6ea54007\n \n 0\n running\n \n 10-251-50-132.ec2.internal\n ec2-72-44-33-4.compute-1.amazonaws.com\n example-key-name\n 23\n \n 774F4FF8\n \n m1.large\n 2007-08-07T11:54:42.000Z\n \n\t\t\t us-east-1b\n\t \n\t aki-ba3adfd3\n\t ari-badbad00\n \n \n i-28a64435\n ami-6ea54007\n \n 0\n running\n \n 10-251-50-134.ec2.internal\n ec2-72-44-33-6.compute-1.amazonaws.com\n example-key-name\n 23\n \n 774F4FF8\n \n m1.large\n 2007-08-07T11:54:42.000Z\n \n\t\t\t us-east-1b\n\t \n\t aki-ba3adfd3\n\t ari-badbad00\n \n \n \n \n", "exampleHTML" : "

        Example Response

        <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <reservationSet>\n    <item>\n      <reservationId>r-44a5402d</reservationId>\n      <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>\n      <groupSet>\n        <item>\n          <groupId>default</groupId>\n        </item>\n      </groupSet>\n      <instancesSet>\n        <item>\n          <instanceId>i-28a64341</instanceId>\n          <imageId>ami-6ea54007</imageId>\n          <instanceState>\n            <code>0</code>\n            <name>running</name>\n          </instanceState>\n          <privateDnsName>10-251-50-132.ec2.internal</privateDnsName>\n          <dnsName>ec2-72-44-33-4.compute-1.amazonaws.com</dnsName>\n          <keyName>example-key-name</keyName>\n          <amiLaunchIndex>23</amiLaunchIndex>\n          <productCodesSet>\n            <item><productCode>774F4FF8</productCode></item>\n          </productCodesSet>\n          <instanceType>m1.large</instanceType>\n          <launchTime>2007-08-07T11:54:42.000Z</launchTime>\n          <placement>\n\t\t\t  <availabilityZone>us-east-1b</availabilityZone>\n\t  </placement>\n\t  <kernelId>aki-ba3adfd3</kernelId>\n\t  <ramdiskId>ari-badbad00</ramdiskId>\n        </item>\n        <item>\n          <instanceId>i-28a64435</instanceId>\n          <imageId>ami-6ea54007</imageId>\n          <instanceState>\n            <code>0</code>\n            <name>running</name>\n          </instanceState>\n          <privateDnsName>10-251-50-134.ec2.internal</privateDnsName>\n          <dnsName>ec2-72-44-33-6.compute-1.amazonaws.com</dnsName>\n          <keyName>example-key-name</keyName>\n          <amiLaunchIndex>23</amiLaunchIndex>\n          <productCodesSet>\n            <item><productCode>774F4FF8</productCode></item>\n          </productCodesSet>\n          <instanceType>m1.large</instanceType>\n          <launchTime>2007-08-07T11:54:42.000Z</launchTime>\n          <placement>\n\t\t\t  <availabilityZone>us-east-1b</availabilityZone>\n\t  </placement>\n\t  <kernelId>aki-ba3adfd3</kernelId>\n\t  <ramdiskId>ari-badbad00</ramdiskId>\n        </item>\n      </instancesSet>\n    </item>\n  </reservationSet>\n</DescribeInstancesResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -2107,14 +3544,13 @@ } ], "type" : "DescribeInstancesResponse", - "exampleCode" : "\n \n \n r-44a5402d\n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n \n \n default\n \n \n \n \n i-28a64341\n ami-6ea54007\n \n 0\n running\n \n 10-251-50-132.ec2.internal\n ec2-72-44-33-4.compute-1.amazonaws.com\n example-key-name\n 23\n \n 774F4FF8\n \n m1.large\n 2007-08-07T11:54:42.000Z\n \n\t\t\t us-east-1b\n\t \n\t aki-ba3adfd3\n\t ari-badbad00\n \n \n i-28a64435\n ami-6ea54007\n \n 0\n running\n \n 10-251-50-134.ec2.internal\n ec2-72-44-33-6.compute-1.amazonaws.com\n example-key-name\n 23\n \n 774F4FF8\n \n m1.large\n 2007-08-07T11:54:42.000Z\n \n\t\t\t us-east-1b\n\t \n\t aki-ba3adfd3\n\t ari-badbad00\n \n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html" ] }, "DescribeImagesResponseItemType" : { "ancestor" : "DescribeImagesResponseInfoType", - "fields" : [ + "contents" : [ { "desc" : "The architecture of the image (i386 or x86_64).", "name" : "architecture", @@ -2140,7 +3576,7 @@ "optional" : "false" }, { - "desc" : "If the operation returns deregistered, the image is deregistered and no longer available for launching. ", + "desc" : "Current state of the AMI. If the operation returns available, the image is successfully registered and available for launching. If the operation returns deregistered, the image is deregistered and no longer available for launching. ", "name" : "imageState", "type" : "xsd:string", "optional" : "false" @@ -2189,8 +3625,9 @@ }, "LaunchPermissionListType" : { "ancestor" : "DescribeImageAttributeResponse", - "fields" : [ + "contents" : [ { + "desc" : "Information for launch permissions.", "name" : "item", "type" : "LaunchPermissionItemType", "optional" : "false" @@ -2203,7 +3640,7 @@ }, "BlockDeviceMappingItemType" : { "ancestor" : "BlockDeviceMappingType", - "fields" : [ + "contents" : [ { "desc" : "The device name (e.g., /dev/sdh).", "name" : "deviceName", @@ -2223,9 +3660,9 @@ ] }, "DeleteVolumeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DeleteVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DeleteVolumeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -2240,14 +3677,13 @@ } ], "type" : "DeleteVolumeResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteVolume.html" ] }, "DescribeImagesResponseInfoType" : { "ancestor" : "DescribeImagesResponse", - "fields" : [ + "contents" : [ { "desc" : "Information for one image.", "name" : "item", @@ -2262,7 +3698,7 @@ }, "IpRangeItemType" : { "ancestor" : "IpRangeSetType", - "fields" : [ + "contents" : [ { "desc" : "CIDR range.", "name" : "cidrIp ", @@ -2276,9 +3712,9 @@ ] }, "DisassociateAddressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <DisassociateAddressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</DisassociateAddressResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -2293,14 +3729,13 @@ } ], "type" : "DisassociateAddressResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DisassociateAddress.html" ] }, "UserIdGroupPairSetType" : { "ancestor" : "IpPermissionType", - "fields" : [ + "contents" : [ { "desc" : "Information for one security group.", "name" : "item", @@ -2314,9 +3749,9 @@ ] }, "CancelBundleTaskResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n i-12345678\n bun-cla322b9\n canceling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 20%\n \n \n my-bucket\n my-new-image\n \n \n \n", "exampleHTML" : "

        Example Response

        <CancelBundleTaskResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <bundleInstanceTask>\n      <instanceId>i-12345678</instanceId>\n      <bundleId>bun-cla322b9</bundleId>\n      <state>canceling</state>\n      <startTime>2008-10-07T11:41:50.000Z</startTime>\n      <updateTime>2008-10-07T11:51:50.000Z</updateTime>\n      <progress>20%</progress>\n      <storage>\n        <S3>\n          <bucket>my-bucket</bucket>\n          <prefix>my-new-image</prefix>\n        </S3>\n      </storage>\n  </bundleInstanceTask>\n</CancelBundleTaskResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "Bundle task to cancel.", "name" : "bundleInstanceTask", @@ -2331,14 +3766,13 @@ } ], "type" : "CancelBundleTaskResponse", - "exampleCode" : "\n \n i-12345678\n bun-cla322b9\n canceling\n 2008-10-07T11:41:50.000Z\n 2008-10-07T11:51:50.000Z\n 20%\n \n \n my-bucket\n my-new-image\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CancelBundleTask.html" ] }, "MonitorInstancesResponseSetType" : { "ancestor" : "MonitorInstancesResponse", - "fields" : [ + "contents" : [ { "desc" : "Instance Item.", "name" : "item", @@ -2353,7 +3787,7 @@ }, "DescribeReservedInstancesResponseSetItemType" : { "ancestor" : "DescribeReservedInstancesResponseSetType", - "fields" : [ + "contents" : [ { "desc" : "The Availability Zone in which the Reserved Instance can be used.", "name" : "availabilityZone", @@ -2421,9 +3855,9 @@ ] }, "DescribeSecurityGroupsResponse" : { - "ancestor" : "None", + "exampleCode" : "\n \n \n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n WebServers\n Web Servers\n \n \n \t tcp\n\t 80\n\t 80\n\t \n\t \n\t \n\t 0.0.0.0/0\n\t \n\t \n \n \n \n \n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n RangedPortsBySource\n Group A\n \n \t\n\t tcp\n\t 6000\n\t 7000\n\t \n\t \n\t\n \n \n \n", "exampleHTML" : "

        Example Response

        <DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <securityGroupInfo>\n    <item>\n      <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>\n      <groupName>WebServers</groupName>\n      <groupDescription>Web Servers</groupDescription>\n      <ipPermissions>\n        <item>\n  \t  <ipProtocol>tcp</ipProtocol>\n\t  <fromPort>80</fromPort>\n\t  <toPort>80</toPort>\n\t  <groups/>\n\t  <ipRanges>\n\t    <item>\n\t      <cidrIp>0.0.0.0/0</cidrIp>\n\t    </item>\n\t  </ipRanges>\n         </item>\n      </ipPermissions>\n    </item>\n    <item>\n      <ownerId>UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM</ownerId>\n      <groupName>RangedPortsBySource</groupName>\n      <groupDescription>Group A</groupDescription>\n      <ipPermissions>\n \t<item>\n\t  <ipProtocol>tcp</ipProtocol>\n\t  <fromPort>6000</fromPort>\n\t  <toPort>7000</toPort>\n\t  <groups/>\n\t  <ipRanges/>\n\t</item>\n      </ipPermissions>\n    </item>\n  </securityGroupInfo>\n</DescribeSecurityGroupsResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -2438,15 +3872,14 @@ } ], "type" : "DescribeSecurityGroupsResponse", - "exampleCode" : "\n \n \n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n WebServers\n Web Servers\n \n \n \t tcp\n\t 80\n\t 80\n\t \n\t \n\t \n\t 0.0.0.0/0\n\t \n\t \n \n \n \n \n UYY3TLBUXIEON5NQVUUX6OMPWBZIQNFM\n RangedPortsBySource\n Group A\n \n \t\n\t tcp\n\t 6000\n\t 7000\n\t \n\t \n\t\n \n \n \n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html" ] }, "GetConsoleOutputResponse" : { - "ancestor" : "None", + "exampleCode" : "\n i-28a64341\n 2007-01-03 15:00:00\n TGludXggdmVyc2lvbiAyLjYuMTYteGVuVSAoYnVpbGRlckBwYXRjaGJhdC5hbWF6b25zYSkgKGdj\nYyB2ZXJzaW9uIDQuMC4xIDIwMDUwNzI3IChSZWQgSGF0IDQuMC4xLTUpKSAjMSBTTVAgVGh1IE9j\ndCAyNiAwODo0MToyNiBTQVNUIDIwMDYKQklPUy1wcm92aWRlZCBwaHlzaWNhbCBSQU0gbWFwOgpY\nZW46IDAwMDAwMDAwMDAwMDAwMDAgLSAwMDAwMDAwMDZhNDAwMDAwICh1c2FibGUpCjk4ME1CIEhJ\nR0hNRU0gYXZhaWxhYmxlLgo3MjdNQiBMT1dNRU0gYXZhaWxhYmxlLgpOWCAoRXhlY3V0ZSBEaXNh\nYmxlKSBwcm90ZWN0aW9uOiBhY3RpdmUKSVJRIGxvY2t1cCBkZXRlY3Rpb24gZGlzYWJsZWQKQnVp\nbHQgMSB6b25lbGlzdHMKS2VybmVsIGNvbW1hbmQgbGluZTogcm9vdD0vZGV2L3NkYTEgcm8gNApF\nbmFibGluZyBmYXN0IEZQVSBzYXZlIGFuZCByZXN0b3JlLi4uIGRvbmUuCg==\n", "exampleHTML" : "

        Example Response

        <GetConsoleOutputResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <instanceId>i-28a64341</instanceId>\n  <timestamp>2007-01-03 15:00:00</timestamp>\n  <output>TGludXggdmVyc2lvbiAyLjYuMTYteGVuVSAoYnVpbGRlckBwYXRjaGJhdC5hbWF6b25zYSkgKGdj\nYyB2ZXJzaW9uIDQuMC4xIDIwMDUwNzI3IChSZWQgSGF0IDQuMC4xLTUpKSAjMSBTTVAgVGh1IE9j\ndCAyNiAwODo0MToyNiBTQVNUIDIwMDYKQklPUy1wcm92aWRlZCBwaHlzaWNhbCBSQU0gbWFwOgpY\nZW46IDAwMDAwMDAwMDAwMDAwMDAgLSAwMDAwMDAwMDZhNDAwMDAwICh1c2FibGUpCjk4ME1CIEhJ\nR0hNRU0gYXZhaWxhYmxlLgo3MjdNQiBMT1dNRU0gYXZhaWxhYmxlLgpOWCAoRXhlY3V0ZSBEaXNh\nYmxlKSBwcm90ZWN0aW9uOiBhY3RpdmUKSVJRIGxvY2t1cCBkZXRlY3Rpb24gZGlzYWJsZWQKQnVp\nbHQgMSB6b25lbGlzdHMKS2VybmVsIGNvbW1hbmQgbGluZTogcm9vdD0vZGV2L3NkYTEgcm8gNApF\nbmFibGluZyBmYXN0IEZQVSBzYXZlIGFuZCByZXN0b3JlLi4uIGRvbmUuCg==</output>\n</GetConsoleOutputResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The instance ID.", "name" : "instanceId", @@ -2473,15 +3906,14 @@ } ], "type" : "GetConsoleOutputResponse", - "exampleCode" : "\n i-28a64341\n 2007-01-03 15:00:00\n TGludXggdmVyc2lvbiAyLjYuMTYteGVuVSAoYnVpbGRlckBwYXRjaGJhdC5hbWF6b25zYSkgKGdj\nYyB2ZXJzaW9uIDQuMC4xIDIwMDUwNzI3IChSZWQgSGF0IDQuMC4xLTUpKSAjMSBTTVAgVGh1IE9j\ndCAyNiAwODo0MToyNiBTQVNUIDIwMDYKQklPUy1wcm92aWRlZCBwaHlzaWNhbCBSQU0gbWFwOgpY\nZW46IDAwMDAwMDAwMDAwMDAwMDAgLSAwMDAwMDAwMDZhNDAwMDAwICh1c2FibGUpCjk4ME1CIEhJ\nR0hNRU0gYXZhaWxhYmxlLgo3MjdNQiBMT1dNRU0gYXZhaWxhYmxlLgpOWCAoRXhlY3V0ZSBEaXNh\nYmxlKSBwcm90ZWN0aW9uOiBhY3RpdmUKSVJRIGxvY2t1cCBkZXRlY3Rpb24gZGlzYWJsZWQKQnVp\nbHQgMSB6b25lbGlzdHMKS2VybmVsIGNvbW1hbmQgbGluZTogcm9vdD0vZGV2L3NkYTEgcm8gNApF\nbmFibGluZyBmYXN0IEZQVSBzYXZlIGFuZCByZXN0b3JlLi4uIGRvbmUuCg==\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-GetConsoleOutput.html" ] }, "ModifyImageAttributeResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</ModifyImageAttributeResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "The ID of the request.", "name" : "requestId", @@ -2496,15 +3928,14 @@ } ], "type" : "ModifyImageAttributeResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyImageAttribute.html" ] }, "AssociateAddressResponse" : { - "ancestor" : "None", + "exampleCode" : "\n true\n", "exampleHTML" : "

        Example Response

        <AssociateAddressResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">\n  <return>true</return>\n</AssociateAddressResponse>
        \n", - "fields" : [ + "contents" : [ { "desc" : "IP address.", "name" : "publicIp", @@ -2512,6 +3943,7 @@ "optional" : "false" }, { + "desc" : "The ID of the request.", "name" : "requestId", "type" : "xsd:string", "optional" : "false" @@ -2524,1475 +3956,12 @@ } ], "type" : "AssociateAddressResponse", - "exampleCode" : "\n true\n", "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AssociateAddress.html" ] } }, - "categories" : [ - { - "name" : "Amazon DevPay", - "queries" : { - "ConfirmProductInstance" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes the confirms the product code is associated with the instance.

        https://ec2.amazonaws.com/?Action=ConfirmProductInstance&ProductCode=774F4FF8&InstanceId=i-10a64379&AuthParams
        \n", - "fields" : [ - { - "desc" : "The product code to confirm.", - "name" : "ProductCode", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The instance to confirm.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "ConfirmProductInstance", - "exampleCode" : "https://ec2.amazonaws.com/?Action=ConfirmProductInstance&ProductCode=774F4FF8&InstanceId=i-10a64379&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ConfirmProductInstance.html", - "DescribeInstances", - "RunInstances" - ], - "responseType" : "ConfirmProductInstanceResponse" - } - } - }, - { - "name" : "AMIs", - "queries" : { - "DeregisterImage" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example deregisters the ami-4fa54026 AMI.

        https://ec2.amazonaws.com/?Action=DeregisterImage&ImageId=ami-4fa54026&AuthParams
        \n", - "fields" : [ - { - "desc" : "Unique ID of the AMI which was assigned during registration. To register an AMI, use RegisterImage. To view the AMI IDs of AMIs that belong to your account. use DescribeImages.", - "name" : "ImageId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DeregisterImage", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DeregisterImage&ImageId=ami-4fa54026&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeregisterImage.html", - "RegisterImage", - "DescribeImages" - ], - "responseType" : "DeregisterImageResponse" - }, - "ModifyImageAttribute" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example makes this a public AMI and grants specific permissions to a user.

        https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams
        \n", - "fields" : [ - { - "desc" : "The AMI ID.", - "name" : "ImageId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "User IDs associated with the launchPermission attribute.", - "name" : "UserId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Security groups associated with the launchPermission attribute. You can specify the ", - "name" : "Group.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "User IDs associated with the launchPermission attribute.", - "name" : "UserId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Security groups associated with the launchPermission attribute. You can specify the ", - "name" : "Group.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Amazon DevPay product code. Currently only one product code can be associated with an AMI. Once set, the product code cannot be changed or reset.", - "name" : "ProductCode.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "ModifyImageAttribute", - "exampleCode" : "https://ec2.amazonaws.com/?Action=ModifyImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&OperationType=add&Group.1=all &UserId.1=495219933132&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ModifyImageAttribute.html", - "ResetImageAttribute", - "DescribeImageAttribute" - ], - "responseType" : "ModifyImageAttributeResponse" - }, - "DescribeImageAttribute" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example lists the launch permissions for the ami-61a54008 AMI

        https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=launchPermission&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the AMI for which an attribute will be described.", - "name" : "ImageId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the launch permissions of the AMI.", - "name" : "LaunchPermission", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the product code associated with the AMI.", - "name" : "ProductCodes", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the ID of the kernel associated with the AMI.", - "name" : "Kernel", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the ID of the RAM disk associated with the AMI.", - "name" : "Ramdisk", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the mapping that defines native device names to use when exposing virtual devices.", - "name" : "BlockDeviceMapping", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Describes the operating system platform.", - "name" : "Platform", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DescribeImageAttribute", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeImageAttribute&ImageId=ami-2bb65342&Attribute=launchPermission&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImageAttribute.html", - "DescribeImages", - "ModifyImageAttribute", - "ResetImageAttribute" - ], - "responseType" : "DescribeImageAttributeResponse" - }, - "DescribeImages" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes the ami-be3adfd7 AMI.

        https://ec2.amazonaws.com/?Action=DescribeImages&ImageId.1=ami-be3adfd7&AuthParams
        \n", - "fields" : [ - { - "name" : "public", - "optional" : "false" - }, - { - "name" : "explicit", - "optional" : "false" - }, - { - "name" : "implicit", - "optional" : "false" - } - ], - "type" : "DescribeImages", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeImages&ImageId.1=ami-be3adfd7&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html", - "DescribeInstances", - "DescribeImageAttribute" - ], - "responseType" : "DescribeImagesResponse" - } - } - }, - { - "name" : "Availability Zones and Regions", - "queries" : { - "DescribeAvailabilityZones" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example displays information about Availability Zones that are available to the account.

        https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&ZoneName.0=us-east-1a&ZoneName.1=us-east-1b&ZoneName.1=us-east-1c&AuthParams
        \n", - "fields" : [ - { - "desc" : "Availability Zone name.", - "name" : "ZoneName", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - } - ], - "type" : "DescribeAvailabilityZones", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeAvailabilityZones&ZoneName.0=us-east-1a&ZoneName.1=us-east-1b&ZoneName.1=us-east-1c&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAvailabilityZones.html", - "RunInstances", - "DescribeRegions" - ], - "responseType" : "DescribeAvailabilityZonesResponse" - }, - "DescribeRegions" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example displays regions that are available to the account.

        https://ec2.amazonaws.com/?Action=DescribeRegions&RegionName.0=us-east-1&RegionName.1=eu-west-1&AuthParams
        \n", - "fields" : [ - { - "desc" : "Name of a region.", - "name" : "Region.n", - "type" : "String", - "defaultValue" : "Describes all regions available to the account.", - "optional" : "true" - } - ], - "type" : "DescribeRegions", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeRegions&RegionName.0=us-east-1&RegionName.1=eu-west-1&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeRegions.html", - "DescribeAvailabilityZones", - "RunInstances" - ], - "responseType" : "DescribeRegionsResponse" - } - } - }, - { - "name" : "Elastic Block Store", - "queries" : { - "DeleteVolume" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example deletes volume vol-4282672b.

        https://ec2.amazonaws.com/?Action=DeleteVolume&VolumeId=vol-4282672b&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the volume to delete.", - "name" : "VolumeId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DeleteVolume", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteVolume&VolumeId=vol-4282672b&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteVolume.html", - "CreateVolume", - "DescribeVolumes", - "AttachVolume", - "DetachVolume" - ], - "responseType" : "DeleteVolumeResponse" - }, - "DescribeSnapshots" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes snapshot snap-78a54011.

        https://ec2.amazonaws.com/?Action=DescribeSnapshots&SnapshotId=snap-78a54011&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the Amazon EBS snapshot.", - "name" : "SnapshotId.n", - "type" : "String", - "defaultValue" : "Describes all snapshots that you own.", - "optional" : "true" - } - ], - "type" : "DescribeSnapshots", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeSnapshots&SnapshotId=snap-78a54011&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html", - "CreateSnapshot", - "DeleteSnapshot" - ], - "responseType" : "DescribeSnapshotsResponse" - }, - "DescribeVolumes" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes all volumes associated with your account.

        https://ec2.amazonaws.com/?Action=DescribeVolumes&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the volume to list.", - "name" : "VolumeId", - "type" : "String", - "defaultValue" : "Describes all volumes that you own.", - "optional" : "true" - } - ], - "type" : "DescribeVolumes", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeVolumes&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumes.html", - "CreateSnapshot", - "DeleteSnapshot" - ], - "responseType" : "DescribeVolumesResponse" - }, - "DetachVolume" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example detaches volume vol-4d826724.

        https://ec2.amazonaws.com/?Action=DetachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the volume.", - "name" : "VolumeId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The ID of the instance.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The device name.", - "name" : "Device", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "Forces detachment if the previous detachment attempt did not occur cleanly (logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance will not have an opportunity to flush file system caches nor file system meta data.", - "name" : "Force", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - } - ], - "type" : "DetachVolume", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DetachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DetachVolume.html", - "CreateVolume", - "DeleteVolume", - "DescribeVolumes", - "AttachVolume" - ], - "responseType" : "DetachVolumeResponse" - }, - "AttachVolume" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example attaches volume vol-4d826724 to instance i-6058a509 and exposes it as /dev/sdh. For information on standard storage locations, go to the Amazon Elastic Compute Cloud Developer Guide.

        https://ec2.amazonaws.com/?Action=AttachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509\n&Device=/dev/sdh&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running.", - "name" : "VolumeId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Specifies how the device is exposed to the instance (e.g., /dev/sdh).", - "name" : "Device", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "AttachVolume", - "exampleCode" : "https://ec2.amazonaws.com/?Action=AttachVolume&VolumeId=vol-4d826724\n&InstanceId=i-6058a509\n&Device=/dev/sdh&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AttachVolume.html", - "CreateVolume", - "DeleteVolume", - "DescribeVolumes", - "DetachVolume" - ], - "responseType" : "AttachVolumeResponse" - }, - "CreateSnapshot" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example creates a snapshot of volume vol-4d826724.

        https://ec2.amazonaws.com/?Action=CreateSnapshot&VolumeId=vol-4d826724&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the Amazon EBS volume to take a snapshot of.", - "name" : "VolumeId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "CreateSnapshot", - "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateSnapshot&VolumeId=vol-4d826724&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSnapshot.html", - "DeleteSnapshot", - "DescribeSnapshots" - ], - "responseType" : "CreateSnapshotResponse" - }, - "CreateVolume" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example creates a new 800 GiB volume in Availability Zone us-east-1a.

        https://ec2.amazonaws.com/?Action=CreateVolume&Size=800&AvailabilityZone=us-east-1a&AuthParams
        \n", - "fields" : [ - { - "constraints" : "1-1024", - "desc" : "The size of the volume, in GiBs. Required if you are not creating a volume from a snapshot.", - "name" : "Size", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The snapshot from which to create the new volume.", - "name" : "SnapshotId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The Availability Zone in which to create the new volume.", - "name" : "AvailabilityZone", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "CreateVolume", - "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateVolume&Size=800&AvailabilityZone=us-east-1a&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVolume.html", - "DeleteVolume", - "DescribeVolumes", - "AttachVolume", - "DetachVolume", - "DescribeAvailabilityZones" - ], - "responseType" : "CreateVolumeResponse" - }, - "DeleteSnapshot" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example deletes snapshot snap-78a54011.

        https://ec2.amazonaws.com/?Action=DeleteSnapshot&SnapshotId.1=snap-78a54011&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the Amazon EBS snapshot to delete.", - "name" : "SnapshotId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DeleteSnapshot", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteSnapshot&SnapshotId.1=snap-78a54011&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSnapshot.html", - "CreateSnapshot", - "DescribeSnapshots" - ], - "responseType" : "DeleteSnapshotResponse" - } - } - }, - { - "name" : "Elastic IP Addresses", - "queries" : { - "AllocateAddress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example returns an elastic IP address for use with the account.

        https://ec2.amazonaws.com/?Action=AllocateAddress&AuthParams
        \n", - "fields" : [ - { - "ancestor" : "None", - "desc" : "AllocateAddressResponse element.", - "name" : "AllocateAddressResponse", - "type" : "AllocateAddressResponse", - "children" : "requestId, publicIp", - "optional" : "false" - }, - { - "ancestor" : "AllocateAddressResponse", - "desc" : "The ID of the request.", - "name" : "requestId", - "type" : "xsd:string", - "children" : "None", - "optional" : "false" - }, - { - "ancestor" : "AllocateAddressResponse", - "desc" : "IP address for use with your account.", - "name" : "publicIp", - "type" : "xsd:string", - "children" : "None", - "optional" : "false" - } - ], - "type" : "AllocateAddress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=AllocateAddress&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AllocateAddress.html", - "DescribeAddresses", - "ReleaseAddress", - "AssociateAddress", - "DisassociateAddress" - ], - "responseType" : "AllocateAddressResponse" - }, - "DisassociateAddress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example disassociates the 67.202.55.255 IP address from the instance to which it is assigned.

        https://ec2.amazonaws.com/?Action=DisassociateAddress&PublicIp=67.202.55.255&AuthParams
        \n", - "fields" : [ - { - "desc" : "IP address that you are disassociating from the instance.", - "name" : "PublicIp", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DisassociateAddress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DisassociateAddress&PublicIp=67.202.55.255&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DisassociateAddress.html", - "AllocateAddress", - "DescribeAddresses", - "ReleaseAddress", - "AssociateAddress" - ], - "responseType" : "DisassociateAddressResponse" - }, - "ReleaseAddress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example releases an elastic IP address associated with the account.

        https://ec2.amazonaws.com/?Action=ReleaseAddress&PublicIp=67.202.55.255&AuthParams
        \n", - "fields" : [ - { - "desc" : "The IP address that you are releasing from your account.", - "name" : "PublicIp", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "ReleaseAddress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=ReleaseAddress&PublicIp=67.202.55.255&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ReleaseAddress.html", - "AllocateAddress", - "DescribeAddresses", - "AssociateAddress", - "DisassociateAddress" - ], - "responseType" : "ReleaseAddressResponse" - }, - "AssociateAddress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example associates an IP address with an instance.

        https://ec2.amazonaws.com/?Action=AssociateAddress\n\t\t\t\t\t\t&InstanceId=i-2ea64347\n\t\t\t\t\t\t&PublicIp=67.202.55.255\n\t\t\t\t\t\t&AuthParams
        \n", - "fields" : [ - { - "desc" : "The instance to associate with the IP address.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "IP address that you are assigning to the instance.", - "name" : "PublicIp", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "AssociateAddress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=AssociateAddress\n\t\t\t\t\t\t&InstanceId=i-2ea64347\n\t\t\t\t\t\t&PublicIp=67.202.55.255\n\t\t\t\t\t\t&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AssociateAddress.html", - "AllocateAddress", - "DescribeAddresses", - "ReleaseAddress", - "DisassociateAddress" - ], - "responseType" : "AssociateAddressResponse" - }, - "DescribeAddresses" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes elastic IP addresses assigned to the account. Amazon EC2 returns 67.202.55.255 which is assigned to instance i-f15ebb98 and 67.202.55.233 which is not assigned to an instance.

        https://ec2.amazonaws.com/?Action=DescribeAddresses&PublicIp.1=67.202.55.255\n&PublicIp.1=67.202.55.233&AuthParams
        \n", - "fields" : [ - { - "desc" : "Elastic IP address to describe.", - "name" : "PublicIp.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - } - ], - "type" : "DescribeAddresses", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeAddresses&PublicIp.1=67.202.55.255\n&PublicIp.1=67.202.55.233&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeAddresses.html", - "AllocateAddress", - "ReleaseAddress" - ], - "responseType" : "DescribeAddressesResponse" - } - } - }, - { - "name" : "General", - "queries" : { - "GetConsoleOutput" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example retrieves the console output for the i-10a64379 Linux and UNIX instance.

        https://ec2.amazonaws.com/?Action=GetConsoleOutput&InstanceId=i-10a64379&AuthParams
        \n", - "fields" : [ - { - "desc" : "ID of the instance for which you want console output.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "GetConsoleOutput", - "exampleCode" : "https://ec2.amazonaws.com/?Action=GetConsoleOutput&InstanceId=i-10a64379&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-GetConsoleOutput.html", - "RunInstances" - ], - "responseType" : "GetConsoleOutputResponse" - } - } - }, - { - "name" : "Images", - "queries" : { - "ResetImageAttribute" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example resets the launchPermission attribute.

        https://ec2.amazonaws.com/?Action=ResetImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&AuthParams
        \n", - "fields" : [ - { - "desc" : "ID of the AMI on which the attribute will be reset.", - "name" : "ImageId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "ResetImageAttribute", - "exampleCode" : "https://ec2.amazonaws.com/?Action=ResetImageAttribute&ImageId=ami-61a54008&Attribute=launchPermission&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-ResetImageAttribute.html", - "ModifyImageAttribute", - "DescribeImageAttribute" - ], - "responseType" : "ResetImageAttributeResponse" - }, - "RegisterImage" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example registers the AMI specified in the image.manifest.xml manifest file.

        https://ec2.amazonaws.com/?Action=RegisterImage&ImageLocation=mybucket-myimage.manifest.xml&AuthParams
        \n", - "fields" : [ - { - "desc" : "Full path to your AMI manifest in Amazon S3 storage.", - "name" : "ImageLocation", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "RegisterImage", - "exampleCode" : "https://ec2.amazonaws.com/?Action=RegisterImage&ImageLocation=mybucket-myimage.manifest.xml&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RegisterImage.html", - "DescribeImages", - "DeregisterImage" - ], - "responseType" : "RegisterImageResponse" - } - } - }, - { - "name" : "Instances", - "queries" : { - "TerminateInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example terminates the i-3ea74257 instance.

        https://ec2.amazonaws.com/?Action=TerminateInstances&InstanceId.1=i-3ea74257&AuthParams
        \n", - "fields" : [ - { - "desc" : "Instance ID to terminate.", - "name" : "InstanceId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "TerminateInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=TerminateInstances&InstanceId.1=i-3ea74257&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-TerminateInstances.html", - "DescribeInstances" - ], - "responseType" : "TerminateInstancesResponse" - }, - "DescribeInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes the current state of the instances owned by this user.

        https://ec2.amazonaws.com/?Action=DescribeInstances&AuthParams
        \n", - "fields" : [ - { - "desc" : "Instance IDs to describe.", - "name" : "InstanceId.n", - "type" : "String", - "defaultValue" : "Returns all instances.", - "optional" : "true" - } - ], - "type" : "DescribeInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeInstances&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html", - "RunInstances", - "TerminateInstances" - ], - "responseType" : "DescribeInstancesResponse" - }, - "RunInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example launches three instances of the ami-60a54009 AMI.

        https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-60a54009&MaxCount=3&MinCount=1&Placement.AvailabilityZone=us-east-1a&Monitoring.Enabled=true&AuthParams
        \n", - "fields" : [ - { - "desc" : "Unique ID of a machine image, returned by a call to RegisterImage.", - "name" : "ImageId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "constraints" : "Between 1 and the maximum number allowed for your account (default: 20).", - "desc" : "Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.", - "name" : "MinCount", - "type" : "Integer", - "defaultValue" : "20", - "optional" : "false" - }, - { - "constraints" : "Between 1 and the maximum number allowed for your account (default: 20).", - "desc" : "Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.", - "name" : "MaxCount", - "type" : "Integer", - "defaultValue" : "20", - "optional" : "false" - }, - { - "desc" : "The name of the key pair.", - "name" : "KeyName", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "Name of the security group.", - "name" : "groupId", - "type" : "String", - "defaultValue" : "defaultValue", - "optional" : "true" - }, - { - "desc" : "The user data.", - "name" : "Data", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The version.", - "name" : "Version", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The encoding.", - "name" : "Encoding", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Deprecated.", - "name" : "AddressingType", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "Specifies the instance type.", - "name" : "InstanceType", - "valueMap" : { - "c1.xlarge" : "c1.xlarge", - "m1.large" : "m1.large", - "m1.xlarge" : "m1.xlarge", - "c1.medium" : "c1.medium", - "m1.small" : "m1.small" - }, - "type" : "String", - "defaultValue" : "m1.small", - "optional" : "true" - }, - { - "desc" : "Specifies the placement constraints (Availability Zones) for launching the instances.", - "name" : "AvailabilityZone", - "type" : "String", - "defaultValue" : "Amazon EC2 selects an Availability Zone.", - "optional" : "true" - }, - { - "desc" : "The ID of the kernel with which to launch the instance.", - "name" : "KernelId", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.", - "name" : "RamdiskId", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The virtual name.", - "name" : "VirtualName", - "type" : "String", - "defaultValue" : "None ", - "optional" : "true" - }, - { - "desc" : "The device name (e.g., /dev/sdh).", - "name" : "DeviceName", - "type" : "String", - "defaultValue" : "None ", - "optional" : "true" - }, - { - "desc" : "Enables monitoring for the instance.", - "name" : "Monitoring.Enabled", - "type" : "Boolean", - "defaultValue" : "Disabled", - "optional" : "true" - } - ], - "type" : "RunInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-60a54009&MaxCount=3&MinCount=1&Placement.AvailabilityZone=us-east-1a&Monitoring.Enabled=true&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RunInstances.html", - "DescribeInstances", - "TerminateInstances", - "AuthorizeSecurityGroupIngress", - "RevokeSecurityGroupIngress", - "DescribeSecurityGroups", - "CreateSecurityGroup", - "CreateKeyPair" - ], - "responseType" : "RunInstancesResponse" - }, - "RebootInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example reboots an instance.

        https://ec2.amazonaws.com/?Action=RebootInstances&AuthParams
        \n", - "fields" : [ - { - "desc" : "One or more instance IDs.", - "name" : "InstanceId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "RebootInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=RebootInstances&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RebootInstances.html", - "RunInstances" - ], - "responseType" : "RebootInstancesResponse" - } - } - }, - { - "name" : "Key Pairs", - "queries" : { - "DescribeKeyPairs" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes the state of the gsg-keypair key.

        https://ec2.amazonaws.com/?Action=DescribeKeyPairs&KeyName.1=gsg-keypair&AuthParams
        \n", - "fields" : [ - { - "desc" : "Key pair to describe.", - "name" : "KeyName.n", - "type" : "String", - "defaultValue" : "Describes all key pairs available to the account.", - "optional" : "true" - } - ], - "type" : "DescribeKeyPairs", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeKeyPairs&KeyName.1=gsg-keypair&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeKeyPairs.html", - "DescribeAvailabilityZones", - "RunInstances" - ], - "responseType" : "DescribeKeyPairsResponse" - }, - "CreateKeyPair" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example creates a key pair named gsg-keypair.

        https://ec2.amazonaws.com/?Action=CreateKeyPair&KeyName=gsg-keypair.&AuthParams
        \n", - "fields" : [ - { - "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", - "desc" : "A unique name for the key pair.", - "name" : "KeyName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "CreateKeyPair", - "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateKeyPair&KeyName=gsg-keypair.&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateKeyPair.html", - "RunInstances", - "DescribeKeyPairs", - "DeleteKeyPair" - ], - "responseType" : "CreateKeyPairResponse" - }, - "DeleteKeyPair" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example deletes the gsg-keypair key pair.

        https://ec2.amazonaws.com/?Action=DeleteKeyPair&KeyName=gsg-keypair&AuthParams
        \n", - "fields" : [ - { - "desc" : "Name of the key pair to delete.", - "name" : "KeyName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DeleteKeyPair", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteKeyPair&KeyName=gsg-keypair&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteKeyPair.html", - "CreateKeyPair", - "DescribeKeyPairs" - ], - "responseType" : "DeleteKeyPairResponse" - } - } - }, - { - "name" : "Monitoring", - "queries" : { - "MonitorInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example enables monitoring for i-43a4412a and i-23a3397d.

        https://ec2.amazonaws.com/?Action=MonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams
        \n", - "fields" : [ - { - "desc" : "Instance ID.", - "name" : "InstanceId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "MonitorInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=MonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-MonitorInstances.html", - "UnmonitorInstances", - "RunInstances" - ], - "responseType" : "MonitorInstancesResponse" - }, - "UnmonitorInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example disables monitoring for i-43a4412a and i-23a3397d.

        https://ec2.amazonaws.com/?Action=UnmonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams
        \n", - "fields" : [ - { - "desc" : "Instance ID.", - "name" : "InstanceId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "UnmonitorInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=UnmonitorInstances&InstanceId.1=i-43a4412a&InstanceId.2=i-23a3397d&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-UnmonitorInstances.html", - "MonitorInstances", - "RunInstances" - ], - "responseType" : "UnmonitorInstancesResponse" - } - } - }, - { - "name" : "Reserved Instances", - "queries" : { - "DescribeReservedInstances" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes Reserved Instances owned by the account.

        https://ec2.amazonaws.com/?Action=DescribeReservedInstances&AuthParams
        \n", - "fields" : [ - { - "desc" : "IDs of the Reserved Instance to describe.", - "name" : "ReservedInstancesId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - } - ], - "type" : "DescribeReservedInstances", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeReservedInstances&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstances.html", - "PurchaseReservedInstancesOffering", - "DescribeReservedInstancesOfferings" - ], - "responseType" : "DescribeReservedInstancesResponse" - }, - "DescribeReservedInstancesOfferings" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes available Reserved Instance offerings.

        https://ec2.amazonaws.com/?Action=DescribeReservedInstancesOfferings&AuthParams
        \n", - "fields" : [ - { - "desc" : "ID of the Reserved Instances to describe.", - "name" : "ReservedInstancesOfferingId", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The instance type on which the Reserved Instance can be used.", - "name" : "InstanceType", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The Availability Zone in which the Reserved Instance can be used.", - "name" : "AvailabilityZone", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - }, - { - "desc" : "The Reserved Instance description.", - "name" : "ProductDescription", - "type" : "String", - "defaultValue" : "None", - "optional" : "true" - } - ], - "type" : "DescribeReservedInstancesOfferings", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeReservedInstancesOfferings&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeReservedInstancesOfferings.html", - "PurchaseReservedInstancesOffering", - "DescribeReservedInstances" - ], - "responseType" : "DescribeReservedInstancesOfferingsResponse" - }, - "PurchaseReservedInstancesOffering" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example purchases Reserved Instances.

        https://ec2.amazonaws.com/?Action=PurchaseReservedInstancesOffering&OfferingId.1=offering-12345678&instanceCount.1=2&AuthParams
        \n", - "fields" : [ - { - "desc" : "The offering ID of the Reserved Instance to purchase.", - "name" : "ReservedInstancesOfferingId.n", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The number of Reserved Instances to purchase.", - "name" : "InstanceCount.n", - "type" : "Integer", - "defaultValue" : "1", - "optional" : "true" - } - ], - "type" : "PurchaseReservedInstancesOffering", - "exampleCode" : "https://ec2.amazonaws.com/?Action=PurchaseReservedInstancesOffering&OfferingId.1=offering-12345678&instanceCount.1=2&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-PurchaseReservedInstancesOffering.html", - "DescribeReservedInstancesOfferings", - "DescribeReservedInstances" - ], - "responseType" : "PurchaseReservedInstancesOfferingResponse" - } - } - }, - { - "name" : "Security Groups", - "queries" : { - "DescribeSecurityGroups" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example returns information about two security groups that are configured for the account.

        https://ec2.amazonaws.com/?Action=DescribeSecurityGroups&GroupName.1=WebServers&GroupName.2=RangedPortsBySource&AuthParams
        \n", - "fields" : [ - { - "desc" : "Name of the security group.", - "name" : "GroupName.n", - "type" : "String", - "defaultValue" : "Describes all groups within the account.", - "optional" : "true" - } - ], - "type" : "DescribeSecurityGroups", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeSecurityGroups&GroupName.1=WebServers&GroupName.2=RangedPortsBySource&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSecurityGroups.html", - "CreateSecurityGroup", - "AuthorizeSecurityGroupIngress", - "RevokeSecurityGroupIngress", - "DeleteSecurityGroup" - ], - "responseType" : "DescribeSecurityGroupsResponse" - }, - "AuthorizeSecurityGroupIngress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example grants TCP port 80 access from the 205.192.0.0/16 address range to the websrv security group.

        https://ec2.amazonaws.com/?Action=AuthorizeSecurityGroupIngress&GroupName=websrv\n&IpProtocol=tcp\n&FromPort=80\n&ToPort=80\n&CidrIp=205.192.0.0/16\n&AuthParams
        \n", - "fields" : [ - { - "desc" : "AWS Access Key ID.", - "name" : "UserId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Name of the group to modify. The name must be valid and belong to the account", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "IP protocol.", - "name" : "IpProtocol", - "valueMap" : { - "udp" : "udp", - "tcp" : "tcp", - "icmp" : "icmp" - }, - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).", - "name" : "FromPort", - "type" : "Integer", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).", - "name" : "ToPort", - "type" : "Integer", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "AWS User ID of an account.", - "name" : "UserId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Name of the security group.", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "constraints" : "Valid CIDR IP address range.", - "desc" : "CIDR range.", - "name" : "CidrIp", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "AuthorizeSecurityGroupIngress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=AuthorizeSecurityGroupIngress&GroupName=websrv\n&IpProtocol=tcp\n&FromPort=80\n&ToPort=80\n&CidrIp=205.192.0.0/16\n&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-AuthorizeSecurityGroupIngress.html", - "CreateSecurityGroup", - "DescribeSecurityGroups", - "RevokeSecurityGroupIngress", - "DeleteSecurityGroup" - ], - "responseType" : "AuthorizeSecurityGroupIngressResponse" - }, - "CreateSecurityGroup" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example creates the websrv security group.

        https://ec2.amazonaws.com/?Action=CreateSecurityGroup&GroupName=websrv&GroupDescription='Web Servers'&AuthParams
        \n", - "fields" : [ - { - "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", - "desc" : "Name of the security group.", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "constraints" : "Accepts alphanumeric characters, spaces, dashes, and underscores.", - "desc" : "Description of the group. This is informational only. If the description contains spaces, you must enclose it in single quotes (').", - "name" : "GroupDescription", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "CreateSecurityGroup", - "exampleCode" : "https://ec2.amazonaws.com/?Action=CreateSecurityGroup&GroupName=websrv&GroupDescription='Web Servers'&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CreateSecurityGroup.html", - "RunInstances", - "DescribeSecurityGroups", - "AuthorizeSecurityGroupIngress", - "RevokeSecurityGroupIngress", - "DeleteSecurityGroup" - ], - "responseType" : "CreateSecurityGroupResponse" - }, - "DeleteSecurityGroup" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example deletes the websrv security group.

        https://ec2.amazonaws.com/?Action=DeleteSecurityGroup&GroupName=websrv&AuthParams
        \n", - "fields" : [ - { - "desc" : "Name of the security group to delete.", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "DeleteSecurityGroup", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DeleteSecurityGroup&GroupName=websrv&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteSecurityGroup.html", - "CreateSecurityGroup", - "DescribeSecurityGroups", - "AuthorizeSecurityGroupIngress", - "RevokeSecurityGroupIngress" - ], - "responseType" : "DeleteSecurityGroupResponse" - }, - "RevokeSecurityGroupIngress" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example revokes TCP port 80 access from the 205.192.0.0/16 address range for the websrv security group.

        https://ec2.amazonaws.com/?Action=RevokeSecurityGroupIngress&IpProtocol=tcp&FromPort=80&ToPort=80&CidrIp=205.192.0.0/16\n&AuthParams
        \n", - "fields" : [ - { - "desc" : "AWS Access Key ID.", - "name" : "UserId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Name of the group to modify.", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "IP protocol.", - "name" : "IpProtocol", - "valueMap" : { - "udp" : "udp", - "tcp" : "tcp", - "icmp" : "icmp" - }, - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Start of port range for the TCP and UDP protocols, or an ICMP type number. An ICMP type number of -1 indicates a wildcard (i.e., any ICMP type number).", - "name" : "FromPort", - "type" : "Integer", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "End of port range for the TCP and UDP protocols, or an ICMP code. An ICMP code of -1 indicates a wildcard (i.e., any ICMP code).", - "name" : "ToPort", - "type" : "Integer", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "AWS User ID of an account.", - "name" : "UserId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Name of the security group.", - "name" : "GroupName", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "constraints" : "Valid CIDR IP address range.", - "desc" : "CIDR range.", - "name" : "CidrIp", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "RevokeSecurityGroupIngress", - "exampleCode" : "https://ec2.amazonaws.com/?Action=RevokeSecurityGroupIngress&IpProtocol=tcp&FromPort=80&ToPort=80&CidrIp=205.192.0.0/16\n&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-RevokeSecurityGroupIngress.html", - "CreateSecurityGroup", - "DescribeSecurityGroups", - "AuthorizeSecurityGroupIngress", - "DeleteSecurityGroup" - ], - "responseType" : "RevokeSecurityGroupIngressResponse" - } - } - }, - { - "name" : "Windows", - "queries" : { - "CancelBundleTask" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example cancels the bun-cla322b9 bundle task.

        https://ec2.amazonaws.com/?Action=CancelBundleTask&BundleId=bun-cla322b9&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the bundle task to cancel.", - "name" : "BundleId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "CancelBundleTask", - "exampleCode" : "https://ec2.amazonaws.com/?Action=CancelBundleTask&BundleId=bun-cla322b9&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-CancelBundleTask.html", - "BundleInstance", - "DescribeBundleTasks" - ], - "responseType" : "CancelBundleTaskResponse" - }, - "DescribeBundleTasks" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example describes the status of the bun-57a5403e bundle task.

        https://ec2.amazonaws.com/?Action=DescribeBundleTasks&bundleId.0=bun-c1a540a8&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the bundle task to describe.", - "name" : "BundleId", - "type" : "String", - "defaultValue" : "If no ID is specified, all bundle tasks are described.", - "optional" : "true" - } - ], - "type" : "DescribeBundleTasks", - "exampleCode" : "https://ec2.amazonaws.com/?Action=DescribeBundleTasks&bundleId.0=bun-c1a540a8&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeBundleTasks.html", - "BundleInstance", - "CancelBundleTask" - ], - "responseType" : "DescribeBundleTasksResponse" - }, - "BundleInstance" : { - "ancestor" : "None", - "exampleHTML" : "

        Example Request

        This example bundles the i-e468cd8d instance.

        https://ec2.amazonaws.com/?Action=BundleInstance&InstanceId=-i-e468cd8d\n&Storage.S3.AWSAccessKeyId=10QMXFEV71ZS32XQFTR2\n&Storage.S3.Bucket=my-bucket\n&Storage.S3.Prefix=winami\n&Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl1dfQ%3D%3D\n&Storage.S3.UploadPolicySignature=w6BZu2oxGsiiLZnoBmQSErotuMA%3D\n&AuthParams
        \n", - "fields" : [ - { - "desc" : "The ID of the instance to bundle.", - "name" : "InstanceId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "The Access Key ID of the owner of the Amazon S3 bucket.", - "name" : "Storage.S3.AWSAccessKeyId", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : " The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.", - "name" : "Storage.S3.Bucket", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "Specifies the beginning of the file name of the AMI.", - "name" : "Storage.S3.Prefix", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : "An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on the user's behalf. For more information on bundling in Windows, go to the Amazon Elastic Compute Cloud Developer Guide and Amazon Elastic Compute Cloud Getting Started Guide.", - "name" : "Storage.S3.UploadPolicy", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - }, - { - "desc" : " The signature of the Base64 encoded JSON document.", - "name" : "Storage.S3.UploadPolicySignature", - "type" : "String", - "defaultValue" : "None", - "optional" : "false" - } - ], - "type" : "BundleInstance", - "exampleCode" : "https://ec2.amazonaws.com/?Action=BundleInstance&InstanceId=-i-e468cd8d\n&Storage.S3.AWSAccessKeyId=10QMXFEV71ZS32XQFTR2\n&Storage.S3.Bucket=my-bucket\n&Storage.S3.Prefix=winami\n&Storage.S3.UploadPolicy=eyJleHBpcmF0aW9uIjogIjIwMDgtMDgtMzBUMDg6NDk6MDlaIiwiY29uZGl0aW9ucyI6IFt7ImJ1Y2tldCI6ICJteS1idWNrZXQifSxbInN0YXJ0cy13aXRoIiwgIiRrZXkiLCAibXktbmV3LWltYWdlIl1dfQ%3D%3D\n&Storage.S3.UploadPolicySignature=w6BZu2oxGsiiLZnoBmQSErotuMA%3D\n&AuthParams", - "see" : [ - "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-BundleInstance.html", - "CancelBundleTask", - "DescribeBundleTasks" - ], - "responseType" : "BundleInstanceResponse" - } - } - } - ], "see" : [ "http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/OperationList-query.html" ] -} \ No newline at end of file +} diff --git a/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParserTest.java b/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParserTest.java new file mode 100644 index 0000000000..5383915a57 --- /dev/null +++ b/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/parser/AmazonEC2QueryAPIParserTest.java @@ -0,0 +1,904 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.ec2.queryapi.parser; + +import org.jclouds.codegen.ec2.queryapi.Category; +import org.jclouds.codegen.ec2.queryapi.Content; +import org.jclouds.codegen.ec2.queryapi.DataType; +import org.jclouds.codegen.ec2.queryapi.Query; +import org.jclouds.codegen.ec2.queryapi.parser.AmazonEC2QueryAPIParser; +import org.jclouds.codegen.ec2.queryapi.parser.AmazonEC2QueryAPIValidator; +import org.testng.annotations.AfterTest; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + +/** + * Tests to ensure that the json file parsed from the EC2 site appears correct. + * + * @author Adrian Cole + */ +@Test(testName = "ec2.AmazonEC2QueryAPIParser") +public class AmazonEC2QueryAPIParserTest extends AmazonEC2QueryAPIValidator { + @BeforeTest + public void setUp() throws Exception { + setModel(new AmazonEC2QueryAPIParser().parseJSONResource("/objmodels/ec2.json")); + } + + @Test + public void testCategoriesParsedNames() { + super.validateCategories(); + } + + @AfterTest + public void tearDown() throws Exception { + setModel(null); + } + + @SuppressWarnings("unused") + private void codeUsedToGenerateThisClass() { + StringBuilder builder = new StringBuilder(); + builder + .append(" private Map> expectedQueryNamesForCategoryName = new ImmutableMap.Builder"); + builder.append(">()").append("\n"); + + for (Category category : getModel().getCategories().values()) { + builder.append(String.format(".put(\"%1$s\",%n ImmutableSet.of(", category.getName())); + for (String string : category.getQueries().keySet()) { + builder.append(String.format("\"%1$s\",", string)); + } + builder.append(String.format("))%n")); + } + builder.append(String.format(".build();")); + System.out.println(builder.toString().replaceAll(",\\)", ")")); + + builder = new StringBuilder(); + builder + .append(" private Map> expectedFieldNamesForBeanName = new ImmutableMap.Builder"); + builder.append(">()").append("\n"); + + for (DataType bean : getModel().getDataTypes().values()) { + builder.append(String.format(".put(\"%1$s\",%n ImmutableSet.of(", bean.getType())); + for (Content field : bean.getContents()) { + builder.append(String.format("\"%1$s\",", field.getName())); + } + builder.append(String.format("))%n")); + } + for (Category category : getModel().getCategories().values()) { + for (DataType bean : category.getQueries().values()) { + builder.append(String.format(".put(\"%1$s\",%n ImmutableSet.of(", bean.getType())); + for (Content field : bean.getContents()) { + builder.append(String.format("\"%1$s\",", field.getName())); + } + builder.append(String.format("))%n")); + } + } + builder.append(String.format(".build();")); + System.out.println(builder.toString().replaceAll(",\\)", ")")); + + for (String string : getModel().getCategories().keySet()) { + System.out.printf(" @Test%n public void test%1$sQueryNames(){%n " + + "validateQueriesInCategory(\"%2$s\");" + "}%n", string.replaceAll(" ", ""), + string); + } + + for (Category cat : getModel().getCategories().values()) { + for (Query bean : cat.getQueries().values()) { + System.out.printf(" @Test%n public void test%1$sQuery(){%n " + + "validateQueryInCategory(\"%1$s\", \"%2$s\");%n}%n", bean.getType(), cat + .getName()); + } + + } + for (DataType bean : getModel().getDataTypes().values()) { + System.out.printf(" @Test%n public void test%1$sBean(){%n " + + "validateFieldsOfBean(getModel().getDomain().get(\"%1$s\"));%n}%n", bean + .getType()); + } + System.out.printf(" public EC2ModelValidator validateCommands() {%n"); + for (Category cat : getModel().getCategories().values()) { + for (Query bean : cat.getQueries().values()) { + System.out.printf("validateQueryInCategory(\"%1$s\", \"%2$s\");%n", bean.getType(), cat + .getName()); + } + } + System.out.printf("return this;%n }%n"); + + System.out.printf(" public EC2ModelValidator validateDomain() {%n"); + for (DataType bean : getModel().getDataTypes().values()) { + System.out.printf("validateFieldsOfBean(getModel().getDomain().get(\"%1$s\"));%n", bean + .getType()); + } + + System.out.printf("return this;%n }%n"); + + } + + @Test + public void testAmazonDevPayQueryNames() { + validateQueriesInCategory("Amazon DevPay"); + } + + @Test + public void testAMIsQueryNames() { + validateQueriesInCategory("AMIs"); + } + + @Test + public void testAvailabilityZonesandRegionsQueryNames() { + validateQueriesInCategory("Availability Zones and Regions"); + } + + @Test + public void testElasticBlockStoreQueryNames() { + validateQueriesInCategory("Elastic Block Store"); + } + + @Test + public void testElasticIPAddressesQueryNames() { + validateQueriesInCategory("Elastic IP Addresses"); + } + + @Test + public void testGeneralQueryNames() { + validateQueriesInCategory("General"); + } + + @Test + public void testImagesQueryNames() { + validateQueriesInCategory("Images"); + } + + @Test + public void testInstancesQueryNames() { + validateQueriesInCategory("Instances"); + } + + @Test + public void testKeyPairsQueryNames() { + validateQueriesInCategory("Key Pairs"); + } + + @Test + public void testMonitoringQueryNames() { + validateQueriesInCategory("Monitoring"); + } + + @Test + public void testReservedInstancesQueryNames() { + validateQueriesInCategory("Reserved Instances"); + } + + @Test + public void testSecurityGroupsQueryNames() { + validateQueriesInCategory("Security Groups"); + } + + @Test + public void testWindowsQueryNames() { + validateQueriesInCategory("Windows"); + } + + @Test + public void testConfirmProductInstanceQuery() { + validateQueryInCategory("ConfirmProductInstance", "Amazon DevPay"); + } + + @Test + public void testDeregisterImageQuery() { + validateQueryInCategory("DeregisterImage", "AMIs"); + } + + @Test + public void testModifyImageAttributeQuery() { + validateQueryInCategory("ModifyImageAttribute", "AMIs"); + } + + @Test + public void testDescribeImageAttributeQuery() { + validateQueryInCategory("DescribeImageAttribute", "AMIs"); + } + + @Test + public void testDescribeImagesQuery() { + validateQueryInCategory("DescribeImages", "AMIs"); + } + + @Test + public void testDescribeAvailabilityZonesQuery() { + validateQueryInCategory("DescribeAvailabilityZones", "Availability Zones and Regions"); + } + + @Test + public void testDescribeRegionsQuery() { + validateQueryInCategory("DescribeRegions", "Availability Zones and Regions"); + } + + @Test + public void testDeleteVolumeQuery() { + validateQueryInCategory("DeleteVolume", "Elastic Block Store"); + } + + @Test + public void testDescribeSnapshotsQuery() { + validateQueryInCategory("DescribeSnapshots", "Elastic Block Store"); + } + + @Test + public void testDescribeVolumesQuery() { + validateQueryInCategory("DescribeVolumes", "Elastic Block Store"); + } + + @Test + public void testDetachVolumeQuery() { + validateQueryInCategory("DetachVolume", "Elastic Block Store"); + } + + @Test + public void testAttachVolumeQuery() { + validateQueryInCategory("AttachVolume", "Elastic Block Store"); + } + + @Test + public void testCreateSnapshotQuery() { + validateQueryInCategory("CreateSnapshot", "Elastic Block Store"); + } + + @Test + public void testCreateVolumeQuery() { + validateQueryInCategory("CreateVolume", "Elastic Block Store"); + } + + @Test + public void testDeleteSnapshotQuery() { + validateQueryInCategory("DeleteSnapshot", "Elastic Block Store"); + } + + @Test + public void testAllocateAddressQuery() { + validateQueryInCategory("AllocateAddress", "Elastic IP Addresses"); + } + + @Test + public void testDisassociateAddressQuery() { + validateQueryInCategory("DisassociateAddress", "Elastic IP Addresses"); + } + + @Test + public void testReleaseAddressQuery() { + validateQueryInCategory("ReleaseAddress", "Elastic IP Addresses"); + } + + @Test + public void testAssociateAddressQuery() { + validateQueryInCategory("AssociateAddress", "Elastic IP Addresses"); + } + + @Test + public void testDescribeAddressesQuery() { + validateQueryInCategory("DescribeAddresses", "Elastic IP Addresses"); + } + + @Test + public void testGetConsoleOutputQuery() { + validateQueryInCategory("GetConsoleOutput", "General"); + } + + @Test + public void testResetImageAttributeQuery() { + validateQueryInCategory("ResetImageAttribute", "Images"); + } + + @Test + public void testRegisterImageQuery() { + validateQueryInCategory("RegisterImage", "Images"); + } + + @Test + public void testTerminateInstancesQuery() { + validateQueryInCategory("TerminateInstances", "Instances"); + } + + @Test + public void testDescribeInstancesQuery() { + validateQueryInCategory("DescribeInstances", "Instances"); + } + + @Test + public void testRunInstancesQuery() { + validateQueryInCategory("RunInstances", "Instances"); + } + + @Test + public void testRebootInstancesQuery() { + validateQueryInCategory("RebootInstances", "Instances"); + } + + @Test + public void testDescribeKeyPairsQuery() { + validateQueryInCategory("DescribeKeyPairs", "Key Pairs"); + } + + @Test + public void testCreateKeyPairQuery() { + validateQueryInCategory("CreateKeyPair", "Key Pairs"); + } + + @Test + public void testDeleteKeyPairQuery() { + validateQueryInCategory("DeleteKeyPair", "Key Pairs"); + } + + @Test + public void testMonitorInstancesQuery() { + validateQueryInCategory("MonitorInstances", "Monitoring"); + } + + @Test + public void testUnmonitorInstancesQuery() { + validateQueryInCategory("UnmonitorInstances", "Monitoring"); + } + + @Test + public void testDescribeReservedInstancesQuery() { + validateQueryInCategory("DescribeReservedInstances", "Reserved Instances"); + } + + @Test + public void testDescribeReservedInstancesOfferingsQuery() { + validateQueryInCategory("DescribeReservedInstancesOfferings", "Reserved Instances"); + } + + @Test + public void testPurchaseReservedInstancesOfferingQuery() { + validateQueryInCategory("PurchaseReservedInstancesOffering", "Reserved Instances"); + } + + @Test + public void testDescribeSecurityGroupsQuery() { + validateQueryInCategory("DescribeSecurityGroups", "Security Groups"); + } + + @Test + public void testAuthorizeSecurityGroupIngressQuery() { + validateQueryInCategory("AuthorizeSecurityGroupIngress", "Security Groups"); + } + + @Test + public void testCreateSecurityGroupQuery() { + validateQueryInCategory("CreateSecurityGroup", "Security Groups"); + } + + @Test + public void testDeleteSecurityGroupQuery() { + validateQueryInCategory("DeleteSecurityGroup", "Security Groups"); + } + + @Test + public void testRevokeSecurityGroupIngressQuery() { + validateQueryInCategory("RevokeSecurityGroupIngress", "Security Groups"); + } + + @Test + public void testCancelBundleTaskQuery() { + validateQueryInCategory("CancelBundleTask", "Windows"); + } + + @Test + public void testDescribeBundleTasksQuery() { + validateQueryInCategory("DescribeBundleTasks", "Windows"); + } + + @Test + public void testBundleInstanceQuery() { + validateQueryInCategory("BundleInstance", "Windows"); + } + + @Test + public void testReservationSetTypeBean() { + validateDataType(getModel().getDataTypes().get("ReservationSetType")); + } + + @Test + public void testDeleteKeyPairResponseBean() { + validateDataType(getModel().getDataTypes().get("DeleteKeyPairResponse")); + } + + @Test + public void testDescribeKeyPairsResponseInfoTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeKeyPairsResponseInfoType")); + } + + @Test + public void testAuthorizeSecurityGroupIngressResponseBean() { + validateDataType(getModel().getDataTypes().get("AuthorizeSecurityGroupIngressResponse")); + } + + @Test + public void testAttachmentSetItemResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("AttachmentSetItemResponseType")); + } + + @Test + public void testDescribeAddressesResponseInfoTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeAddressesResponseInfoType")); + } + + @Test + public void testDescribeReservedInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeReservedInstancesResponse")); + } + + @Test + public void testDescribeVolumesSetItemResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeVolumesSetItemResponseType")); + } + + @Test + public void testLaunchPermissionItemTypeBean() { + validateDataType(getModel().getDataTypes().get("LaunchPermissionItemType")); + } + + @Test + public void testDescribeSnapshotsSetItemResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeSnapshotsSetItemResponseType")); + } + + @Test + public void testRunningInstancesItemTypeBean() { + validateDataType(getModel().getDataTypes().get("RunningInstancesItemType")); + } + + @Test + public void testDescribeReservedInstancesOfferingsResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeReservedInstancesOfferingsResponse")); + } + + @Test + public void testBlockDeviceMappingTypeBean() { + validateDataType(getModel().getDataTypes().get("BlockDeviceMappingType")); + } + + @Test + public void testResetImageAttributeResponseBean() { + validateDataType(getModel().getDataTypes().get("ResetImageAttributeResponse")); + } + + @Test + public void testAvailabilityZoneSetTypeBean() { + validateDataType(getModel().getDataTypes().get("AvailabilityZoneSetType")); + } + + @Test + public void testRevokeSecurityGroupIngressResponseBean() { + validateDataType(getModel().getDataTypes().get("RevokeSecurityGroupIngressResponse")); + } + + @Test + public void testReservationInfoTypeBean() { + validateDataType(getModel().getDataTypes().get("ReservationInfoType")); + } + + @Test + public void testRebootInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("RebootInstancesResponse")); + } + + @Test + public void testGroupItemTypeBean() { + validateDataType(getModel().getDataTypes().get("GroupItemType")); + } + + @Test + public void testAvailabilityZoneItemTypeBean() { + validateDataType(getModel().getDataTypes().get("AvailabilityZoneItemType")); + } + + @Test + public void testRunningInstancesSetTypeBean() { + validateDataType(getModel().getDataTypes().get("RunningInstancesSetType")); + } + + @Test + public void testCreateSecurityGroupResponseBean() { + validateDataType(getModel().getDataTypes().get("CreateSecurityGroupResponse")); + } + + @Test + public void testReleaseAddressResponseBean() { + validateDataType(getModel().getDataTypes().get("ReleaseAddressResponse")); + } + + @Test + public void testSecurityGroupItemTypeBean() { + validateDataType(getModel().getDataTypes().get("SecurityGroupItemType")); + } + + @Test + public void testNullableAttributeValueTypeBean() { + validateDataType(getModel().getDataTypes().get("NullableAttributeValueType")); + } + + @Test + public void testDescribeSnapshotsResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeSnapshotsResponse")); + } + + @Test + public void testBundleInstanceResponseBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceResponse")); + } + + @Test + public void testDescribeKeyPairsResponseItemTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeKeyPairsResponseItemType")); + } + + @Test + public void testBundleInstanceTasksSetTypeBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceTasksSetType")); + } + + @Test + public void testDescribeAddressesResponseItemTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeAddressesResponseItemType")); + } + + @Test + public void testMonitorInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("MonitorInstancesResponse")); + } + + @Test + public void testDescribeImagesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeImagesResponse")); + } + + @Test + public void testMonitorInstancesResponseSetItemTypeBean() { + validateDataType(getModel().getDataTypes().get("MonitorInstancesResponseSetItemType")); + } + + @Test + public void testBundleInstanceTaskErrorTypeBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceTaskErrorType")); + } + + @Test + public void testProductCodesSetTypeBean() { + validateDataType(getModel().getDataTypes().get("ProductCodesSetType")); + } + + @Test + public void testUnmonitorInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("UnmonitorInstancesResponse")); + } + + @Test + public void testIpPermissionTypeBean() { + validateDataType(getModel().getDataTypes().get("IpPermissionType")); + } + + @Test + public void testIpPermissionSetTypeBean() { + validateDataType(getModel().getDataTypes().get("IpPermissionSetType")); + } + + @Test + public void testDeleteSecurityGroupResponseBean() { + validateDataType(getModel().getDataTypes().get("DeleteSecurityGroupResponse")); + } + + @Test + public void testRunInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("RunInstancesResponse")); + } + + @Test + public void testDeregisterImageResponseBean() { + validateDataType(getModel().getDataTypes().get("DeregisterImageResponse")); + } + + @Test + public void testTerminateInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("TerminateInstancesResponse")); + } + + @Test + public void testDescribeSnapshotsSetResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeSnapshotsSetResponseType")); + } + + @Test + public void testDescribeReservedInstancesOfferingsResponseSetTypeBean() { + validateDataType(getModel().getDataTypes().get( + "DescribeReservedInstancesOfferingsResponseSetType")); + } + + @Test + public void testBundleInstanceTaskTypeBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceTaskType")); + } + + @Test + public void testConfirmProductInstanceResponseBean() { + validateDataType(getModel().getDataTypes().get("ConfirmProductInstanceResponse")); + } + + @Test + public void testCreateKeyPairResponseBean() { + validateDataType(getModel().getDataTypes().get("CreateKeyPairResponse")); + } + + @Test + public void testRegisterImageResponseBean() { + validateDataType(getModel().getDataTypes().get("RegisterImageResponse")); + } + + @Test + public void testIpRangeSetTypeBean() { + validateDataType(getModel().getDataTypes().get("IpRangeSetType")); + } + + @Test + public void testRegionSetTypeBean() { + validateDataType(getModel().getDataTypes().get("RegionSetType")); + } + + @Test + public void testInstanceStateTypeBean() { + validateDataType(getModel().getDataTypes().get("InstanceStateType")); + } + + @Test + public void testDescribeReservedInstancesOfferingsResponseSetItemTypeBean() { + validateDataType(getModel().getDataTypes().get( + "DescribeReservedInstancesOfferingsResponseSetItemType")); + } + + @Test + public void testBundleInstanceS3StorageTypeBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceS3StorageType")); + } + + @Test + public void testDescribeVolumesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeVolumesResponse")); + } + + @Test + public void testTerminateInstancesResponseInfoTypeBean() { + validateDataType(getModel().getDataTypes().get("TerminateInstancesResponseInfoType")); + } + + @Test + public void testDeleteSnapshotResponseBean() { + validateDataType(getModel().getDataTypes().get("DeleteSnapshotResponse")); + } + + @Test + public void testBundleInstanceTaskStorageTypeBean() { + validateDataType(getModel().getDataTypes().get("BundleInstanceTaskStorageType")); + } + + @Test + public void testDescribeAvailabilityZonesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeAvailabilityZonesResponse")); + } + + @Test + public void testCreateVolumeResponseBean() { + validateDataType(getModel().getDataTypes().get("CreateVolumeResponse")); + } + + @Test + public void testDescribeReservedInstancesResponseSetTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeReservedInstancesResponseSetType")); + } + + @Test + public void testDescribeAddressesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeAddressesResponse")); + } + + @Test + public void testInstanceMonitoringStateTypeBean() { + validateDataType(getModel().getDataTypes().get("InstanceMonitoringStateType")); + } + + @Test + public void testDetachVolumeResponseBean() { + validateDataType(getModel().getDataTypes().get("DetachVolumeResponse")); + } + + @Test + public void testDescribeKeyPairsResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeKeyPairsResponse")); + } + + @Test + public void testAttachVolumeResponseBean() { + validateDataType(getModel().getDataTypes().get("AttachVolumeResponse")); + } + + @Test + public void testDescribeBundleTasksResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeBundleTasksResponse")); + } + + @Test + public void testTerminateInstancesResponseItemTypeBean() { + validateDataType(getModel().getDataTypes().get("TerminateInstancesResponseItemType")); + } + + @Test + public void testSecurityGroupSetTypeBean() { + validateDataType(getModel().getDataTypes().get("SecurityGroupSetType")); + } + + @Test + public void testAttachmentSetResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("AttachmentSetResponseType")); + } + + @Test + public void testDescribeImageAttributeResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeImageAttributeResponse")); + } + + @Test + public void testPurchaseReservedInstancesOfferingResponseBean() { + validateDataType(getModel().getDataTypes().get("PurchaseReservedInstancesOfferingResponse")); + } + + @Test + public void testCreateSnapshotResponseBean() { + validateDataType(getModel().getDataTypes().get("CreateSnapshotResponse")); + } + + @Test + public void testGroupSetTypeBean() { + validateDataType(getModel().getDataTypes().get("GroupSetType")); + } + + @Test + public void testProductCodesSetItemTypeBean() { + validateDataType(getModel().getDataTypes().get("ProductCodesSetItemType")); + } + + @Test + public void testAllocateAddressResponseBean() { + validateDataType(getModel().getDataTypes().get("AllocateAddressResponse")); + } + + @Test + public void testProductCodeItemTypeBean() { + validateDataType(getModel().getDataTypes().get("ProductCodeItemType")); + } + + @Test + public void testUserIdGroupPairTypeBean() { + validateDataType(getModel().getDataTypes().get("UserIdGroupPairType")); + } + + @Test + public void testDescribeVolumesSetResponseTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeVolumesSetResponseType")); + } + + @Test + public void testProductCodeListTypeBean() { + validateDataType(getModel().getDataTypes().get("ProductCodeListType")); + } + + @Test + public void testDescribeRegionsResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeRegionsResponse")); + } + + @Test + public void testRegionItemTypeBean() { + validateDataType(getModel().getDataTypes().get("RegionItemType")); + } + + @Test + public void testDescribeInstancesResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeInstancesResponse")); + } + + @Test + public void testDescribeImagesResponseItemTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeImagesResponseItemType")); + } + + @Test + public void testLaunchPermissionListTypeBean() { + validateDataType(getModel().getDataTypes().get("LaunchPermissionListType")); + } + + @Test + public void testBlockDeviceMappingItemTypeBean() { + validateDataType(getModel().getDataTypes().get("BlockDeviceMappingItemType")); + } + + @Test + public void testDeleteVolumeResponseBean() { + validateDataType(getModel().getDataTypes().get("DeleteVolumeResponse")); + } + + @Test + public void testDescribeImagesResponseInfoTypeBean() { + validateDataType(getModel().getDataTypes().get("DescribeImagesResponseInfoType")); + } + + @Test + public void testIpRangeItemTypeBean() { + validateDataType(getModel().getDataTypes().get("IpRangeItemType")); + } + + @Test + public void testDisassociateAddressResponseBean() { + validateDataType(getModel().getDataTypes().get("DisassociateAddressResponse")); + } + + @Test + public void testUserIdGroupPairSetTypeBean() { + validateDataType(getModel().getDataTypes().get("UserIdGroupPairSetType")); + } + + @Test + public void testCancelBundleTaskResponseBean() { + validateDataType(getModel().getDataTypes().get("CancelBundleTaskResponse")); + } + + @Test + public void testMonitorInstancesResponseSetTypeBean() { + validateDataType(getModel().getDataTypes().get("MonitorInstancesResponseSetType")); + } + + @Test + public void testDescribeReservedInstancesResponseSetItemTypeBean() { + validateDataType(getModel().getDataTypes().get( + "DescribeReservedInstancesResponseSetItemType")); + } + + @Test + public void testDescribeSecurityGroupsResponseBean() { + validateDataType(getModel().getDataTypes().get("DescribeSecurityGroupsResponse")); + } + + @Test + public void testGetConsoleOutputResponseBean() { + validateDataType(getModel().getDataTypes().get("GetConsoleOutputResponse")); + } + + @Test + public void testModifyImageAttributeResponseBean() { + validateDataType(getModel().getDataTypes().get("ModifyImageAttributeResponse")); + } + + @Test + public void testAssociateAddressResponseBean() { + validateDataType(getModel().getDataTypes().get("AssociateAddressResponse")); + } +} diff --git a/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToFieldTest.java b/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToFieldTest.java new file mode 100644 index 0000000000..7acc3aa377 --- /dev/null +++ b/codegen/ec2/src/test/java/org/jclouds/codegen/ec2/queryapi/transform/ConvertContentToFieldTest.java @@ -0,0 +1,107 @@ +package org.jclouds.codegen.ec2.queryapi.transform; + +import static org.testng.Assert.*; + +import org.testng.annotations.Test; + +/** + * Tests to ensure that we can transform EC2 {@link Content contents} to jclouds {@link Field + * fields} + * + * @author Adrian Cole + */ +@Test(testName = "ec2.ConvertContentToFieldTest") +public class ConvertContentToFieldTest { + + // sub parse_java_type { + // $_ = shift; + // s/xsd:string/String/; + // s/xsd:boolean/Boolean/; + // s/xsd:Int/Integer/; + // s/xsd:dateTime/DateTime/; + // if (/Type/ || /Item/ || /Info/) { + // my $awsType = $_; + // my $javaType = get_java_name($awsType); + // #if ( !/Response/ ) { + // $domain->{$awsType} = { + // awsType => $awsType, + // javaType => $javaType, + // packageName => $domain_package, + // className => $domain_package . "." . $javaType, + // see => ["${refUrl}/ApiReference-ItemType-${awsType}.html"], + // fields => + // build_fields("${refUrl}/ApiReference-ItemType-$awsType.html") + // }; + // #} + // $_ = $javaType; + // } + // + // return $_; + // } + // + // sub get_java_name { + // $_ = shift; + // if (/sSetType/) { + // s/sSetType//; + // return "Set<$_>"; + // } + // if (/ListType/) { + // s/ListType//; + // return "List<$_>"; + // } + // if (/sResponseInfoType/){ + // s/sResponseInfoType//; + // return "Set<$_>"; + // } + // if (/sSetItemType/) { + // s/sSetItemType//; + // } + // if (/sResponseItemType/){ + // s/sResponseItemType//; + // } + // if (/sItemType/) { + // s/sItemType//; + // } + // if (/sSet/) { + // s/sSet//; + // } + // if (/Set/) { + // s/Set//; + // } + // if (/Type/) { + // s/Type//; + // } + // if (/Item/) { + // s/Item//; + // } + // if (/Info/) { + // s/Info//; + // } + // return $_; + // } + + @Test + void testParseJavaTypeForxsd_string() { + ConvertContentToField converter = new ConvertContentToField(); + assertEquals(converter.parseJavaType("xsd:string"), "String"); + } + + @Test + void testParseJavaTypeForxsd_Int() { + ConvertContentToField converter = new ConvertContentToField(); + assertEquals(converter.parseJavaType("xsd:Int"), "Integer"); + } + + @Test + void testParseJavaTypeForxsd_boolean() { + ConvertContentToField converter = new ConvertContentToField(); + assertEquals(converter.parseJavaType("xsd:boolean"), "Boolean"); + } + + @Test + void testParseJavaTypeForxsd_dateTime() { + ConvertContentToField converter = new ConvertContentToField(); + assertEquals(converter.parseJavaType("xsd:dateTime"), "org.joda.time.DateTime"); + } + +} diff --git a/codegen/pom.xml b/codegen/pom.xml index 97e2497ac2..8f7b6f0ade 100644 --- a/codegen/pom.xml +++ b/codegen/pom.xml @@ -1,108 +1,106 @@ - + http://www.apache.org/licenses/LICENSE-2.0.html Unless required by + applicable law or agreed to in writing, software distributed under the + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for + the specific language governing permissions and limitations under the + License. + ==================================================================== + --> - - jclouds-project - org.jclouds - 1.0-SNAPSHOT - ../project/pom.xml - - 4.0.0 - jclouds-codegen - jclouds code generator - jar - jclouds code generator + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + jclouds-codegen-project + org.jclouds + 1.0-SNAPSHOT + ../project/pom.xml + + 4.0.0 + jclouds-codegen-core + jclouds code generator + jar + jclouds code generator - - scm:svn:http://jclouds.googlecode.com/svn/trunk/codegen - scm:svn:https://jclouds.googlecode.com/svn/trunk/codegen - http://jclouds.googlecode.com/svn/trunk/codegen - + + scm:svn:http://jclouds.googlecode.com/svn/trunk/codegen/core + scm:svn:https://jclouds.googlecode.com/svn/trunk/codegen/core + http://jclouds.googlecode.com/svn/trunk/codegen/core + - - - gson - http://google-gson.googlecode.com/svn/mavenrepo - - true - - - true - - - + + + gson + http://google-gson.googlecode.com/svn/mavenrepo + + - + - com.google.code.gson - gson - 1.3 - compile + commons-io + commons-io + 1.4 - - org.freemarker - freemarker - 2.3.14 - - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - org.jclouds.codegen.util.CodeGenerator - - - - - - maven-assembly-plugin - - - jar-with-dependencies - - - - - make-assembly - package - - single - - - - - - + + com.google.code.gson + gson + 1.3 + compile + + + org.freemarker + freemarker + 2.3.14 + + + com.google.collections + google-collections + 1.0-rc1 + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.jclouds.codegen.util.CodeGenerator + + + + + + maven-assembly-plugin + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Model.java b/codegen/src/main/java/org/jclouds/codegen/model/API.java similarity index 79% rename from codegen/src/main/java/org/jclouds/codegen/model/Model.java rename to codegen/src/main/java/org/jclouds/codegen/model/API.java index 14de8f8150..c69f8a1e3e 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/Model.java +++ b/codegen/src/main/java/org/jclouds/codegen/model/API.java @@ -27,23 +27,31 @@ import java.util.List; import java.util.Map; /** - * + * @author Adrian Cole * @author James Murty */ -public class Model { +public class API { private List packages; - private Map domain; + private Map domain; @Override public String toString() { - return packages.toString(); + return getPackages().toString(); + } + + public void setPackages(List packages) { + this.packages = packages; } public List getPackages() { return packages; } - public Map getDomain() { + public void setDomain(Map domain) { + this.domain = domain; + } + + public Map getDomain() { return domain; } } diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Command.java b/codegen/src/main/java/org/jclouds/codegen/model/Command.java index 6f5168f8c5..fc1d43cc46 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/Command.java +++ b/codegen/src/main/java/org/jclouds/codegen/model/Command.java @@ -23,37 +23,45 @@ */ package org.jclouds.codegen.model; -import java.util.List; - /** - * + * @author Adrian Cole * @author James Murty */ -public class Command extends BaseBean { - private List parameters; - private Options options; - private Handler handler; - private Response response; - private List see; - - public List getParameters() { - return parameters; - } - - public Options getOptions() { - return options; - } +public class Command extends TopLevelType { + private TopLevelType options; + private TopLevelType handler; + private DomainType response; + private String description; - public Handler getHandler() { - return handler; - } - - public Response getResponse() { - return response; - } - - public List getSee() { - return see; - } - + public void setDescription(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } + + public void setOptions(TopLevelType options) { + this.options = options; + } + + public TopLevelType getOptions() { + return options; + } + + public void setHandler(TopLevelType handler) { + this.handler = handler; + } + + public TopLevelType getHandler() { + return handler; + } + + public void setResponse(DomainType response) { + this.response = response; + } + + public DomainType getResponse() { + return response; + } } diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Handler.java b/codegen/src/main/java/org/jclouds/codegen/model/DomainType.java similarity index 80% rename from codegen/src/main/java/org/jclouds/codegen/model/Handler.java rename to codegen/src/main/java/org/jclouds/codegen/model/DomainType.java index ba594e8c27..3186a8a4f4 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/Handler.java +++ b/codegen/src/main/java/org/jclouds/codegen/model/DomainType.java @@ -23,22 +23,17 @@ */ package org.jclouds.codegen.model; -import java.util.List; -/** - * - * @author James Murty - */ -public class Handler extends BaseBean { - private String example; - private List see; - - public String getExample() { - return example; - } - - public List getSee() { - return see; - } +public class DomainType extends Type { -} + private String ancestor; + + public void setAncestor(String ancestor) { + this.ancestor = ancestor; + } + + public String getAncestor() { + return ancestor; + } + +} \ No newline at end of file diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Field.java b/codegen/src/main/java/org/jclouds/codegen/model/Field.java new file mode 100644 index 0000000000..6f27899aba --- /dev/null +++ b/codegen/src/main/java/org/jclouds/codegen/model/Field.java @@ -0,0 +1,116 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.codegen.model; + +import java.util.Map; + +/** + * + * @author Adrian Cole + */ +public class Field { + + private String constraints; + private String defaultValue; + private String desc; + private String name; + private String javaName; + private boolean optional = true; + private String type; + private String javaType; + private Map valueMap; + + public void setConstraints(String constraints) { + this.constraints = constraints; + } + + public String getConstraints() { + return constraints; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public String getDefaultValue() { + return defaultValue; + } + + public void setDesc(String desc) { + this.desc = desc; + } + + public String getDesc() { + return desc; + } + + public void setValueMap(Map valueMap) { + this.valueMap = valueMap; + } + + public Map getValueMap() { + return valueMap; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setOptional(boolean optional) { + this.optional = optional; + } + + public boolean getOptional() { + return optional; + } + + public void setType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + + public void setJavaName(String javaName) { + this.javaName = javaName; + } + + public String getJavaName() { + return javaName; + } + + public void setJavaType(String javaType) { + this.javaType = javaType; + } + + public String getJavaType() { + return javaType; + } + +} diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Options.java b/codegen/src/main/java/org/jclouds/codegen/model/Options.java deleted file mode 100644 index 13660ef21f..0000000000 --- a/codegen/src/main/java/org/jclouds/codegen/model/Options.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * - * Copyright (C) 2009 Global Cloud Specialists, Inc. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.codegen.model; - -import java.util.List; - -/** - * - * @author James Murty - */ -public class Options extends BaseBean { - private List parameters; - private String example; - private List see; - - public List getParameters() { - return parameters; - } - - public String getExample() { - return example; - } - public List getSee() { - return see; - } - -} diff --git a/codegen/src/main/java/org/jclouds/codegen/model/ResponseField.java b/codegen/src/main/java/org/jclouds/codegen/model/TopLevelType.java similarity index 66% rename from codegen/src/main/java/org/jclouds/codegen/model/ResponseField.java rename to codegen/src/main/java/org/jclouds/codegen/model/TopLevelType.java index a93316de41..c5f05cbe5c 100644 --- a/codegen/src/main/java/org/jclouds/codegen/model/ResponseField.java +++ b/codegen/src/main/java/org/jclouds/codegen/model/TopLevelType.java @@ -23,39 +23,35 @@ */ package org.jclouds.codegen.model; -/** - * - * @author James Murty - */ -public class ResponseField { - private String javaName; - private String desc; - private String name; - private String type; - private String javaType; - public String getDesc() { - return desc; +public class TopLevelType extends Type { + + private String ancestor; + private String exampleCode; + private String exampleHTML; + + public void setAncestor(String ancestor) { + this.ancestor = ancestor; } - public String getName() { - return name; + public String getAncestor() { + return ancestor; } - public String getType() { - return type; + public void setExampleCode(String exampleCode) { + this.exampleCode = exampleCode; } - public String getJavaType() { - return javaType; + public String getExampleCode() { + return exampleCode; } - public void setJavaName(String javaName) { - this.javaName = javaName; + public void setExampleHTML(String exampleHTML) { + this.exampleHTML = exampleHTML; } - public String getJavaName() { - return javaName; + public String getExampleHTML() { + return exampleHTML; } -} +} \ No newline at end of file diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Type.java b/codegen/src/main/java/org/jclouds/codegen/model/Type.java new file mode 100644 index 0000000000..babc3075cb --- /dev/null +++ b/codegen/src/main/java/org/jclouds/codegen/model/Type.java @@ -0,0 +1,74 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2009, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jclouds.codegen.model; + +import java.util.Set; + +public class Type { + + private String packageName; + private String name; + private String javaName; + private Set see; + private Set fields; + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setJavaName(String javaName) { + this.javaName = javaName; + } + + public String getJavaName() { + return javaName; + } + + public void setSee(Set see) { + this.see = see; + } + + public Set getSee() { + return see; + } + + public void setFields(Set fields) { + this.fields = fields; + } + + public Set getFields() { + return fields; + } + + public void setPackageName(String packageName) { + this.packageName = packageName; + } + + public String getPackageName() { + return packageName; + } + +} \ No newline at end of file diff --git a/codegen/src/main/java/org/jclouds/codegen/model/Value.java b/codegen/src/main/java/org/jclouds/codegen/model/Value.java deleted file mode 100644 index 62afdf6b1b..0000000000 --- a/codegen/src/main/java/org/jclouds/codegen/model/Value.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Copyright (C) 2009 Global Cloud Specialists, Inc. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.codegen.model; - -import java.util.List; - -/** - * - * @author James Murty - */ -public class Value extends BaseBean { - private List fields; - private String javaType; - private List see; - - public List getFields() { - return fields; - } - - public String getJavaType() { - return javaType; - } - - public List getSee() { - return see; - } - -} diff --git a/codegen/src/main/java/org/jclouds/codegen/model/ValueField.java b/codegen/src/main/java/org/jclouds/codegen/model/ValueField.java deleted file mode 100644 index 341124db0f..0000000000 --- a/codegen/src/main/java/org/jclouds/codegen/model/ValueField.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * - * Copyright (C) 2009 Global Cloud Specialists, Inc. - * - * ==================================================================== - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * ==================================================================== - */ -package org.jclouds.codegen.model; - -/** - * - * @author James Murty - */ -public class ValueField { - private String desc; - private String name; - private String type; - private String javaType; - - public String getDesc() { - return desc; - } - - public String getName() { - return name; - } - - public String getType() { - return type; - } - - public String getJavaType() { - return javaType; - } - -} diff --git a/codegen/src/main/java/org/jclouds/codegen/util/CodeGenerator.java b/codegen/src/main/java/org/jclouds/codegen/util/CodeGenerator.java index 92c8728b44..0d3214d635 100644 --- a/codegen/src/main/java/org/jclouds/codegen/util/CodeGenerator.java +++ b/codegen/src/main/java/org/jclouds/codegen/util/CodeGenerator.java @@ -32,11 +32,11 @@ import java.io.Writer; import java.util.HashMap; import java.util.Map; -import org.jclouds.codegen.model.BaseBean; +import org.jclouds.codegen.model.API; import org.jclouds.codegen.model.Command; -import org.jclouds.codegen.model.Model; +import org.jclouds.codegen.model.DomainType; import org.jclouds.codegen.model.Package; -import org.jclouds.codegen.model.Value; +import org.jclouds.codegen.model.Type; import com.google.gson.Gson; import com.google.gson.JsonParseException; @@ -89,10 +89,10 @@ public class CodeGenerator { * @throws JsonParseException * @throws FileNotFoundException */ - public Model parseModelFromJSON(File objectModelFile) throws JsonParseException, + public API parseModelFromJSON(File objectModelFile) throws JsonParseException, FileNotFoundException { Gson gson = new Gson(); - return gson.fromJson(new FileReader(objectModelFile), Model.class); + return gson.fromJson(new FileReader(objectModelFile), API.class); } /** @@ -106,7 +106,7 @@ public class CodeGenerator { */ public void generateCode(File objectModelFile) throws JsonParseException, IOException, TemplateException { - Model model = parseModelFromJSON(objectModelFile); + API model = parseModelFromJSON(objectModelFile); for (Package pkg : model.getPackages()) { for (Command command : pkg.getCommands()) { @@ -116,17 +116,17 @@ public class CodeGenerator { generateClassFile(command.getHandler(), BEAN_TEMPLATE_FILENAME); } if (command.getOptions() != null - && command.getOptions().getClassName().indexOf( + && command.getOptions().getJavaName().indexOf( "BaseEC2RequestOptions") == -1) { generateClassFile(command.getOptions(), OPTIONS_TEMPLATE_FILENAME); } if (command.getResponse() != null - && !command.getResponse().getJavaType().equals("Boolean")) { + && !command.getResponse().getJavaName().equals("Boolean")) { generateClassFile(command.getResponse(), RESPONSE_TEMPLATE_FILENAME); } } } - for (Value value : model.getDomain().values()) { + for (DomainType value : model.getDomain().values()) { generateClassFile(value, VALUE_TEMPLATE_FILENAME); } @@ -141,10 +141,10 @@ public class CodeGenerator { * @throws IOException * @throws TemplateException */ - public void generateClassFile(BaseBean bean, String templateFileName) throws IOException, + public void generateClassFile(Type bean, String templateFileName) throws IOException, TemplateException { - String shortClassName = bean.getClassName().substring( - bean.getClassName().lastIndexOf('.') + 1); + String shortClassName = bean.getJavaName().substring( + bean.getJavaName().lastIndexOf('.') + 1); Map objectMap = new HashMap(); objectMap.put("bean", bean);