├── .coveragerc ├── .gitignore ├── .travis.yml ├── CHANGELOG.rst ├── CONTRIBUTING.rst ├── LICENSE.txt ├── MANIFEST.in ├── README.rst ├── awscli ├── __init__.py ├── argparser.py ├── argprocess.py ├── arguments.py ├── clidocs.py ├── clidriver.py ├── compat.py ├── completer.py ├── customizations │ ├── __init__.py │ ├── addexamples.py │ ├── argrename.py │ ├── arguments.py │ ├── assumerole.py │ ├── cliinputjson.py │ ├── cloudsearch.py │ ├── cloudsearchdomain.py │ ├── cloudtrail.py │ ├── codedeploy.py │ ├── commands.py │ ├── configservice │ │ ├── __init__.py │ │ ├── getstatus.py │ │ ├── rename_cmd.py │ │ └── subscribe.py │ ├── configure.py │ ├── datapipeline │ │ ├── __init__.py │ │ └── translator.py │ ├── dryrundocs.py │ ├── ec2addcount.py │ ├── ec2bundleinstance.py │ ├── ec2decryptpassword.py │ ├── ec2protocolarg.py │ ├── ec2runinstances.py │ ├── ec2secgroupsimplify.py │ ├── emr │ │ ├── .helptext.py.swp │ │ ├── __init__.py │ │ ├── addinstancegroups.py │ │ ├── addsteps.py │ │ ├── addtags.py │ │ ├── applicationutils.py │ │ ├── argumentschema.py │ │ ├── constants.py │ │ ├── createcluster.py │ │ ├── createdefaultroles.py │ │ ├── describecluster.py │ │ ├── emr.py │ │ ├── emrutils.py │ │ ├── exceptions.py │ │ ├── hbase.py │ │ ├── hbaseutils.py │ │ ├── helptext.py │ │ ├── installapplications.py │ │ ├── instancegroupsutils.py │ │ ├── listclusters.py │ │ ├── modifyclusterattributes.py │ │ ├── ssh.py │ │ ├── sshutils.py │ │ ├── steputils.py │ │ └── terminateclusters.py │ ├── flatten.py │ ├── generatecliskeleton.py │ ├── globalargs.py │ ├── iamvirtmfa.py │ ├── opsworks.py │ ├── paginate.py │ ├── preview.py │ ├── putmetricdata.py │ ├── rds.py │ ├── removals.py │ ├── s3 │ │ ├── __init__.py │ │ ├── comparator.py │ │ ├── executor.py │ │ ├── fileformat.py │ │ ├── filegenerator.py │ │ ├── fileinfo.py │ │ ├── fileinfobuilder.py │ │ ├── filters.py │ │ ├── s3.py │ │ ├── s3handler.py │ │ ├── subcommands.py │ │ ├── syncstrategy │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── delete.py │ │ │ ├── exacttimestamps.py │ │ │ ├── register.py │ │ │ └── sizeonly.py │ │ ├── tasks.py │ │ ├── transferconfig.py │ │ └── utils.py │ ├── s3endpoint.py │ ├── s3errormsg.py │ ├── scalarparse.py │ ├── service.py │ ├── sessendemail.py │ ├── streamingoutputarg.py │ ├── toplevelbool.py │ ├── utils.py │ └── waiters.py ├── data │ └── cli.json ├── errorhandler.py ├── examples │ ├── autoscaling │ │ ├── attach-instances.rst │ │ ├── create-auto-scaling-group.rst │ │ ├── create-launch-configuration.rst │ │ ├── create-or-update-tags.rst │ │ ├── delete-auto-scaling-group.rst │ │ ├── delete-launch-configuration.rst │ │ ├── delete-notification-configuration.rst │ │ ├── delete-policy.rst │ │ ├── delete-scheduled-action.rst │ │ ├── delete-tags.rst │ │ ├── describe-account-limits.rst │ │ ├── describe-adjustment-types.rst │ │ ├── describe-auto-scaling-groups.rst │ │ ├── describe-auto-scaling-instances.rst │ │ ├── describe-auto-scaling-notification-types.rst │ │ ├── describe-launch-configurations.rst │ │ ├── describe-metric-collection-types.rst │ │ ├── describe-notification-configurations.rst │ │ ├── describe-policies.rst │ │ ├── describe-scaling-activities.rst │ │ ├── describe-scaling-process-types.rst │ │ ├── describe-scheduled-actions.rst │ │ ├── describe-tags.rst │ │ ├── describe-termination-policy-types.rst │ │ ├── disable-metrics-collection.rst │ │ ├── enable-metrics-collection.rst │ │ ├── execute-policy.rst │ │ ├── put-notification-configuration.rst │ │ ├── put-scaling-policy.rst │ │ ├── put-scheduled-update-group-action.rst │ │ ├── resume-processes.rst │ │ ├── set-desired-capacity.rst │ │ ├── suspend-processes.rst │ │ ├── terminate-instance-in-auto-scaling-group.rst │ │ └── update-auto-scaling-group.rst │ ├── cloudformation │ │ ├── create-stack.rst │ │ ├── describe-stacks.rst │ │ ├── get-template.rst │ │ ├── list-stacks.rst │ │ ├── update-stack.rst │ │ └── validate-template.rst │ ├── cloudwatch │ │ ├── delete-alarms.rst │ │ ├── describe-alarm-history.rst │ │ ├── describe-alarms-for-metric.rst │ │ ├── describe-alarms.rst │ │ ├── disable-alarm-actions.rst │ │ ├── enable-alarm-actions.rst │ │ ├── get-metric-statistics.rst │ │ ├── list-metrics.rst │ │ ├── put-metric-alarm.rst │ │ ├── put-metric-data.rst │ │ └── set-alarm-state.rst │ ├── configure │ │ ├── _description.rst │ │ ├── get │ │ │ ├── _description.rst │ │ │ └── _examples.rst │ │ └── set │ │ │ ├── _description.rst │ │ │ └── _examples.rst │ ├── deploy │ │ ├── batch-get-applications.rst │ │ ├── batch-get-deployments.rst │ │ ├── create-application.rst │ │ ├── create-deployment-config.rst │ │ ├── create-deployment-group.rst │ │ ├── create-deployment.rst │ │ ├── delete-application.rst │ │ ├── delete-deployment-config.rst │ │ ├── delete-deployment-group.rst │ │ ├── get-application-revision.rst │ │ ├── get-application.rst │ │ ├── get-deployment-config.rst │ │ ├── get-deployment-group.rst │ │ ├── get-deployment-instance.rst │ │ ├── get-deployment.rst │ │ ├── list-application-revisions.rst │ │ ├── list-applications.rst │ │ ├── list-deployment-configs.rst │ │ ├── list-deployment-groups.rst │ │ ├── list-deployment-instances.rst │ │ ├── list-deployments.rst │ │ ├── push.rst │ │ ├── register-application-revision.rst │ │ ├── stop-deployment.rst │ │ ├── update-application.rst │ │ └── update-deployment-group.rst │ ├── dynamodb │ │ ├── batch-get-item.rst │ │ ├── batch-write-item.rst │ │ ├── create-table.rst │ │ ├── delete-item.rst │ │ ├── delete-table.rst │ │ ├── describe-table.rst │ │ ├── get-item.rst │ │ ├── list-tables.rst │ │ ├── put-item.rst │ │ ├── query.rst │ │ ├── scan.rst │ │ ├── update-item.rst │ │ └── update-table.rst │ ├── ec2 │ │ ├── accept-vpc-peering-connection.rst │ │ ├── allocate-address.rst │ │ ├── assign-private-ip-addresses.rst │ │ ├── associate-address.rst │ │ ├── associate-dhcp-options.rst │ │ ├── associate-route-table.rst │ │ ├── attach-classic-link-vpc.rst │ │ ├── attach-internet-gateway.rst │ │ ├── attach-network-interface.rst │ │ ├── attach-volume.rst │ │ ├── attach-vpn-gateway.rst │ │ ├── authorize-security-group-ingress.rst │ │ ├── cancel-conversion-task.rst │ │ ├── cancel-export-task.rst │ │ ├── cancel-spot-instance-requests.rst │ │ ├── confirm-product-instance.rst │ │ ├── copy-image.rst │ │ ├── copy-snapshot.rst │ │ ├── create-customer-gateway.rst │ │ ├── create-dhcp-options.rst │ │ ├── create-image.rst │ │ ├── create-instance-export-task.rst │ │ ├── create-internet-gateway.rst │ │ ├── create-key-pair.rst │ │ ├── create-network-acl-entry.rst │ │ ├── create-network-acl.rst │ │ ├── create-network-interface.rst │ │ ├── create-route-table.rst │ │ ├── create-route.rst │ │ ├── create-security-group.rst │ │ ├── create-snapshot.rst │ │ ├── create-spot-datafeed-subscription.rst │ │ ├── create-subnet.rst │ │ ├── create-tags.rst │ │ ├── create-volume.rst │ │ ├── create-vpc-peering-connection.rst │ │ ├── create-vpc.rst │ │ ├── create-vpn-connection-route.rst │ │ ├── create-vpn-connection.rst │ │ ├── create-vpn-gateway.rst │ │ ├── delete-customer-gateway.rst │ │ ├── delete-dhcp-options.rst │ │ ├── delete-internet-gateway.rst │ │ ├── delete-key-pair.rst │ │ ├── delete-network-acl-entry.rst │ │ ├── delete-network-acl.rst │ │ ├── delete-network-interface.rst │ │ ├── delete-route-table.rst │ │ ├── delete-route.rst │ │ ├── delete-security-group.rst │ │ ├── delete-snapshot.rst │ │ ├── delete-spot-datafeed-subscription.rst │ │ ├── delete-subnet.rst │ │ ├── delete-tags.rst │ │ ├── delete-volume.rst │ │ ├── delete-vpc-peering-connection.rst │ │ ├── delete-vpc.rst │ │ ├── delete-vpn-connection-route.rst │ │ ├── delete-vpn-connection.rst │ │ ├── delete-vpn-gateway.rst │ │ ├── deregister-image.rst │ │ ├── describe-account-attributes.rst │ │ ├── describe-addresses.rst │ │ ├── describe-availability-zones.rst │ │ ├── describe-classic-link-instances.rst │ │ ├── describe-conversion-tasks.rst │ │ ├── describe-customer-gateways.rst │ │ ├── describe-dhcp-options.rst │ │ ├── describe-export-tasks.rst │ │ ├── describe-image-attribute.rst │ │ ├── describe-images.rst │ │ ├── describe-instance-attribute.rst │ │ ├── describe-instance-status.rst │ │ ├── describe-instances.rst │ │ ├── describe-internet-gateways.rst │ │ ├── describe-key-pairs.rst │ │ ├── describe-network-acls.rst │ │ ├── describe-network-interfaces.rst │ │ ├── describe-regions.rst │ │ ├── describe-reserved-instances-modifications.rst │ │ ├── describe-reserved-instances-offerings.rst │ │ ├── describe-reserved-instances.rst │ │ ├── describe-route-tables.rst │ │ ├── describe-security-groups.rst │ │ ├── describe-snapshot-attribute.rst │ │ ├── describe-snapshots.rst │ │ ├── describe-spot-datafeed-subscription.rst │ │ ├── describe-spot-instance-requests.rst │ │ ├── describe-spot-price-history.rst │ │ ├── describe-subnets.rst │ │ ├── describe-tags.rst │ │ ├── describe-volume-attribute.rst │ │ ├── describe-volume-status.rst │ │ ├── describe-volumes.rst │ │ ├── describe-vpc-attribute.rst │ │ ├── describe-vpc-classic-link.rst │ │ ├── describe-vpc-peering-connections.rst │ │ ├── describe-vpcs.rst │ │ ├── describe-vpn-connections.rst │ │ ├── describe-vpn-gateways.rst │ │ ├── detach-classic-link-vpc.rst │ │ ├── detach-internet-gateway.rst │ │ ├── detach-network-interface.rst │ │ ├── detach-volume.rst │ │ ├── detach-vpn-gateway.rst │ │ ├── disable-vgw-route-propagation.rst │ │ ├── disable-vpc-classic-link.rst │ │ ├── disassociate-address.rst │ │ ├── disassociate-route-table.rst │ │ ├── enable-vgw-route-propagation.rst │ │ ├── enable-vpc-classic-link.rst │ │ ├── get-console-output.rst │ │ ├── get-password-data.rst │ │ ├── modify-image-attribute.rst │ │ ├── modify-instance-attribute.rst │ │ ├── modify-reserved-instances.rst │ │ ├── modify-subnet-attribute.rst │ │ ├── modify-volume-attribute.rst │ │ ├── modify-vpc-attribute.rst │ │ ├── purchase-reserved-instances-offering.rst │ │ ├── reboot-instances.rst │ │ ├── register-image.rst │ │ ├── reject-vpc-peering-connection.rst │ │ ├── release-address.rst │ │ ├── replace-network-acl-association.rst │ │ ├── replace-route-table-association.rst │ │ ├── replace-route.rst │ │ ├── request-spot-instances.rst │ │ ├── reset-image-attribute.rst │ │ ├── reset-instance-attribute.rst │ │ ├── revoke-security-group-ingress.rst │ │ ├── run-instances.rst │ │ ├── start-instances.rst │ │ ├── stop-instances.rst │ │ ├── terminate_instances.rst │ │ └── unassign-private-ip-addresses.rst │ ├── ecs │ │ ├── create-cluster.rst │ │ ├── delete-cluster.rst │ │ ├── deregister-container-instance.rst │ │ ├── describe-clusters.rst │ │ ├── describe-container-instances.rst │ │ ├── describe-task-definition.rst │ │ ├── describe-tasks.rst │ │ ├── list-clusters.rst │ │ ├── list-container-instances.rst │ │ ├── list-task-definitions.rst │ │ ├── list-tasks.rst │ │ ├── register-task-definition.rst │ │ └── run-task.rst │ ├── elasticbeanstalk │ │ ├── create-application-version.rst │ │ ├── create-application.rst │ │ ├── create-environment.rst │ │ └── update-environment.rst │ ├── elb │ │ ├── add-tags.rst │ │ ├── apply-security-groups-to-load-balancer.rst │ │ ├── attach-load-balancer-to-subnets.rst │ │ ├── configure-health-check.rst │ │ ├── create-app-cookie-stickiness-policy.rst │ │ ├── create-lb-cookie-stickiness-policy.rst │ │ ├── create-load-balancer-listeners.rst │ │ ├── create-load-balancer-policy.rst │ │ ├── create-load-balancer.rst │ │ ├── delete-load-balancer-listeners.rst │ │ ├── delete-load-balancer-policy.rst │ │ ├── delete-load-balancer.rst │ │ ├── deregister-instances-from-load-balancer.rst │ │ ├── describe-instance-health.rst │ │ ├── describe-load-balancer-attributes.rst │ │ ├── describe-load-balancer-policies.rst │ │ ├── describe-load-balancer-policy-types.rst │ │ ├── describe-load-balancers.rst │ │ ├── describe-tags.rst │ │ ├── detach-load-balancer-from-subnets.rst │ │ ├── disable-availaibility-zones-for-load-balancer.rst │ │ ├── enable-availability-zones-for-load-balancer.rst │ │ ├── modify-load-balancer-attributes.rst │ │ ├── register-instances-with-load-balancer.rst │ │ ├── remove-tags.rst │ │ ├── set-load-balancer-listener-ssl-certificate.rst │ │ ├── set-load-balancer-policies-for-backend-server.rst │ │ └── set-load-balancer-policies-of-listener.rst │ ├── emr │ │ ├── add-steps.rst │ │ ├── add-tags.rst │ │ ├── create-cluster-examples.rst │ │ ├── create-cluster-synopsis.rst │ │ ├── create-default-roles.rst │ │ ├── describe-cluster.rst │ │ └── schedule-hbase-backup.rst │ ├── iam │ │ ├── add-role-to-instance-profile.rst │ │ ├── add-user-to-group.rst │ │ ├── change-password.rst │ │ ├── create-access-key.rst │ │ ├── create-account-alias.rst │ │ ├── create-group.rst │ │ ├── create-instance-profile.rst │ │ ├── create-login-profile.rst │ │ ├── create-role.rst │ │ ├── create-user.rst │ │ ├── delete-access-key.rst │ │ ├── delete-account-alias.rst │ │ ├── delete-account-password-policy.rst │ │ ├── delete-group-policy.rst │ │ ├── delete-instance-profile.rst │ │ ├── delete-login-profile.rst │ │ ├── delete-role-policy.rst │ │ ├── delete-role.rst │ │ ├── delete-signing-certificate.rst │ │ ├── delete-user-policy.rst │ │ ├── delete-user.rst │ │ ├── delete-virtual-mfa-device.rst │ │ ├── get-account-password-policy.rst │ │ ├── get-account-summary.rst │ │ ├── get-group-policy.rst │ │ ├── get-instance-profile.rst │ │ ├── get-login-profile.rst │ │ ├── get-role-policy.rst │ │ ├── get-role.rst │ │ ├── get-user-policy.rst │ │ ├── get-user.rst │ │ ├── list-access-keys.rst │ │ ├── list-account-aliases.rst │ │ ├── list-group-policies.rst │ │ ├── list-groups-for-user.rst │ │ ├── list-groups.rst │ │ ├── list-instance-profiles-for-role.rst │ │ ├── list-instance-profiles.rst │ │ ├── list-role-policies.rst │ │ ├── list-roles.rst │ │ ├── list-signing-certificates.rst │ │ ├── list-user-policies.rst │ │ ├── list-users.rst │ │ ├── list-virtual-mfa-devices.rst │ │ ├── put-group-policy.rst │ │ ├── put-role-policy.rst │ │ ├── put-user-policy.rst │ │ ├── remove-role-from-instance-profile.rst │ │ ├── remove-user-from-group.rst │ │ ├── update-access-key.rst │ │ ├── update-account-password-policy.rst │ │ ├── update-assume-role-policy.rst │ │ ├── update-group.rst │ │ ├── update-login-profile.rst │ │ ├── update-signing-certificate.rst │ │ ├── update-user.rst │ │ ├── upload-server-certificate.rst │ │ └── upload-signing-certificate.rst │ ├── kms │ │ └── encrypt.rst │ ├── opsworks │ │ ├── create-app.rst │ │ ├── create-deployment.rst │ │ ├── create-instance.rst │ │ ├── create-layer.rst │ │ ├── create-stack.rst │ │ ├── describe-apps.rst │ │ ├── describe-commands.rst │ │ ├── describe-deployments.rst │ │ ├── describe-elastic-ips.rst │ │ ├── describe-instances.rst │ │ ├── describe-layers.rst │ │ ├── describe-stacks.rst │ │ ├── register.rst │ │ └── start-instance.rst │ ├── rds │ │ ├── add-tag-to-resource.rst │ │ ├── create-db-instance.rst │ │ ├── create-db-security-group.rst │ │ ├── create-option-group.rst │ │ └── describe-db-instances.rst │ ├── redshift │ │ ├── authorize-cluster-security-group-ingress.rst │ │ ├── authorize-snapshot-access.rst │ │ ├── copy-cluster-snapshot.rst │ │ ├── create-cluster-parameter-group.rst │ │ ├── create-cluster-security-group.rst │ │ ├── create-cluster-snapshot.rst │ │ ├── create-cluster-subnet-group.rst │ │ ├── create-cluster.rst │ │ ├── delete-cluster-parameter-group.rst │ │ ├── delete-cluster-security-group.rst │ │ ├── delete-cluster-snapshot.rst │ │ ├── delete-cluster-subnet-group.rst │ │ ├── delete-cluster.rst │ │ ├── describe-cluster-parameter-groups.rst │ │ ├── describe-cluster-parameters.rst │ │ ├── describe-cluster-security-groups.rst │ │ ├── describe-cluster-snapshots.rst │ │ ├── describe-cluster-subnet-groups.rst │ │ ├── describe-cluster-versions.rst │ │ ├── describe-clusters.rst │ │ ├── describe-default-cluster-parameters.rst │ │ ├── describe-events.rst │ │ ├── describe-orderable-cluster-options.rst │ │ ├── describe-reserved-node-offerings.rst │ │ ├── describe-reserved-nodes.rst │ │ ├── describe-resize.rst │ │ ├── modify-cluster-parameter-group.rst │ │ ├── modify-cluster-subnet-group.rst │ │ ├── modify-cluster.rst │ │ ├── purchase-reserved-node-offering.rst │ │ ├── reboot-cluster.rst │ │ ├── reset-cluster-parameter-group.rst │ │ ├── restore-from-cluster-snapshot.rst │ │ ├── revoke-cluster-security-group-ingress.rst │ │ └── revoke-snapshot-access.rst │ ├── route53 │ │ ├── change-resource-record-sets.rst │ │ ├── create-health-check.rst │ │ ├── create-hosted-zone.rst │ │ ├── delete-health-check.rst │ │ ├── delete-hosted-zone.rst │ │ ├── get-change.rst │ │ ├── get-health-check.rst │ │ ├── get-hosted-zone.rst │ │ ├── list-health-checks.rst │ │ ├── list-hosted-zones.rst │ │ └── list-resource-record-sets.rst │ ├── s3 │ │ ├── _concepts.rst │ │ ├── cp.rst │ │ ├── ls.rst │ │ ├── mb.rst │ │ ├── mv.rst │ │ ├── rb.rst │ │ ├── rm.rst │ │ └── sync.rst │ ├── s3api │ │ ├── delete-object.rst │ │ ├── get-object.rst │ │ ├── list-buckets.rst │ │ ├── list-objects.rst │ │ ├── put-bucket-acl.rst │ │ ├── put-bucket-cors.rst │ │ ├── put-bucket-logging.rst │ │ ├── put-bucket-policy.rst │ │ ├── put-object-acl.rst │ │ └── put-object.rst │ ├── ses │ │ ├── delete-identity.rst │ │ ├── get-identity-dkim-attributes.rst │ │ ├── get-identity-notification-attributes.rst │ │ ├── get-identity-verification-attributes.rst │ │ ├── get-send-quota.rst │ │ ├── get-send-statistics.rst │ │ ├── list-identities.rst │ │ ├── send-email.rst │ │ ├── send-raw-email.rst │ │ ├── set-identity-dkim-enabled.rst │ │ ├── set-identity-feedback-forwarding-enabled.rst │ │ ├── set-identity-notification-topic.rst │ │ ├── verify-domain-dkim.rst │ │ ├── verify-domain-identity.rst │ │ └── verify-email-identity.rst │ ├── sns │ │ └── create-topic.rst │ ├── sqs │ │ ├── create-queue.rst │ │ └── get-queue-attributes.rst │ ├── ssm │ │ ├── create-association-batch.rst │ │ ├── create-association.rst │ │ ├── create-document.rst │ │ ├── delete-association.rst │ │ ├── delete-document.rst │ │ ├── describe-association.rst │ │ ├── describe-document.rst │ │ ├── get-document.rst │ │ ├── list-associations.rst │ │ ├── list-documents.rst │ │ └── update-association-status.rst │ ├── storagegateway │ │ ├── describe-gateway-information.rst │ │ ├── list-gateways.rst │ │ └── list-volumes.rst │ └── swf │ │ ├── count-closed-workflow-executions.rst │ │ ├── count-open-workflow-executions.rst │ │ ├── deprecate-domain.rst │ │ ├── describe-domain.rst │ │ ├── list-activity-types.rst │ │ ├── list-domains.rst │ │ ├── list-workflow-types.rst │ │ ├── register-domain.rst │ │ └── register-workflow-type.rst ├── formatter.py ├── handlers.py ├── help.py ├── paramfile.py ├── plugin.py ├── schema.py ├── table.py ├── testutils.py ├── text.py ├── topics │ ├── config-vars.rst │ ├── return-codes.rst │ ├── s3-config.rst │ └── topic-tags.json ├── topictags.py └── utils.py ├── bin ├── aws ├── aws.cmd ├── aws_completer └── aws_zsh_completer.sh ├── doc ├── Makefile ├── README.rst └── source │ ├── _static │ └── logo.png │ ├── _templates │ ├── feedback.html │ ├── layout.html │ └── sidebarlogo.html │ ├── bootstrapdocs.py │ ├── conf.py │ ├── guzzle_sphinx_theme │ ├── LICENSE │ ├── __init__.py │ └── guzzle_sphinx_theme │ │ ├── comments.html │ │ ├── layout.html │ │ ├── searchbox.html │ │ ├── static │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.js │ │ ├── glyphicons-halflings-white.png │ │ ├── glyphicons-halflings.png │ │ ├── guzzle.css_t │ │ └── jquery-1.9.1.min.js │ │ └── theme.conf │ ├── htmlgen │ └── index.rst ├── examples ├── modify_operation.py ├── new_command.py └── new_option.py ├── requirements.txt ├── requirements26.txt ├── scripts ├── install ├── make-bundle └── make-topic-index ├── setup.py ├── tests ├── __init__.py ├── integration │ ├── __init__.py │ ├── customizations │ │ ├── __init__.py │ │ ├── s3 │ │ │ ├── __init__.py │ │ │ ├── test_filegenerator.py │ │ │ ├── test_plugin.py │ │ │ └── test_s3handler.py │ │ ├── test_cliinputjson.py │ │ ├── test_configure.py │ │ ├── test_generatecliskeleton.py │ │ └── test_waiters.py │ ├── test_cli.py │ └── test_smoke.py └── unit │ ├── __init__.py │ ├── autoscale │ ├── __init__.py │ └── test_terminate_instance_in_autoscaling_group.py │ ├── cloudformation │ ├── __init__.py │ └── test_create_stack.py │ ├── cloudsearch │ ├── __init__.py │ └── test_cloudsearch.py │ ├── cloudwatch │ ├── __init__.py │ └── test_put_metric_data.py │ ├── customizations │ ├── __init__.py │ ├── configservice │ │ ├── __init__.py │ │ ├── test_getstatus.py │ │ └── test_subscribe.py │ ├── datapipeline │ │ ├── __init__.py │ │ ├── test_arg_serialize.py │ │ ├── test_commands.py │ │ └── test_translator.py │ ├── emr │ │ ├── __init__.py │ │ ├── input_applications.json │ │ ├── input_bootstrap_actions.json │ │ ├── input_ec2_attributes_with_az.json │ │ ├── input_ec2_attributes_with_security_groups.json │ │ ├── input_ec2_attributes_with_subnet.json │ │ ├── input_emr_fs.json │ │ ├── input_hbase_restore_from_backup.json │ │ ├── input_instance_groups.json │ │ ├── input_steps.json │ │ ├── test_add_instance_groups.py │ │ ├── test_add_steps.py │ │ ├── test_add_tags.py │ │ ├── test_assume_role_policy.py │ │ ├── test_create_cluster.py │ │ ├── test_create_default_role.py │ │ ├── test_create_hbase_backup.py │ │ ├── test_describe_cluster.py │ │ ├── test_disable_hbase_backup.py │ │ ├── test_emr_utils.py │ │ ├── test_get_service_principal.py │ │ ├── test_install_applications.py │ │ ├── test_list_clusters.py │ │ ├── test_modify_cluster_attributes.py │ │ ├── test_restore_from_hbase_backup.py │ │ ├── test_schedule_hbase_backup.py │ │ ├── test_sshutils.py │ │ └── test_terminate_clusters.py │ ├── s3 │ │ ├── __init__.py │ │ ├── fake_session.py │ │ ├── syncstrategy │ │ │ ├── __init__.py │ │ │ ├── test_base.py │ │ │ ├── test_delete.py │ │ │ ├── test_exacttimestamps.py │ │ │ ├── test_register.py │ │ │ └── test_sizeonly.py │ │ ├── test_comparator.py │ │ ├── test_copy_params.py │ │ ├── test_copy_params_data │ │ ├── test_cp_command.py │ │ ├── test_executor.py │ │ ├── test_fileformat.py │ │ ├── test_filegenerator.py │ │ ├── test_fileinfo.py │ │ ├── test_fileinfobuilder.py │ │ ├── test_filters.py │ │ ├── test_ls_command.py │ │ ├── test_mv_command.py │ │ ├── test_s3.py │ │ ├── test_s3handler.py │ │ ├── test_subcommands.py │ │ ├── test_sync_command.py │ │ ├── test_tasks.py │ │ ├── test_transferconfig.py │ │ ├── test_utils.py │ │ └── test_website_command.py │ ├── test_arguments.py │ ├── test_assumerole.py │ ├── test_cliinputjson.py │ ├── test_cloudsearchdomain.py │ ├── test_cloudtrail.py │ ├── test_cloudwatch.py │ ├── test_codedeploy.py │ ├── test_commands.py │ ├── test_configure.py │ ├── test_flatten.py │ ├── test_generatecliskeleton.py │ ├── test_globalargs.py │ ├── test_opsworks.py │ ├── test_paginate.py │ ├── test_preview.py │ ├── test_s3endpoint.py │ ├── test_s3errormsg.py │ ├── test_scalarparse.py │ ├── test_utils.py │ └── test_waiters.py │ ├── datapipeline │ ├── test_get_pipeline_definition.py │ └── test_query_objects.py │ ├── docs │ ├── __init__.py │ ├── test_examples.py │ └── test_help_output.py │ ├── ec2 │ ├── __init__.py │ ├── test_associate_address.py │ ├── test_attach_internet_gateway.py │ ├── test_bundle_instance.py │ ├── test_create_image.py │ ├── test_create_network_acl_entry.py │ ├── test_create_tags.py │ ├── test_describe_instance_attribute.py │ ├── test_describe_instances.py │ ├── test_get_password_data.py │ ├── test_modify_image_attribute.py │ ├── test_modify_instance_attribute.py │ ├── test_replace_network_acl_entry.py │ ├── test_run_instances.py │ ├── test_security_group_operations.py │ └── testcli.pem │ ├── elasticache │ ├── __init__.py │ └── test_create_cache_cluster.py │ ├── elasticbeanstalk │ ├── __init__.py │ ├── new_keypair_config.json │ ├── test_create_application.py │ └── test_update_configuration_template.py │ ├── elb │ ├── __init__.py │ ├── test.json │ ├── test_configure_health_check.py │ ├── test_register_instances_with_load_balancer.py │ └── test_with_spaces.json │ ├── iam │ ├── __init__.py │ └── test_create_virtual_mfa_device.py │ ├── opsworks │ ├── __init__.py │ ├── create_layer_attributes.json │ ├── test_create_instance.py │ ├── test_create_layer.py │ ├── test_create_stack.py │ └── test_describe_layers.py │ ├── output │ ├── __init__.py │ ├── test_json_output.py │ ├── test_table_formatter.py │ └── test_text_output.py │ ├── rds │ ├── __init__.py │ ├── test_describe_db_log_files.py │ └── test_modify_option_group.py │ ├── route53 │ ├── __init__.py │ └── test_resource_id.py │ ├── s3 │ ├── __init__.py │ ├── test_get_object.py │ ├── test_list_objects.py │ ├── test_put_bucket_tagging.py │ ├── test_put_object.py │ └── test_put_object_data │ ├── ses │ ├── __init__.py │ └── test_send_email.py │ ├── sns │ ├── __init__.py │ └── test_create_platform_application.py │ ├── sqs │ ├── __init__.py │ ├── test_add_permission.py │ ├── test_change_message_visibility.py │ ├── test_create_queue.py │ ├── test_get_queue_attributes.py │ ├── test_list_queues.py │ ├── test_purge_queue.py │ └── test_set_queue_attributes.py │ ├── test_argprocess.py │ ├── test_arguments.py │ ├── test_clidocs.py │ ├── test_clidriver.py │ ├── test_completer.py │ ├── test_errorhandler.py │ ├── test_help.py │ ├── test_paramfile.py │ ├── test_plugin.py │ ├── test_schema.py │ ├── test_table.py │ ├── test_text.py │ ├── test_topictags.py │ └── test_utils.py └── tox.ini /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | include = 4 | awscli/* 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | *.DS_Store 3 | 4 | # Packages 5 | *.egg 6 | *.egg-info 7 | dist 8 | build 9 | eggs 10 | parts 11 | var 12 | sdist 13 | develop-eggs 14 | .installed.cfg 15 | 16 | # Installer logs 17 | pip-log.txt 18 | 19 | # Unit test / coverage reports 20 | .coverage 21 | .tox 22 | 23 | #Translations 24 | *.mo 25 | 26 | #Mr Developer 27 | .mr.developer.cfg 28 | 29 | # Emacs backup files 30 | *~ 31 | 32 | # Eclipse IDE 33 | /.project 34 | /.pydevproject 35 | 36 | # IDEA IDE 37 | .idea* 38 | src/ 39 | 40 | # CLI docs generation 41 | doc/source/aws_man_pages.json 42 | doc/source/reference 43 | doc/source/tutorial/services.rst 44 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | python: 4 | - "2.6" 5 | - "2.7" 6 | - "3.3" 7 | 8 | sudo: false 9 | 10 | install: 11 | - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r requirements26.txt; fi 12 | - pip install -r requirements.txt 13 | - python setup.py develop 14 | - pip install coverage python-coveralls 15 | 16 | script: nosetests tests/unit --cover-erase --with-coverage --cover-package awscli 17 | 18 | after_success: coveralls 19 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"). You 4 | may not use this file except in compliance with the License. A copy of 5 | the License is located at 6 | 7 | http://aws.amazon.com/apache2.0/ 8 | 9 | or in the "license" file accompanying this file. This file is 10 | distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | ANY KIND, either express or implied. See the License for the specific 12 | language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.txt 3 | include requirements.txt 4 | recursive-include awscli/examples *.rst 5 | recursive-include awscli/data *.json 6 | -------------------------------------------------------------------------------- /awscli/customizations/configservice/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /awscli/customizations/emr/.helptext.py.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/awscli/customizations/emr/.helptext.py.swp -------------------------------------------------------------------------------- /awscli/customizations/emr/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /awscli/customizations/s3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /awscli/customizations/s3/syncstrategy/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/attach-instances.rst: -------------------------------------------------------------------------------- 1 | **To attach an instance to an Auto Scaling group** 2 | 3 | The following ``attach-instances`` command attaches an instance to an Auto Scaling group:: 4 | 5 | aws autoscaling attach-instances --instance-ids i-93633f9b --auto-scaling-group-name basic-auto-scaling-group 6 | 7 | For more information, see `Attach Amazon Instances to Your Auto Scaling Group`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Attach Amazon Instances to Your Auto Scaling Group`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/attach-instance-asg.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/create-or-update-tags.rst: -------------------------------------------------------------------------------- 1 | **To create or update tags for an Auto Scaling group** 2 | 3 | The following ``create-or-update-tags`` command attaches two tags to an Auto Scaling group:: 4 | 5 | aws autoscaling create-or-update-tags --tags ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Role,Value=WebServer,PropagateAtLaunch=true ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Dept,Value=Research,PropagateAtLaunch=true 6 | 7 | For more information, see `Add, Modify, or Remove Auto Scaling Group Tags`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Add, Modify, or Remove Auto Scaling Group Tags`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-auto-scaling-group.rst: -------------------------------------------------------------------------------- 1 | **To delete an Auto Scaling group** 2 | 3 | The following ``delete-auto-scaling-group`` command deletes an Auto Scaling group:: 4 | 5 | aws autoscaling delete-auto-scaling-group --auto-scaling-group-name delete-me-auto-scaling-group 6 | 7 | If you want to delete the Auto Scaling group without waiting for the instances in the group to terminate, use the ``--force-delete`` parameter:: 8 | 9 | aws autoscaling delete-auto-scaling-group --auto-scaling-group-name delete-me-auto-scaling-group --force-delete 10 | 11 | For more information, see `Shut Down Your Auto Scaling Process`_ in the *Auto Scaling Developer Guide*. 12 | 13 | .. _`Shut Down Your Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-process-shutdown.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-launch-configuration.rst: -------------------------------------------------------------------------------- 1 | **To delete an Auto Scaling launch configuration** 2 | 3 | The following ``delete-launch-configuration`` command deletes an Auto Scaling launch configuration:: 4 | 5 | aws autoscaling delete-launch-configuration --launch-configuration-name test 6 | 7 | For more information, see `Shut Down Your Auto Scaling Process`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Shut Down Your Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-process-shutdown.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-notification-configuration.rst: -------------------------------------------------------------------------------- 1 | **To delete an Auto Scaling notification** 2 | 3 | The following ``delete-notification-configuration`` command deletes a notification from an Auto Scaling group:: 4 | 5 | aws autoscaling delete-notification-configuration --auto-scaling-group-name basic-auto-scaling-group --topic-arn arn:aws:sns:us-west-2:896650972448:second-test-topic 6 | 7 | For more information, see the `Delete Notification Configuration`_ section in the Getting Notifications When Your Auto Scaling Group Changes topic, in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Delete Notification Configuration`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASGettingNotifications.html#delete-settingupnotifications 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-policy.rst: -------------------------------------------------------------------------------- 1 | **To delete an Auto Scaling policy** 2 | 3 | The following ``delete-policy`` command deletes an Auto Scaling policy:: 4 | 5 | aws autoscaling delete-policy --auto-scaling-group-name basic-auto-scaling-group --policy-name ScaleIn 6 | 7 | For more information, see `Dynamic Scaling`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Dynamic Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-scheduled-action.rst: -------------------------------------------------------------------------------- 1 | **To delete a scheduled action from an Auto Scaling group** 2 | 3 | The following ``delete-scheduled-action`` command deletes a scheduled action from an Auto Scaling group:: 4 | 5 | aws autoscaling delete-scheduled-action --auto-scaling-group-name basic-auto-scaling-group --scheduled-action-name sample-scheduled-action 6 | 7 | For more information, see `Scheduled Scaling`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Scheduled Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/schedule_time.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/delete-tags.rst: -------------------------------------------------------------------------------- 1 | **To delete a tag from an Auto Scaling group** 2 | 3 | The following ``delete-tags`` command deletes a tag from an Auto Scaling group:: 4 | 5 | aws autoscaling delete-tags --tags ResourceId=tags-auto-scaling-group,ResourceType=auto-scaling-group,Key=Dept,Value=Research 6 | 7 | For more information, see `Add, Modify, or Remove Auto Scaling Group Tags`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Add, Modify, or Remove Auto Scaling Group Tags`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASTagging.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/describe-account-limits.rst: -------------------------------------------------------------------------------- 1 | **To describe your Auto Scaling account limits** 2 | 3 | The following ``describe-account-limits`` command describes your Auto Scaling account limits:: 4 | 5 | aws autoscaling describe-account-limits 6 | 7 | The output of this command is a JSON block that describes your Auto Scaling account limits, similar to the following:: 8 | 9 | { 10 | "MaxNumberOfLaunchConfigurations": 100, 11 | "MaxNumberOfAutoScalingGroups": 20 12 | } 13 | 14 | For more information, see `Auto Scaling Limits`_ in the *Auto Scaling Developer Guide*. 15 | 16 | .. _`Auto Scaling Limits`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-account-limits.html 17 | 18 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/describe-adjustment-types.rst: -------------------------------------------------------------------------------- 1 | **To describe the Auto Scaling adjustment types** 2 | 3 | The following ``describe-adjustment types`` command describes the adjustment types available for Auto Scaling groups:: 4 | 5 | aws autoscaling describe-adjustment-types 6 | 7 | The output of this command is a JSON block that describes the adjustment types, similar to the following:: 8 | 9 | { 10 | "AdjustementTypes": [ 11 | { 12 | "AdjustmentType": "ChangeInCapacity" 13 | } 14 | { 15 | "AdjustmentType": "ExactCapcity" 16 | } 17 | { 18 | "AdjustmentType": "PercentChangeInCapacity" 19 | } 20 | ] 21 | } 22 | 23 | For more information, see `Dynamic Scaling`_ in the *Auto Scaling Developer Guide*. 24 | 25 | .. _`Dynamic Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html 26 | 27 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/describe-termination-policy-types.rst: -------------------------------------------------------------------------------- 1 | **To describe termination policy types** 2 | 3 | The following ``describe-termination-policy-types`` command returns the available termination policy types:: 4 | 5 | aws autoscaling describe-termination-policy-types 6 | 7 | The output of this command is a JSON block that lists the types of termination policies, similar to the following:: 8 | 9 | { 10 | "TerminationPolicyTypes": [ 11 | "ClosestToNextInstanceHour", 12 | "Default", 13 | "NewestInstance", 14 | "OldestInstance", 15 | "OldestLaunchConfiguration" 16 | ] 17 | } 18 | 19 | For more information, see the `How Termination Policies Work`_ section in the Configure Instance Termination Policy for Your Auto Scaling Group topic, in the *Auto Scaling Developer Guide*. 20 | 21 | .. _`How Termination Policies Work`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/us-termination-policy.html#your-termination-policy 22 | 23 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/disable-metrics-collection.rst: -------------------------------------------------------------------------------- 1 | **To disable metrics collection for an Auto Scaling group** 2 | 3 | The following ``disable-metrics-collection`` command disables collecting data for the ``GroupDesiredCapacity`` metric for an Auto Scaling group:: 4 | 5 | aws autoscaling disable-metrics-collection --auto-scaling-group-name basic-auto-scaling-group --metrics GroupDesiredCapacity 6 | 7 | For more information, see `Monitoring Your Auto Scaling Instances`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Monitoring Your Auto Scaling Instances`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-instance-monitoring.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/enable-metrics-collection.rst: -------------------------------------------------------------------------------- 1 | **To enable metrics collection for an Auto Scaling group** 2 | 3 | The following ``enable-metrics-collection`` command enables collecting data for an Auto Scaling group:: 4 | 5 | aws autoscaling enable-metrics-collection --auto-scaling-group-name basic-auto-scaling-group --granularity "1Minute" 6 | 7 | To collect data on a specific metric, use the ``metrics`` parameter:: 8 | 9 | aws autoscaling enable-metrics-collection --auto-scaling-group-name basic-auto-scaling-group --metrics GroupDesiredCapacity --granularity "1Minute" 10 | 11 | For more information, see `Monitoring Your Auto Scaling Instances`_ in the *Auto Scaling Developer Guide*. 12 | 13 | .. _`Monitoring Your Auto Scaling Instances`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-instance-monitoring.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/execute-policy.rst: -------------------------------------------------------------------------------- 1 | **To execute an Auto Scaling policy** 2 | 3 | The following ``execute-policy`` command executes an Auto Scaling policy for an Auto Scaling group:: 4 | 5 | aws autoscaling execute-policy --auto-scaling-group-name basic-auto-scaling-group --policy-name ScaleIn --honor-cooldown 6 | 7 | For more information, see `Dynamic Scaling`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Dynamic Scaling`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/put-notification-configuration.rst: -------------------------------------------------------------------------------- 1 | **To add an Auto Scaling notification** 2 | 3 | The following ``put-notification-configuration`` command adds a notification to an Auto Scaling group:: 4 | 5 | --auto-scaling-group-name basic-auto-scaling-group --topic-arn arn:aws:sns:us-west-2:896650972448:test-topic --notification-type autoscaling:TEST_NOTIFICATION 6 | 7 | For more information, see the `Configure your Auto Scaling Group to Send Notifications`_ section in the Getting Notifications When Your Auto Scaling Group Changes topic, in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Configure your Auto Scaling Group to Send Notifications`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/ASGettingNotifications.html#as-configure-asg-for-sns 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/resume-processes.rst: -------------------------------------------------------------------------------- 1 | **To resume Auto Scaling processes** 2 | 3 | The following ``resume-processes`` command resumes a suspended scaling process for an Auto Scaling group:: 4 | 5 | aws autoscaling resume-processes --auto-scaling-group-name basic-auto-scaling-group --scaling-processes AlarmNotification 6 | 7 | For more information, see `Suspend and Resume Auto Scaling Process`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Suspend and Resume Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_SuspendResume.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/set-desired-capacity.rst: -------------------------------------------------------------------------------- 1 | **To set the desired capacity for an Auto Scaling group** 2 | 3 | The following ``set-desired-capacity`` command sets the desired capacity for an Auto Scaling group:: 4 | 5 | aws autoscaling set-desired-capacity --auto-scaling-group-name basic-auto-scaling-group --desired-capacity 2 --honor-cooldown 6 | 7 | For more information, see `How Auto Scaling Works`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`How Auto Scaling Works`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/how-as-works.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/suspend-processes.rst: -------------------------------------------------------------------------------- 1 | **To suspend Auto Scaling processes** 2 | 3 | The following ``suspend-processes`` command suspends a scaling process for an Auto Scaling group:: 4 | 5 | aws autoscaling suspend-processes --auto-scaling-group-name basic-auto-scaling-group --scaling-processes AlarmNotification 6 | 7 | For more information, see `Suspend and Resume Auto Scaling Process`_ in the *Auto Scaling Developer Guide*. 8 | 9 | .. _`Suspend and Resume Auto Scaling Process`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/US_SuspendResume.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/autoscaling/terminate-instance-in-auto-scaling-group.rst: -------------------------------------------------------------------------------- 1 | **To terminate an instance in an Auto Scaling group** 2 | 3 | The following ``terminate-instance-in-auto-scaling-group`` command terminates an instance from an Auto Scaling group without resetting the size of the group:: 4 | 5 | aws autoscaling terminate-instance-in-auto-scaling-group --instance-id i-93633f9b --no-should-decrement-desired-capacity 6 | 7 | This results in a new instance starting up after the specified instance terminates. 8 | 9 | For more information, see `Configure Instance Termination Policy for Your Auto Scaling Group`_ in the *Auto Scaling Developer Guide*. 10 | 11 | .. _`Configure Instance Termination Policy for Your Auto Scaling Group`: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/us-termination-policy.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/cloudformation/list-stacks.rst: -------------------------------------------------------------------------------- 1 | **To list AWS CloudFormation stacks** 2 | 3 | The following ``list-stacks`` command shows a summary of all stacks that have a status of ``CREATE_COMPLETE``:: 4 | 5 | aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE 6 | 7 | Output:: 8 | 9 | [ 10 | { 11 | "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/myteststack/466df9e0-0dff-08e3-8e2f-5088487c4896", 12 | "TemplateDescription": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.", 13 | "StackStatusReason": null, 14 | "CreationTime": "2013-08-26T03:27:10.190Z", 15 | "StackName": "myteststack", 16 | "StackStatus": "CREATE_COMPLETE" 17 | } 18 | ] -------------------------------------------------------------------------------- /awscli/examples/cloudformation/validate-template.rst: -------------------------------------------------------------------------------- 1 | **To validate an AWS CloudFormation template** 2 | 3 | The following ``validate-template`` command validates the ``sampletemplate.json`` template:: 4 | 5 | aws cloudformation validate-template --template-body file:////home//local//test//sampletemplate.json 6 | 7 | Output:: 8 | 9 | { 10 | "Description": "AWS CloudFormation Sample Template S3_Bucket: Sample template showing how to create a publicly accessible S3 bucket. **WARNING** This template creates an S3 bucket. You will be billed for the AWS resources used if you create a stack from this template.", 11 | "Parameters": [], 12 | "Capabilities": [] 13 | } 14 | 15 | For more information, see `Working with AWS CloudFormation Templates`_ in the *AWS CloudFormation User Guide*. 16 | 17 | .. _`Working with AWS CloudFormation Templates`: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-guide.html 18 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/delete-alarms.rst: -------------------------------------------------------------------------------- 1 | **To delete an alarm** 2 | 3 | The following example uses the ``delete-alarms`` command to delete the Amazon CloudWatch alarm 4 | named "myalarm":: 5 | 6 | aws cloudwatch delete-alarms --alarm-name myalarm 7 | 8 | Output:: 9 | 10 | This command returns to the prompt if successful. 11 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/disable-alarm-actions.rst: -------------------------------------------------------------------------------- 1 | **To disable actions for an alarm** 2 | 3 | The following example uses the ``disable-alarm-actions`` command to disable all actions for the alarm named myalarm.:: 4 | 5 | aws cloudwatch disable-alarm-actions --alarm-names myalarm 6 | 7 | This command returns to the prompt if successful. 8 | 9 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/enable-alarm-actions.rst: -------------------------------------------------------------------------------- 1 | **To enable all actions for an alarm** 2 | 3 | The following example uses the ``enable-alarm-actions`` command to enable all actions for the alarm named myalarm.:: 4 | 5 | aws cloudwatch enable-alarm-actions --alarm-names myalarm 6 | 7 | This command returns to the prompt if successful. 8 | 9 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/put-metric-alarm.rst: -------------------------------------------------------------------------------- 1 | **To send an Amazon Simple Notification Service email message when CPU utilization exceeds 70 percent** 2 | 3 | The following example uses the ``put-metric-alarm`` command to send an Amazon Simple Notification Service email message when CPU utilization exceeds 70 percent:: 4 | 5 | aws cloudwatch put-metric-alarm --alarm-name cpu-mon --alarm-description "Alarm when CPU exceeds 70 percent" --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 300 --threshold 70 --comparison-operator GreaterThanThreshold --dimensions Name=InstanceId,Value=i-12345678 --evaluation-periods 2 --alarm-actions arn:aws:sns:us-east-1:111122223333:MyTopic --unit Percent 6 | 7 | This command returns to the prompt if successful. If an alarm with the same name already exists, it will be overwritten by the new alarm. 8 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/put-metric-data.rst: -------------------------------------------------------------------------------- 1 | **To publish a custom metric to Amazon CloudWatch** 2 | 3 | The following example uses the ``put-metric-data`` command to publish a custom metric to Amazon CloudWatch:: 4 | 5 | aws cloudwatch put-metric-data --namespace "Usage Metrics" --metric-data file://metric.json 6 | 7 | The values for the metric itself are stored in the JSON file, ``metric.json``. 8 | 9 | Here are the contents of that file:: 10 | 11 | [ 12 | { 13 | "MetricName": "New Posts", 14 | "Timestamp": "Wednesday, June 12, 2013 8:28:20 PM", 15 | "Value": 0.50, 16 | "Unit": "Count" 17 | } 18 | ] 19 | 20 | For more information, see `Publishing Custom Metrics`_ in the *Amazon CloudWatch Developer Guide*. 21 | 22 | .. _`Publishing Custom Metrics`: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html 23 | 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/cloudwatch/set-alarm-state.rst: -------------------------------------------------------------------------------- 1 | **To temporarily change the state of an alarm** 2 | 3 | The following example uses the ``set-alarm-state`` command to temporarily change the state of an 4 | Amazon CloudWatch alarm named "myalarm" and set it to the ALARM state for testing purposes:: 5 | 6 | aws cloudwatch set-alarm-state --alarm-name "myalarm" --state-value ALARM --state-reason "testing purposes" 7 | 8 | This command returns to the prompt if successful. 9 | -------------------------------------------------------------------------------- /awscli/examples/configure/set/_examples.rst: -------------------------------------------------------------------------------- 1 | Given an empty config file, the following commands:: 2 | 3 | $ aws configure set aws_access_key_id default_access_key 4 | $ aws configure set aws_secret_access_key default_secret_key 5 | $ aws configure set default.region us-west-2 6 | $ aws configure set region us-west-1 --profile testing 7 | $ aws configure set profile.testing2.region eu-west-1 8 | $ aws configure set preview.cloudsearch true 9 | 10 | will produce the following config file:: 11 | 12 | [default] 13 | region = us-west-2 14 | 15 | [profile testing] 16 | region = us-west-1 17 | 18 | [profile testing2] 19 | region = eu-west-1 20 | 21 | [preview] 22 | cloudsearch = true 23 | 24 | and the following ``~/.aws/credentials`` file:: 25 | 26 | [default] 27 | aws_access_key_id = default_access_key 28 | aws_secret_access_key = default_secret_key 29 | -------------------------------------------------------------------------------- /awscli/examples/deploy/batch-get-applications.rst: -------------------------------------------------------------------------------- 1 | **To get information about multiple applications** 2 | 3 | This example displays information about multiple applications that are associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy batch-get-applications --application-names WordPress_App MyOther_App 8 | 9 | Output:: 10 | 11 | { 12 | "applicationsInfo": [ 13 | { 14 | "applicationName": "WordPress_App", 15 | "applicationId": "d9dd6993-f171-44fa-a811-211e4EXAMPLE", 16 | "createTime": 1407878168.078, 17 | "linkedToGitHub": false 18 | }, 19 | { 20 | "applicationName": "MyOther_App", 21 | "applicationId": "8ca57519-31da-42b2-9194-8bb16EXAMPLE", 22 | "createTime": 1407453571.63, 23 | "linkedToGitHub": false 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/create-application.rst: -------------------------------------------------------------------------------- 1 | **To create an application** 2 | 3 | This example creates an application and associates it with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy create-application --application-name MyOther_App 8 | 9 | Output:: 10 | 11 | { 12 | "applicationId": "cfd3e1f1-5744-4aee-9251-eaa25EXAMPLE" 13 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/create-deployment-config.rst: -------------------------------------------------------------------------------- 1 | **To create a custom deployment configuration** 2 | 3 | This example creates a custom deployment configuration and associates it with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy create-deployment-config --deployment-config-name ThreeQuartersHealthy --minimum-healthy-hosts type=FLEET_PERCENT,value=75 8 | 9 | Output:: 10 | 11 | { 12 | "deploymentConfigId": "bf6b390b-61d3-4f24-8911-a1664EXAMPLE" 13 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/create-deployment-group.rst: -------------------------------------------------------------------------------- 1 | **To create a deployment group** 2 | 3 | This example creates a deployment group and associates it with the specified application and the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy create-deployment-group --application-name WordPress_App --auto-scaling-groups CodeDeployDemo-ASG --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name WordPress_DG --ec2-tag-filters Key=Name,Value=CodeDeployDemo,Type=KEY_AND_VALUE --service-role-arn arn:aws:iam::80398EXAMPLE:role/CodeDeployDemoRole 8 | 9 | Output:: 10 | 11 | { 12 | "deploymentGroupId": "cdac3220-0e64-4d63-bb50-e68faEXAMPLE" 13 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/create-deployment.rst: -------------------------------------------------------------------------------- 1 | **To create a deployment** 2 | 3 | This example creates a deployment and associates it with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy create-deployment --application-name WordPress_App --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name WordPress_DG --description "My demo deployment" --s3-location bucket=CodeDeployDemoBucket,bundleType=zip,eTag=dd56cfd59d434b8e768f9d77fEXAMPLE,key=WordPressApp.zip 8 | 9 | Output:: 10 | 11 | { 12 | "deploymentId": "d-N65YI7Gex" 13 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/delete-application.rst: -------------------------------------------------------------------------------- 1 | **To delete an application** 2 | 3 | This example deletes an application that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy delete-application --application-name WordPress_App 8 | 9 | Output:: 10 | 11 | None. -------------------------------------------------------------------------------- /awscli/examples/deploy/delete-deployment-config.rst: -------------------------------------------------------------------------------- 1 | **To delete a deployment configuration** 2 | 3 | This example deletes a custom deployment configuration that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy delete-deployment-config --deployment-config-name ThreeQuartersHealthy 8 | 9 | Output:: 10 | 11 | None. -------------------------------------------------------------------------------- /awscli/examples/deploy/delete-deployment-group.rst: -------------------------------------------------------------------------------- 1 | **To delete a deployment group** 2 | 3 | This example deletes a deployment group that is associated with the specified application. 4 | 5 | Command:: 6 | 7 | aws deploy delete-deployment-group --application-name WordPress_App --deployment-group-name WordPress_DG 8 | 9 | Output:: 10 | 11 | { 12 | "hooksNotCleanedUp": [] 13 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/get-application.rst: -------------------------------------------------------------------------------- 1 | **To get information about an application** 2 | 3 | This example displays information about an application that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy get-application --application-name WordPress_App 8 | 9 | Output:: 10 | 11 | { 12 | "application": { 13 | "applicationName": "WordPress_App", 14 | "applicationId": "d9dd6993-f171-44fa-a811-211e4EXAMPLE", 15 | "createTime": 1407878168.078, 16 | "linkedToGitHub": false 17 | } 18 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/get-deployment-config.rst: -------------------------------------------------------------------------------- 1 | **To get information about a deployment configuration** 2 | 3 | This example displays information about a deployment configuration that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy get-deployment-config --deployment-config-name ThreeQuartersHealthy 8 | 9 | Output:: 10 | 11 | { 12 | "deploymentConfigInfo": { 13 | "deploymentConfigId": "bf6b390b-61d3-4f24-8911-a1664EXAMPLE", 14 | "minimumHealthyHosts": { 15 | "type": "FLEET_PERCENT", 16 | "value": 75 17 | }, 18 | "createTime": 1411081164.379, 19 | "deploymentConfigName": "ThreeQuartersHealthy" 20 | } 21 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/list-applications.rst: -------------------------------------------------------------------------------- 1 | **To get information about applications** 2 | 3 | This example displays information about all applications that are associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy list-applications 8 | 9 | Output:: 10 | 11 | { 12 | "applications": [ 13 | "WordPress_App", 14 | "MyOther_App" 15 | ] 16 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/list-deployment-configs.rst: -------------------------------------------------------------------------------- 1 | **To get information about deployment configurations** 2 | 3 | This example displays information about all deployment configurations that are associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy list-deployment-configs 8 | 9 | Output:: 10 | 11 | { 12 | "deploymentConfigsList": [ 13 | "ThreeQuartersHealthy", 14 | "CodeDeployDefault.AllAtOnce", 15 | "CodeDeployDefault.HalfAtATime", 16 | "CodeDeployDefault.OneAtATime" 17 | ] 18 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/list-deployment-groups.rst: -------------------------------------------------------------------------------- 1 | **To get information about deployment groups** 2 | 3 | This example displays information about all deployment groups that are associated with the specified application. 4 | 5 | Command:: 6 | 7 | aws deploy list-deployment-groups --application-name WordPress_App 8 | 9 | Output:: 10 | 11 | { 12 | "applicationName": "WordPress_App", 13 | "deploymentGroups": [ 14 | "WordPress_DG", 15 | "WordPress_Beta_DG" 16 | ] 17 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/list-deployment-instances.rst: -------------------------------------------------------------------------------- 1 | **To get information about deployment instances** 2 | 3 | This example displays information about all deployment instances that are associated with the specified deployment. 4 | 5 | Command:: 6 | 7 | aws deploy list-deployment-instances --deployment-id d-9DI6I4EX --instance-status-filter Succeeded 8 | 9 | Output:: 10 | 11 | { 12 | "instancesList": [ 13 | "i-8c4490EX", 14 | "i-7d5389EX" 15 | ] 16 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/list-deployments.rst: -------------------------------------------------------------------------------- 1 | **To get information about deployments** 2 | 3 | This example displays information about all deployments that are associated with the specified application and deployment group. 4 | 5 | Command:: 6 | 7 | aws deploy list-deployments --application-name WordPress_App --create-time-range start=2014-08-19T00:00:00,end=2014-08-20T00:00:00 --deployment-group-name WordPress_DG --include-only-statuses Failed 8 | 9 | Output:: 10 | 11 | { 12 | "deployments": [ 13 | "d-QA4G4F9EX", 14 | "d-1MVNYOEEX", 15 | "d-WEWRE8BEX" 16 | ] 17 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/register-application-revision.rst: -------------------------------------------------------------------------------- 1 | **To register information about an already-uploaded application revision** 2 | 3 | This example registers information about an already-uploaded application revision in Amazon S3 with AWS CodeDeploy. 4 | 5 | Command:: 6 | 7 | aws deploy register-application-revision --application-name WordPress_App --description "Revised WordPress application" --s3-location bucket=CodeDeployDemoBucket,key=RevisedWordPressApp.zip,bundleType=zip,eTag=cecc9b8a08eac650a6e71fdb88EXAMPLE 8 | 9 | Output:: 10 | 11 | None. -------------------------------------------------------------------------------- /awscli/examples/deploy/stop-deployment.rst: -------------------------------------------------------------------------------- 1 | **To attempt to stop a deployment** 2 | 3 | This example attempts to stop an in-progress deployment that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy stop-deployment --deployment-id d-8365D4OEX 8 | 9 | Output:: 10 | 11 | { 12 | "status": "Succeeded", 13 | "statusMessage": "No more commands will be scheduled for execution in the deployment instances" 14 | } -------------------------------------------------------------------------------- /awscli/examples/deploy/update-application.rst: -------------------------------------------------------------------------------- 1 | **To change information about an application** 2 | 3 | This example changes the name of an application that is associated with the user's AWS account. 4 | 5 | Command:: 6 | 7 | aws deploy update-application --application-name WordPress_App --new-application-name My_WordPress_App 8 | 9 | Output:: 10 | 11 | None. -------------------------------------------------------------------------------- /awscli/examples/deploy/update-deployment-group.rst: -------------------------------------------------------------------------------- 1 | **To change information about a deployment group** 2 | 3 | This example changes the settings of a deployment group that is associated with the specified application. 4 | 5 | Command:: 6 | 7 | aws deploy update-deployment-group --application-name WordPress_App --auto-scaling-groups My_CodeDeployDemo_ASG --current-deployment-group-name WordPress_DG --deployment-config-name CodeDeployDefault.AllAtOnce --ec2-tag-filters Key=Name,Type=KEY_AND_VALUE,Value=My_CodeDeployDemo --new-deployment-group-name My_WordPress_DepGroup --service-role-arn arn:aws:iam::80398EXAMPLE:role/CodeDeployDemo-2 8 | 9 | Output:: 10 | 11 | None. -------------------------------------------------------------------------------- /awscli/examples/dynamodb/delete-item.rst: -------------------------------------------------------------------------------- 1 | **To delete an item** 2 | 3 | This example deletes an item from the *MusicCollection* table. 4 | 5 | Command:: 6 | 7 | aws dynamodb delete-item --table-name MusicCollection --key file://key.json 8 | 9 | The arguments for ``--key`` are stored in a JSON file, ``key.json``. Here are the contents of that file:: 10 | 11 | { 12 | "Artist": {"S": "No One You Know"}, 13 | "SongTitle": {"S": "Scared of My Shadow"} 14 | } 15 | 16 | Output:: 17 | 18 | { 19 | "ConsumedCapacity": { 20 | "CapacityUnits": 1.0, 21 | "TableName": "MusicCollection" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /awscli/examples/dynamodb/delete-table.rst: -------------------------------------------------------------------------------- 1 | **To delete a table** 2 | 3 | This example deletes the *MusicCollection* table. 4 | 5 | Command:: 6 | 7 | aws dynamodb delete-table --table-name MusicCollection 8 | 9 | Output:: 10 | 11 | { 12 | "TableDescription": { 13 | "TableStatus": "DELETING", 14 | "TableSizeBytes": 0, 15 | "ItemCount": 0, 16 | "TableName": "MusicCollection", 17 | "ProvisionedThroughput": { 18 | "NumberOfDecreasesToday": 0, 19 | "WriteCapacityUnits": 5, 20 | "ReadCapacityUnits": 5 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /awscli/examples/dynamodb/get-item.rst: -------------------------------------------------------------------------------- 1 | **To read an item in a table** 2 | 3 | This example retrieves an item from the *MusicCollection* table. The table has a hash-and-range primary key (*Artist* and *SongTitle*), so you must specify both of these ttributes. 4 | 5 | 6 | Command:: 7 | 8 | aws dynamodb get-item --table-name MusicCollection --key file://key.json 9 | 10 | The arguments for ``--key`` are stored in a JSON file, ``key.json``. Here are the contents of that file:: 11 | 12 | { 13 | "Artist": {"S": "Acme Band"}, 14 | "SongTitle": {"S": "Happy Day"} 15 | } 16 | 17 | 18 | Output:: 19 | 20 | { 21 | "Item": { 22 | "AlbumTitle": { 23 | "S": "Songs About Life" 24 | }, 25 | "SongTitle": { 26 | "S": "Happy Day" 27 | }, 28 | "Artist": { 29 | "S": "Acme Band" 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /awscli/examples/dynamodb/list-tables.rst: -------------------------------------------------------------------------------- 1 | **To list tables** 2 | 3 | This example lists all of the tables associated with the current AWS account and endpoint 4 | 5 | Command:: 6 | 7 | aws dynamodb list-tables 8 | 9 | Output:: 10 | 11 | { 12 | "TableNames": [ 13 | "Forum", 14 | "ProductCatalog", 15 | "Reply", 16 | "Thread", 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /awscli/examples/dynamodb/put-item.rst: -------------------------------------------------------------------------------- 1 | **To add an item to a table** 2 | 3 | This example adds a new item to the *MusicCollection* table. 4 | 5 | Command:: 6 | 7 | aws dynamodb put-item --table-name MusicCollection --item file://item.json --return-consumed-capacity TOTAL 8 | 9 | The arguments for ``--item`` are stored in a JSON file, ``item.json``. Here are the contents of that file:: 10 | 11 | { 12 | "Artist": {"S": "No One You Know"}, 13 | "SongTitle": {"S": "Call Me Today"}, 14 | "AlbumTitle": {"S": "Somewhat Famous"} 15 | } 16 | 17 | Output:: 18 | 19 | { 20 | "ConsumedCapacity": { 21 | "CapacityUnits": 1.0, 22 | "TableName": "MusicCollection" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /awscli/examples/ec2/accept-vpc-peering-connection.rst: -------------------------------------------------------------------------------- 1 | **To accept a VPC peering connection** 2 | 3 | This example accepts the specified VPC peering connection request. 4 | 5 | Command:: 6 | 7 | aws ec2 accept-vpc-peering-connection --vpc-peering-connection-id pcx-1a2b3c4d 8 | 9 | Output:: 10 | 11 | { 12 | "VpcPeeringConnection": { 13 | "Status": { 14 | "Message": "Provisioning", 15 | "Code": "provisioning" 16 | }, 17 | "Tags": [], 18 | "AccepterVpcInfo": { 19 | "OwnerId": "444455556666", 20 | "VpcId": "vpc-44455566", 21 | "CidrBlock": "10.0.1.0/28" 22 | }, 23 | "VpcPeeringConnectionId": "pcx-1a2b3c4d", 24 | "RequesterVpcInfo": { 25 | "OwnerId": "444455556666", 26 | "VpcId": "vpc-111abc45", 27 | "CidrBlock": "10.0.0.0/28" 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/allocate-address.rst: -------------------------------------------------------------------------------- 1 | **To allocate an Elastic IP address for EC2-Classic** 2 | 3 | This example allocates an Elastic IP address to use with an instance in EC2-Classic. 4 | 5 | Command:: 6 | 7 | aws ec2 allocate-address 8 | 9 | Output:: 10 | 11 | { 12 | "PublicIp": "198.51.100.0", 13 | "Domain": "standard" 14 | } 15 | 16 | **To allocate an Elastic IP address for EC2-VPC** 17 | 18 | This example allocates an Elastic IP address to use with an instance in a VPC. 19 | 20 | Command:: 21 | 22 | aws ec2 allocate-address --domain vpc 23 | 24 | Output:: 25 | 26 | { 27 | "PublicIp": "203.0.113.0", 28 | "Domain": "vpc", 29 | "AllocationId": "eipalloc-64d5890a" 30 | } 31 | 32 | -------------------------------------------------------------------------------- /awscli/examples/ec2/assign-private-ip-addresses.rst: -------------------------------------------------------------------------------- 1 | **To assign a specific secondary private IP address a network interface** 2 | 3 | This example assigns the specified secondary private IP address to the specified network interface. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 assign-private-ip-addresses --network-interface-id eni-e5aa89a3 --private-ip-addresses 10.0.0.82 8 | 9 | **To assign secondary private IP addresses that Amazon EC2 selects to a network interface** 10 | 11 | This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 assign-private-ip-addresses --network-interface-id eni-e5aa89a3 --secondary-private-ip-address-count 2 16 | -------------------------------------------------------------------------------- /awscli/examples/ec2/associate-dhcp-options.rst: -------------------------------------------------------------------------------- 1 | **To associate a DHCP options set with your VPC** 2 | 3 | This example associates the specified DHCP options set with the specified VPC. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 associate-dhcp-options --dhcp-options-id dopt-d9070ebb --vpc-id vpc-a01106c2 8 | 9 | **To associate the default DHCP options set with your VPC** 10 | 11 | This example associates the default DHCP options set with the specified VPC. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 associate-dhcp-options --dhcp-options-id default --vpc-id vpc-a01106c2 16 | -------------------------------------------------------------------------------- /awscli/examples/ec2/associate-route-table.rst: -------------------------------------------------------------------------------- 1 | **To associate a route table with a subnet** 2 | 3 | This example associates the specified route table with the specified subnet. 4 | 5 | Command:: 6 | 7 | aws ec2 associate-route-table --route-table-id rtb-22574640 --subnet-id subnet-9d4a7b6c 8 | 9 | Output:: 10 | 11 | { 12 | "AssociationId": "rtbassoc-781d0d1a" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/attach-classic-link-vpc.rst: -------------------------------------------------------------------------------- 1 | **To link (attach) an EC2-Classic instance to a VPC** 2 | 3 | This example links instance i-1a2b3c4d to VPC vpc-88888888 through the VPC security group sg-12312312. 4 | 5 | Command:: 6 | 7 | aws ec2 attach-classic-link-vpc --instance-id i-1a2b3c4d --vpc-id vpc-88888888 --groups sg-12312312 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/attach-internet-gateway.rst: -------------------------------------------------------------------------------- 1 | **To attach an Internet gateway to your VPC** 2 | 3 | This example attaches the specified Internet gateway to the specified VPC. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 attach-internet-gateway --internet-gateway-id igw-c0a643a9 --vpc-id vpc-a01106c2 -------------------------------------------------------------------------------- /awscli/examples/ec2/attach-network-interface.rst: -------------------------------------------------------------------------------- 1 | **To attach a network interface to an instance** 2 | 3 | This example attaches the specified network interface to the specified instance. 4 | 5 | Command:: 6 | 7 | aws ec2 attach-network-interface --network-interface-id eni-e5aa89a3 --instance-id i-640a3c17 --device-index 1 8 | 9 | Output:: 10 | 11 | { 12 | "AttachmentId": "eni-attach-66c4350a" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/attach-volume.rst: -------------------------------------------------------------------------------- 1 | **To attach a volume to an instance** 2 | 3 | This example command attaches a volume (``vol-1234abcd``) to an instance (``i-abcd1234``) as ``/dev/sdf``. 4 | 5 | Command:: 6 | 7 | aws ec2 attach-volume --volume-id vol-1234abcd --instance-id i-abcd1234 --device /dev/sdf 8 | 9 | Output:: 10 | 11 | { 12 | "AttachTime": "YYYY-MM-DDTHH:MM:SS.000Z", 13 | "InstanceId": "i-abcd1234", 14 | "VolumeId": "vol-1234abcd", 15 | "State": "attaching", 16 | "Device": "/dev/sdf" 17 | } 18 | -------------------------------------------------------------------------------- /awscli/examples/ec2/attach-vpn-gateway.rst: -------------------------------------------------------------------------------- 1 | **To attach a virtual private gateway to your VPC** 2 | 3 | This example attaches the specified virtual private gateway to the specified VPC. 4 | 5 | Command:: 6 | 7 | aws ec2 attach-vpn-gateway --vpn-gateway-id vgw-9a4cacf3 --vpc-id vpc-a01106c2 8 | 9 | Output:: 10 | 11 | { 12 | "VpcAttachement": { 13 | "State": "attaching", 14 | "VpcId": "vpc-a01106c2" 15 | } 16 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/cancel-conversion-task.rst: -------------------------------------------------------------------------------- 1 | **To cancel an active conversion of an instance or a volume** 2 | 3 | This example cancels the upload associated with the task ID import-i-fh95npoc. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 cancel-conversion-task --conversion-task-id import-i-fh95npoc 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/cancel-export-task.rst: -------------------------------------------------------------------------------- 1 | **To cancel an active export task** 2 | 3 | This example cancels an active export task with the task ID export-i-fgelt0i7. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 cancel-export-task --export-task-id export-i-fgelt0i7 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/cancel-spot-instance-requests.rst: -------------------------------------------------------------------------------- 1 | **To cancel Spot Instance requests** 2 | 3 | This example command cancels a Spot Instance request. 4 | 5 | Command:: 6 | 7 | aws ec2 cancel-spot-instance-requests --spot-instance-request-ids sir-08b93456 8 | 9 | Output:: 10 | 11 | { 12 | "CancelledSpotInstanceRequests": [ 13 | { 14 | "State": "cancelled", 15 | "SpotInstanceRequestId": "sir-08b93456" 16 | } 17 | ] 18 | } 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/ec2/confirm-product-instance.rst: -------------------------------------------------------------------------------- 1 | **To confirm the product instance** 2 | 3 | This example determines whether the specified product code is associated with the specified instance. 4 | 5 | Command:: 6 | 7 | aws ec2 confirm-product-instance --product-code 774F4FF8 --instance-id i-5203422c 8 | 9 | Output:: 10 | 11 | { 12 | "OwnerId": "123456789012" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/copy-image.rst: -------------------------------------------------------------------------------- 1 | **To copy an AMI to another region** 2 | 3 | This example copies the specified AMI from the ``us-east-1`` region to the ``ap-northeast-1`` region. 4 | 5 | Command:: 6 | 7 | aws ec2 copy-image --source-image-id ami-5731123e --source-region us-east-1 --region ap-northeast-1 --name "My server" 8 | 9 | Output:: 10 | 11 | { 12 | "ImageId": "ami-438bea42" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/copy-snapshot.rst: -------------------------------------------------------------------------------- 1 | **To copy a snapshot** 2 | 3 | This example command copies a snapshot with the snapshot ID of ``snap-1234abcd`` from the ``us-west-2`` region to the ``us-east-1`` region and adds a short description to identify the snapshot. 4 | 5 | Command:: 6 | 7 | aws --region us-east-1 ec2 copy-snapshot --source-region us-west-2 --source-snapshot-id snap-1234abcd --description "This is my copied snapshot." 8 | 9 | Output:: 10 | 11 | { 12 | "SnapshotId": "snap-2345bcde" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-customer-gateway.rst: -------------------------------------------------------------------------------- 1 | **To create a customer gateway** 2 | 3 | This example creates a customer gateway with the specified IP address for its outside interface. 4 | 5 | Command:: 6 | 7 | aws ec2 create-customer-gateway --type ipsec.1 --public-ip 12.1.2.3 --bgp-asn 65534 8 | 9 | Output:: 10 | 11 | { 12 | "CustomerGateway": { 13 | "CustomerGatewayId": "cgw-0e11f167", 14 | "IpAddress": "12.1.2.3", 15 | "State": "available", 16 | "Type": "ipsec.1", 17 | "BgpAsn": "65534" 18 | } 19 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-dhcp-options.rst: -------------------------------------------------------------------------------- 1 | **To create a DHCP options set** 2 | 3 | This example creates a DHCP options set. 4 | 5 | Command:: 6 | 7 | aws ec2 create-dhcp-options --dhcp-configuration "Key=domain-name-servers,Values=10.2.5.1,10.2.5.2" 8 | 9 | Output:: 10 | 11 | { 12 | "DhcpOptions": { 13 | "DhcpConfigurations": [ 14 | { 15 | "Values": [ 16 | "10.2.5.2", 17 | "10.2.5.1" 18 | ], 19 | "Key": "domain-name-servers" 20 | } 21 | ], 22 | "DhcpOptionsId": "dopt-d9070ebb" 23 | } 24 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-internet-gateway.rst: -------------------------------------------------------------------------------- 1 | **To create an Internet gateway** 2 | 3 | This example creates an Internet gateway. 4 | 5 | Command:: 6 | 7 | aws ec2 create-internet-gateway 8 | 9 | Output:: 10 | 11 | { 12 | "InternetGateway": { 13 | "Tags": [], 14 | "InternetGatewayId": "igw-c0a643a9", 15 | "Attachments": [] 16 | } 17 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-key-pair.rst: -------------------------------------------------------------------------------- 1 | **To create a key pair** 2 | 3 | This example creates a key pair named ``MyKeyPair``. 4 | 5 | Command:: 6 | 7 | aws ec2 create-key-pair --key-name MyKeyPair 8 | 9 | The output is an ASCII version of the private key and key fingerprint. You need to save the key to a file. 10 | 11 | For more information, see `Using Key Pairs`_ in the *AWS Command Line Interface User Guide*. 12 | 13 | .. _`Using Key Pairs`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-network-acl-entry.rst: -------------------------------------------------------------------------------- 1 | **To create a network ACL entry** 2 | 3 | This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 create-network-acl-entry --network-acl-id acl-5fb85d36 --ingress --rule-number 100 --protocol udp --port-range From=53,To=53 --cidr-block 0.0.0.0/0 --rule-action allow 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-route-table.rst: -------------------------------------------------------------------------------- 1 | **To create a route table** 2 | 3 | This example creates a route table for the specified VPC. 4 | 5 | Command:: 6 | 7 | aws ec2 create-route-table --vpc-id vpc-a01106c2 8 | 9 | Output:: 10 | 11 | { 12 | "RouteTable": { 13 | "Associations": [], 14 | "RouteTableId": "rtb-22574640", 15 | "VpcId": "vpc-a01106c2", 16 | "PropagatingVgws": [], 17 | "Tags": [], 18 | "Routes": [ 19 | { 20 | "GatewayId": "local", 21 | "DestinationCidrBlock": "10.0.0.0/16", 22 | "State": "active" 23 | } 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-route.rst: -------------------------------------------------------------------------------- 1 | **To create a route** 2 | 3 | This example creates a route for the specified route table. The route matches all traffic (``0.0.0.0/0``) and routes it to the specified Internet gateway. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 create-route --route-table-id rtb-22574640 --destination-cidr-block 0.0.0.0/0 --gateway-id igw-c0a643a9 8 | 9 | This example command creates a route in route table rtb-g8ff4ea2. The route matches traffic for the CIDR block 10 | 10.0.0.0/16 and routes it to VPC peering connection, pcx-111aaa22. This route enables traffic to be directed to the peer 11 | VPC in the VPC peering connection. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 create-route --route-table-id rtb-g8ff4ea2 --destination-cidr-block 10.0.0.0/16 --vpc-peering-connection-id pcx-1a2b3c4d 16 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-security-group.rst: -------------------------------------------------------------------------------- 1 | **To create a security group for EC2-Classic** 2 | 3 | This example creates a security group named ``MySecurityGroup``. 4 | 5 | Command:: 6 | 7 | aws ec2 create-security-group --group-name MySecurityGroup --description "My security group" 8 | 9 | Output:: 10 | 11 | { 12 | "GroupId": "sg-903004f8" 13 | } 14 | 15 | **To create a security group for EC2-VPC** 16 | 17 | This example creates a security group named ``MySecurityGroup`` for the specified VPC. 18 | 19 | Command:: 20 | 21 | aws ec2 create-security-group --group-name MySecurityGroup --description "My security group" --vpc-id vpc-1a2b3c4d 22 | 23 | Output:: 24 | 25 | { 26 | "GroupId": "sg-903004f8" 27 | } 28 | 29 | For more information, see `Using Security Groups`_ in the *AWS Command Line Interface User Guide*. 30 | 31 | .. _`Using Security Groups`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html 32 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-snapshot.rst: -------------------------------------------------------------------------------- 1 | **To create a snapshot** 2 | 3 | This example command creates a snapshot of the volume with a volume ID of ``vol-1234abcd`` and a short description to identify the snapshot. 4 | 5 | Command:: 6 | 7 | aws ec2 create-snapshot --volume-id vol-1234abcd --description "This is my root volume snapshot." 8 | 9 | Output:: 10 | 11 | { 12 | "Description": "This is my root volume snapshot.", 13 | "Tags": [], 14 | "VolumeId": "vol-1234abcd", 15 | "State": "pending", 16 | "VolumeSize": 8, 17 | "StartTime": "2014-02-28T21:06:01.000Z", 18 | "OwnerId": "012345678910", 19 | "SnapshotId": "snap-1a2b3c4d" 20 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-spot-datafeed-subscription.rst: -------------------------------------------------------------------------------- 1 | **To create a Spot Instance datafeed** 2 | 3 | This example command creates a Spot Instance data feed for the account. 4 | 5 | Command:: 6 | 7 | aws ec2 create-spot-datafeed-subscription --bucket --prefix spotdata 8 | 9 | Output:: 10 | 11 | { 12 | "SpotDatafeedSubscription": { 13 | "OwnerId": "", 14 | "Prefix": "spotdata", 15 | "Bucket": "", 16 | "State": "Active" 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-subnet.rst: -------------------------------------------------------------------------------- 1 | **To create a subnet** 2 | 3 | This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you. Alternatively, you can use the ``--availability-zone`` option to specify the Availability Zone. 4 | 5 | Command:: 6 | 7 | aws ec2 create-subnet --vpc-id vpc-a01106c2 --cidr-block 10.0.1.0/24 8 | 9 | Output:: 10 | 11 | { 12 | "Subnet": { 13 | "VpcId": "vpc-a01106c2", 14 | "CidrBlock": "10.0.1.0/24", 15 | "State": "pending", 16 | "AvailabilityZone": "us-east-1c", 17 | "SubnetId": "subnet-9d4a7b6c", 18 | "AvailableIpAddressCount": 251 19 | } 20 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/create-vpn-connection-route.rst: -------------------------------------------------------------------------------- 1 | **To create a static route for a VPN connection** 2 | 3 | This example creates a static route for the specified VPN connection. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 create-vpn-connection-route --vpn-connection-id vpn-40f41529 --destination-cidr-block 11.12.0.0/16 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/create-vpn-gateway.rst: -------------------------------------------------------------------------------- 1 | **To create a virtual private gateway** 2 | 3 | This example creates a virtual private gateway. 4 | 5 | Command:: 6 | 7 | aws ec2 create-vpn-gateway --type ipsec.1 8 | 9 | Output:: 10 | 11 | { 12 | "VpnGateway": { 13 | "State": "available", 14 | "Type": "ipsec.1", 15 | "VpnGatewayId": "vgw-9a4cacf3", 16 | "VpcAttachments": [] 17 | } 18 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-customer-gateway.rst: -------------------------------------------------------------------------------- 1 | **To delete a customer gateway** 2 | 3 | This example deletes the specified customer gateway. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-customer-gateway --customer-gateway-id cgw-0e11f167 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-dhcp-options.rst: -------------------------------------------------------------------------------- 1 | **To delete a DHCP options set** 2 | 3 | This example deletes the specified DHCP options set. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-dhcp-options --dhcp-options-id dopt-d9070ebb 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-internet-gateway.rst: -------------------------------------------------------------------------------- 1 | **To delete an Internet gateway** 2 | 3 | This example deletes the specified Internet gateway. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-internet-gateway --internet-gateway-id igw-c0a643a9 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-key-pair.rst: -------------------------------------------------------------------------------- 1 | **To delete a key pair** 2 | 3 | This example deletes the key pair named ``MyKeyPair``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-key-pair --key-name MyKeyPair 8 | 9 | For more information, see `Using Key Pairs`_ in the *AWS Command Line Interface User Guide*. 10 | 11 | .. _`Using Key Pairs`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-network-acl-entry.rst: -------------------------------------------------------------------------------- 1 | **To delete a network ACL entry** 2 | 3 | This example deletes ingress rule number 100 from the specified network ACL. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-network-acl-entry --network-acl-id acl-5fb85d36 --ingress --rule-number 100 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-network-acl.rst: -------------------------------------------------------------------------------- 1 | **To delete a network ACL** 2 | 3 | This example deletes the specified network ACL. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-network-acl --network-acl-id acl-5fb85d36 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-network-interface.rst: -------------------------------------------------------------------------------- 1 | **To delete a network interface** 2 | 3 | This example deletes the specified network interface. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-network-interface --network-interface-id eni-e5aa89a3 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-route-table.rst: -------------------------------------------------------------------------------- 1 | **To delete a route table** 2 | 3 | This example deletes the specified route table. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-route-table --route-table-id rtb-22574640 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-route.rst: -------------------------------------------------------------------------------- 1 | **To delete a route** 2 | 3 | This example deletes the specified route from the specified route table. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-route --route-table-id rtb-22574640 --destination-cidr-block 0.0.0.0/0 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-security-group.rst: -------------------------------------------------------------------------------- 1 | **[EC2-Classic] To delete a security group** 2 | 3 | This example deletes the security group named ``MySecurityGroup``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-security-group --group-name MySecurityGroup 8 | 9 | **[EC2-VPC] To delete a security group** 10 | 11 | This example deletes the security group with the ID ``sg-903004f8``. Note that you can't reference a security group for EC2-VPC by name. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 delete-security-group --group-id sg-903004f8 16 | 17 | For more information, see `Using Security Groups`_ in the *AWS Command Line Interface User Guide*. 18 | 19 | .. _`Using Security Groups`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-sg.html 20 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-snapshot.rst: -------------------------------------------------------------------------------- 1 | **To delete a snapshot** 2 | 3 | This example command deletes a snapshot with the snapshot ID of ``snap-1234abcd``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-snapshot --snapshot-id snap-1234abcd 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-spot-datafeed-subscription.rst: -------------------------------------------------------------------------------- 1 | **To cancel a Spot Instance data feed subscription** 2 | 3 | This example command deletes a Spot data feed subscription for the account. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-spot-datafeed-subscription 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-subnet.rst: -------------------------------------------------------------------------------- 1 | **To delete a subnet** 2 | 3 | This example deletes the specified subnet. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-subnet --subnet-id subnet-9d4a7b6c 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-volume.rst: -------------------------------------------------------------------------------- 1 | **To delete a volume** 2 | 3 | This example command deletes an available volume with the volume ID of ``vol-1234abcd``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-volume --volume-id vol-1234abcd 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-vpc-peering-connection.rst: -------------------------------------------------------------------------------- 1 | **To delete a VPC peering connection** 2 | 3 | This example deletes the specified VPC peering connection. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-vpc-peering-connection --vpc-peering-connection-id pcx-1a2b3c4d 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } 14 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-vpc.rst: -------------------------------------------------------------------------------- 1 | **To delete a VPC** 2 | 3 | This example deletes the specified VPC. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-vpc --vpc-id vpc-a01106c2 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-vpn-connection-route.rst: -------------------------------------------------------------------------------- 1 | **To delete a static route from a VPN connection** 2 | 3 | This example deletes the specified static route from the specified VPN connection. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-vpn-connection-route --vpn-connection-id vpn-40f41529 --destination-cidr-block 11.12.0.0/16 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-vpn-connection.rst: -------------------------------------------------------------------------------- 1 | **To delete a VPN connection** 2 | 3 | This example deletes the specified VPN connection. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-vpn-connection --vpn-connection-id vpn-40f41529 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/delete-vpn-gateway.rst: -------------------------------------------------------------------------------- 1 | **To delete a virtual private gateway** 2 | 3 | This example deletes the specified virtual private gateway. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 delete-vpn-gateway --vpn-gateway-id vgw-9a4cacf3 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/deregister-image.rst: -------------------------------------------------------------------------------- 1 | **To deregister an AMI** 2 | 3 | This example deregisters the specified AMI. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 deregister-image --image-id ami-4fa54026 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-export-tasks.rst: -------------------------------------------------------------------------------- 1 | **To list details about an instance export task** 2 | 3 | This example describes the export task with ID export-i-fh8sjjsq. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-export-tasks --export-task-ids export-i-fh8sjjsq 8 | 9 | Output:: 10 | 11 | { 12 | "ExportTasks": [ 13 | { 14 | "State": "active", 15 | "InstanceExportDetails": { 16 | "InstanceId": "i-38e485d8", 17 | "TargetEnvironment": "vmware" 18 | }, 19 | "ExportToS3Task": { 20 | "S3Bucket": "myexportbucket", 21 | "S3Key": "RHEL5export-i-fh8sjjsq.ova", 22 | "DiskImageFormat": "vmdk", 23 | "ContainerFormat": "ova" 24 | }, 25 | "Description": "RHEL5 instance", 26 | "ExportTaskId": "export-i-fh8sjjsq" 27 | } 28 | ] 29 | } 30 | 31 | -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-image-attribute.rst: -------------------------------------------------------------------------------- 1 | **To describe the launch permissions for an AMI** 2 | 3 | This example describes the launch permissions for the specified AMI. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-image-attribute --image-id ami-5731123e --attribute launchPermission 8 | 9 | Output:: 10 | 11 | { 12 | "LaunchPermissions": [ 13 | { 14 | "UserId": "123456789012" 15 | } 16 | ], 17 | "ImageId": "ami-5731123e", 18 | } 19 | 20 | **To describe the product codes for an AMI** 21 | 22 | This example describes the product codes for the specified AMI. Note that this AMI has no product codes. 23 | 24 | Command:: 25 | 26 | aws ec2 describe-image-attribute --image-id ami-5731123e --attribute productCodes 27 | 28 | Output:: 29 | 30 | { 31 | "ProductCodes": [], 32 | "ImageId": "ami-5731123e", 33 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-key-pairs.rst: -------------------------------------------------------------------------------- 1 | **To display a key pair** 2 | 3 | This example displays the fingerprint for the key pair named ``MyKeyPair``. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-key-pairs --key-name MyKeyPair 8 | 9 | Output:: 10 | 11 | { 12 | "KeyPairs": [ 13 | { 14 | "KeyName": "MyKeyPair", 15 | "KeyFingerprint": "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f" 16 | } 17 | ] 18 | } 19 | 20 | For more information, see `Using Key Pairs`_ in the *AWS Command Line Interface User Guide*. 21 | 22 | .. _`Using Key Pairs`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-snapshot-attribute.rst: -------------------------------------------------------------------------------- 1 | **To describe snapshot attributes** 2 | 3 | This example command describes the ``createVolumePermission`` and ``productCodes`` attributes on a snapshot with the snapshot ID of ``snap-1234abcd``. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-snapshot-attribute --snapshot-id snap-1234abcd --attribute createVolumePermission --attribute productCodes 8 | 9 | Output:: 10 | 11 | { 12 | "SnapshotId": "snap-b52c0044", 13 | "CreateVolumePermissions": [], 14 | "ProductCodes": [] 15 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-spot-datafeed-subscription.rst: -------------------------------------------------------------------------------- 1 | **To describe Spot Instance datafeed subscription for an account** 2 | 3 | This example command describes the data feed for the the account. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-spot-datafeed-subscription 8 | 9 | Output:: 10 | 11 | { 12 | "SpotDatafeedSubscription": { 13 | "OwnerId": "", 14 | "Prefix": "spotdata", 15 | "Bucket": "", 16 | "State": "Active" 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-volume-attribute.rst: -------------------------------------------------------------------------------- 1 | **To describe a volume attribute** 2 | 3 | This example command describes the ``autoEnableIo`` attribute of the volume with the ID ``vol-2725bc51``. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-volume-attribute --volume-id vol-2725bc51 --attribute autoEnableIO 8 | 9 | Output:: 10 | 11 | { 12 | "AutoEnableIO": { 13 | "Value": false 14 | }, 15 | "ProductCodes": [], 16 | "VolumeId": "vol-2725bc51" 17 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/describe-vpc-classic-link.rst: -------------------------------------------------------------------------------- 1 | **To describe the ClassicLink status of your VPCs** 2 | 3 | This example lists the ClassicLink status of vpc-88888888. 4 | 5 | Command:: 6 | 7 | aws ec2 describe-vpc-classic-link --vpc-id vpc-88888888 8 | 9 | Output:: 10 | 11 | { 12 | "Vpcs": [ 13 | { 14 | "ClassicLinkEnabled": true, 15 | "VpcId": "vpc-88888888", 16 | "Tags": [ 17 | { 18 | "Value": "classiclinkvpc", 19 | "Key": "Name" 20 | } 21 | ] 22 | } 23 | ] 24 | } 25 | 26 | This example lists only VPCs that are enabled for Classiclink (the filter value of ``is-classic-link-enabled`` is set to ``true``). 27 | 28 | Command:: 29 | 30 | aws ec2 describe-vpc-classic-link --filter "Name=is-classic-link-enabled,Values=true" 31 | -------------------------------------------------------------------------------- /awscli/examples/ec2/detach-classic-link-vpc.rst: -------------------------------------------------------------------------------- 1 | **To unlink (detach) an EC2-Classic instance from a VPC** 2 | 3 | This example unlinks instance i-1a2b3c4d from VPC vpc-88888888. 4 | 5 | Command:: 6 | 7 | aws ec2 detach-classic-link-vpc --instance-id i-1a2b3c4d --vpc-id vpc-88888888 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/detach-internet-gateway.rst: -------------------------------------------------------------------------------- 1 | **To detach an Internet gateway from your VPC** 2 | 3 | This example detaches the specified Internet gateway from the specified VPC. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 detach-internet-gateway --internet-gateway-id igw-c0a643a9 --vpc-id vpc-a01106c2 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/detach-network-interface.rst: -------------------------------------------------------------------------------- 1 | **To detach a network interface from your instance** 2 | 3 | This example detaches the specified network interface from the specified instance. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 detach-network-interface --attachment-id eni-attach-66c4350a 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/detach-volume.rst: -------------------------------------------------------------------------------- 1 | **To detach a volume from an instance** 2 | 3 | This example command detaches the volume (``vol-1234abcd``) from the instance it is attached to. 4 | 5 | Command:: 6 | 7 | aws ec2 detach-volume --volume-id vol-1234abcd 8 | 9 | Output:: 10 | 11 | { 12 | "AttachTime": "2014-02-27T19:23:06.000Z", 13 | "InstanceId": "i-0751440e", 14 | "VolumeId": "vol-1234abcd", 15 | "State": "detaching", 16 | "Device": "/dev/sdb" 17 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/detach-vpn-gateway.rst: -------------------------------------------------------------------------------- 1 | **To detach a virtual private gateway from your VPC** 2 | 3 | This example detaches the specified virtual private gateway from the specified VPC. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 detach-internet-gateway --vpn-gateway-id vgw-9a4cacf3 --vpc-id vpc-a01106c2 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/disable-vgw-route-propagation.rst: -------------------------------------------------------------------------------- 1 | **To disable route propagation** 2 | 3 | This example disables the specified virtual private gateway from propagating static routes to the specified route table. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 disable-vgw-route-propagation --route-table-id rtb-22574640 --gateway-id vgw-9a4cacf3 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/disable-vpc-classic-link.rst: -------------------------------------------------------------------------------- 1 | **To disable ClassicLink for a VPC** 2 | 3 | This example disables ClassicLink for vpc-8888888. 4 | 5 | Command:: 6 | 7 | aws ec2 disable-vpc-classic-link --vpc-id vpc-88888888 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/disassociate-address.rst: -------------------------------------------------------------------------------- 1 | **To disassociate an Elastic IP addresses in EC2-Classic** 2 | 3 | This example disassociates an Elastic IP address from an instance in EC2-Classic. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 disassociate-address --public-ip 198.51.100.0 8 | 9 | **To disassociate an Elastic IP address in EC2-VPC** 10 | 11 | This example disassociates an Elastic IP address from an instance in a VPC. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 disassociate-address --association-id eipassoc-2bebb745 16 | -------------------------------------------------------------------------------- /awscli/examples/ec2/disassociate-route-table.rst: -------------------------------------------------------------------------------- 1 | **To disassociate a route table** 2 | 3 | This example disassociates the specified route table from the specified subnet. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 disassociate-route-table --association-id rtbassoc-781d0d1a 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/enable-vgw-route-propagation.rst: -------------------------------------------------------------------------------- 1 | **To enable route propagation** 2 | 3 | This example enables the specified virtual private gateway to propagate static routes to the specified route table. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 enable-vgw-route-propagation --route-table-id rtb-22574640 --gateway-id vgw-9a4cacf3 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/enable-vpc-classic-link.rst: -------------------------------------------------------------------------------- 1 | **To enable a VPC for ClassicLink** 2 | 3 | This example enables vpc-8888888 for ClassicLink. 4 | 5 | Command:: 6 | 7 | aws ec2 enable-vpc-classic-link --vpc-id vpc-88888888 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/get-console-output.rst: -------------------------------------------------------------------------------- 1 | **To get the console output** 2 | 3 | This example gets the console ouput for the specified Linux instance. 4 | 5 | Command:: 6 | 7 | aws ec2 get-console-output --instance-id i-10a64379 8 | 9 | Output:: 10 | 11 | { 12 | "InstanceId": "i-10a64379", 13 | "Timestamp": "2013-07-25T21:23:53.000Z", 14 | "Output": "..." 15 | } 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/ec2/modify-subnet-attribute.rst: -------------------------------------------------------------------------------- 1 | **To change a subnet's public IP addressing behavior** 2 | 3 | This example modifies subnet-1a2b3c4d to specify that all instances launched into this subnet are assigned a public IP address. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 modify-subnet-attribute --subnet-id subnet-1a2b3c4d --map-public-ip-on-launch 8 | 9 | For more information, see `IP Addressing in Your VPC`_ in the *AWS Virtual Private Cloud User Guide*. 10 | 11 | .. _`IP Addressing in Your VPC`: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-ip-addressing.html -------------------------------------------------------------------------------- /awscli/examples/ec2/modify-volume-attribute.rst: -------------------------------------------------------------------------------- 1 | **To modify a volume attribute** 2 | 3 | This example sets the ``autoEnableIo`` attribute of the volume with the ID ``vol-1a2b3c4d`` to ``true``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 modify-volume-attribute --volume-id vol-1a2b3c4d --auto-enable-io 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/purchase-reserved-instances-offering.rst: -------------------------------------------------------------------------------- 1 | **To purchase a Reserved Instance offering** 2 | 3 | This example command illustrates a purchase of a Reserved Instances offering, specifying an offering ID and instance count. 4 | 5 | Command:: 6 | 7 | aws ec2 purchase-reserved-instances-offering --reserved-instances-offering-id ec06327e-dd07-46ee-9398-75b5fexample --instance-count 3 8 | 9 | 10 | Output:: 11 | 12 | { 13 | "ReservedInstancesId": "af9f760e-6f91-4559-85f7-4980eexample" 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/ec2/reboot-instances.rst: -------------------------------------------------------------------------------- 1 | **To reboot an Amazon EC2 instance** 2 | 3 | This example reboots the specified instance. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 reboot-instances --instance-ids i-1a2b3c4d 8 | 9 | For more information, see `Reboot Your Instance`_ in the *Amazon Elastic Compute Cloud User Guide*. 10 | 11 | .. _`Reboot Your Instance`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-reboot.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/ec2/reject-vpc-peering-connection.rst: -------------------------------------------------------------------------------- 1 | **To reject a VPC peering connection** 2 | 3 | This example rejects the specified VPC peering connection request. 4 | 5 | Command:: 6 | 7 | aws ec2 reject-vpc-peering-connection --vpc-peering-connection-id pcx-1a2b3c4d 8 | 9 | Output:: 10 | 11 | { 12 | "Return": true 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/release-address.rst: -------------------------------------------------------------------------------- 1 | **To release an Elastic IP addresses for EC2-Classic** 2 | 3 | This example releases an Elastic IP address for use with instances in EC2-Classic. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 release-address --public-ip 198.51.100.0 8 | 9 | **To release an Elastic IP address for EC2-VPC** 10 | 11 | This example releases an Elastic IP address for use with instances in a VPC. If the command succeeds, no output is returned. 12 | 13 | Command:: 14 | 15 | aws ec2 release-address --allocation-id eipalloc-64d5890a 16 | -------------------------------------------------------------------------------- /awscli/examples/ec2/replace-network-acl-association.rst: -------------------------------------------------------------------------------- 1 | **To replace the network ACL associated with a subnet** 2 | 3 | This example associates the specified network ACL with the subnet for the specified network ACL association. 4 | 5 | Command:: 6 | 7 | aws ec2 replace-network-acl-association --association-id aclassoc-e5b95c8c --network-acl-id acl-5fb85d36 8 | 9 | Output:: 10 | 11 | { 12 | "NewAssociationId": "aclassoc-3999875b" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/replace-route-table-association.rst: -------------------------------------------------------------------------------- 1 | **To replace the route table associated with a subnet** 2 | 3 | This example associates the specified route table with the subnet for the specified route table association. 4 | 5 | Command:: 6 | 7 | aws ec2 replace-route-table-association --association-id rtbassoc-781d0d1a --route-table-id rtb-22574640 8 | 9 | Output:: 10 | 11 | { 12 | "NewAssociationId": "rtbassoc-3a1f0f58" 13 | } -------------------------------------------------------------------------------- /awscli/examples/ec2/replace-route.rst: -------------------------------------------------------------------------------- 1 | **To replace a route** 2 | 3 | This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 replace-route --route-table-id rtb-22574640 --destination-cidr-block 10.0.0.0/16 --gateway-id vgw-9a4cacf3 -------------------------------------------------------------------------------- /awscli/examples/ec2/reset-image-attribute.rst: -------------------------------------------------------------------------------- 1 | **To reset the launchPermission attribute** 2 | 3 | This example resets the ``launchPermission`` attribute for the specified AMI to its default value. By default, AMIs are private. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 reset-image-attribute --image-id ami-5731123e --attribute launchPermission 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/revoke-security-group-ingress.rst: -------------------------------------------------------------------------------- 1 | **To remove a rule from a security group** 2 | 3 | This example removes TCP port 22 access for the ``203.0.113.0/24`` address range from the security group named ``MySecurityGroup``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 revoke-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 22 --cidr 203.0.113.0/24 8 | -------------------------------------------------------------------------------- /awscli/examples/ec2/start-instances.rst: -------------------------------------------------------------------------------- 1 | **To start an Amazon EC2 instance** 2 | 3 | This example starts the specified Amazon EBS-backed instance. 4 | 5 | Command:: 6 | 7 | aws ec2 start-instances --instance-ids i-1a2b3c4d 8 | 9 | Output:: 10 | 11 | { 12 | "StartingInstances": [ 13 | { 14 | "InstanceId": "i-1a2b3c4d", 15 | "CurrentState": { 16 | "Code": 0, 17 | "Name": "pending" 18 | }, 19 | "PreviousState": { 20 | "Code": 80, 21 | "Name": "stopped" 22 | } 23 | } 24 | ] 25 | } 26 | 27 | For more information, see `Stop and Start Your Instance`_ in the *Amazon Elastic Compute Cloud User Guide*. 28 | 29 | .. _`Stop and Start Your Instance`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html 30 | 31 | -------------------------------------------------------------------------------- /awscli/examples/ec2/stop-instances.rst: -------------------------------------------------------------------------------- 1 | **To stop an Amazon EC2 instance** 2 | 3 | This example stops the specified Amazon EBS-backed instance. 4 | 5 | Command:: 6 | 7 | aws ec2 stop-instances --instance-ids i-1a2b3c4d 8 | 9 | Output:: 10 | 11 | { 12 | "StoppingInstances": [ 13 | { 14 | "InstanceId": "i-1a2b3c4d", 15 | "CurrentState": { 16 | "Code": 64, 17 | "Name": "stopping" 18 | }, 19 | "PreviousState": { 20 | "Code": 16, 21 | "Name": "running" 22 | } 23 | } 24 | ] 25 | } 26 | 27 | For more information, see `Stop and Start Your Instance`_ in the *Amazon Elastic Compute Cloud User Guide*. 28 | 29 | .. _`Stop and Start Your Instance`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html 30 | 31 | -------------------------------------------------------------------------------- /awscli/examples/ec2/terminate_instances.rst: -------------------------------------------------------------------------------- 1 | **To terminate an Amazon EC2 instance** 2 | 3 | This example terminates the specified instance. 4 | 5 | Command:: 6 | 7 | aws ec2 terminate-instances --instance-ids i-5203422c 8 | 9 | Output:: 10 | 11 | { 12 | "TerminatingInstances": [ 13 | { 14 | "InstanceId": "i-5203422c", 15 | "CurrentState": { 16 | "Code": 32, 17 | "Name": "shutting-down" 18 | }, 19 | "PreviousState": { 20 | "Code": 16, 21 | "Name": "running" 22 | } 23 | } 24 | ] 25 | } 26 | 27 | For more information, see `Using Amazon EC2 Instances`_ in the *AWS Command Line Interface User Guide*. 28 | 29 | .. _`Using Amazon EC2 Instances`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-launch.html 30 | 31 | -------------------------------------------------------------------------------- /awscli/examples/ec2/unassign-private-ip-addresses.rst: -------------------------------------------------------------------------------- 1 | **To unassign a secondary private IP address from a network interface** 2 | 3 | This example unassigns the specified private IP address from the specified network interface. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ec2 unassign-private-ip-addresses --network-interface-id eni-e5aa89a3 --private-ip-addresses 10.0.0.82 8 | -------------------------------------------------------------------------------- /awscli/examples/ecs/create-cluster.rst: -------------------------------------------------------------------------------- 1 | **To create a new cluster** 2 | 3 | This example command creates a cluster in your default region. 4 | 5 | Command:: 6 | 7 | aws ecs create-cluster --cluster-name "my_cluster" 8 | 9 | Output:: 10 | 11 | { 12 | "cluster": { 13 | "clusterName": "my_cluster", 14 | "status": "ACTIVE", 15 | "clusterArn": "arn:aws:ecs:us-east-1::cluster/my_cluster" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /awscli/examples/ecs/delete-cluster.rst: -------------------------------------------------------------------------------- 1 | **To delete an empty cluster** 2 | 3 | This example command deletes an empty cluster in your default region. 4 | 5 | Command:: 6 | 7 | aws ecs delete-cluster --cluster default 8 | 9 | Output:: 10 | 11 | { 12 | "cluster": { 13 | "clusterName": "default", 14 | "status": "INACTIVE", 15 | "clusterArn": "arn:aws:ecs:::cluster/default" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /awscli/examples/ecs/deregister-container-instance.rst: -------------------------------------------------------------------------------- 1 | **To deregister a container instance from a cluster** 2 | 3 | This example deregisters a container instance from the specified cluster in your default region. If there are still tasks running on the container instance, you must either stop those tasks before deregistering, or use the force option. 4 | 5 | Command:: 6 | 7 | aws ecs deregister-container-instance --cluster default --container-instance --force -------------------------------------------------------------------------------- /awscli/examples/ecs/describe-clusters.rst: -------------------------------------------------------------------------------- 1 | **To describe a cluster** 2 | 3 | This example command provides a description of the specified cluster in your default region. 4 | 5 | Command:: 6 | 7 | aws ecs describe-cluster --cluster default 8 | 9 | Output:: 10 | 11 | { 12 | "clusters": [ 13 | { 14 | "clusterName": "default", 15 | "status": "ACTIVE", 16 | "clusterArn": "arn:aws:ecs:us-east-1::cluster/default" 17 | } 18 | ], 19 | "failures": [] 20 | } 21 | -------------------------------------------------------------------------------- /awscli/examples/ecs/list-clusters.rst: -------------------------------------------------------------------------------- 1 | **To list your available clusters** 2 | 3 | This example command lists all of your available clusters in your default region. 4 | 5 | Command:: 6 | 7 | aws ecs list-clusters 8 | 9 | Output:: 10 | 11 | { 12 | "clusterArns": [ 13 | "arn:aws:ecs:us-east-1::cluster/test", 14 | "arn:aws:ecs:us-east-1::cluster/default", 15 | "arn:aws:ecs:us-east-1::cluster/My test cluster" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /awscli/examples/ecs/list-container-instances.rst: -------------------------------------------------------------------------------- 1 | **To list your available container instances in a cluster** 2 | 3 | This example command lists all of your available container instances in the specified cluster in your default region. 4 | 5 | Command:: 6 | 7 | aws ecs list-container-instances --cluster default 8 | 9 | Output:: 10 | 11 | { 12 | "containerInstanceArns": [ 13 | "arn:aws:ecs:us-east-1::container-instance/f6bbb147-5370-4ace-8c73-c7181ded911f", 14 | "arn:aws:ecs:us-east-1::container-instance/ffe3d344-77e2-476c-a4d0-bf560ad50acb" 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /awscli/examples/ecs/list-tasks.rst: -------------------------------------------------------------------------------- 1 | **To list the tasks in a cluster** 2 | 3 | This example command lists all of the tasks in a cluster. 4 | 5 | Command:: 6 | 7 | aws ecs list-tasks --cluster default 8 | 9 | Output:: 10 | 11 | { 12 | "taskArns": [ 13 | "arn:aws:ecs:us-east-1::task/0cc43cdb-3bee-4407-9c26-c0e6ea5bee84", 14 | "arn:aws:ecs:us-east-1::task/6b809ef6-c67e-4467-921f-ee261c15a0a1" 15 | ] 16 | } 17 | 18 | **To list the tasks on a particular container instance** 19 | 20 | This example command lists the tasks of a specified container instance, using the container instance UUID as a filter. 21 | 22 | Command:: 23 | 24 | aws ecs list-tasks --cluster default --container-instance f6bbb147-5370-4ace-8c73-c7181ded911f 25 | 26 | Output:: 27 | 28 | { 29 | "taskArns": [ 30 | "arn:aws:ecs:us-east-1::task/0cc43cdb-3bee-4407-9c26-c0e6ea5bee84" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /awscli/examples/elasticbeanstalk/create-application.rst: -------------------------------------------------------------------------------- 1 | **To create a new application** 2 | 3 | The following command creates a new application named "MyApp":: 4 | 5 | aws elasticbeanstalk create-application --application-name MyApp --description "my application" 6 | 7 | The ``create-application`` command only configures the application's name and description. To upload source code for the application, create an initial version of the application using ``create-application-version``. ``create-application-version`` also has an ``auto-create-application`` option that lets you create the application and the application version in one step. 8 | 9 | Output:: 10 | 11 | { 12 | "Application": { 13 | "ApplicationName": "MyApp", 14 | "ConfigurationTemplates": [], 15 | "DateUpdated": "2015-02-12T18:32:21.181Z", 16 | "Description": "my application", 17 | "DateCreated": "2015-02-12T18:32:21.181Z" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /awscli/examples/elb/add-tags.rst: -------------------------------------------------------------------------------- 1 | **To add tags for a load balancer** 2 | 3 | This example adds tags for a load balancer. 4 | 5 | Command:: 6 | 7 | aws elb add-tags --load-balancer-name MyTCPLoadBalancer --tag "Key=project,Value=lima" 8 | 9 | Output:: 10 | 11 | {} 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/elb/apply-security-groups-to-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To associate a security group with a load balancer in Amazon VPC** 2 | 3 | This example associates a security group with a load balancer in Amazon VPC. 4 | 5 | 6 | Command:: 7 | 8 | aws elb apply-security-groups-to-load-balancer --load-balancer-name MyVPCLoadBalancer --security-groups sg-fc448899 9 | 10 | Output:: 11 | 12 | { 13 | "SecurityGroups": [ 14 | "sg-fc448899" 15 | ] 16 | } 17 | 18 | -------------------------------------------------------------------------------- /awscli/examples/elb/attach-load-balancer-to-subnets.rst: -------------------------------------------------------------------------------- 1 | **To attach subnets to a load balancer** 2 | 3 | This example adds a subnet to the configured subnets in the Amazon VPC for the load balancer. 4 | 5 | 6 | Command:: 7 | 8 | aws elb attach-load-balancer-to-subnets --load-balancer MyVPCLoadBalancer --subnets subnet-0ecac448 9 | 10 | Output:: 11 | 12 | { 13 | "Subnets": [ 14 | "subnet-15aaab61", 15 | "subnet-0ecac448" 16 | ] 17 | } 18 | 19 | -------------------------------------------------------------------------------- /awscli/examples/elb/configure-health-check.rst: -------------------------------------------------------------------------------- 1 | **To specify health check settings for your back-end EC2 instances** 2 | 3 | This example specifies health check settings to use for evaluating the health of your back-end EC2 instances. 4 | 5 | 6 | Command:: 7 | 8 | aws elb configure-health-check --load-balancer-name MyLoadBalancer --health-check Target=HTTP:80/png,Interval=30,UnhealthyThreshold=2,HealthyThreshold=2,Timeout=3 9 | 10 | Output:: 11 | 12 | { 13 | "HealthCheck": { 14 | "HealthyThreshold": 2, 15 | "Interval": 30, 16 | "Target": "HTTP:80/png", 17 | "Timeout": 3, 18 | "UnhealthyThreshold": 2 19 | } 20 | 21 | -------------------------------------------------------------------------------- /awscli/examples/elb/create-app-cookie-stickiness-policy.rst: -------------------------------------------------------------------------------- 1 | **To generate stickiness-policy for your HTTPS load balancer** 2 | 3 | This example generates a stickiness-policy that follows the sticky session lifetimes of the application-generated cookie. 4 | 5 | 6 | Command:: 7 | 8 | aws elb create-app-cookie-stickiness-policy --load-balancer-name MyHTTPSLoadBalancer --policy-name MyAppStickyPolicy --cookie-name MyAppCookie 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/create-lb-cookie-stickiness-policy.rst: -------------------------------------------------------------------------------- 1 | **To generate duration-based stickiness policy for your HTTPS load balancer** 2 | 3 | This example generates a stickiness-policy with sticky session lifetimes controlled by the specified expiration period. 4 | 5 | 6 | Command:: 7 | 8 | aws elb create-lb-cookie-stickiness-policy --load-balancer-name MyHTTPSLoadBalancer --policy-name MyDurationStickyPolicy --cookie-expiration-period 60 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/create-load-balancer-listeners.rst: -------------------------------------------------------------------------------- 1 | **To create listeners on a load balancer** 2 | 3 | This example creates listeners on your load balancer at the specified ports using specified protocols. 4 | 5 | 6 | Command:: 7 | 8 | aws elb create-load-balancer-listeners --load-balancer-name MyHTTPSLoadBalancer --listeners Protocol=HTTP,LoadBalancerPort=80,InstanceProtocol=HTTP,InstancePort=80 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/delete-load-balancer-listeners.rst: -------------------------------------------------------------------------------- 1 | **To delete a listener from your load balancer** 2 | 3 | This example deletes a listener from your load balancer on the specified port. 4 | 5 | Command:: 6 | 7 | aws elb delete-load-balancer-listeners --load-balancer-name MyHTTPSLoadBalancer --load-balancer-ports 80 8 | 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/delete-load-balancer-policy.rst: -------------------------------------------------------------------------------- 1 | **To delete a policy from your load balancer** 2 | 3 | This example deletes a policy. The policy must not be enabled on any listener. 4 | 5 | Command:: 6 | 7 | aws elb delete-load-balancer-policy --load-balancer-name MyHTTPSLoadBalancer --policy-name EnableDurationStickinessPolicy 8 | 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/delete-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To delete load balancer** 2 | 3 | This example deletes a specified load balancer. 4 | 5 | Command:: 6 | 7 | aws elb delete-load-balancer --load-balancer-name MyLoadBalancer 8 | 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/deregister-instances-from-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To deregister instance from your load balancer** 2 | 3 | This example deregisters an instance from your load balancer. 4 | 5 | Command:: 6 | 7 | aws elb deregister-instances-from-load-balancer --load-balancer-name MyHTTPSLoadBalancer --instances i-d6f6fae3 8 | 9 | 10 | Output:: 11 | 12 | { 13 | "Instances": [ 14 | { 15 | "InstanceId": "i-207d9717" 16 | }, 17 | { 18 | "InstanceId": "i-afefb49b" 19 | } 20 | ] 21 | } 22 | 23 | -------------------------------------------------------------------------------- /awscli/examples/elb/describe-load-balancer-attributes.rst: -------------------------------------------------------------------------------- 1 | **To describe the attributes of a load balancer** 2 | 3 | This example describes the attributes of a specified load balancer. 4 | 5 | Command:: 6 | 7 | aws elb describe-load-balancer-attributes --load-balancer-name MyHTTPSLoadBalancer 8 | 9 | Output:: 10 | 11 | { 12 | "LoadBalancerAttributes": { 13 | "ConnectionSettings": { 14 | "IdleTimeout": 30 15 | }, 16 | "ConnectionDraining": { 17 | "Enabled": false, 18 | "Timeout": 300 19 | }, 20 | "CrossZoneLoadBalancing": { 21 | "Enabled": true 22 | }, 23 | "AccessLog": { 24 | "Enabled": false 25 | } 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /awscli/examples/elb/describe-tags.rst: -------------------------------------------------------------------------------- 1 | **To describe the tags assigned to load balancer** 2 | 3 | This example describes the the tags assigned to a load balancer. 4 | 5 | Command:: 6 | 7 | aws elb describe-tags --load-balancer-name MyTCPLoadBalancer 8 | 9 | Output:: 10 | 11 | { 12 | "TagDescriptions": [ 13 | { 14 | "Tags": [ 15 | { 16 | "Value": "digital-media", 17 | "Key": "department" 18 | } 19 | ], 20 | "LoadBalancerName": "MyTCPLoadBalancer" 21 | } 22 | ] 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /awscli/examples/elb/detach-load-balancer-from-subnets.rst: -------------------------------------------------------------------------------- 1 | **To detach load balancer from subnets** 2 | 3 | This example detaches your load balancer from the specified subnets in your Amazon VPC. 4 | 5 | Command:: 6 | 7 | aws elb detach-load-balancer-from-subnets --load-balancer-name MyVPCLoadBalancer --subnets subnet-0ecac448 8 | 9 | 10 | Output:: 11 | 12 | { 13 | "Subnets": [ 14 | "subnet-15aaab61" 15 | ] 16 | } 17 | 18 | -------------------------------------------------------------------------------- /awscli/examples/elb/disable-availaibility-zones-for-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To disable availability zone from a load balancer** 2 | 3 | This example removes specified availability zone from your load balancer. You must have at least one availability zone 4 | enabled for your load balancer at all times. 5 | 6 | Command:: 7 | 8 | aws elb disable-availability-zones-for-load-balancer --load-balancer-name MyLoadBalancer --availability-zones us-east-1a 9 | 10 | Output:: 11 | 12 | { 13 | "AvailabilityZones": [ 14 | "us-east-1b" 15 | ] 16 | } 17 | 18 | -------------------------------------------------------------------------------- /awscli/examples/elb/enable-availability-zones-for-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To enable availability zone for your load balancer** 2 | 3 | This example adds specified availability zone to your load balancer. 4 | 5 | Command:: 6 | 7 | aws elb enable-availability-zones-for-load-balancer --load-balancer-name MyLoadBalancer --availability-zones us-east-1a 8 | 9 | Output:: 10 | 11 | { 12 | "AvailabilityZones": [ 13 | "us-east-1a", 14 | "us-east-1b" 15 | ] 16 | } 17 | 18 | -------------------------------------------------------------------------------- /awscli/examples/elb/modify-load-balancer-attributes.rst: -------------------------------------------------------------------------------- 1 | **To modify attributes of your load balancer** 2 | 3 | This example modifies attributes of a specified load balancer. The following example uses JSON syntax on a Windows 4 | operating system to specify the attributes. For information about specifying JSON syntax on your operating system, see 5 | `Quoting Strings`_. 6 | 7 | Command:: 8 | 9 | aws elb modify-load-balancer-attributes --load-balancer-name MyHTTPSLoadBalancer --load-balancer-attributes "{\"CrossZoneLoadBalancing\":{\"Enabled\":true}} 10 | 11 | Output:: 12 | 13 | { 14 | "LoadBalancerAttributes": { 15 | "CrossZoneLoadBalancing": { 16 | "Enabled": true 17 | } 18 | }, 19 | "LoadBalancerName": "MyHTTPSLoadBalancer" 20 | } 21 | 22 | .. _`Quoting Strings`: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#quoting-strings 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/elb/register-instances-with-load-balancer.rst: -------------------------------------------------------------------------------- 1 | **To register instance with your load balancer** 2 | 3 | This example registers an instance with your load balancer. 4 | 5 | Command:: 6 | 7 | aws elb register-instances-with-load-balancer --load-balancer-name MyHTTPSLoadBalancer --instances i-d6f6fae3 8 | 9 | Output:: 10 | 11 | { 12 | "Instances": [ 13 | { 14 | "InstanceId": "i-d6f6fae3" 15 | }, 16 | { 17 | "InstanceId": "i-207d9717" 18 | }, 19 | { 20 | "InstanceId": "i-afefb49b" 21 | } 22 | ] 23 | } 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/elb/remove-tags.rst: -------------------------------------------------------------------------------- 1 | **To remove tags for a load balancer** 2 | 3 | This example removes tags for a load balancer. 4 | 5 | Command:: 6 | 7 | aws elb remove-tags --load-balancer-name MyTCPLoadBalancer --tag "Key=project,Value=lima" 8 | 9 | Output:: 10 | 11 | {} -------------------------------------------------------------------------------- /awscli/examples/elb/set-load-balancer-listener-ssl-certificate.rst: -------------------------------------------------------------------------------- 1 | **To update SSL certificate for your HTTPS load balancer** 2 | 3 | This example replaces the existing SSL certificate for your HTTPS load balancer. 4 | 5 | Command:: 6 | 7 | aws elb set-load-balancer-listener-ssl-certificate --load-balancer-name MyHTTPSLoadBalancer --load-balancer-port 443 --ssl-certificate-id arn:aws:iam::012345678901:server-certificate/scert 8 | 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/elb/set-load-balancer-policies-of-listener.rst: -------------------------------------------------------------------------------- 1 | **To replace the current policies associated with your load balancer** 2 | 3 | This example replaces the existing policies associated with your load balancer. 4 | 5 | Command:: 6 | 7 | aws elb set-load-balancer-policies-of-listener --load-balancer-name MyHTTPSLoadBalancer --load-balancer-port 443 --policy-names MySSLNegotiationPolicy 8 | 9 | 10 | Output:: 11 | 12 | {} 13 | 14 | **To remove all policies associated with your load balancer** 15 | 16 | This example removes all associated policies from the specified load balancer. 17 | 18 | Command:: 19 | 20 | aws elb set-load-balancer-policies-of-listener --load-balancer-name MyHTTPSLoadBalancer --load-balancer-port 443 --policy-names [] 21 | 22 | To confirm that all the associated policies are removed from the load balancer, use ''describe-load-balancer-policies'' 23 | command and specify the name of your load balancer. 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/emr/add-tags.rst: -------------------------------------------------------------------------------- 1 | **1. To add tags to a cluster** 2 | 3 | - Command:: 4 | 5 | aws emr add-tags --resource-id j-xxxxxxx --tags name="John Doe" age=29 sex=male address="123 East NW Seattle" 6 | 7 | - Output:: 8 | 9 | None 10 | 11 | **2. To list tags of a cluster** 12 | 13 | --Command:: 14 | 15 | aws emr describe-cluster --cluster-id j-XXXXXXYY --query Cluster.Tags 16 | 17 | - Output:: 18 | 19 | [ 20 | { 21 | "Value": "male", 22 | "Key": "sex" 23 | }, 24 | { 25 | "Value": "123 East NW Seattle", 26 | "Key": "address" 27 | }, 28 | { 29 | "Value": "John Doe", 30 | "Key": "name" 31 | }, 32 | { 33 | "Value": "29", 34 | "Key": "age" 35 | } 36 | ] 37 | -------------------------------------------------------------------------------- /awscli/examples/emr/create-cluster-synopsis.rst: -------------------------------------------------------------------------------- 1 | create-cluster 2 | --ami-version 3 | --instance-type | --instance-groups 4 | --instance-count 5 | [--auto-terminate | --no-auto-terminate] 6 | [--use-default-role] 7 | [--service-role ] 8 | [--name ] 9 | [--log-uri ] 10 | [--additional-info ] 11 | [--ec2-attributes ] 12 | [--termination-protected | --no-termination-protected] 13 | [--visible-to-all-users | --no-visible-to-all-users] 14 | [--enable-debugging | --no-enable-debugging] 15 | [--tags ] 16 | [--applications ] 17 | [--emrfs ] 18 | [--bootstrap-actions ] 19 | [--steps ] 20 | [--restore-from-hbase-backup ] 21 | -------------------------------------------------------------------------------- /awscli/examples/emr/schedule-hbase-backup.rst: -------------------------------------------------------------------------------- 1 | **1. To schedule a full hbase backup** 2 | 3 | - Command:: 4 | 5 | aws emr schedule-hbase-backup --cluster-id j-XXXXXXYY --type full --dir 6 | s3://myBucket/backup --interval 10 --unit hours --start-time 7 | 2014-04-21T05:26:10Z --consistent 8 | 9 | - Output:: 10 | 11 | None 12 | 13 | **2. To schedule an incremental hbase backup** 14 | 15 | - Command:: 16 | 17 | aws emr schedule-hbase-backup --cluster-id j-XXXXXXYY --type incremental 18 | --dir s3://myBucket/backup --interval 30 --unit minutes --start-time 19 | 2014-04-21T05:26:10Z --consistent 20 | 21 | - Output:: 22 | 23 | None -------------------------------------------------------------------------------- /awscli/examples/iam/add-role-to-instance-profile.rst: -------------------------------------------------------------------------------- 1 | **To add a role to an instance profile** 2 | 3 | The following ``add-role-to-instance-profile`` command adds the role named ``Test-Role`` to the instance profile named ``ExampleInstanceProfile``:: 4 | 5 | aws iam add-role-to-instance-profile --instance-profile-name ExampleInstanceProfile --role-name Test-Role 6 | 7 | To create an instance profile, use the ``create-instance-profile`` command. 8 | 9 | For more information, see `Instance Profiles`_ in the *Using IAM* guide. 10 | 11 | .. _`Instance Profiles`: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/iam/add-user-to-group.rst: -------------------------------------------------------------------------------- 1 | **To add a user to an IAM group** 2 | 3 | The following ``add-user-to-group`` command adds an IAM user named ``Bob`` to the IAM group named ``Admins``:: 4 | 5 | aws iam add-user-to-group --user-name Bob --group-name Admins 6 | 7 | For more information, see `Adding Users to and Removing Users from a Group`_ in the *Using IAM* guide. 8 | 9 | .. _`Adding Users to and Removing Users from a Group`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_AddOrRemoveUsersFromGroup.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/change-password.rst: -------------------------------------------------------------------------------- 1 | **To change the password for an IAM user** 2 | 3 | The following ``change-password`` command lets an IAM user change his or her own password:: 4 | 5 | aws iam change-password --old-password --new-password 6 | 7 | To set a password policy for the account, use the ``update-account-password-policy`` command. If the new password 8 | violates the account password policy, the command returns a ``PasswordPolicyViolation`` error. 9 | 10 | If this command is called using account (root) credentials, the command returns an ``InvalidUserType`` error. 11 | 12 | For more information, see `Managing Passwords`_ in the *Using IAM* guide. 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/iam/create-account-alias.rst: -------------------------------------------------------------------------------- 1 | **To create an account alias** 2 | 3 | The following ``create-account-alias`` command creates the alias ``mycompany`` for the current account:: 4 | 5 | aws iam create-account-alias --account-alias mycompany 6 | 7 | For more information, see `Using an Alias for Your AWS Account ID`_ in the *Using IAM* guide. 8 | 9 | .. _`Using an Alias for Your AWS Account ID`: http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html 10 | -------------------------------------------------------------------------------- /awscli/examples/iam/create-group.rst: -------------------------------------------------------------------------------- 1 | **To create an IAM group** 2 | 3 | The following ``create-group`` command creates an IAM group named ``Admins``:: 4 | 5 | aws iam create-group --group-name Admins 6 | 7 | Output:: 8 | 9 | { 10 | "Group": { 11 | "Path": "/", 12 | "CreateDate": "2013-06-04T20:27:27.972Z", 13 | "GroupId": "AIDGPMS9RO4H3FEXAMPLE", 14 | "Arn": "arn:aws:iam::123456789012:group/Admins", 15 | "GroupName": "Admins" 16 | } 17 | } 18 | 19 | For more information, see `Creating and Listing Groups`_ in the *Using IAM* guide. 20 | 21 | .. _`Creating and Listing Groups`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_CreatingAndListingGroups.html 22 | 23 | -------------------------------------------------------------------------------- /awscli/examples/iam/create-instance-profile.rst: -------------------------------------------------------------------------------- 1 | **To create an instance profile** 2 | 3 | The following ``create-instance-profile`` command creates an instance profile named ``ExampleInstanceProfile``:: 4 | 5 | aws iam create-instance-profile --instance-profile-name ExampleInstanceProfile 6 | 7 | Output:: 8 | 9 | { 10 | "InstanceProfile": { 11 | "InstanceProfileId": "AIDGPMS9RO4H3FEXAMPLE", 12 | "Roles": [], 13 | "CreateDate": "2013-06-07T21:05:24.085Z", 14 | "InstanceProfileName": "ExampleInstanceProfile", 15 | "Path": "/", 16 | "Arn": "arn:aws:iam::123456789012:instance-profile/ExampleInstanceProfile" 17 | } 18 | } 19 | 20 | To add a role to an instance profile, use the ``add-role-to-instance-profile`` command. 21 | 22 | For more information, see `Instance Profiles`_ in the *Using IAM* guide. 23 | 24 | .. _`Instance Profiles`: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html 25 | 26 | -------------------------------------------------------------------------------- /awscli/examples/iam/create-user.rst: -------------------------------------------------------------------------------- 1 | **To create an IAM user** 2 | 3 | The following ``create-user`` command creates an IAM user named ``Bob`` in the current account:: 4 | 5 | aws iam create-user --user-name Bob 6 | 7 | Output:: 8 | 9 | { 10 | "User": { 11 | "UserName": "Bob", 12 | "Path": "/", 13 | "CreateDate": "2013-06-08T03:20:41.270Z", 14 | "UserId": "AKIAIOSFODNN7EXAMPLE", 15 | "Arn": "arn:aws:iam::123456789012:user/Bob" 16 | } 17 | } 18 | 19 | For more information, see `Adding a New User to Your AWS Account`_ in the *Using IAM* guide. 20 | 21 | .. _`Adding a New User to Your AWS Account`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html 22 | 23 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-access-key.rst: -------------------------------------------------------------------------------- 1 | **To delete an access key for an IAM user** 2 | 3 | The following ``delete-access-key`` command deletes the specified access key (access key ID and secret access key) for the IAM user named ``Bob``:: 4 | 5 | aws iam delete-access-key --access-key AKIDPMS9RO4H3FEXAMPLE --user-name Bob 6 | 7 | To list the access keys defined for an IAM user, use the ``list-access-keys`` command. 8 | 9 | For more information, see `Creating, Modifying, and Viewing User Security Credentials`_ in the *Using IAM* guide. 10 | 11 | .. _`Creating, Modifying, and Viewing User Security Credentials`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_CreateAccessKey.html 12 | 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-account-alias.rst: -------------------------------------------------------------------------------- 1 | **To delete an account alias** 2 | 3 | The following ``delete-account-alias`` command removes the alias ``mycompany`` for the current account:: 4 | 5 | aws iam delete-account-alias --account-alias mycompany 6 | 7 | For more information, see `Using an Alias for Your AWS Account ID`_ in the *Using IAM* guide. 8 | 9 | .. _`Using an Alias for Your AWS Account ID`: http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html 10 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-account-password-policy.rst: -------------------------------------------------------------------------------- 1 | **To delete the current account password policy** 2 | 3 | The following ``delete-account-password-policy`` command removes the password policy for the current account:: 4 | 5 | aws iam delete-account-password-policy 6 | 7 | For more information, see `Managing an IAM Password Policy`_ in the *Using IAM* guide. 8 | 9 | .. _`Managing an IAM Password Policy`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-group-policy.rst: -------------------------------------------------------------------------------- 1 | **To delete a policy from an IAM group** 2 | 3 | The following ``delete-group-policy`` command deletes the policy named ``ExamplePolicy`` from the group named ``Admins``:: 4 | 5 | aws iam delete-group-policy --group-name Admins --policy-name ExamplePolicy 6 | 7 | To see the policies attached to a group, use the ``list-group-policies`` command. 8 | 9 | For more information, see `Managing IAM Policies`_ in the *Using IAM* guide. 10 | 11 | .. _`Managing IAM Policies`: http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingPolicies.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-instance-profile.rst: -------------------------------------------------------------------------------- 1 | **To delete an instance profile** 2 | 3 | The following ``delete-instance-profile`` command deletes the instance profile named ``ExampleInstanceProfile``:: 4 | 5 | aws iam delete-instance-profile --instance-profile-name ExampleInstanceProfile 6 | 7 | For more information, see `Instance Profiles`_ in the *Using IAM* guide. 8 | 9 | .. _`Instance Profiles`: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-login-profile.rst: -------------------------------------------------------------------------------- 1 | **To delete a password for an IAM user** 2 | 3 | The following ``delete-login-profile`` command deletes the password for the IAM user named ``Bob``:: 4 | 5 | aws iam delete-login-profile --user-name Bob 6 | 7 | For more information, see `Managing Passwords`_ in the *Using IAM* guide. 8 | 9 | .. _`Managing Passwords`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html 10 | 11 | 12 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-role-policy.rst: -------------------------------------------------------------------------------- 1 | **To remove a policy from an IAM role** 2 | 3 | The following ``delete-role-policy`` command removes the policy named ``ExamplePolicy`` from the role named ``Test-Role``:: 4 | 5 | aws iam delete-role-policy --role-name Test-Role --policy-name ExamplePolicy 6 | 7 | For more information, see `Creating a Role`_ in the *Using IAM* guide. 8 | 9 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-role.rst: -------------------------------------------------------------------------------- 1 | **To delete an IAM role** 2 | 3 | The following ``delete-role`` command removes the role named ``Test-Role``:: 4 | 5 | aws iam delete-role --role-name Test-Role 6 | 7 | Before you can delete a role, you must remove the role from any instance profile (``remove-role-from-instance-policy``) and delete any policies that are attached to the role (``delete-role-policy``). 8 | 9 | For more information, see `Creating a Role`_ and `Instance Profiles`_ in the *Using IAM* guide. 10 | 11 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 12 | .. _Instance Profiles: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html 13 | 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-signing-certificate.rst: -------------------------------------------------------------------------------- 1 | **To delete a signing certificate for an IAM user** 2 | 3 | The following ``delete-signing-certificate`` command deletes the specified signing certificate for the IAM user named ``Bob``:: 4 | 5 | aws iam delete-signing-certificate --user-name Bob --certificate-id TA7SMP42TDN5Z26OBPJE7EXAMPLE 6 | 7 | To get the ID for a signing certificate, use the ``list-signing-certificates`` command. 8 | 9 | For more information, see `Creating and Uploading a User Signing Certificate`_ in the *Using IAM* guide. 10 | 11 | .. _`Creating and Uploading a User Signing Certificate`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_UploadCertificate.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-user-policy.rst: -------------------------------------------------------------------------------- 1 | **To remove a policy from an IAM user** 2 | 3 | The following ``delete-user-policy`` command removes the specified policy from the IAM user named ``Bob``:: 4 | 5 | aws iam delete-user-policy --user-name Bob --policy-name ExamplePolicy 6 | 7 | To get a list of policies for an IAM user, use the ``list-user-policies`` command. 8 | 9 | For more information, see `Adding a New User to Your AWS Account`_ in the *Using IAM* guide. 10 | 11 | .. _`Adding a New User to Your AWS Account`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-user.rst: -------------------------------------------------------------------------------- 1 | **To delete an IAM user** 2 | 3 | The following ``delete-user`` command removes the IAM user named ``Bob`` from the current account:: 4 | 5 | aws iam delete-user --user-name Bob 6 | 7 | For more information, see `Deleting a User from Your AWS Account`_ in the *Using IAM* guide. 8 | 9 | .. _`Deleting a User from Your AWS Account`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_DeletingUserFromAccount.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/delete-virtual-mfa-device.rst: -------------------------------------------------------------------------------- 1 | **To remove a virtual MFA device** 2 | 3 | The following ``delete-virtual-mfa-device`` command removes the specified MFA device from the current account:: 4 | 5 | aws iam delete-virtual-mfa-device --serial-number arn:aws:iam::123456789012:mfa/MFATest 6 | 7 | For more information, see `Using a Virtual MFA Device with AWS`_ in the *Using IAM* guide. 8 | 9 | .. _`Using a Virtual MFA Device with AWS`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/get-account-password-policy.rst: -------------------------------------------------------------------------------- 1 | **To see the current account password policy** 2 | 3 | The following ``get-account-password-policy`` command displays details about the password policy for the current account:: 4 | 5 | aws iam get-account-password-policy 6 | 7 | Output:: 8 | 9 | { 10 | "PasswordPolicy": { 11 | "AllowUsersToChangePassword": false, 12 | "RequireLowercaseCharacters": false, 13 | "RequireUppercaseCharacters": false, 14 | "MinimumPasswordLength": 8, 15 | "RequireNumbers": true, 16 | "RequireSymbols": true 17 | } 18 | } 19 | 20 | If no password policy is defined for the account, the command returns a ``NoSuchEntity`` error. 21 | 22 | For more information, see `Managing an IAM Password Policy`_ in the *Using IAM* guide. 23 | 24 | .. _`Managing an IAM Password Policy`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html 25 | -------------------------------------------------------------------------------- /awscli/examples/iam/get-role.rst: -------------------------------------------------------------------------------- 1 | **To get information about an IAM role** 2 | 3 | The following ``get-role`` command gets information about the role named ``Test-Role``:: 4 | 5 | aws iam get-role --role-name Test-Role 6 | 7 | Output:: 8 | 9 | { 10 | "Role": { 11 | "AssumeRolePolicyDocument": "", 12 | "RoleId": "AIDIODR4TAW7CSEXAMPLE", 13 | "CreateDate": "2013-04-18T05:01:58Z", 14 | "RoleName": "Test-Role", 15 | "Path": "/", 16 | "Arn": "arn:aws:iam::123456789012:role/Test-Role" 17 | } 18 | } 19 | 20 | The command displays the trust policy attached to the role. To list the permissions policies attached to a role, use the ``list-role-policies`` command. 21 | 22 | For more information, see `Creating a Role`_ in the *Using IAM* guide. 23 | 24 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 25 | 26 | -------------------------------------------------------------------------------- /awscli/examples/iam/get-user.rst: -------------------------------------------------------------------------------- 1 | **To get information about an IAM user** 2 | 3 | The following ``get-user`` command gets information about the IAM user named ``Bob``:: 4 | 5 | aws iam get-user --user-name Bob 6 | 7 | Output:: 8 | 9 | { 10 | "User": { 11 | "UserName": "Bob", 12 | "Path": "/", 13 | "CreateDate": "2012-09-21T23:03:13Z", 14 | "UserId": "AKIAIOSFODNN7EXAMPLE", 15 | "Arn": "arn:aws:iam::123456789012:user/Bob" 16 | } 17 | } 18 | 19 | For more information, see `Listing Users`_ in the *Using IAM* guide. 20 | 21 | .. _`Listing Users`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_GetListOfUsers.html 22 | 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-account-aliases.rst: -------------------------------------------------------------------------------- 1 | **To list account aliases** 2 | 3 | The following ``list-account-aliases`` command lists the aliases for the current account:: 4 | 5 | aws iam list-account-aliases 6 | 7 | Output:: 8 | 9 | "AccountAliases": [ 10 | "mycompany" 11 | ] 12 | 13 | For more information, see `Using an Alias for Your AWS Account ID`_ in the *Using IAM* guide. 14 | 15 | .. _`Using an Alias for Your AWS Account ID`: http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-group-policies.rst: -------------------------------------------------------------------------------- 1 | **To list the policies for IAM groups in the current account** 2 | 3 | The following ``list-group-policies`` command lists the names of policies that are attached to the IAM group named 4 | ``Admins`` in the current account:: 5 | 6 | aws iam list-group-policies --group-name Admins 7 | 8 | Output:: 9 | 10 | "PolicyNames": [ 11 | "ExamplepPolicy", 12 | "AdminPolicy" 13 | ] 14 | 15 | For more information, see `Managing IAM Policies`_ in the *Using IAM* guide. 16 | 17 | .. _`Managing IAM Policies`: http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingPolicies.html 18 | 19 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-groups.rst: -------------------------------------------------------------------------------- 1 | **To list the IAM groups for the current account** 2 | 3 | The following ``list-groups`` command lists the IAM groups in the current account:: 4 | 5 | aws iam list-groups 6 | 7 | Output:: 8 | 9 | "Groups": [ 10 | { 11 | "Path": "/", 12 | "CreateDate": "2013-06-04T20:27:27.972Z", 13 | "GroupId": "AIDACKCEVSQ6C2EXAMPLE", 14 | "Arn": "arn:aws:iam::123456789012:group/Admins", 15 | "GroupName": "Admins" 16 | }, 17 | { 18 | "Path": "/", 19 | "CreateDate": "2013-04-16T20:30:42Z", 20 | "GroupId": "AIDGPMS9RO4H3FEXAMPLE", 21 | "Arn": "arn:aws:iam::123456789012:group/S3-Admins", 22 | "GroupName": "S3-Admins" 23 | } 24 | ] 25 | 26 | For more information, see `Creating and Listing Groups`_ in the *Using IAM* guide. 27 | 28 | .. _`Creating and Listing Groups`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_CreatingAndListingGroups.html 29 | 30 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-role-policies.rst: -------------------------------------------------------------------------------- 1 | **To list the policies attached to an IAM role** 2 | 3 | The following ``list-role-policies`` command lists the names of the permissions policies for the specified IAM role:: 4 | 5 | aws iam list-role-policies --role-name Test-Role 6 | 7 | Output:: 8 | 9 | "PolicyNames": [ 10 | "ExamplePolicy" 11 | ] 12 | 13 | To see the trust policy attached to a role, use the ``get-role`` command. To see the details of a permissions policy, use the ``get-role-policy`` command. 14 | 15 | For more information, see `Creating a Role`_ in the *Using IAM* guide. 16 | 17 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 18 | 19 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-signing-certificates.rst: -------------------------------------------------------------------------------- 1 | **To list the signing certificates for an IAM user** 2 | 3 | The following ``list-signing-certificates`` command lists the signing certificates for the IAM user named ``Bob``:: 4 | 5 | aws iam list-signing-certificates --user-name Bob 6 | 7 | Output:: 8 | 9 | { 10 | "Certificates: "[ 11 | { 12 | "UserName": "Bob", 13 | "Status": "Inactive", 14 | "CertificateBody": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", 15 | "CertificateId": "TA7SMP42TDN5Z26OBPJE7EXAMPLE", 16 | "UploadDate": "2013-06-06T21:40:08Z" 17 | } 18 | ] 19 | } 20 | 21 | For more information, see `Creating and Uploading a User Signing Certificate`_ in the *Using IAM* guide. 22 | 23 | .. _`Creating and Uploading a User Signing Certificate`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_UploadCertificate.html 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-user-policies.rst: -------------------------------------------------------------------------------- 1 | **To list policies for an IAM user** 2 | 3 | The following ``list-user-policies`` command lists the policies that are attached to the IAM user named ``Bob``:: 4 | 5 | aws iam list-user-policies --user-name Bob 6 | 7 | Output:: 8 | 9 | "PolicyNames": [ 10 | "ExamplePolicy", 11 | "TestPolicy" 12 | ] 13 | 14 | For more information, see `Adding a New User to Your AWS Account`_ in the *Using IAM* guide. 15 | 16 | .. _`Adding a New User to Your AWS Account`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-users.rst: -------------------------------------------------------------------------------- 1 | **To list IAM users** 2 | 3 | The following ``list-users`` command lists the IAM users in the current account:: 4 | 5 | aws iam list-users 6 | 7 | Output:: 8 | 9 | "Users": [ 10 | { 11 | "UserName": "Adele", 12 | "Path": "/", 13 | "CreateDate": "2013-03-07T05:14:48Z", 14 | "UserId": "AKIAI44QH8DHBEXAMPLE", 15 | "Arn": "arn:aws:iam::123456789012:user/Adele" 16 | }, 17 | { 18 | "UserName": "Bob", 19 | "Path": "/", 20 | "CreateDate": "2012-09-21T23:03:13Z", 21 | "UserId": "AKIAIOSFODNN7EXAMPLE", 22 | "Arn": "arn:aws:iam::123456789012:user/Bob" 23 | } 24 | ] 25 | 26 | For more information, see `Listing Users`_ in the *Using IAM* guide. 27 | 28 | .. _`Listing Users`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_GetListOfUsers.html 29 | 30 | -------------------------------------------------------------------------------- /awscli/examples/iam/list-virtual-mfa-devices.rst: -------------------------------------------------------------------------------- 1 | **To list virtual MFA devices** 2 | 3 | The following ``list-virtual-mfa-devices`` command lists the virtual MFA devices that have been configured for the current account:: 4 | 5 | aws iam list-virtual-mfa-devices 6 | 7 | Output:: 8 | 9 | { 10 | "VirtualMFADevices": [ 11 | { 12 | "SerialNumber": "arn:aws:iam::123456789012:mfa/ExampleMFADevice" 13 | }, 14 | { 15 | "SerialNumber": "arn:aws:iam::123456789012:mfa/Fred" 16 | } 17 | ] 18 | } 19 | 20 | For more information, see `Using a Virtual MFA Device with AWS`_ in the *Using IAM* guide. 21 | 22 | .. _`Using a Virtual MFA Device with AWS`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/iam/put-group-policy.rst: -------------------------------------------------------------------------------- 1 | **To add a policy to a group** 2 | 3 | The following ``put-group-policy`` command adds a policy to the IAM group named ``Admins``:: 4 | 5 | aws iam put-group-policy --group-name Admins --policy-document file://AdminPolicy.json --policy-name AdminRoot 6 | 7 | The policy is defined as a JSON document in the *AdminPolicy.json* file. (The file name and extension do not have 8 | significance.) 9 | 10 | For more information, see `Managing IAM Policies`_ in the *Using IAM* guide. 11 | 12 | .. _`Managing IAM Policies`: http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingPolicies.html 13 | 14 | -------------------------------------------------------------------------------- /awscli/examples/iam/put-role-policy.rst: -------------------------------------------------------------------------------- 1 | **To attach a permissions policy to an IAM role** 2 | 3 | The following ``put-role-policy`` command adds a permissions policy to the role named ``Test-Role``:: 4 | 5 | aws iam put-role-policy --role-name Test-Role --policy-name ExamplePolicy --policy-document file://AdminPolicy.json 6 | 7 | The policy is defined as a JSON document in the *AdminPolicy.json* file. (The file name and extension do not have significance.) 8 | 9 | To attach a trust policy to a role, use the ``update-assume-role-policy`` command. 10 | 11 | For more information, see `Creating a Role`_ in the *Using IAM* guide. 12 | 13 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/iam/put-user-policy.rst: -------------------------------------------------------------------------------- 1 | **To attach a policy to an IAM user** 2 | 3 | The following ``put-user-policy`` command attaches a policy to the IAM user named ``Bob``:: 4 | 5 | aws iam put-user-policy --user-name Bob --policy-name ExamplePolicy --policy-document file://AdminPolicy.json 6 | 7 | The policy is defined as a JSON document in the *AdminPolicy.json* file. (The file name and extension do not have significance.) 8 | 9 | For more information, see `Adding a New User to Your AWS Account`_ in the *Using IAM* guide. 10 | 11 | .. _`Adding a New User to Your AWS Account`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/iam/remove-role-from-instance-profile.rst: -------------------------------------------------------------------------------- 1 | **To remove a role from an instance profile** 2 | 3 | The following ``remove-role-from-instance-profile`` command removes the role named ``Test-Role`` from the instance 4 | profile named ``ExampleInstanceProfile``:: 5 | 6 | aws iam remove-role-from-instance-profile --instance-profile-name ExampleInstanceProfile --role-name Test-Role 7 | 8 | For more information, see `Instance Profiles`_ in the *Using IAM* guide. 9 | 10 | .. _`Instance Profiles`: http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html 11 | 12 | -------------------------------------------------------------------------------- /awscli/examples/iam/remove-user-from-group.rst: -------------------------------------------------------------------------------- 1 | **To remove a user from an IAM group** 2 | 3 | The following ``remove-user-from-group`` command removes the user named ``Bob`` from the IAM group named ``Admins``:: 4 | 5 | aws iam remove-user-from-group --user-name Bob --group-name Admins 6 | 7 | For more information, see `Adding Users to and Removing Users from a Group`_ in the *Using IAM* guide. 8 | 9 | .. _`Adding Users to and Removing Users from a Group`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_AddOrRemoveUsersFromGroup.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-access-key.rst: -------------------------------------------------------------------------------- 1 | **To activate or deactivate an access key for an IAM user** 2 | 3 | The following ``update-access-key`` command deactivates the specified access key (access key ID and secret access key) 4 | for the IAM user named ``Bob``:: 5 | 6 | aws iam update-access-key --access-key-id AKIAIOSFODNN7EXAMPLE --status Inactive --user-name Bob 7 | 8 | Deactivating the key means that it cannot be used for programmatic access to AWS. However, the key is still available and can be reactivated. 9 | 10 | For more information, see `Creating, Modifying, and Viewing User Security Credentials`_ in the *Using IAM* guide. 11 | 12 | .. _`Creating, Modifying, and Viewing User Security Credentials`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_CreateAccessKey.html 13 | 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-account-password-policy.rst: -------------------------------------------------------------------------------- 1 | **To set or change the current account password policy** 2 | 3 | The following ``update-account-password-policy`` command sets the password policy to require a minimum length of eight 4 | characters and to require one or more numbers in the password:: 5 | 6 | aws iam update-account-password-policy --minimum-password-length 8 --require-numbers 7 | 8 | Changes to an account's password policy affect any new passwords that are created for IAM users in the account. Password 9 | policy changes do not affect existing passwords. 10 | 11 | For more information, see `Setting an Account Password Policy for IAM Users`_ in the *Using IAM* guide. 12 | 13 | .. _`Setting an Account Password Policy for IAM Users`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingPasswordPolicies.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-assume-role-policy.rst: -------------------------------------------------------------------------------- 1 | **To update the trust policy for an IAM role** 2 | 3 | The following ``update-assume-role-policy`` command updates the trust policy for the role named ``Test-Role``:: 4 | 5 | aws iam update-assume-role-policy --role-name Test-Tole --policy-document file://Test-Role-Trust-Policy.json 6 | 7 | The trust policy is defined as a JSON document in the *Test-Role-Trust-Policy.json* file. (The file name and extension 8 | do not have significance.) The trust policy must specify a principal. 9 | 10 | To update the permissions policy for a role, use the ``put-role-policy`` command. 11 | 12 | For more information, see `Creating a Role`_ in the *Using IAM* guide. 13 | 14 | .. _`Creating a Role`: http://docs.aws.amazon.com/IAM/latest/UserGuide/creating-role.html 15 | 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-group.rst: -------------------------------------------------------------------------------- 1 | **To rename an IAM group** 2 | 3 | The following ``update-group`` command changes the name of the IAM group ``Test`` to ``Test-1``:: 4 | 5 | aws iam update-group --group-name Test --new-group-name Test-1 6 | 7 | For more information, see `Changing a Group's Name or Path`_ in the *Using IAM* guide. 8 | 9 | .. _`Changing a Group's Name or Path`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_RenamingGroup.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-signing-certificate.rst: -------------------------------------------------------------------------------- 1 | **To activate or deactivate a signing certificate for an IAM user** 2 | 3 | The following ``update-signing-certificate`` command deactivates the specified signing certificate for the IAM user named ``Bob``:: 4 | 5 | aws iam update-signing-certificate --certificate-id TA7SMP42TDN5Z26OBPJE7EXAMPLE --status Inactive --user-name Bob 6 | 7 | To get the ID for a signing certificate, use the ``list-signing-certificates`` command. 8 | 9 | For more information, see `Creating and Uploading a User Signing Certificate`_ in the *Using IAM* guide. 10 | 11 | .. _`Creating and Uploading a User Signing Certificate`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_UploadCertificate.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/iam/update-user.rst: -------------------------------------------------------------------------------- 1 | **To change an IAM user's name** 2 | 3 | The following ``update-user`` command changes the name of the IAM user ``Bob`` to ``Robert``:: 4 | 5 | aws iam update-user --user-name Bob --new-user-name Robert 6 | 7 | For more information, see `Changing a Group's Name or Path`_ in the *Using IAM* guide. 8 | 9 | .. _`Changing a Group's Name or Path`: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_RenamingGroup.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/kms/encrypt.rst: -------------------------------------------------------------------------------- 1 | This example shows how to encrypt the string ``"1\!2@3#4$5%6^7&8*9(0)-_=+"`` 2 | and save the binary contents to a file:: 3 | 4 | aws kms encrypt --key-id my-key-id --plaintext "1\!2@3#4$5%6^7&8*9(0)-_=+" --query CiphertextBlob --output text | base64 -d > /tmp/encrypted 5 | 6 | If you are on Mac OS X, you'll need to use ``base64 -D`` instead of 7 | ``base64 -d`` to decode the base64 ciphertext blob. 8 | 9 | If you want to decrypt the contents of the file above you can use this 10 | command:: 11 | 12 | echo "Decrypted is: $(aws kms decrypt --ciphertext-blob fileb:///tmp/encrypted --output text --query Plaintext | base64 -d)" 13 | 14 | On Mac OS X, you will again need to use ``base64 -D`` instead of ``base64 -d``. 15 | 16 | Note the use of the ``fileb://`` prefix in the ``decrypt`` command above. This 17 | indicates that the referenced file contains binary contents, and that the file 18 | contents are not decoded before being used. 19 | -------------------------------------------------------------------------------- /awscli/examples/opsworks/create-app.rst: -------------------------------------------------------------------------------- 1 | **To create an app** 2 | 3 | The following ``create-app`` command creates a PHP app named SimplePHPApp from code stored on a GitHub repository:: 4 | 5 | aws opsworks --region us-east-1 create-app --stack-id f6673d70-32e6-4425-8999-265dd002fec7 --name SimplePHPApp --type php --app-source Type=git,Url=git://github.com/amazonwebservices/opsworks-demo-php-simple-app.git,Revision=version1 6 | 7 | **Note**: OpsWorks CLI commands should set the region to us-east-1, regardless of the stack's location. 8 | 9 | Output:: 10 | 11 | { 12 | "AppId": "6cf5163c-a951-444f-a8f7-3716be75f2a2" 13 | } 14 | 15 | For more information, see `Adding Apps`_ in the *OpsWorks User Guide*. 16 | 17 | .. _`Adding Apps`: http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html 18 | 19 | -------------------------------------------------------------------------------- /awscli/examples/opsworks/create-layer.rst: -------------------------------------------------------------------------------- 1 | **To create a layer** 2 | 3 | The following ``create-layer`` command creates a PHP App Server layer named MyPHPLayer in a specified stack:: 4 | 5 | aws opsworks create-layer --region us-east-1 --stack-id f6673d70-32e6-4425-8999-265dd002fec7 --type php-app --name MyPHPLayer --shortname myphplayer 6 | 7 | **Note**: OpsWorks CLI commands should set the region to us-east-1, regardless of the stack's location. 8 | 9 | Output:: 10 | 11 | { 12 | "LayerId": "0b212672-6b4b-40e4-8a34-5a943cf2e07a" 13 | } 14 | 15 | For more information, see `How to Create a Layer`_ in the *OpsWorks User Guide*. 16 | 17 | .. _`How to Create a Layer`: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-create.html 18 | -------------------------------------------------------------------------------- /awscli/examples/opsworks/describe-elastic-ips.rst: -------------------------------------------------------------------------------- 1 | **To describe Elastic IPs** 2 | 3 | The following ``describe-elastic-ips`` commmand describes the Elastic IP addresses in a specified instance:: 4 | 5 | aws opsworks --region us-east-1 describe-elastic-ips --instance-id b62f3e04-e9eb-436c-a91f-d9e9a396b7b0 6 | 7 | **Note**: OpsWorks CLI commands should set the region to us-east-1, regardless of the stack's location. 8 | 9 | Output:: 10 | 11 | { 12 | "ElasticIps": [ 13 | { 14 | "Ip": "192.0.2.0", 15 | "Domain": "standard", 16 | "Region": "us-west-2" 17 | } 18 | ] 19 | } 20 | 21 | For more information, see Instances_ in the *OpsWorks User Guide*. 22 | 23 | .. _Instances: http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances.html 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/opsworks/start-instance.rst: -------------------------------------------------------------------------------- 1 | **To start an instance** 2 | 3 | The following ``start-instance`` command starts a specified instance:: 4 | 5 | aws opsworks start-instance --instance-id f705ee48-9000-4890-8bd3-20eb05825aaf 6 | 7 | **Note**: OpsWorks CLI commands should set the region to us-east-1, regardless of the stack's location. 8 | 9 | .. _start-stack: http://docs.aws.amazon.com/cli/latest/reference/opsworks/start-stack.html 10 | 11 | No output. Use describe-instances_ to check the instance's status. 12 | 13 | .. _describe-instances: http://docs.aws.amazon.com/cli/latest/reference/opsworks/describe-instances.html 14 | 15 | For more information, see `Adding Apps`_ in the *OpsWorks User Guide*. 16 | 17 | .. _`Adding Apps`: http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html 18 | 19 | **Note**: You can start every offline instance in a stack with one command by calling start-stack_. 20 | 21 | -------------------------------------------------------------------------------- /awscli/examples/rds/add-tag-to-resource.rst: -------------------------------------------------------------------------------- 1 | **To add a tag to an Amazon RDS resource** 2 | 3 | The following ``add-tags-to-resource`` command adds a tag to an Amazon RDS resource. In the example, a DB instance is 4 | identified by the instance's ARN, arn:aws:rds:us-west-2:001234567890:db:mysql-db1. The tag that is added to the DB 5 | instance has a key of ``project`` and a value of ``salix``:: 6 | 7 | aws rds add-tags-to-resource --resource-name arn:aws:rds:us-west-2:001234567890:db:mysql-db1 --tags account=sg01,project=salix 8 | 9 | This command outputs a JSON block that acknowledges the change to the RDS resource. 10 | 11 | For more information, see `Tagging an Amazon RDS DB Instance`_ in the *AWS Command Line Interface User Guide*. 12 | 13 | .. _`Tagging an Amazon RDS DB Instance`: http://docs.aws.amazon.com/cli/latest/userguide/cli-rds-add-tags.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/rds/create-db-security-group.rst: -------------------------------------------------------------------------------- 1 | **To create an Amazon RDS DB security group** 2 | 3 | The following ``create-db-security-group`` command creates a new Amazon RDS DB security group:: 4 | 5 | aws rds create-db-security-group --db-security-group-name mysecgroup --db-security-group-description "My Test Security Group" 6 | 7 | In the example, the new DB security group is named ``mysecgroup`` and has a description. 8 | 9 | This command output a JSON block that contains information about the DB security group. 10 | 11 | For more information, see `Create an Amazon RDS DB Security Group`_ in the *AWS Command Line Interface User Guide*. 12 | 13 | .. _`Create an Amazon RDS DB Security Group`: http://docs.aws.amazon.com/cli/latest/userguide/cli-rds-create-secgroup.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/rds/create-option-group.rst: -------------------------------------------------------------------------------- 1 | **To Create an Amazon RDS option group** 2 | 3 | The following ``create-option-group`` command creates a new Amazon RDS option group:: 4 | 5 | aws rds create-option-group --option-group-name MyOptionGroup --engine-name oracle-ee --major-engine-version 11.2 --option-group-description "Oracle Database Manager Database Control" 6 | 7 | In the example, the option group is created for Oracle Enterprise Edition version *11.2*, is named *MyOptionGroup* and 8 | includes a description. 9 | 10 | This command output a JSON block that contains information on the option group. 11 | 12 | For more information, see `Create an Amazon RDS Option Group`_ in the *AWS Command Line Interface User Guide*. 13 | 14 | .. _`Create an Amazon RDS Option Group`: http://docs.aws.amazon.com/cli/latest/userguide/cli-rds-create-option-group.html 15 | 16 | -------------------------------------------------------------------------------- /awscli/examples/rds/describe-db-instances.rst: -------------------------------------------------------------------------------- 1 | **To Describe an Amazon RDS DB instance** 2 | 3 | The following ``describe-db-instances`` command describes all DB instances that are owned by the AWS account:: 4 | 5 | aws rds describe-db-instances 6 | 7 | This command output a JSON block that contains descriptive information about all the DB instances for this AWS account. 8 | 9 | For more information, see `Describe an Amazon RDS DB Instance`_ in the *AWS Command Line Interface User Guide*. 10 | 11 | .. _`Describe an Amazon RDS DB Instance`: http://docs.aws.amazon.com/cli/latest/userguide/cli-rds-describe-instance.html 12 | 13 | -------------------------------------------------------------------------------- /awscli/examples/redshift/authorize-cluster-security-group-ingress.rst: -------------------------------------------------------------------------------- 1 | Authorizing Access to an EC2 Security Group 2 | ------------------------------------------- 3 | 4 | This example authorizes access to a named Amazon EC2 security group. 5 | 6 | Command:: 7 | 8 | aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890 9 | 10 | Authorizing Access to a CIDR range 11 | ---------------------------------- 12 | 13 | This example authorizes access to a CIDR range. 14 | 15 | Command:: 16 | 17 | aws redshift authorize-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32 18 | 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/redshift/create-cluster-parameter-group.rst: -------------------------------------------------------------------------------- 1 | Create a Cluster Parameter Group 2 | -------------------------------- 3 | 4 | This example creates a new cluster parameter group. 5 | 6 | Command:: 7 | 8 | aws redshift create-cluster-parameter-group --parameter-group-name myclusterparametergroup --parameter-group-family redshift-1.0 --description "My first cluster parameter group" 9 | 10 | Result:: 11 | 12 | { 13 | "ClusterParameterGroup": { 14 | "ParameterGroupFamily": "redshift-1.0", 15 | "Description": "My first cluster parameter group", 16 | "ParameterGroupName": "myclusterparametergroup" 17 | }, 18 | "ResponseMetadata": { 19 | "RequestId": "739448f0-64cc-11e2-8f7d-3b939af52818" 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/redshift/delete-cluster-parameter-group.rst: -------------------------------------------------------------------------------- 1 | Delete a Cluster Parameter Group 2 | -------------------------------- 3 | 4 | This example deletes a cluster parameter group. 5 | 6 | Command:: 7 | 8 | aws redshift delete-cluster-parameter-group --parameter-group-name myclusterparametergroup 9 | 10 | -------------------------------------------------------------------------------- /awscli/examples/redshift/delete-cluster-security-group.rst: -------------------------------------------------------------------------------- 1 | Delete a Cluster Security Group 2 | ------------------------------- 3 | 4 | This example deletes a cluster security group. 5 | 6 | Command:: 7 | 8 | aws redshift delete-cluster-security-group --cluster-security-group-name mysecuritygroup 9 | 10 | -------------------------------------------------------------------------------- /awscli/examples/redshift/delete-cluster-snapshot.rst: -------------------------------------------------------------------------------- 1 | Delete a Cluster Snapshot 2 | ------------------------- 3 | 4 | This example deletes a cluster snapshot. 5 | 6 | Command:: 7 | 8 | aws redshift delete-cluster-snapshot --snapshot-identifier my-snapshot-id 9 | 10 | -------------------------------------------------------------------------------- /awscli/examples/redshift/delete-cluster-subnet-group.rst: -------------------------------------------------------------------------------- 1 | Delete a Cluster subnet Group 2 | ----------------------------- 3 | 4 | This example deletes a cluster subnet group. 5 | 6 | Command:: 7 | 8 | aws redshift delete-cluster-subnet-group --cluster-subnet-group-name mysubnetgroup 9 | 10 | Result:: 11 | 12 | { 13 | "ResponseMetadata": { 14 | "RequestId": "253fbffd-6993-11e2-bc3a-47431073908a" 15 | } 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /awscli/examples/redshift/delete-cluster.rst: -------------------------------------------------------------------------------- 1 | Delete a Cluster with No Final Cluster Snapshot 2 | ----------------------------------------------- 3 | 4 | This example deletes a cluster, forcing data deletion so no final cluster snapshot 5 | is created. 6 | 7 | Command:: 8 | 9 | aws redshift delete-cluster --cluster-identifier mycluster --skip-final-cluster-snapshot 10 | 11 | 12 | Delete a Cluster, Allowing a Final Cluster Snapshot 13 | --------------------------------------------------- 14 | 15 | This example deletes a cluster, but specifies a final cluster snapshot. 16 | 17 | Command:: 18 | 19 | aws redshift delete-cluster --cluster-identifier mycluster --final-cluster-snapshot-identifier myfinalsnapshot 20 | 21 | 22 | -------------------------------------------------------------------------------- /awscli/examples/redshift/describe-cluster-versions.rst: -------------------------------------------------------------------------------- 1 | Get a Description of All Cluster Versions 2 | ----------------------------------------- 3 | 4 | This example returns a description of all cluster versions. By default, the output is in JSON format. 5 | 6 | Command:: 7 | 8 | aws redshift describe-cluster-versions 9 | 10 | Result:: 11 | 12 | { 13 | "ClusterVersions": [ 14 | { 15 | "ClusterVersion": "1.0", 16 | "Description": "Initial release", 17 | "ClusterParameterGroupFamily": "redshift-1.0" 18 | } ], 19 | "ResponseMetadata": { 20 | "RequestId": "16a53de3-64cc-11e2-bec0-17624ad140dd" 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/redshift/describe-resize.rst: -------------------------------------------------------------------------------- 1 | Describe Resize 2 | --------------- 3 | 4 | This example describes the latest resize of a cluster. The request was for 3 nodes of type ``dw.hs1.8xlarge``. 5 | 6 | Command:: 7 | 8 | aws redshift describe-resize --cluster-identifier mycluster 9 | 10 | Result:: 11 | 12 | { 13 | "Status": "NONE", 14 | "TargetClusterType": "multi-node", 15 | "TargetNodeType": "dw.hs1.8xlarge", 16 | "ResponseMetadata": { 17 | "RequestId": "9f52b0b4-7733-11e2-aa9b-318b2909bd27" 18 | }, 19 | "TargetNumberOfNodes": "3" 20 | } 21 | 22 | -------------------------------------------------------------------------------- /awscli/examples/redshift/modify-cluster-parameter-group.rst: -------------------------------------------------------------------------------- 1 | Modify a Parameter in a Parameter Group 2 | --------------------------------------- 3 | 4 | This example shows how to modify the *wlm_json_configuration* parameter for workload management. 5 | 6 | Command:: 7 | 8 | aws redshift modify-cluster-parameter-group --parameter-group-name myclusterparametergroup --parameters '{"parameter_name":"wlm_json_configuration","parameter_value":"\[{\\"user_group\\":\[\\"example_user_group1\\"],\\"query_group\\":\[\\"example_query_group1\\"],\\"query_concurrency\\":7},{\\"query_concurrency\\":5}]"}' 9 | 10 | Result:: 11 | 12 | { 13 | "ParameterGroupStatus": "Your parameter group has been updated but changes won't get applied until you reboot the associated Clusters.", 14 | "ParameterGroupName": "myclusterparametergroup", 15 | "ResponseMetadata": { 16 | "RequestId": "09974cc0-64cd-11e2-bea9-49e0ce183f07" 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/redshift/reset-cluster-parameter-group.rst: -------------------------------------------------------------------------------- 1 | Reset Parameters in a Parameter Group 2 | ------------------------------------- 3 | 4 | This example shows how to reset all of the parameters in a parameter group. 5 | 6 | Command:: 7 | 8 | aws redshift reset-cluster-parameter-group --parameter-group-name myclusterparametergroup --reset-all-parameters 9 | 10 | -------------------------------------------------------------------------------- /awscli/examples/redshift/revoke-cluster-security-group-ingress.rst: -------------------------------------------------------------------------------- 1 | Revoke Access from an EC2 Security Group 2 | ---------------------------------------- 3 | 4 | This example revokes access to a named Amazon EC2 security group. 5 | 6 | Command:: 7 | 8 | aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --ec2-security-group-name myec2securitygroup --ec2-security-group-owner-id 123445677890 9 | 10 | 11 | Revoking Access to a CIDR range 12 | ------------------------------- 13 | 14 | This example revokes access to a CIDR range. 15 | 16 | Command:: 17 | 18 | aws redshift revoke-cluster-security-group-ingress --cluster-security-group-name mysecuritygroup --cidrip 192.168.100.100/32 19 | 20 | 21 | -------------------------------------------------------------------------------- /awscli/examples/route53/create-hosted-zone.rst: -------------------------------------------------------------------------------- 1 | **To create a hosted zone** 2 | 3 | The following ``create-hosted-zone`` command adds a hosted zone named ``example.com`` using the caller reference ``2014-04-01-18:47``. The optional comment includes a space, so it must be enclosed in quotation marks:: 4 | 5 | aws route53 create-hosted-zone --name example.com --caller-reference 2014-04-01-18:47 --hosted-zone-config Comment="command-line version" 6 | 7 | For more information, see `Working with Hosted Zones`_ in the *Amazon Route 53 Developer Guide*. 8 | 9 | .. _`Working with Hosted Zones`: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/AboutHZWorkingWith.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/route53/delete-health-check.rst: -------------------------------------------------------------------------------- 1 | **To delete a health check** 2 | 3 | The following ``delete-health-check`` command deletes the health check with a ``health-check-id`` of ``e75b48d9-547a-4c3d-88a5-ae4002397608``:: 4 | 5 | aws route53 delete-health-check --health-check-id e75b48d9-547a-4c3d-88a5-ae4002397608 6 | -------------------------------------------------------------------------------- /awscli/examples/route53/delete-hosted-zone.rst: -------------------------------------------------------------------------------- 1 | **To delete a hosted zone** 2 | 3 | The following ``delete-hosted-zone`` command deletes the hosted zone with an ``id`` of ``Z36KTIQEXAMPLE``:: 4 | 5 | aws route53 delete-hosted-zone --id Z36KTIQEXAMPLE 6 | 7 | -------------------------------------------------------------------------------- /awscli/examples/route53/get-change.rst: -------------------------------------------------------------------------------- 1 | **To get the status of a change to resource record sets** 2 | 3 | The following ``get-change`` command gets the status and other information about the ``change-resource-record-sets`` request that has an ``Id`` of ``/change/CWPIK4URU2I5S``:: 4 | 5 | aws route53 get-change --id /change/CWPIK4URU2I5S 6 | 7 | -------------------------------------------------------------------------------- /awscli/examples/route53/get-health-check.rst: -------------------------------------------------------------------------------- 1 | **To get information about a health check** 2 | 3 | The following ``get-health-check`` command gets information about the health check that has a ``health-check-id`` of ``02ec8401-9879-4259-91fa-04e66d094674``:: 4 | 5 | aws route53 get-health-check --health-check-id 02ec8401-9879-4259-91fa-04e66d094674 6 | 7 | -------------------------------------------------------------------------------- /awscli/examples/route53/get-hosted-zone.rst: -------------------------------------------------------------------------------- 1 | **To get information about a hosted zone** 2 | 3 | The following ``get-hosted-zone`` command gets information about the hosted zone with an ``id`` of ``Z1R8UBAEXAMPLE``:: 4 | 5 | aws route53 get-hosted-zone --id Z1R8UBAEXAMPLE 6 | -------------------------------------------------------------------------------- /awscli/examples/route53/list-health-checks.rst: -------------------------------------------------------------------------------- 1 | **To list the health checks associated with the current AWS account** 2 | 3 | The following ``list-health-checks`` command lists detailed information about the first 100 health checks that are associated with the current AWS account.:: 4 | 5 | aws route53 list-health-checks 6 | 7 | If you have more than 100 health checks, or if you want to list them in groups smaller than 100, include the ``--maxitems`` parameter. For example, to list health checks one at a time, use the following command:: 8 | 9 | aws route53 list-health-checks --max-items 1 10 | 11 | To view the next health check, take the value of ``NextToken`` from the response to the previous command, and include it in the ``--starting-token`` parameter, for example:: 12 | 13 | aws route53 list-health-checks --max-items 1 --starting-token 02ec8401-9879-4259-91fa-094674111111 14 | 15 | 16 | -------------------------------------------------------------------------------- /awscli/examples/route53/list-hosted-zones.rst: -------------------------------------------------------------------------------- 1 | **To list the hosted zones associated with the current AWS account** 2 | 3 | The following ``list-hosted-zones`` command lists summary information about the first 100 hosted zones that are associated with the current AWS account.:: 4 | 5 | aws route53 list-hosted-zones 6 | 7 | If you have more than 100 hosted zones, or if you want to list them in groups smaller than 100, include the ``--maxitems`` parameter. For example, to list hosted zones one at a time, use the following command:: 8 | 9 | aws route53 list-hosted-zones --max-items 1 10 | 11 | To view information about the next hosted zone, take the value of ``NextToken`` from the response to the previous command, and include it in the ``--starting-token`` parameter, for example:: 12 | 13 | aws route53 list-hosted-zones --max-items 1 --starting-token Z3M3LMPEXAMPLE 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/s3/mb.rst: -------------------------------------------------------------------------------- 1 | The following ``mb`` command creates a bucket. In this example, the user makes the bucket ``mybucket``. The bucket is 2 | created in the region specified in the user's configuration file:: 3 | 4 | aws s3 mb s3://mybucket 5 | 6 | Output:: 7 | 8 | make_bucket: mybucket 9 | 10 | The following ``mb`` command creates a bucket in a region specified by the ``--region`` parameter. In this example, the 11 | user makes the bucket ``mybucket`` in the region ``us-west-1``:: 12 | 13 | aws s3 mb s3://mybucket --region us-west-1 14 | 15 | Output:: 16 | 17 | make_bucket: mybucket 18 | -------------------------------------------------------------------------------- /awscli/examples/s3/rb.rst: -------------------------------------------------------------------------------- 1 | The following ``rb`` command removes a bucket. In this example, the user's bucket is ``mybucket``. Note that the bucket must be empty in order to remove:: 2 | 3 | aws s3 rb s3://mybucket 4 | 5 | Output:: 6 | 7 | remove_bucket: mybucket 8 | 9 | The following ``rb`` command uses the ``--force`` parameter to first remove all of the objects in the bucket and then 10 | remove the bucket itself. In this example, the user's bucket is ``mybucket`` and the objects in ``mybucket`` are 11 | ``test1.txt`` and ``test2.txt``:: 12 | 13 | aws s3 rb s3://mybucket --force 14 | 15 | Output:: 16 | 17 | delete: s3://mybucket/test1.txt 18 | delete: s3://mybucket/test2.txt 19 | remove_bucket: mybucket 20 | 21 | -------------------------------------------------------------------------------- /awscli/examples/s3api/delete-object.rst: -------------------------------------------------------------------------------- 1 | Delete an object 2 | ---------------- 3 | 4 | The following example uses the ``get-object`` command to download an object from Amazon S3:: 5 | 6 | aws s3api delete-object --bucket text-content --key dir-1/my_images.tar.bz2 --region=us-east-1 7 | 8 | For more information about deleting objects, see `Deleting Objects`_ in the *Amazon S3 Developer Guide*. 9 | 10 | .. _`Deleting Objects`: http://docs.aws.amazon.com/AmazonS3/latest/dev/DeletingObjects.html 11 | -------------------------------------------------------------------------------- /awscli/examples/s3api/get-object.rst: -------------------------------------------------------------------------------- 1 | Get an object 2 | ------------- 3 | 4 | The following example uses the ``get-object`` command to download an object from Amazon S3:: 5 | 6 | aws s3api get-object --bucket text-content --key dir/my_images.tar.bz2 my_images.tar.bz2 7 | 8 | For more information about retrieving objects, see `Getting Objects`_ in the *Amazon S3 Developer Guide*. 9 | 10 | .. _`Getting Objects`: http://docs.aws.amazon.com/AmazonS3/latest/dev/GettingObjectsUsingAPIs.html 11 | -------------------------------------------------------------------------------- /awscli/examples/s3api/list-buckets.rst: -------------------------------------------------------------------------------- 1 | List Your Buckets 2 | ----------------- 3 | 4 | The following example uses the ``list-buckets`` command to display the names of all your Amazon S3 buckets (across all 5 | regions):: 6 | 7 | aws s3api list-buckets | jq ".Buckets[].Name" 8 | 9 | The example uses jq_ to filter the output of ``list-buckets`` down to only the bucket names. 10 | 11 | For more information about buckets, see `Working with Amazon S3 Buckets`_ in the *Amazon S3 Developer Guide*. 12 | 13 | .. _jq: http://stedolan.github.io/jq/ 14 | .. _`Working with Amazon S3 Buckets`: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html 15 | -------------------------------------------------------------------------------- /awscli/examples/s3api/list-objects.rst: -------------------------------------------------------------------------------- 1 | List the Objects in a Bucket 2 | ---------------------------- 3 | 4 | The following example uses the ``list-objects`` command to display the names of all the objects in the specified bucket:: 5 | 6 | aws s3api list-objects --bucket text-content --query 'Contents[].{Key: Key, Size: Size}' 7 | 8 | The example uses the ``--query`` argument to filter the output of 9 | ``list-objects`` down to the key value and size for each object 10 | 11 | For more information about objects, see `Working with Amazon S3 Objects`_ in the *Amazon S3 Developer Guide*. 12 | 13 | .. _`Working with Amazon S3 Objects`: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html 14 | -------------------------------------------------------------------------------- /awscli/examples/s3api/put-bucket-acl.rst: -------------------------------------------------------------------------------- 1 | This example grants ``full control`` to two AWS users (*user1@example.com* and *user2@example.com*) and ``read`` 2 | permission to everyone:: 3 | 4 | aws s3api put-bucket-acl --bucket MyBucket --grant-full-control 'emailaddress="user1@example.com",emailaddress="user2@example.com"' --grant-read 'uri="http://acs.amazonaws.com/groups/global/AllUsers"' 5 | 6 | See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTacl.html for details on custom ACLs (the s3api ACL 7 | commands, such as ``put-bucket-acl``, use the same shorthand argument notation). 8 | 9 | -------------------------------------------------------------------------------- /awscli/examples/s3api/put-bucket-cors.rst: -------------------------------------------------------------------------------- 1 | The following example enables ``PUT``, ``POST``, and ``DELETE`` requests from *www.example.com*, and enables ``GET`` 2 | requests from any domain:: 3 | 4 | aws s3api put-bucket-cors --bucket MyBucket --cors-configuration file://cors.json 5 | 6 | cors.json: 7 | { 8 | "CORSRules": [ 9 | { 10 | "AllowedOrigins": ["http://www.example.com"], 11 | "AllowedHeaders": ["*"], 12 | "AllowedMethods": ["PUT", "POST", "DELETE"], 13 | "MaxAgeSeconds": 3000, 14 | "ExposeHeaders": ["x-amz-server-side-encryption"] 15 | }, 16 | { 17 | "AllowedOrigins": ["*"], 18 | "AllowedHeaders": ["Authorization"], 19 | "AllowedMethods": ["GET"], 20 | "MaxAgeSeconds": 3000 21 | } 22 | ] 23 | } 24 | 25 | -------------------------------------------------------------------------------- /awscli/examples/s3api/put-object-acl.rst: -------------------------------------------------------------------------------- 1 | This example grants ``full control`` to two AWS users (*user1@example.com* and *user2@example.com*) and ``read`` 2 | permission to everyone:: 3 | 4 | aws s3api put-object-acl --bucket MyBucket --key file.txt --grant-full-control 'emailaddress="user1@example.com",emailaddress="user2@example.com"' --grant-read 'uri="http://acs.amazonaws.com/groups/global/AllUsers"' 5 | 6 | See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTacl.html for details on custom ACLs (the s3api ACL 7 | commands, such as ``put-object-acl``, use the same shorthand argument notation). 8 | -------------------------------------------------------------------------------- /awscli/examples/s3api/put-object.rst: -------------------------------------------------------------------------------- 1 | Upload an object 2 | ---------------- 3 | 4 | The following example uses the ``put-object`` command to upload an object to Amazon S3:: 5 | 6 | aws s3api put-object --bucket text-content --key dir-1/my_images.tar.bz2 --body my_images.tar.bz2 7 | 8 | The following example shows an upload of a video file (The video file is 9 | specified using Windows file system syntax.):: 10 | 11 | aws s3api put-object --bucket text-content --key dir-1/big-video-file.mp4 --body e:\media\videos\f-sharp-3-data-services.mp4 12 | 13 | For more information about uploading objects, see `Uploading Objects`_ in the *Amazon S3 Developer Guide*. 14 | 15 | .. _`Uploading Objects`: http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html 16 | 17 | -------------------------------------------------------------------------------- /awscli/examples/ses/delete-identity.rst: -------------------------------------------------------------------------------- 1 | **To delete an identity** 2 | 3 | The following example uses the ``delete-identity`` command to delete an identity from the list of identities verified with Amazon SES:: 4 | 5 | aws ses delete-identity --identity user@example.com 6 | 7 | For more information about verified identities, see `Verifying Email Addresses and Domains in Amazon SES`_ in the *Amazon Simple Email Service Developer Guide*. 8 | 9 | .. _`Verifying Email Addresses and Domains in Amazon SES`: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html 10 | -------------------------------------------------------------------------------- /awscli/examples/ses/set-identity-dkim-enabled.rst: -------------------------------------------------------------------------------- 1 | **To enable or disable Easy DKIM for an Amazon SES verified identity** 2 | 3 | The following example uses the ``set-identity-dkim-enabled`` command to disable DKIM for a verified email address:: 4 | 5 | aws ses set-identity-dkim-enabled --identity user@example.com --no-dkim-enabled 6 | 7 | For more information about Easy DKIM, see `Easy DKIM in Amazon SES`_ in the *Amazon Simple Email Service Developer Guide*. 8 | 9 | .. _`Easy DKIM in Amazon SES`: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/ses/set-identity-notification-topic.rst: -------------------------------------------------------------------------------- 1 | **To set the Amazon SNS topic to which Amazon SES will publish bounce, complaint, and/or delivery notifications for a verified identity** 2 | 3 | The following example uses the ``set-identity-notification-topic`` command to specify the Amazon SNS topic to which a verified email address will receive bounce notifications:: 4 | 5 | aws ses set-identity-notification-topic --identity user@example.com --notification-type Bounce --sns-topic arn:aws:sns:us-east-1:EXAMPLE65304:MyTopic 6 | 7 | For more information about notifications, see `Using Notifications With Amazon SES`_ in the *Amazon Simple Email Service Developer Guide*. 8 | 9 | .. _`Using Notifications With Amazon SES`: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/ses/verify-domain-dkim.rst: -------------------------------------------------------------------------------- 1 | **To generate a verified domain's DKIM tokens for DKIM signing with Amazon SES** 2 | 3 | The following example uses the ``verify-domain-dkim`` command to generate DKIM tokens for a domain that has been verified with Amazon SES:: 4 | 5 | aws ses verify-domain-dkim --domain example.com 6 | 7 | Output:: 8 | 9 | { 10 | "DkimTokens": [ 11 | "EXAMPLEq76owjnks3lnluwg65scbemvw", 12 | "EXAMPLEi3dnsj67hstzaj673klariwx2", 13 | "EXAMPLEwfbtcukvimehexktmdtaz6naj" 14 | ] 15 | } 16 | 17 | To set up DKIM, you must use the returned DKIM tokens to update your domain's DNS settings with CNAME records that point to DKIM public keys hosted by Amazon SES. For more information, see `Easy DKIM in Amazon SES`_ in the *Amazon Simple Email Service Developer Guide*. 18 | 19 | .. _`Easy DKIM in Amazon SES`: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/easy-dkim.html 20 | -------------------------------------------------------------------------------- /awscli/examples/ses/verify-domain-identity.rst: -------------------------------------------------------------------------------- 1 | **To verify a domain with Amazon SES** 2 | 3 | The following example uses the ``verify-domain-identity`` command to verify a domain:: 4 | 5 | aws ses verify-domain-identity --domain example.com 6 | 7 | Output:: 8 | 9 | { 10 | "VerificationToken": "eoEmxw+YaYhb3h3iVJHuXMJXqeu1q1/wwmvjuEXAMPLE" 11 | } 12 | 13 | 14 | To complete domain verification, you must add a TXT record with the returned verification token to your domain's DNS settings. For more information, see `Verifying Domains in Amazon SES`_ in the *Amazon Simple Email Service Developer Guide*. 15 | 16 | .. _`Verifying Domains in Amazon SES`: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-domains.html 17 | -------------------------------------------------------------------------------- /awscli/examples/sns/create-topic.rst: -------------------------------------------------------------------------------- 1 | **To create an SNS Topic** 2 | 3 | The following ``create-topic`` command creates an SNS topic:: 4 | 5 | aws sns create-topic --name MyTopic 6 | 7 | The topic ARN is returned:: 8 | 9 | { 10 | "ResponseMetadata": { 11 | "RequestId": "1469e8d7-1642-564e-b85d-a19b4b341f83" 12 | }, 13 | "TopicArn": "arn:aws:sns:us-east-1:123456789012:MyTopic" 14 | } 15 | 16 | For more information, see `Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`_ in the *AWS Command Line Interface User Guide*. 17 | 18 | .. _`Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`: http://docs.aws.amazon.com/cli/latest/userguide/cli-sqs-queue-sns-topic.html 19 | 20 | -------------------------------------------------------------------------------- /awscli/examples/sqs/create-queue.rst: -------------------------------------------------------------------------------- 1 | **To create an SQS queue** 2 | 3 | The following ``create-queue`` command creates an SQS queue named MyQueue:: 4 | 5 | aws sqs create-queue --queue-name MyQueue 6 | 7 | For more information, see `Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`_ in the *AWS Command Line Interface User Guide*. 8 | 9 | .. _`Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`: http://docs.aws.amazon.com/cli/latest/userguide/cli-sqs-queue-sns-topic.html 10 | 11 | -------------------------------------------------------------------------------- /awscli/examples/sqs/get-queue-attributes.rst: -------------------------------------------------------------------------------- 1 | **To retrieve queue attributes from an SQS queue** 2 | 3 | The following ``get-queue-attributes`` command retrieves the queue ARN:: 4 | 5 | aws sqs get-queue-attributes --queue-url https://queue.amazonaws.com/803981987763/MyQueue --attribute-names QueueArn 6 | 7 | The following ``get-queue-attributes`` command retrieves multiple attributes from the specified SQS queue:: 8 | 9 | aws sqs get-queue-attributes --queue-url https://queue.amazonaws.com/803981987763/MyQueue --attribute-names QueueArn MaximumMessageSize VisibilityTimeout 10 | 11 | For more information, see `Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`_ in the *AWS Command Line Interface User Guide*. 12 | 13 | .. _`Using the AWS Command Line Interface with Amazon SQS and Amazon SNS`: http://docs.aws.amazon.com/cli/latest/userguide/cli-sqs-queue-sns-topic.html 14 | 15 | -------------------------------------------------------------------------------- /awscli/examples/ssm/create-association.rst: -------------------------------------------------------------------------------- 1 | **To associate a configuration document** 2 | 3 | This example associates configuration document ``My_Config_File`` with instance ``i-1a2b3c4d``. 4 | 5 | Command:: 6 | 7 | aws ssm create-association --instance-id i-1a2b3c4d --name "My_Config_File" 8 | 9 | Output:: 10 | 11 | { 12 | "AssociationDescription": { 13 | "InstanceId": "i-1a2b3c4d", 14 | "Date": 1424354424.842, 15 | "Name": "My_Config_File", 16 | "Status": { 17 | "Date": 1424354424.842, 18 | "Message": "Associated with My_Config_File", 19 | "Name": "Associated" 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /awscli/examples/ssm/create-document.rst: -------------------------------------------------------------------------------- 1 | **To create a configuration document** 2 | 3 | This example creates a configuration document called ``My_Document`` in your account. The document must be in JSON format. For more information about writing a configuration document, see `Configuration Document`_ in the *SSM API Reference*. 4 | 5 | .. _`Configuration Document`: http://docs.aws.amazon.com/ssm/latest/APIReference/aws-ssm-document.html 6 | 7 | Command:: 8 | 9 | aws ssm create-document --content file://myconfigfile.json --name "My_Config_Document" 10 | 11 | Output:: 12 | 13 | { 14 | "DocumentDescription": { 15 | "Status": "Creating", 16 | "Sha1": "715919de1715exampled803025817856844a5f3", 17 | "Name": "My_Config_Document", 18 | "CreatedDate": 1424351175.521 19 | } 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /awscli/examples/ssm/delete-association.rst: -------------------------------------------------------------------------------- 1 | **To delete an association** 2 | 3 | This example deletes the association between instance ``i-bbcc3344`` and the configuration document ``Test_config``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ssm delete-association --instance-id i-bbcc3344 --name Test_config 8 | 9 | -------------------------------------------------------------------------------- /awscli/examples/ssm/delete-document.rst: -------------------------------------------------------------------------------- 1 | **To delete a configuration document** 2 | 3 | This example deletes the configuration document called ``Config_2``. If the command succeeds, no output is returned. 4 | 5 | Command:: 6 | 7 | aws ssm delete-document --name "Config_2" 8 | -------------------------------------------------------------------------------- /awscli/examples/ssm/describe-association.rst: -------------------------------------------------------------------------------- 1 | **To describe an association** 2 | 3 | This example describes the association between instance ``i-1a2b3c4d`` and ``My_Config_File``. 4 | 5 | Command:: 6 | 7 | aws ssm describe-association --instance-id i-1a2b3c4d --name "My_Config_File" 8 | 9 | Output:: 10 | 11 | { 12 | "AssociationDescription": { 13 | "InstanceId": "i-1a2b3c4d", 14 | "Date": 1424419009.036, 15 | "Name": "My_Config_File", 16 | "Status": { 17 | "Date": 1424419196.804, 18 | "AdditionalInfo": "{agent=EC2Config,ver=3.0.54,osver=6.3.9600,os=Windows Server 2012 R2 Standard,lang=en-US}", 19 | "Message": "RunId=0198dadc-aaaa-4150-875f-exampleba3d, status:InProgress, code:0, message:RuntimeStatusCounts=[PassedAndReboot=1], RuntimeStatus=[aws:domainJoin={PassedAndReboot,Domain join Succeeded to domain: test.ssm.com}]", 20 | "Name": "Pending" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /awscli/examples/ssm/describe-document.rst: -------------------------------------------------------------------------------- 1 | **To describe a configuration document** 2 | 3 | This example returns information about a document called ``My_Config_Doc``. 4 | 5 | Command:: 6 | 7 | aws ssm describe-document --name "My_Config_Doc" 8 | 9 | Output:: 10 | 11 | { 12 | "Document": { 13 | "Status": "Active", 14 | "Sha1": "715919de171exampleb3d803025817856844a5f3", 15 | "Name": "My_Config_Doc", 16 | "CreatedDate": 1424351175.521 17 | } 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /awscli/examples/ssm/get-document.rst: -------------------------------------------------------------------------------- 1 | **To get the contents of a configuration document** 2 | 3 | This example gets the contents of the document called ``My_Config_Document``. 4 | 5 | Command:: 6 | 7 | aws ssm get-document --name "My_Config_Document" 8 | 9 | 10 | Output:: 11 | 12 | { 13 | "Content": "{\n 14 | \"schemaVersion\": \"1.0\",\n 15 | \"description\": \"Sample configuration to join an instance to a domain\",\n 16 | \"runtimeConfig\": {\n 17 | \"aws:domainJoin\": {\n 18 | \"properties\": [\n 19 | {\n 20 | \"directoryId\": \"d-1234567890\",\n 21 | \"directoryName\": \"test.example.com\",\n 22 | \"dnsIpAddresses\": [\"198.51.100.1\",\"198.51.100.2\"]\n 23 | }\n 24 | ]\n 25 | }\n 26 | }\n 27 | }", 28 | "Name": "My_Config_Document" 29 | } -------------------------------------------------------------------------------- /awscli/examples/ssm/list-documents.rst: -------------------------------------------------------------------------------- 1 | **To list all the configuration documents in your account** 2 | 3 | This example lists all the configuration documents in your account. 4 | 5 | Command:: 6 | 7 | aws ssm list-documents 8 | 9 | Output:: 10 | 11 | { 12 | "DocumentIdentifiers": [ 13 | { 14 | "Name": "Config_2" 15 | }, 16 | { 17 | "Name": "My_Config_Document" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /awscli/examples/ssm/update-association-status.rst: -------------------------------------------------------------------------------- 1 | **To update the association status** 2 | 3 | This example updates the association status of the association between instance ``i-1a2b3c4d`` and configuration document ``My_Config_1``. 4 | 5 | Command:: 6 | 7 | aws ssm update-association-status --name My_Config_1 --instance-id i-1a2b3c4d --association-status Date=1424421071.939,Name=Pending,Message=temp_status_change,AdditionalInfo=Additional-Config-Needed 8 | 9 | 10 | Output:: 11 | 12 | { 13 | "AssociationDescription": { 14 | "InstanceId": "i-1a2b3c4d", 15 | "Date": 1424421071.939, 16 | "Name": "My_Config_1", 17 | "Status": { 18 | "Date": 1424421071.0, 19 | "AdditionalInfo": "Additional-Config-Needed", 20 | "Message": "temp_status_change", 21 | "Name": "Pending" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /awscli/examples/storagegateway/describe-gateway-information.rst: -------------------------------------------------------------------------------- 1 | **To describe a gateway** 2 | 3 | The following ``describe-gateway-information`` command returns metadata about the specified gateway. 4 | To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in the command. 5 | This examples specifies the gateway named "ExampleGateway". 6 | 7 | :: 8 | 9 | aws storagegateway describe-gateway-information --gateway-arn "arn:aws:storagegateway:us-east-1:111122223333:gateway/ExampleGateway" 10 | 11 | This command outputs a JSON block that contains metadata about about the gateway such as its name, 12 | network interfaces, configured time zone, and the state (whether the gateway is running or not). 13 | -------------------------------------------------------------------------------- /awscli/examples/storagegateway/list-gateways.rst: -------------------------------------------------------------------------------- 1 | **To list gateways for an account** 2 | 3 | The following ``list-gateways`` command lists all the gateways defined for an account:: 4 | 5 | aws storagegateway list-gateways 6 | 7 | This command outputs a JSON block that contains a list of gateway Amazon Resource Names (ARNs). 8 | -------------------------------------------------------------------------------- /awscli/examples/storagegateway/list-volumes.rst: -------------------------------------------------------------------------------- 1 | **To list the volumes configured for a gateway** 2 | 3 | The following ``list-volumes`` command returns a list of volumes configured for the specified gateway. 4 | To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in the command. 5 | 6 | This examples specifies the gateway named "ExampleGateway":: 7 | 8 | aws storagegateway list-volumes --gateway-arn "arn:aws:storagegateway:us-east-1:100447751468:gateway/ExampleGateway" 9 | 10 | This command outputs a JSON block that a list of volumes that includes the type and ARN for each volume. 11 | -------------------------------------------------------------------------------- /bin/aws: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"). You 5 | # may not use this file except in compliance with the License. A copy of 6 | # the License is located at 7 | 8 | # http://aws.amazon.com/apache2.0/ 9 | 10 | # or in the "license" file accompanying this file. This file is 11 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 12 | # ANY KIND, either express or implied. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | import sys 15 | import os 16 | 17 | if os.environ.get('LC_CTYPE', '') == 'UTF-8': 18 | os.environ['LC_CTYPE'] = 'en_US.UTF-8' 19 | import awscli.clidriver 20 | 21 | 22 | def main(): 23 | return awscli.clidriver.main() 24 | 25 | 26 | if __name__ == '__main__': 27 | sys.exit(main()) 28 | -------------------------------------------------------------------------------- /doc/source/_static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/doc/source/_static/logo.png -------------------------------------------------------------------------------- /doc/source/_templates/feedback.html: -------------------------------------------------------------------------------- 1 |
2 |

Feedback

3 | 5 |
6 | -------------------------------------------------------------------------------- /doc/source/_templates/sidebarlogo.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /doc/source/bootstrapdocs.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import subprocess 4 | import sys 5 | 6 | RST_GENERATION_SCRIPT = 'htmlgen' 7 | script_path = os.path.join(os.path.dirname(__file__), 8 | RST_GENERATION_SCRIPT) 9 | os.environ['PATH'] += ':.' 10 | rc = subprocess.call("python "+ script_path, shell=True, env=os.environ) 11 | if rc != 0: 12 | sys.stderr.write("Failed to generate documentation!\n") 13 | sys.exit(2) 14 | -------------------------------------------------------------------------------- /doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/comments.html: -------------------------------------------------------------------------------- 1 | {% if theme_disqus_comments_shortname %} 2 |
3 |
4 | 13 | 14 | comments powered by Disqus 15 |
16 | {% endif %} 17 | -------------------------------------------------------------------------------- /doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/searchbox.html: -------------------------------------------------------------------------------- 1 | {%- if pagename != "search" %} 2 | 11 | 12 | {%- endif %} 13 | -------------------------------------------------------------------------------- /doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/static/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/static/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/static/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/doc/source/guzzle_sphinx_theme/guzzle_sphinx_theme/static/glyphicons-halflings.png -------------------------------------------------------------------------------- /doc/source/index.rst: -------------------------------------------------------------------------------- 1 | ******* 2 | AWS CLI 3 | ******* 4 | 5 | The AWS Command Line Interface is a unified tool that provides a consistent 6 | interface for interacting with all parts of AWS. 7 | 8 | .. toctree:: 9 | :maxdepth: 2 10 | :titlesonly: 11 | 12 | Command Reference 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | tox==1.4 2 | docutils>=0.10 3 | Sphinx==1.1.3 4 | # botocore and the awscli packages are typically developed 5 | # in tandem, so we're requiring the latest develop 6 | # branch of botocore when working on the awscli. 7 | -e git://github.com/boto/botocore.git@develop#egg=botocore 8 | -e git://github.com/boto/bcdoc.git@develop#egg=bcdoc 9 | -e git://github.com/boto/jmespath.git@develop#egg=jmespath 10 | nose==1.3.0 11 | colorama>=0.2.5,<=0.3.3 12 | mock==1.0.1 13 | rsa>=3.1.2,<=3.1.4 14 | -------------------------------------------------------------------------------- /requirements26.txt: -------------------------------------------------------------------------------- 1 | unittest2==0.8.0 2 | -------------------------------------------------------------------------------- /scripts/make-topic-index: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """This is a script to generate a JSON index for the CLI Topic Guide 3 | 4 | Whenever a new topic is added to the awscli/topics directory or a tag 5 | has been modified in a current topic in that directory, this script 6 | **must** be run. The script will scan through all of the topics in the 7 | directory and generate a JSON index that is used by the CLI to link related 8 | topics and commands. 9 | """ 10 | 11 | import awscli 12 | from awscli.topictags import TopicTagDB 13 | 14 | 15 | def main(): 16 | topic_tag_db = TopicTagDB() 17 | src_files = topic_tag_db.get_all_topic_src_files() 18 | topic_tag_db.scan(src_files) 19 | topic_tag_db.save_to_json_index() 20 | 21 | 22 | if __name__ == '__main__': 23 | main() 24 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/__init__.py -------------------------------------------------------------------------------- /tests/integration/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/integration/customizations/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/integration/customizations/s3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/__init__.py -------------------------------------------------------------------------------- /tests/unit/autoscale/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/cloudformation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/cloudformation/__init__.py -------------------------------------------------------------------------------- /tests/unit/cloudsearch/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/cloudsearch/__init__.py -------------------------------------------------------------------------------- /tests/unit/cloudwatch/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/customizations/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/customizations/configservice/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/customizations/datapipeline/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/customizations/datapipeline/__init__.py -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_applications.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"Name": "Hive"}, 3 | {"Name": "Pig"}, 4 | {"Name": "Ganglia"}, 5 | {"Name": "hbase"}, 6 | {"Name": "Impala", 7 | "Args": ["IMPALA_BACKEND_PORT=22001", "IMPALA_MEM_LIMIT=70%"] 8 | }, 9 | {"Name": "mapr", 10 | "Args": ["--edition", "m5", "--version", "3.0.2"] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_bootstrap_actions.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"Name": "Bootstrap Action 1", 3 | "Path": "s3://mybucket/test1", 4 | "Args": ["arg1", "arg2"] 5 | }, 6 | {"Name": "Bootstrap Action 2", 7 | "Path": "s3://mybucket/test2", 8 | "Args": ["arg1", "arg2"] 9 | } 10 | ] -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_ec2_attributes_with_az.json: -------------------------------------------------------------------------------- 1 | { 2 | "AvailabilityZone": "us-east-1a", 3 | "KeyName": "testkey", 4 | "InstanceProfile": "EMR_EC2_DefaultRole" 5 | } -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_ec2_attributes_with_security_groups.json: -------------------------------------------------------------------------------- 1 | { 2 | "EmrManagedMasterSecurityGroup": "sg-master1", 3 | "EmrManagedSlaveSecurityGroup": "sg-slave1", 4 | "AdditionalMasterSecurityGroups": ["sg-addMaster1","sg-addMaster2","sg-addMaster3","sg-addMaster4"], 5 | "AdditionalSlaveSecurityGroups": ["sg-addSlave1","sg-addSlave2","sg-addSlave3","sg-addSlave4"] 6 | } -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_ec2_attributes_with_subnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "SubnetId": "subnet-123456", 3 | "KeyName": "testkey", 4 | "InstanceProfile": "EMR_EC2_DefaultRole" 5 | } -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_emr_fs.json: -------------------------------------------------------------------------------- 1 | { 2 | "Consistent": true, 3 | "SSE": false, 4 | "RetryCount": 10, 5 | "RetryPeriod": 3, 6 | "Args": [ 7 | "fs.s3.serverSideEncryptionAlgorithm=AES256", 8 | "fs.s3.sleepTimeSeconds=30" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_hbase_restore_from_backup.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dir": "s3://mybucket/test", 3 | "BackupVersion": "test_version" 4 | } -------------------------------------------------------------------------------- /tests/unit/customizations/emr/input_instance_groups.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "InstanceGroupType": "MASTER", 4 | "InstanceCount": 1, 5 | "Name": "Master Instance Group", 6 | "InstanceType": "m1.large" 7 | }, 8 | { 9 | "InstanceGroupType": "CORE", 10 | "InstanceCount": 2, 11 | "Name": "Core Instance Group", 12 | "InstanceType": "m1.xlarge" 13 | }, 14 | { 15 | "InstanceGroupType": "TASK", 16 | "InstanceCount": 3, 17 | "Name": "Task Instance Group", 18 | "BidPrice": "3.45", 19 | "InstanceType": "m1.xlarge" 20 | } 21 | ] -------------------------------------------------------------------------------- /tests/unit/customizations/s3/syncstrategy/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/customizations/s3/test_copy_params_data: -------------------------------------------------------------------------------- 1 | This is a test. -------------------------------------------------------------------------------- /tests/unit/docs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/ec2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/elasticache/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/elasticache/__init__.py -------------------------------------------------------------------------------- /tests/unit/elasticbeanstalk/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/elasticbeanstalk/new_keypair_config.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Namespace": "aws:autoscaling:launchconfiguration", 4 | "OptionName": "EC2KeyName", 5 | "Value": "webapps" 6 | }, 7 | { 8 | "Namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", 9 | "OptionName": "Xms", 10 | "Value": "1256m" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /tests/unit/elb/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/elb/test.json: -------------------------------------------------------------------------------- 1 | [{"InstanceId": "i-12345678"}, 2 | {"InstanceId": "i-87654321"}] 3 | -------------------------------------------------------------------------------- /tests/unit/elb/test_with_spaces.json: -------------------------------------------------------------------------------- 1 | [{"InstanceId": "i-12345678"}, 2 | {"InstanceId": "i-87654321"}] 3 | -------------------------------------------------------------------------------- /tests/unit/iam/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/opsworks/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/opsworks/create_layer_attributes.json: -------------------------------------------------------------------------------- 1 | {"RubygemsVersion": "1.8.24", 2 | "RailsStack": "apache_passenger", 3 | "RubyVersion": "1.9.3", 4 | "BundlerVersion": "1.2.3", 5 | "PassengerVersion": "3.0.17", 6 | "ManageBundler": "true" 7 | } 8 | -------------------------------------------------------------------------------- /tests/unit/output/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/airbnb/aws-cli/bd14d17c0d1e5cd24fe0e75da40545ad1b0f21f3/tests/unit/output/__init__.py -------------------------------------------------------------------------------- /tests/unit/rds/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | 14 | -------------------------------------------------------------------------------- /tests/unit/route53/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/s3/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/s3/test_put_object_data: -------------------------------------------------------------------------------- 1 | This is a test. -------------------------------------------------------------------------------- /tests/unit/ses/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/sns/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tests/unit/sqs/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"). You 4 | # may not use this file except in compliance with the License. A copy of 5 | # the License is located at 6 | # 7 | # http://aws.amazon.com/apache2.0/ 8 | # 9 | # or in the "license" file accompanying this file. This file is 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 11 | # ANY KIND, either express or implied. See the License for the specific 12 | # language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py26,py27,py33 3 | 4 | [testenv] 5 | deps = -r{toxinidir}/requirements.txt 6 | commands = nosetests tests/unit 7 | 8 | [testenv:py26] 9 | deps = 10 | -r{toxinidir}/requirements26.txt 11 | -r{toxinidir}/requirements.txt 12 | --------------------------------------------------------------------------------