pax_global_header00006660000000000000000000000064135523773340014526gustar00rootroot0000000000000052 comment=08236c0d4040ddedb51855edf7eda480907ce59e boto3-1.9.253/000077500000000000000000000000001355237733400127355ustar00rootroot00000000000000boto3-1.9.253/.changes/000077500000000000000000000000001355237733400144235ustar00rootroot00000000000000boto3-1.9.253/.changes/0.0.1.json000066400000000000000000000004051355237733400157510ustar00rootroot00000000000000[ { "category": "Resources", "description": "Supports S3, EC2, SQS, SNS, and IAM resources", "type": "feature" }, { "category": "Clients", "description": "Supports low-level clients for most services", "type": "feature" } ] boto3-1.9.253/.changes/0.0.10.json000066400000000000000000000012061355237733400160310ustar00rootroot00000000000000[ { "category": "Documentation", "description": "Name collisions are now handled at the resource model layer instead of the factory, meaning that the documentation now uses the correct names. (`issue 67 `__)", "type": "bugfix" }, { "category": "Session", "description": "Add a ``region_name`` option when creating a session. (`issue 69 `__, `issue 21 `__)", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.94.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.11.json000066400000000000000000000013041355237733400160310ustar00rootroot00000000000000[ { "category": "Resources", "description": "Add Amazon EC2 support for ClassicLink actions and add a delete action to EC2 ``Volume`` resources.", "type": "feature" }, { "category": "Resources", "description": "Add a ``load`` operation and ``user`` reference to AWS IAM's ``CurrentUser`` resource. (`issue 72 `__,", "type": "feature" }, { "category": "Resources", "description": "Add resources for AWS IAM managed policies. (`issue 71 `__)", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.97.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.12.json000066400000000000000000000007031355237733400160340ustar00rootroot00000000000000[ { "category": "Resources", "description": "Add the ability to load resource data from a ``has`` relationship. This saves a call to ``load`` when available, and otherwise fixes a problem where there was no way to get at certain resource data. (`issue 74 `__,", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.99.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.13.json000066400000000000000000000001621355237733400160340ustar00rootroot00000000000000[ { "category": "Botocore", "description": "Update to Botocore 0.100.0.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.14.json000066400000000000000000000006701355237733400160410ustar00rootroot00000000000000[ { "category": "Resources", "description": "Update to the latest resource models for", "type": "feature" }, { "category": "Amazon S3", "description": "Add an ``upload_file`` and ``download_file`` to S3 clients that transparently handle parallel multipart transfers.", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.102.0.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.15.json000066400000000000000000000007461355237733400160460ustar00rootroot00000000000000[ { "category": "Packaging", "description": "Fix an issue with the Amazon S3 ``upload_file`` and ``download_file`` customization. (`issue 85 `__)", "type": "bugfix" }, { "category": "Resource", "description": "Fix an issue with the Amazon S3 ``BucketNofitication`` resource.", "type": "bugfix" }, { "category": "Botocore", "description": "Update to Botocore 0.103.0.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.16.json000066400000000000000000000004061355237733400160400ustar00rootroot00000000000000[ { "category": "Packaging", "description": "Fix release sdist and whl files from 0.0.15.", "type": "bugfix" }, { "category": "Amazon Dynamodb", "description": "Add resource model for Amazon DynamoDB.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.17.json000066400000000000000000000001621355237733400160400ustar00rootroot00000000000000[ { "category": "Botocore", "description": "Update to Botocore 0.107.0.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.18.json000066400000000000000000000011061355237733400160400ustar00rootroot00000000000000[ { "category": "DynamoDB", "description": "Add document level interface for Table resource (`issue 103 `__)", "type": "feature" }, { "category": "DynamoDB", "description": "Add ConditionExpression interface for querying and filtering Table resource. (`issue 103 `__)", "type": "feature" }, { "category": "Clients", "description": "Add support for passing of ``botocore.client.Config`` object to instantiation of clients.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.19.json000066400000000000000000000006771355237733400160550ustar00rootroot00000000000000[ { "category": "Collections", "description": "Remove the ``page_count`` and ``limit`` arguments from ``all()``. Undocument support for the two arguments in the ``filter()`` method. (`issue 119 `__)", "type": "breakingchange" }, { "category": "DynamoDB", "description": "Add batch writer. (`issue 118 `__)", "type": "feature" } ] boto3-1.9.253/.changes/0.0.2.json000066400000000000000000000014071355237733400157550ustar00rootroot00000000000000[ { "category": "Resources", "description": "Adds resources for `AWS CloudFormation `_ and `AWS OpsWorks `_.", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.73.0 and JMESPath 0.5.0", "type": "feature" }, { "category": "Clients", "description": "Adds support for `AWS CodeDeploy `_, `AWS Config `_, `AWS KMS `_, `AWS Lambda `_.", "type": "feature" }, { "category": "UserAgent", "description": "Make requests with a customized HTTP user-agent", "type": "feature" } ] boto3-1.9.253/.changes/0.0.20.json000066400000000000000000000002411355237733400160300ustar00rootroot00000000000000[ { "category": "ec2", "description": "Update resource model. (`issue 129 `__)", "type": "feature" } ] boto3-1.9.253/.changes/0.0.21.json000066400000000000000000000003321355237733400160320ustar00rootroot00000000000000[ { "category": "Installation", "description": "Fix regression when installing via older versions of pip on python 2.6. (`issue 132 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/0.0.22.json000066400000000000000000000005711355237733400160400ustar00rootroot00000000000000[ { "category": "``s3.client.upload_file``", "description": "Fix double invocation of callbacks when using signature version 4. (`issue 133 `__)", "type": "bugfix" }, { "category": "", "description": "``s3.Bucket.load`` (`issue 128 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/0.0.3.json000066400000000000000000000001611355237733400157520ustar00rootroot00000000000000[ { "category": "Botocore", "description": "Update to Botocore 0.76.0.", "type": "feature" } ] boto3-1.9.253/.changes/0.0.4.json000066400000000000000000000011051355237733400157520ustar00rootroot00000000000000[ { "category": "Botocore", "description": "Update to Botocore 0.77.0", "type": "feature" }, { "category": "EC2", "description": "Update `Amazon EC2 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/0.0.5.json000066400000000000000000000004521355237733400157570ustar00rootroot00000000000000[ { "category": "Resources", "description": "Add support for batch actions on collections. (`issue 32 `__)", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.78.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.6.json000066400000000000000000000014221355237733400157560ustar00rootroot00000000000000[ { "category": "Amazon SQS", "description": "Add ``purge`` action to queue resources", "type": "feature" }, { "category": "Waiters", "description": "Add documentation for client and resource waiters (`issue 44 `__)", "type": "feature" }, { "category": "Waiters", "description": "Add support for resource waiters (`issue 43 `__)", "type": "feature" }, { "category": "Installation", "description": "Remove dependency on the unused ``six`` module (`issue 42 `__)", "type": "bugfix" }, { "category": "Botocore", "description": "Update to Botocore 0.80.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.7.json000066400000000000000000000023541355237733400157640ustar00rootroot00000000000000[ { "category": "Resources", "description": "Enable support for Amazon Glacier.", "type": "feature" }, { "category": "Resources", "description": "Support plural references and nested JMESPath queries for data members when building parameters and identifiers. (`issue 52 `__)", "type": "feature" }, { "category": "Resources", "description": "Update to the latest resource JSON format. This is a **backward-incompatible** change as not all resources are exposed at the service level anymore. For example, ``s3.Object('bucket', 'key')`` is now ``s3.Bucket('bucket').Object('key')``. (`issue 51 `__)", "type": "feature" }, { "category": "Resources", "description": "Make ``resource.meta`` a proper object. This allows you to do things like ``resource.meta.client``. This is a **backward- incompatible** change. (`issue 45 `__)", "type": "feature" }, { "category": "Dependency", "description": "Update to JMESPath 0.6.1", "type": "feature" }, { "category": "Botocore", "description": "Update to Botocore 0.86.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.8.json000066400000000000000000000013071355237733400157620ustar00rootroot00000000000000[ { "category": "Resources", "description": "Fix Amazon S3 resource identifier order. (`issue 62 `__)", "type": "bugfix" }, { "category": "Resources", "description": "Fix collection resource hydration path. (`issue 61 `__)", "type": "bugfix" }, { "category": "Resources", "description": "Re-enable service-level access to all resources, allowing e.g. ``obj = s3.Object('bucket', 'key')``. (`issue 60 `__)", "type": "bugfix" }, { "category": "Botocore", "description": "Update to Botocore 0.87.0", "type": "feature" } ] boto3-1.9.253/.changes/0.0.9.json000066400000000000000000000001601355237733400157570ustar00rootroot00000000000000[ { "category": "Botocore", "description": "Update to Botocore 0.92.0", "type": "feature" } ] boto3-1.9.253/.changes/1.1.0.json000066400000000000000000000003151355237733400157520ustar00rootroot00000000000000[ { "category": "``EC2.Vpc.filter``", "description": "Fix issue with clobbering of ``Filtering`` paramter. (`issue 154 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.1.1.json000066400000000000000000000003201355237733400157470ustar00rootroot00000000000000[ { "category": "``EC2.ServiceResource.create_tags``", "description": "Fix issue when creating multiple tags. (`issue 160 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.1.2.json000066400000000000000000000011451355237733400157560ustar00rootroot00000000000000[ { "category": "``session.Session``", "description": "Add ``events`` property to access session's event emitter. (`issue 204 `__)", "type": "feature" }, { "category": "``Glacier.Account``", "description": "Fix issue with resource model. (`issue 196 `__)", "type": "bugfix" }, { "category": "``DynamoDB``", "description": "Fix misspelling of error class to ``DynamoDBOperationNotSupportedError``. (`issue 218 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.1.3.json000066400000000000000000000004011355237733400157510ustar00rootroot00000000000000[ { "category": "``aws storagegateway``", "description": "Add support for resource tagging.", "type": "feature" }, { "category": "timeouts", "description": "Add support for customizable timeouts.", "type": "feature" } ] boto3-1.9.253/.changes/1.1.4.json000066400000000000000000000005771355237733400157700ustar00rootroot00000000000000[ { "category": "Identifier", "description": "Make resource identifiers immutable. (`issue 246 `__)", "type": "bugfix" }, { "category": "S3", "description": "Both S3 Bucket and Object obtain upload_file() and download_file() (`issue 243 `__)", "type": "feature" } ] boto3-1.9.253/.changes/1.2.0.json000066400000000000000000000016401355237733400157550ustar00rootroot00000000000000[ { "category": "Docstrings", "description": "Add docstrings for resource identifiers, attributes, references, and subresources. (`issue 239 `__)", "type": "feature" }, { "category": "``S3``", "description": "Add ability to configure host addressing style when making requests to Amazon S3. (`botocore issue 673 `__)", "type": "feature" }, { "category": "``IAM``", "description": "Fix model issue with attached groups, roles, and policies. (`issue 304 `__)", "type": "bugfix" }, { "category": "``EC2.ServiceResource.create_key_pair``", "description": "Fix model issue where creating key pair does not have a ``key_material`` on ``KeyPair`` resource. (`issue 290 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.2.1.json000066400000000000000000000002141355237733400157520ustar00rootroot00000000000000[ { "category": "setup.cfg", "description": "Fix issue in formatting that broke PyPI distributable", "type": "bugfix" } ] boto3-1.9.253/.changes/1.2.2.json000066400000000000000000000011451355237733400157570ustar00rootroot00000000000000[ { "category": "Dependencies", "description": "Relax version constraint of ``futures`` to support version 3.x.", "type": "feature" }, { "category": "Resources", "description": "Allow ``config`` object to be provided when creating resources (`issue 325 `__)", "type": "feature" }, { "category": "Documentation", "description": "Add docstrings for resource collections and waiters (`issue 267 `__, `issue 261 `__)", "type": "feature" } ] boto3-1.9.253/.changes/1.2.3.json000066400000000000000000000016371355237733400157660ustar00rootroot00000000000000[ { "category": "``CloudWatch``", "description": "Add resource model. (`issue 412 `__)", "type": "feature" }, { "category": "``S3``", "description": "Add a start_restore() on Object and ObjectSummary resources. (`issue 408 `__)", "type": "feature" }, { "category": "Documentation", "description": "Add examples for S3. (`issue 402 `__)", "type": "feature" }, { "category": "Collections", "description": "Fix regression where filters could not be chained. (`issue 401 `__)", "type": "bugfix" }, { "category": "``S3``", "description": "Progress callback will be triggered when rewinding stream. (`issue 395 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.2.4.json000066400000000000000000000005471355237733400157660ustar00rootroot00000000000000[ { "category": "``Session``", "description": "Add ``region_name`` property on session. (`issue 414 `__)", "type": "feature" }, { "category": "``S3``", "description": "Fix issue with hanging downloads. (`issue 471 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.2.5.json000066400000000000000000000003031355237733400157550ustar00rootroot00000000000000[ { "category": "``S3``", "description": "Forward ``extra_args`` when using multipart downloads. (`issue 503 `__)", "type": "bugfix" } ] boto3-1.9.253/.changes/1.3.0.json000066400000000000000000000003041355237733400157520ustar00rootroot00000000000000[ { "category": "``EC2``", "description": "Update resource model to include ``Route`` resources. (`issue 532 `__)", "type": "feature" } ] boto3-1.9.253/.changes/1.3.1.json000066400000000000000000000011411355237733400157530ustar00rootroot00000000000000[ { "category": "S3", "description": "Add custom load to ObjectSummary", "type": "feature" }, { "category": "Session", "description": "Add method to get session credentials", "type": "feature" }, { "category": "DynamoDB", "description": "Ensure batch writer never sends more than flush_amount (`#483 `__)", "type": "bugfix" }, { "category": "Resources", "description": "Add get_available_subresources to Resources (`#113 `__)", "type": "feature" } ] boto3-1.9.253/.changes/1.4.0.json000066400000000000000000000023541355237733400157620ustar00rootroot00000000000000[ { "category": "DynamoDB", "description": "Add request auto de-duplication based on specified primary keys for batch_writer. (`#605 `__)", "type": "feature" }, { "category": "s3", "description": "Add managed file-like object uploads to S3 client, Bucket, and Object.", "type": "feature" }, { "category": "Session", "description": "Fixed Session.__repr__ region argument name.", "type": "bugfix" }, { "category": "s3", "description": "Add managed copies to S3 client, Bucket, and Object.", "type": "feature" }, { "category": "s3", "description": "Add managed downloads to file-like objects in the S3 client, Bucket, and Object.", "type": "feature" }, { "category": "s3", "description": "Port ``s3.transfer`` module to use ``s3transfer`` package. Please refer to `Upgrading Notes `_ when upgrading. In porting the logic over, various performance issues and bugs were fixed.", "type": "bugfix" }, { "category": "s3", "description": "Add ``io_chunksize`` parameter to ``TransferConfig``", "type": "feature" } ] boto3-1.9.253/.changes/1.4.1.json000066400000000000000000000007131355237733400157600ustar00rootroot00000000000000[ { "category": "Session", "description": "Expose available_profiles property for Session (``#704 `__)", "type": "feature" }, { "category": "s3", "description": "Fix issue when transfers would not exit quickly from signals", "type": "bugfix" }, { "category": "``sqs.Queue``", "description": "Fix issue in DeadLetterSourceQueues collection", "type": "bugfix" } ]boto3-1.9.253/.changes/1.4.2.json000066400000000000000000000001601355237733400157550ustar00rootroot00000000000000[ { "category": "ec2", "description": "Update client to latest version", "type": "feature" } ]boto3-1.9.253/.changes/1.4.3.json000066400000000000000000000003721355237733400157630ustar00rootroot00000000000000[ { "category": "``s3``", "description": "Add ability to disable thread use with ``use_threads`` option", "type": "feature" }, { "category": "Resource", "description": "Fix resource hashing.", "type": "bugfix" } ]boto3-1.9.253/.changes/1.4.5.json000066400000000000000000000002611355237733400157620ustar00rootroot00000000000000[ { "category": "s3", "description": "Add a LifecycleConfiguration resource to resolve issues with the existing Lifecycle resource.", "type": "enhancement" } ]boto3-1.9.253/.changes/1.4.6.json000066400000000000000000000002651355237733400157670ustar00rootroot00000000000000[ { "category": "Logging", "description": "Switch log levels from INFO to DEBUG (`#1208 `__)", "type": "enhancement" } ]boto3-1.9.253/.changes/1.4.7.json000066400000000000000000000002121355237733400157600ustar00rootroot00000000000000[ { "category": "``botocore``", "description": "Raised minor version dependency for botocore", "type": "enhancement" } ]boto3-1.9.253/.changes/1.4.8.json000066400000000000000000000002121355237733400157610ustar00rootroot00000000000000[ { "category": "``botocore``", "description": "Raised minor version dependency for botocore", "type": "enhancement" } ]boto3-1.9.253/.changes/1.5.0.json000066400000000000000000000020001355237733400157470ustar00rootroot00000000000000[ { "category": "Filters", "description": "Fixes a bug where parameters passed to resource collections could be mutated after the collections were created.", "type": "bugfix" }, { "category": "``ses``", "description": "[``botocore``] Update ses client to latest version", "type": "api-change" }, { "category": "credentials", "description": "[``botocore``] Moved the JSONFileCache from the CLI into botocore so that it can be used without importing from the cli.", "type": "enhancement" }, { "category": "``botocore`` dependency", "description": "Update dependency strategy to always take a floor on the most recent version of ``botocore``. This means whenever there is a release of ``botocore``, ``boto3`` will release as well to account for the new version of ``botocore``.", "type": "feature" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.1.json000066400000000000000000000002261355237733400157600ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.10.json000066400000000000000000000006761355237733400160510ustar00rootroot00000000000000[ { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.11.json000066400000000000000000000002101355237733400160320ustar00rootroot00000000000000[ { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.12.json000066400000000000000000000002121355237733400160350ustar00rootroot00000000000000[ { "category": "``kms``", "description": "[``botocore``] Update kms client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.13.json000066400000000000000000000010511355237733400160400ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``elb``", "description": "[``botocore``] Update elb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.14.json000066400000000000000000000002141355237733400160410ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.15.json000066400000000000000000000005471355237733400160530ustar00rootroot00000000000000[ { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "cloudformation get_template template body ordering", "description": "[``botocore``] fixes boto/boto3`#1378 `__", "type": "enhancement" } ]boto3-1.9.253/.changes/1.5.16.json000066400000000000000000000007401355237733400160470ustar00rootroot00000000000000[ { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``autoscaling-plans``", "description": "[``botocore``] Update autoscaling-plans client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.17.json000066400000000000000000000004571355237733400160550ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``autoscaling-plans``", "description": "[``botocore``] Update autoscaling-plans client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.18.json000066400000000000000000000002261355237733400160500ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.19.json000066400000000000000000000004431355237733400160520ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.2.json000066400000000000000000000005251355237733400157630ustar00rootroot00000000000000[ { "category": "presigned-url", "description": "[``botocore``] Fixes a bug where content-type would be set on presigned requests for query services.", "type": "bugfix" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.20.json000066400000000000000000000002221355237733400160350ustar00rootroot00000000000000[ { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.21.json000066400000000000000000000024621355237733400160460ustar00rootroot00000000000000[ { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "Presign", "description": "[``botocore``] Fix issue where some events were not fired during the presigning of a request thus not including a variety of customizations (`#1340 `__)", "type": "bugfix" }, { "category": "Credentials", "description": "[``botocore``] Improved error message when the source profile for an assume role is misconfigured. Fixes aws/aws-cli`#2763 `__", "type": "enhancement" }, { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" }, { "category": "Paginator", "description": "[``botocore``] Added paginators for a number of services where the result key is unambiguous.", "type": "enhancment" } ]boto3-1.9.253/.changes/1.5.22.json000066400000000000000000000006721355237733400160500ustar00rootroot00000000000000[ { "category": "``mturk``", "description": "[``botocore``] Update mturk client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.23.json000066400000000000000000000010751355237733400160470ustar00rootroot00000000000000[ { "category": "``cloud9``", "description": "[``botocore``] Update cloud9 client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" }, { "category": "``kinesis``", "description": "[``botocore``] Update kinesis client to latest version", "type": "api-change" }, { "category": "``opsworks``", "description": "[``botocore``] Update opsworks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.24.json000066400000000000000000000011271355237733400160460ustar00rootroot00000000000000[ { "category": "``servicediscovery``", "description": "[``botocore``] Update servicediscovery client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.25.json000066400000000000000000000022111355237733400160420ustar00rootroot00000000000000[ { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" }, { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``mediastore``", "description": "[``botocore``] Update mediastore client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.26.json000066400000000000000000000006721355237733400160540ustar00rootroot00000000000000[ { "category": "``lex-runtime``", "description": "[``botocore``] Update lex-runtime client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``lex-models``", "description": "[``botocore``] Update lex-models client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.27.json000066400000000000000000000013121355237733400160450ustar00rootroot00000000000000[ { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``kms``", "description": "[``botocore``] Update kms client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.28.json000066400000000000000000000004431355237733400160520ustar00rootroot00000000000000[ { "category": "``glacier``", "description": "[``botocore``] Update glacier client to latest version", "type": "api-change" }, { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.29.json000066400000000000000000000004511355237733400160520ustar00rootroot00000000000000[ { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" }, { "category": "``lex-models``", "description": "[``botocore``] Update lex-models client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.3.json000066400000000000000000000007121355237733400157620ustar00rootroot00000000000000[ { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``mediastore-data``", "description": "[``botocore``] Update mediastore-data client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.30.json000066400000000000000000000004571355237733400160500ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.31.json000066400000000000000000000002121355237733400160360ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.32.json000066400000000000000000000002201355237733400160360ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.33.json000066400000000000000000000006761355237733400160560ustar00rootroot00000000000000[ { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.34.json000066400000000000000000000007001355237733400160430ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.35.json000066400000000000000000000004251355237733400160500ustar00rootroot00000000000000[ { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.36.json000066400000000000000000000002261355237733400160500ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.4.json000066400000000000000000000004311355237733400157610ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.5.json000066400000000000000000000011451355237733400157650ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "Paginator", "description": "[``botocore``] Added paginator support for lambda list aliases operation.", "type": "enhancement" }, { "category": "``kinesisanalytics``", "description": "[``botocore``] Update kinesisanalytics client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.6.json000066400000000000000000000010751355237733400157700ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.7.json000066400000000000000000000002301355237733400157610ustar00rootroot00000000000000[ { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.8.json000066400000000000000000000002121355237733400157620ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.5.9.json000066400000000000000000000006621355237733400157740ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "``snowball``", "description": "[``botocore``] Update snowball client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.0.json000066400000000000000000000012651355237733400157640ustar00rootroot00000000000000[ { "category": "Stubber", "description": "[``botocore``] Added the ability to add items to response metadata with the stubber.", "type": "enhancement" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Default to virtual hosted addressing regardless of signature version (boto/botocore`#1387 `__)", "type": "feature" } ]boto3-1.9.253/.changes/1.6.1.json000066400000000000000000000002121355237733400157540ustar00rootroot00000000000000[ { "category": "``ecr``", "description": "[``botocore``] Update ecr client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.10.json000066400000000000000000000007061355237733400160440ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.11.json000066400000000000000000000002441355237733400160420ustar00rootroot00000000000000[ { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.12.json000066400000000000000000000027101355237733400160430ustar00rootroot00000000000000[ { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "Credentials", "description": "[``botocore``] Add the ability to disable fetching credentials from EC2 metadata by setting the environment variable AWS_EC2_METADATA_DISABLED to 'true'.", "type": "enhancement" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "Credentials", "description": "[``botocore``] Fix a race condition related to assuming a role for the first time (`#1405 `__)", "type": "bugfix" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.13.json000066400000000000000000000005201355237733400160410ustar00rootroot00000000000000[ { "category": "s3", "description": "[``botocore``] Fixed a bug where head object and bucket calls would attempt redirects incorrectly.", "type": "bugfix" }, { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.14.json000066400000000000000000000002231355237733400160420ustar00rootroot00000000000000[ { "category": "``s3``", "description": "[``botocore``] Fix regression in redirects in using wrong region", "type": "bugfix" } ]boto3-1.9.253/.changes/1.6.15.json000066400000000000000000000006641355237733400160540ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.16.json000066400000000000000000000002121355237733400160420ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.17.json000066400000000000000000000006101355237733400160450ustar00rootroot00000000000000[ { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Fix bug where invalid head_object requests would cause an infinite loop (alternate fix to `#1400 `__)", "type": "bugfix" } ]boto3-1.9.253/.changes/1.6.18.json000066400000000000000000000002121355237733400160440ustar00rootroot00000000000000[ { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.19.json000066400000000000000000000006401355237733400160520ustar00rootroot00000000000000[ { "category": "``mturk``", "description": "[``botocore``] Update mturk client to latest version", "type": "api-change" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.2.json000066400000000000000000000002621355237733400157620ustar00rootroot00000000000000[ { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.20.json000066400000000000000000000011431355237733400160410ustar00rootroot00000000000000[ { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.21.json000066400000000000000000000004331355237733400160430ustar00rootroot00000000000000[ { "category": "``connect``", "description": "[``botocore``] Update connect client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.22.json000066400000000000000000000006661355237733400160540ustar00rootroot00000000000000[ { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.23.json000066400000000000000000000006741355237733400160540ustar00rootroot00000000000000[ { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``translate``", "description": "[``botocore``] Update translate client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.3.json000066400000000000000000000013401355237733400157610ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.4.json000066400000000000000000000002121355237733400157570ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.5.json000066400000000000000000000002261355237733400157650ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.6.json000066400000000000000000000010571355237733400157710ustar00rootroot00000000000000[ { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``mgh``", "description": "[``botocore``] Update mgh client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.7.json000066400000000000000000000011111355237733400157610ustar00rootroot00000000000000[ { "category": "``cloudhsmv2``", "description": "[``botocore``] Update cloudhsmv2 client to latest version", "type": "api-change" }, { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.8.json000066400000000000000000000002441355237733400157700ustar00rootroot00000000000000[ { "category": "``servicediscovery``", "description": "[``botocore``] Update servicediscovery client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.6.9.json000066400000000000000000000002261355237733400157710ustar00rootroot00000000000000[ { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.0.json000066400000000000000000000036261355237733400157700ustar00rootroot00000000000000[ { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "s3", "description": "Add support for S3 Select. Amazon S3 Select is an Amazon S3 feature that makes it easy to retrieve specific data from the contents of an object using simple SQL expressions without having to retrieve the entire object. With this release of the Amazon S3 SDK, S3 Select API (SelectObjectContent) is now generally available in all public regions. This release supports retrieval of a subset of data using SQL clauses, like SELECT and WHERE, from delimited text files and JSON objects in Amazon S3 through the SelectObjectContent API available in AWS S3 SDK.", "type": "feature" }, { "category": "``fms``", "description": "[``botocore``] Update fms client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.1.json000066400000000000000000000004371355237733400157660ustar00rootroot00000000000000[ { "category": "shield", "description": "[``botocore``] Added paginator for list_protections operation.", "type": "enhancement" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.10.json000066400000000000000000000004611355237733400160430ustar00rootroot00000000000000[ { "category": "``glacier``", "description": "[``botocore``] Update glacier client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.11.json000066400000000000000000000016271355237733400160510ustar00rootroot00000000000000[ { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``route53domains``", "description": "[``botocore``] Update route53domains client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.12.json000066400000000000000000000010671355237733400160500ustar00rootroot00000000000000[ { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.13.json000066400000000000000000000007001355237733400160420ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.14.json000066400000000000000000000002261355237733400160460ustar00rootroot00000000000000[ { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.15.json000066400000000000000000000011031355237733400160420ustar00rootroot00000000000000[ { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.16.json000066400000000000000000000004231355237733400160470ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.17.json000066400000000000000000000006441355237733400160550ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.18.json000066400000000000000000000002241355237733400160500ustar00rootroot00000000000000[ { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.19.json000066400000000000000000000002241355237733400160510ustar00rootroot00000000000000[ { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.2.json000066400000000000000000000002161355237733400157620ustar00rootroot00000000000000[ { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.20.json000066400000000000000000000011771355237733400160510ustar00rootroot00000000000000[ { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``iot1click-devices``", "description": "[``botocore``] Update iot1click-devices client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``iot1click-projects``", "description": "[``botocore``] Update iot1click-projects client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.21.json000066400000000000000000000002201355237733400160360ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.22.json000066400000000000000000000004771355237733400160550ustar00rootroot00000000000000[ { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.23.json000066400000000000000000000006721355237733400160530ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.24.json000066400000000000000000000004231355237733400160460ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``ses``", "description": "[``botocore``] Update ses client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.25.json000066400000000000000000000002401355237733400160440ustar00rootroot00000000000000[ { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.26.json000066400000000000000000000007111355237733400160500ustar00rootroot00000000000000[ { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "Credentials", "description": "[``botocore``] Disable proxy configuration when fetching container credentials", "type": "enhancement" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.27.json000066400000000000000000000011131355237733400160460ustar00rootroot00000000000000[ { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.28.json000066400000000000000000000010711355237733400160520ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.29.json000066400000000000000000000002101355237733400160450ustar00rootroot00000000000000[ { "category": "``pi``", "description": "[``botocore``] Update pi client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.3.json000066400000000000000000000002401355237733400157600ustar00rootroot00000000000000[ { "category": "``clouddirectory``", "description": "[``botocore``] Update clouddirectory client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.30.json000066400000000000000000000004371355237733400160500ustar00rootroot00000000000000[ { "category": "``neptune``", "description": "[``botocore``] Update neptune client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.31.json000066400000000000000000000013061355237733400160450ustar00rootroot00000000000000[ { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" }, { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" }, { "category": "``sns``", "description": "[``botocore``] Update sns client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.32.json000066400000000000000000000015411355237733400160470ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``mgh``", "description": "[``botocore``] Update mgh client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.33.json000066400000000000000000000013141355237733400160460ustar00rootroot00000000000000[ { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``shield``", "description": "[``botocore``] Update shield client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.34.json000066400000000000000000000002261355237733400160500ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.35.json000066400000000000000000000002321355237733400160460ustar00rootroot00000000000000[ { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.36.json000066400000000000000000000007101355237733400160500ustar00rootroot00000000000000[ { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``clouddirectory``", "description": "[``botocore``] Update clouddirectory client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.37.json000066400000000000000000000004411355237733400160520ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.38.json000066400000000000000000000004511355237733400160540ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.39.json000066400000000000000000000007061355237733400160600ustar00rootroot00000000000000[ { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.4.json000066400000000000000000000013141355237733400157640ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``workmail``", "description": "[``botocore``] Update workmail client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.40.json000066400000000000000000000002341355237733400160440ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.41.json000066400000000000000000000002321355237733400160430ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.42.json000066400000000000000000000006601355237733400160510ustar00rootroot00000000000000[ { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.43.json000066400000000000000000000006501355237733400160510ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``macie``", "description": "[``botocore``] Update macie client to latest version", "type": "api-change" }, { "category": "``neptune``", "description": "[``botocore``] Update neptune client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.44.json000066400000000000000000000002401355237733400160450ustar00rootroot00000000000000[ { "category": "``clouddirectory``", "description": "[``botocore``] Update clouddirectory client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.45.json000066400000000000000000000004711355237733400160540ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.46.json000066400000000000000000000006741355237733400160620ustar00rootroot00000000000000[ { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.47.json000066400000000000000000000015271355237733400160610ustar00rootroot00000000000000[ { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "StreamingResponses", "description": "[``botocore``] Add ``iter_lines()`` and ``iter_chunks()`` to streaming responses (`#1195 `__)", "type": "enhancement" } ]boto3-1.9.253/.changes/1.7.48.json000066400000000000000000000007221355237733400160560ustar00rootroot00000000000000[ { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.49.json000066400000000000000000000002121355237733400160510ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.5.json000066400000000000000000000022171355237733400157700ustar00rootroot00000000000000[ { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "dynamodb", "description": "Fixes a bug causing dynamodb operations with no output to throw errors.", "type": "bugfix" } ]boto3-1.9.253/.changes/1.7.50.json000066400000000000000000000006461355237733400160540ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.51.json000066400000000000000000000004511355237733400160470ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.52.json000066400000000000000000000004731355237733400160540ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.53.json000066400000000000000000000013501355237733400160500ustar00rootroot00000000000000[ { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.54.json000066400000000000000000000002621355237733400160520ustar00rootroot00000000000000[ { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.55.json000066400000000000000000000013221355237733400160510ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``opsworks``", "description": "[``botocore``] Update opsworks client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.56.json000066400000000000000000000010571355237733400160570ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.57.json000066400000000000000000000015131355237733400160550ustar00rootroot00000000000000[ { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" }, { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" }, { "category": "``efs``", "description": "[``botocore``] Update efs client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``emr``", "description": "[``botocore``] Update emr client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.58.json000066400000000000000000000007541355237733400160640ustar00rootroot00000000000000[ { "category": "``kinesisvideo``", "description": "[``botocore``] Update kinesisvideo client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``kinesis-video-archived-media``", "description": "[``botocore``] Update kinesis-video-archived-media client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.59.json000066400000000000000000000011151355237733400160550ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``snowball``", "description": "[``botocore``] Update snowball client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.6.json000066400000000000000000000004511355237733400157670ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.60.json000066400000000000000000000002341355237733400160460ustar00rootroot00000000000000[ { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.61.json000066400000000000000000000002341355237733400160470ustar00rootroot00000000000000[ { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.62.json000066400000000000000000000004311355237733400160470ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.63.json000066400000000000000000000002241355237733400160500ustar00rootroot00000000000000[ { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.64.json000066400000000000000000000006401355237733400160530ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.65.json000066400000000000000000000015471355237733400160630ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.66.json000066400000000000000000000022511355237733400160550ustar00rootroot00000000000000[ { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``cloudhsmv2``", "description": "[``botocore``] Update cloudhsmv2 client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "Timestamp Serialization", "description": "[``botocore``] Support explicit timestamp serialization per timestamp shape.", "type": "enhancment" }, { "category": "``glacier``", "description": "[``botocore``] Update glacier client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.67.json000066400000000000000000000013061355237733400160560ustar00rootroot00000000000000[ { "category": "``kms``", "description": "[``botocore``] Update kms client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``connect``", "description": "[``botocore``] Update connect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.68.json000066400000000000000000000004671355237733400160660ustar00rootroot00000000000000[ { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.69.json000066400000000000000000000011111355237733400160520ustar00rootroot00000000000000[ { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``kinesis``", "description": "[``botocore``] Update kinesis client to latest version", "type": "api-change" }, { "category": "``resource-groups``", "description": "[``botocore``] Update resource-groups client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.7.json000066400000000000000000000007121355237733400157700ustar00rootroot00000000000000[ { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``autoscaling-plans``", "description": "[``botocore``] Update autoscaling-plans client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.70.json000066400000000000000000000002441355237733400160500ustar00rootroot00000000000000[ { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.71.json000066400000000000000000000004431355237733400160520ustar00rootroot00000000000000[ { "category": "``health``", "description": "[``botocore``] Update health client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.72.json000066400000000000000000000013061355237733400160520ustar00rootroot00000000000000[ { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.73.json000066400000000000000000000004511355237733400160530ustar00rootroot00000000000000[ { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.74.json000066400000000000000000000006341355237733400160570ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``dax``", "description": "[``botocore``] Update dax client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.75.json000066400000000000000000000004451355237733400160600ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.76.json000066400000000000000000000002261355237733400160560ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.77.json000066400000000000000000000006701355237733400160620ustar00rootroot00000000000000[ { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.78.json000066400000000000000000000002301355237733400160530ustar00rootroot00000000000000[ { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.79.json000066400000000000000000000013261355237733400160630ustar00rootroot00000000000000[ { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.8.json000066400000000000000000000005031355237733400157670ustar00rootroot00000000000000[ { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.80.json000066400000000000000000000006761355237733400160620ustar00rootroot00000000000000[ { "category": "``dax``", "description": "[``botocore``] Update dax client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.81.json000066400000000000000000000004571355237733400160600ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.82.json000066400000000000000000000010771355237733400160600ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.83.json000066400000000000000000000002241355237733400160520ustar00rootroot00000000000000[ { "category": "``snowball``", "description": "[``botocore``] Update snowball client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.84.json000066400000000000000000000013521355237733400160560ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``lex-models``", "description": "[``botocore``] Update lex-models client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.7.9.json000066400000000000000000000006741355237733400160010ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``xray``", "description": "[``botocore``] Update xray client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.0.json000066400000000000000000000010411355237733400157560ustar00rootroot00000000000000[ { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "urllib3", "description": "[``botocore``] The vendored version of requests and urllib3 are no longer being used and botocore now has a direct dependency on newer versions of upstream urllib3.", "type": "feature" } ]boto3-1.9.253/.changes/1.8.1.json000066400000000000000000000002141355237733400157600ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.2.json000066400000000000000000000011071355237733400157630ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``signer``", "description": "[``botocore``] Update signer client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.3.json000066400000000000000000000004271355237733400157700ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``xray``", "description": "[``botocore``] Update xray client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.4.json000066400000000000000000000007141355237733400157700ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``sagemaker-runtime``", "description": "[``botocore``] Update sagemaker-runtime client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.5.json000066400000000000000000000007351355237733400157740ustar00rootroot00000000000000[ { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "signing", "description": "[``botocore``] Fix an issue where mixed endpoint casing could cause a SigV4 signature mismatch.", "type": "bugfix" } ]boto3-1.9.253/.changes/1.8.6.json000066400000000000000000000006561355237733400157770ustar00rootroot00000000000000[ { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.7.json000066400000000000000000000004431355237733400157720ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.8.json000066400000000000000000000013021355237733400157660ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``elb``", "description": "[``botocore``] Update elb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.8.9.json000066400000000000000000000007121355237733400157730ustar00rootroot00000000000000[ { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.0.json000066400000000000000000000032531355237733400157660ustar00rootroot00000000000000[ { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "Events", "description": "[``botocore``] This migrates the event system to using sevice ids instead of either client name or endpoint prefix. This prevents issues that might arise when a service changes their endpoint prefix, also fixes a long-standing bug where you could not register an event to a particular service if it happened to share its endpoint prefix with another service (e.g. ``autoscaling`` and ``application-autoscaling`` both use the endpoint prefix ``autoscaling``). Please see the `upgrade notes `_ to determine if you are impacted and how to proceed if you are.", "type": "feature" }, { "category": "Events", "description": "This migrates the event system to using sevice ids instead of either client name or endpoint prefix. This prevents issues that might arise when a service changes their endpoint prefix, also fixes a long-standing bug where you could not register an event to a particular service if it happened to share its endpoint prefix with another service (e.g. ``autoscaling`` and ``application-autoscaling`` both use the endpoint prefix ``autoscaling``). Please see the `upgrade notes `_ to determine if you are impacted and how to proceed if you are.", "type": "feature" } ]boto3-1.9.253/.changes/1.9.1.json000066400000000000000000000004531355237733400157660ustar00rootroot00000000000000[ { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``cloudhsmv2``", "description": "[``botocore``] Update cloudhsmv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.10.json000066400000000000000000000004331355237733400160440ustar00rootroot00000000000000[ { "category": "``connect``", "description": "[``botocore``] Update connect client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.100.json000066400000000000000000000023571355237733400161330ustar00rootroot00000000000000[ { "category": "``kinesis-video-archived-media``", "description": "[``botocore``] Update kinesis-video-archived-media client to latest version", "type": "api-change" }, { "category": "``workdocs``", "description": "[``botocore``] Update workdocs client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``kinesisvideo``", "description": "[``botocore``] Update kinesisvideo client to latest version", "type": "api-change" }, { "category": "``kinesis-video-media``", "description": "[``botocore``] Update kinesis-video-media client to latest version", "type": "api-change" }, { "category": "``transfer``", "description": "[``botocore``] Update transfer client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.101.json000066400000000000000000000011071355237733400161240ustar00rootroot00000000000000[ { "category": "``athena``", "description": "[``botocore``] Update athena client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``stepfunctions``", "description": "[``botocore``] Update stepfunctions client to latest version", "type": "api-change" }, { "category": "``cloud9``", "description": "[``botocore``] Update cloud9 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.102.json000066400000000000000000000011051355237733400161230ustar00rootroot00000000000000[ { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``mediastore``", "description": "[``botocore``] Update mediastore client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.103.json000066400000000000000000000020421355237733400161250ustar00rootroot00000000000000[ { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``resource-groups``", "description": "[``botocore``] Update resource-groups client to latest version", "type": "api-change" }, { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``cur``", "description": "[``botocore``] Update cur client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.104.json000066400000000000000000000004451355237733400161330ustar00rootroot00000000000000[ { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.105.json000066400000000000000000000011711355237733400161310ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``apigatewayv2``", "description": "[``botocore``] Update apigatewayv2 client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.106.json000066400000000000000000000004571355237733400161400ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``autoscaling-plans``", "description": "[``botocore``] Update autoscaling-plans client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.107.json000066400000000000000000000004451355237733400161360ustar00rootroot00000000000000[ { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.108.json000066400000000000000000000011371355237733400161360ustar00rootroot00000000000000[ { "category": "``textract``", "description": "[``botocore``] Update textract client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.109.json000066400000000000000000000004471355237733400161420ustar00rootroot00000000000000[ { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.11.json000066400000000000000000000006501355237733400160460ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" }, { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.110.json000066400000000000000000000017741355237733400161360ustar00rootroot00000000000000[ { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.111.json000066400000000000000000000006621355237733400161320ustar00rootroot00000000000000[ { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.112.json000066400000000000000000000015571355237733400161370ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``quicksight``", "description": "[``botocore``] Update quicksight client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.113.json000066400000000000000000000002401355237733400161240ustar00rootroot00000000000000[ { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.114.json000066400000000000000000000004331355237733400161310ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.115.json000066400000000000000000000017501355237733400161350ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.116.json000066400000000000000000000006401355237733400161330ustar00rootroot00000000000000[ { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.117.json000066400000000000000000000004311355237733400161320ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.118.json000066400000000000000000000007501355237733400161370ustar00rootroot00000000000000[ { "category": "``cognito-identity``", "description": "[``botocore``] Update cognito-identity client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``meteringmarketplace``", "description": "[``botocore``] Update meteringmarketplace client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.119.json000066400000000000000000000013401355237733400161340ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.12.json000066400000000000000000000010651355237733400160500ustar00rootroot00000000000000[ { "category": "``sqs``", "description": "[``botocore``] Update sqs client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.120.json000066400000000000000000000004771355237733400161360ustar00rootroot00000000000000[ { "category": "``iot1click-projects``", "description": "[``botocore``] Update iot1click-projects client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.121.json000066400000000000000000000020561355237733400161320ustar00rootroot00000000000000[ { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``fms``", "description": "[``botocore``] Update fms client to latest version", "type": "api-change" }, { "category": "``iot1click-devices``", "description": "[``botocore``] Update iot1click-devices client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.122.json000066400000000000000000000004371355237733400161340ustar00rootroot00000000000000[ { "category": "``workmail``", "description": "[``botocore``] Update workmail client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.123.json000066400000000000000000000017521355237733400161360ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``transfer``", "description": "[``botocore``] Update transfer client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.124.json000066400000000000000000000011531355237733400161320ustar00rootroot00000000000000[ { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.125.json000066400000000000000000000007061355237733400161360ustar00rootroot00000000000000[ { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.126.json000066400000000000000000000004231355237733400161330ustar00rootroot00000000000000[ { "category": "``emr``", "description": "[``botocore``] Update emr client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.127.json000066400000000000000000000006541355237733400161420ustar00rootroot00000000000000[ { "category": "``securityhub``", "description": "[``botocore``] Update securityhub client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``acm``", "description": "[``botocore``] Update acm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.128.json000066400000000000000000000004451355237733400161410ustar00rootroot00000000000000[ { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.129.json000066400000000000000000000004231355237733400161360ustar00rootroot00000000000000[ { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.13.json000066400000000000000000000012701355237733400160470ustar00rootroot00000000000000[ { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "Event", "description": "[``botocore``] Add the `before-send` event which allows finalized requests to be inspected before being sent across the wire and allows for custom responses to be returned.", "type": "enhancement" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.130.json000066400000000000000000000013701355237733400161300ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``iot1click-devices``", "description": "[``botocore``] Update iot1click-devices client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.131.json000066400000000000000000000016071355237733400161340ustar00rootroot00000000000000[ { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.132.json000066400000000000000000000004271355237733400161340ustar00rootroot00000000000000[ { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.133.json000066400000000000000000000020141355237733400161270ustar00rootroot00000000000000[ { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``worklink``", "description": "[``botocore``] Update worklink client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.134.json000066400000000000000000000007201355237733400161320ustar00rootroot00000000000000[ { "category": "``resource-groups``", "description": "[``botocore``] Update resource-groups client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.135.json000066400000000000000000000027251355237733400161420ustar00rootroot00000000000000[ { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" }, { "category": "``textract``", "description": "[``botocore``] Update textract client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.136.json000066400000000000000000000015571355237733400161450ustar00rootroot00000000000000[ { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.137.json000066400000000000000000000004231355237733400161350ustar00rootroot00000000000000[ { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``sns``", "description": "[``botocore``] Update sns client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.138.json000066400000000000000000000004351355237733400161410ustar00rootroot00000000000000[ { "category": "``transfer``", "description": "[``botocore``] Update transfer client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.139.json000066400000000000000000000016431355237733400161440ustar00rootroot00000000000000[ { "category": "``neptune``", "description": "[``botocore``] Update neptune client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``managedblockchain``", "description": "[``botocore``] Update managedblockchain client to latest version", "type": "api-change" }, { "category": "``s3control``", "description": "[``botocore``] Update s3control client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.14.json000066400000000000000000000004351355237733400160520ustar00rootroot00000000000000[ { "category": "``codestar``", "description": "[``botocore``] Update codestar client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.140.json000066400000000000000000000006361355237733400161350ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``xray``", "description": "[``botocore``] Update xray client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.141.json000066400000000000000000000004551355237733400161350ustar00rootroot00000000000000[ { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``kms``", "description": "[``botocore``] Update kms client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.142.json000066400000000000000000000011351355237733400161320ustar00rootroot00000000000000[ { "category": "``workmail``", "description": "[``botocore``] Update workmail client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.143.json000066400000000000000000000010751355237733400161360ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.144.json000066400000000000000000000011351355237733400161340ustar00rootroot00000000000000[ { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.145.json000066400000000000000000000014101355237733400161310ustar00rootroot00000000000000[ { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``kinesisanalytics``", "description": "[``botocore``] Update kinesisanalytics client to latest version", "type": "api-change" }, { "category": "``kinesisanalyticsv2``", "description": "[``botocore``] Update kinesisanalyticsv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.146.json000066400000000000000000000004251355237733400161370ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.147.json000066400000000000000000000006761355237733400161500ustar00rootroot00000000000000[ { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.148.json000066400000000000000000000011151355237733400161360ustar00rootroot00000000000000[ { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.149.json000066400000000000000000000016761355237733400161530ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "Environment Variables", "description": "[``botocore``] Ignore env var credentials is values are empty (`#1680 `__)", "type": "enhancement" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.15.json000066400000000000000000000004571355237733400160570ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.150.json000066400000000000000000000004351355237733400161330ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.151.json000066400000000000000000000002261355237733400161320ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.152.json000066400000000000000000000007321355237733400161350ustar00rootroot00000000000000[ { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" }, { "category": "``meteringmarketplace``", "description": "[``botocore``] Update meteringmarketplace client to latest version", "type": "api-change" }, { "category": "``mediapackage-vod``", "description": "[``botocore``] Update mediapackage-vod client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.153.json000066400000000000000000000004671355237733400161430ustar00rootroot00000000000000[ { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.154.json000066400000000000000000000022151355237733400161350ustar00rootroot00000000000000[ { "category": "``efs``", "description": "[``botocore``] Update efs client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``worklink``", "description": "[``botocore``] Update worklink client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.155.json000066400000000000000000000004451355237733400161410ustar00rootroot00000000000000[ { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.156.json000066400000000000000000000007201355237733400161360ustar00rootroot00000000000000[ { "category": "``mediastore-data``", "description": "[``botocore``] Update mediastore-data client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" }, { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.157.json000066400000000000000000000024601355237733400161420ustar00rootroot00000000000000[ { "category": "``groundstation``", "description": "[``botocore``] Update groundstation client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.158.json000066400000000000000000000015351355237733400161450ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``securityhub``", "description": "[``botocore``] Update securityhub client to latest version", "type": "api-change" }, { "category": "``iotthingsgraph``", "description": "[``botocore``] Update iotthingsgraph client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.159.json000066400000000000000000000025161355237733400161460ustar00rootroot00000000000000[ { "category": "``iotevents-data``", "description": "[``botocore``] Update iotevents-data client to latest version", "type": "api-change" }, { "category": "``iotevents``", "description": "[``botocore``] Update iotevents client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``rds-data``", "description": "[``botocore``] Update rds-data client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.16.json000066400000000000000000000004651355237733400160570ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.160.json000066400000000000000000000004231355237733400161310ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.161.json000066400000000000000000000013221355237733400161310ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.162.json000066400000000000000000000002141355237733400161310ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.163.json000066400000000000000000000022071355237733400161360ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ses``", "description": "[``botocore``] Update ses client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.164.json000066400000000000000000000002121355237733400161310ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.165.json000066400000000000000000000014261355237733400161420ustar00rootroot00000000000000[ { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``personalize-runtime``", "description": "[``botocore``] Update personalize-runtime client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``personalize-events``", "description": "[``botocore``] Update personalize-events client to latest version", "type": "api-change" }, { "category": "``personalize``", "description": "[``botocore``] Update personalize client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.166.json000066400000000000000000000002261355237733400161400ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.167.json000066400000000000000000000002401355237733400161350ustar00rootroot00000000000000[ { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.168.json000066400000000000000000000011111355237733400161340ustar00rootroot00000000000000[ { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.169.json000066400000000000000000000011171355237733400161430ustar00rootroot00000000000000[ { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" }, { "category": "``personalize``", "description": "[``botocore``] Update personalize client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.17.json000066400000000000000000000014411355237733400160530ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "HTTP Session", "description": "[``botocore``] Added the ability to enable TCP Keepalive via the shared config file's ``tcp_keepalive`` option.", "type": "enhancement" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.170.json000066400000000000000000000013351355237733400161350ustar00rootroot00000000000000[ { "category": "``neptune``", "description": "[``botocore``] Update neptune client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "Paginator", "description": "[``botocore``] Fixes a bug where pagination tokens with three consecutive underscores would result in a parsing failure. Resolves boto/boto3`#1984 `__.", "type": "bugfix" } ]boto3-1.9.253/.changes/1.9.171.json000066400000000000000000000004751355237733400161420ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``resourcegroupstaggingapi``", "description": "[``botocore``] Update resourcegroupstaggingapi client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.172.json000066400000000000000000000002121355237733400161300ustar00rootroot00000000000000[ { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.173.json000066400000000000000000000015471355237733400161450ustar00rootroot00000000000000[ { "category": "``health``", "description": "[``botocore``] Update health client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``iotevents-data``", "description": "[``botocore``] Update iotevents-data client to latest version", "type": "api-change" }, { "category": "``opsworks``", "description": "[``botocore``] Update opsworks client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.174.json000066400000000000000000000011451355237733400161400ustar00rootroot00000000000000[ { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" }, { "category": "``kinesis-video-media``", "description": "[``botocore``] Update kinesis-video-media client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.175.json000066400000000000000000000025501355237733400161420ustar00rootroot00000000000000[ { "category": "``application-insights``", "description": "[``botocore``] Update application-insights client to latest version", "type": "api-change" }, { "category": "``securityhub``", "description": "[``botocore``] Update securityhub client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``fsx``", "description": "[``botocore``] Update fsx client to latest version", "type": "api-change" }, { "category": "``service-quotas``", "description": "[``botocore``] Update service-quotas client to latest version", "type": "api-change" }, { "category": "``resourcegroupstaggingapi``", "description": "[``botocore``] Update resourcegroupstaggingapi client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``apigatewayv2``", "description": "[``botocore``] Update apigatewayv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.176.json000066400000000000000000000004231355237733400161400ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.177.json000066400000000000000000000004631355237733400161450ustar00rootroot00000000000000[ { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``apigatewayv2``", "description": "[``botocore``] Update apigatewayv2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.178.json000066400000000000000000000002241355237733400161410ustar00rootroot00000000000000[ { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.179.json000066400000000000000000000011631355237733400161450ustar00rootroot00000000000000[ { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``ec2-instance-connect``", "description": "[``botocore``] Update ec2-instance-connect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.18.json000066400000000000000000000002101355237733400160450ustar00rootroot00000000000000[ { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.180.json000066400000000000000000000011271355237733400161350ustar00rootroot00000000000000[ { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.181.json000066400000000000000000000010751355237733400161400ustar00rootroot00000000000000[ { "category": "``docdb``", "description": "[``botocore``] Update docdb client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.182.json000066400000000000000000000007361355237733400161440ustar00rootroot00000000000000[ { "category": "CSM", "description": "[``botocore``] Support configuration of the host used in client side metrics via AWS_CSM_HOST", "type": "enhancement" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``mediastore``", "description": "[``botocore``] Update mediastore client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.183.json000066400000000000000000000010431355237733400161350ustar00rootroot00000000000000[ { "category": "``swf``", "description": "[``botocore``] Update swf client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.184.json000066400000000000000000000002101355237733400161310ustar00rootroot00000000000000[ { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.185.json000066400000000000000000000025161355237733400161450ustar00rootroot00000000000000[ { "category": "``efs``", "description": "[``botocore``] Update efs client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``amplify``", "description": "[``botocore``] Update amplify client to latest version", "type": "api-change" }, { "category": "``kinesis-video-archived-media``", "description": "[``botocore``] Update kinesis-video-archived-media client to latest version", "type": "api-change" }, { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" }, { "category": "``kinesisvideo``", "description": "[``botocore``] Update kinesisvideo client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.186.json000066400000000000000000000007101355237733400161400ustar00rootroot00000000000000[ { "category": "``quicksight``", "description": "[``botocore``] Update quicksight client to latest version", "type": "api-change" }, { "category": "``glacier``", "description": "[``botocore``] Update glacier client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.187.json000066400000000000000000000002201355237733400161350ustar00rootroot00000000000000[ { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.188.json000066400000000000000000000011011355237733400161350ustar00rootroot00000000000000[ { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``apigatewayv2``", "description": "[``botocore``] Update apigatewayv2 client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.189.json000066400000000000000000000006621355237733400161510ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.19.json000066400000000000000000000004471355237733400160620ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``iot-jobs-data``", "description": "[``botocore``] Update iot-jobs-data client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.190.json000066400000000000000000000011211355237733400161300ustar00rootroot00000000000000[ { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.191.json000066400000000000000000000004371355237733400161420ustar00rootroot00000000000000[ { "category": "``sqs``", "description": "[``botocore``] Update sqs client to latest version", "type": "api-change" }, { "category": "``iotevents``", "description": "[``botocore``] Update iotevents client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.192.json000066400000000000000000000003251355237733400161370ustar00rootroot00000000000000[ { "category": "Dependency", "description": "[``botocore``] Fixed dependency issue with broken docutils aws/aws-cli`#4332 `__", "type": "bugfix" } ]boto3-1.9.253/.changes/1.9.193.json000066400000000000000000000004271355237733400161430ustar00rootroot00000000000000[ { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "``shield``", "description": "[``botocore``] Update shield client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.194.json000066400000000000000000000004511355237733400161410ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.195.json000066400000000000000000000010611355237733400161400ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.196.json000066400000000000000000000006721355237733400161500ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``ecr``", "description": "[``botocore``] Update ecr client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.197.json000066400000000000000000000017461355237733400161540ustar00rootroot00000000000000[ { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" }, { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.198.json000066400000000000000000000005471355237733400161530ustar00rootroot00000000000000[ { "category": "S3", "description": "[``botocore``] Fix an issue that would cause S3 list_object_versions to sometimes fail parsing responses with certain key values.", "type": "bugfix" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.199.json000066400000000000000000000006721355237733400161530ustar00rootroot00000000000000[ { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.2.json000066400000000000000000000004411355237733400157640ustar00rootroot00000000000000[ { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.20.json000066400000000000000000000011711355237733400160450ustar00rootroot00000000000000[ { "category": "TLS", "description": "[``botocore``] Added support for configuring a client certificate and key when establishing TLS connections.", "type": "enhancement" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "InstanceMetadataFetcher", "description": "[``botocore``] Fix failure to retry on empty credentials and invalid JSON returned from IMDS `1049 `__ `1403 `__", "type": "bugfix" } ]boto3-1.9.253/.changes/1.9.200.json000066400000000000000000000005371355237733400161320ustar00rootroot00000000000000[ { "category": "``sts``", "description": "[``botocore``] Update sts client to latest version", "type": "api-change" }, { "category": "Credentials", "description": "[``botocore``] Add support for a credential provider that handles resolving credentials via STS AssumeRoleWithWebIdentity", "type": "enhancement" } ]boto3-1.9.253/.changes/1.9.201.json000066400000000000000000000006461355237733400161340ustar00rootroot00000000000000[ { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.202.json000066400000000000000000000002161355237733400161260ustar00rootroot00000000000000[ { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.203.json000066400000000000000000000002541355237733400161310ustar00rootroot00000000000000[ { "category": "``application-insights``", "description": "[``botocore``] Update application-insights client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.204.json000066400000000000000000000011251355237733400161300ustar00rootroot00000000000000[ { "category": "``lakeformation``", "description": "[``botocore``] Update lakeformation client to latest version", "type": "api-change" }, { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.205.json000066400000000000000000000013461355237733400161360ustar00rootroot00000000000000[ { "category": "``guardduty``", "description": "[``botocore``] Update guardduty client to latest version", "type": "api-change" }, { "category": "``lex-runtime``", "description": "[``botocore``] Update lex-runtime client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.206.json000066400000000000000000000011731355237733400161350ustar00rootroot00000000000000[ { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.207.json000066400000000000000000000002221355237733400161300ustar00rootroot00000000000000[ { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.208.json000066400000000000000000000002121355237733400161300ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.209.json000066400000000000000000000015531355237733400161420ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``athena``", "description": "[``botocore``] Update athena client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.21.json000066400000000000000000000006661355237733400160560ustar00rootroot00000000000000[ { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.210.json000066400000000000000000000006501355237733400161270ustar00rootroot00000000000000[ { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``emr``", "description": "[``botocore``] Update emr client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.211.json000066400000000000000000000004331355237733400161270ustar00rootroot00000000000000[ { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``cur``", "description": "[``botocore``] Update cur client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.212.json000066400000000000000000000011411355237733400161250ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``transfer``", "description": "[``botocore``] Update transfer client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.213.json000066400000000000000000000020521355237733400161300ustar00rootroot00000000000000[ { "category": "``forecast``", "description": "[``botocore``] Update forecast client to latest version", "type": "api-change" }, { "category": "``forecastquery``", "description": "[``botocore``] Update forecastquery client to latest version", "type": "api-change" }, { "category": "``personalize-runtime``", "description": "[``botocore``] Update personalize-runtime client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``sqs``", "description": "[``botocore``] Update sqs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.214.json000066400000000000000000000004351355237733400161340ustar00rootroot00000000000000[ { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.215.json000066400000000000000000000007041355237733400161340ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``mediapackage-vod``", "description": "[``botocore``] Update mediapackage-vod client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.216.json000066400000000000000000000004431355237733400161350ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``securityhub``", "description": "[``botocore``] Update securityhub client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.217.json000066400000000000000000000002361355237733400161360ustar00rootroot00000000000000[ { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.218.json000066400000000000000000000007121355237733400161360ustar00rootroot00000000000000[ { "category": "``sqs``", "description": "[``botocore``] Update sqs client to latest version", "type": "api-change" }, { "category": "``globalaccelerator``", "description": "[``botocore``] Update globalaccelerator client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.219.json000066400000000000000000000013761355237733400161460ustar00rootroot00000000000000[ { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.22.json000066400000000000000000000013501355237733400160460ustar00rootroot00000000000000[ { "category": "``athena``", "description": "[``botocore``] Update athena client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.220.json000066400000000000000000000007021355237733400161260ustar00rootroot00000000000000[ { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "``apigatewaymanagementapi``", "description": "[``botocore``] Update apigatewaymanagementapi client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.221.json000066400000000000000000000007201355237733400161270ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``resourcegroupstaggingapi``", "description": "[``botocore``] Update resourcegroupstaggingapi client to latest version", "type": "api-change" }, { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.222.json000066400000000000000000000006761355237733400161420ustar00rootroot00000000000000[ { "category": "``stepfunctions``", "description": "[``botocore``] Update stepfunctions client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.223.json000066400000000000000000000002201355237733400161240ustar00rootroot00000000000000[ { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.224.json000066400000000000000000000002441355237733400161330ustar00rootroot00000000000000[ { "category": "``kinesisanalytics``", "description": "[``botocore``] Update kinesisanalytics client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.225.json000066400000000000000000000020461355237733400161360ustar00rootroot00000000000000[ { "category": "``qldb``", "description": "[``botocore``] Update qldb client to latest version", "type": "api-change" }, { "category": "``marketplacecommerceanalytics``", "description": "[``botocore``] Update marketplacecommerceanalytics client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``qldb-session``", "description": "[``botocore``] Update qldb-session client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.226.json000066400000000000000000000002401355237733400161310ustar00rootroot00000000000000[ { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.227.json000066400000000000000000000015431355237733400161410ustar00rootroot00000000000000[ { "category": "``stepfunctions``", "description": "[``botocore``] Update stepfunctions client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" }, { "category": "``ses``", "description": "[``botocore``] Update ses client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.228.json000066400000000000000000000011251355237733400161360ustar00rootroot00000000000000[ { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``workmailmessageflow``", "description": "[``botocore``] Update workmailmessageflow client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.229.json000066400000000000000000000004451355237733400161430ustar00rootroot00000000000000[ { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.23.json000066400000000000000000000002301355237733400160430ustar00rootroot00000000000000[ { "category": "``cloudtrail``", "description": "[``botocore``] Update cloudtrail client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.230.json000066400000000000000000000006621355237733400161340ustar00rootroot00000000000000[ { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``athena``", "description": "[``botocore``] Update athena client to latest version", "type": "api-change" }, { "category": "``personalize``", "description": "[``botocore``] Update personalize client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.231.json000066400000000000000000000006741355237733400161400ustar00rootroot00000000000000[ { "category": "``ram``", "description": "[``botocore``] Update ram client to latest version", "type": "api-change" }, { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.232.json000066400000000000000000000006601355237733400161340ustar00rootroot00000000000000[ { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.233.json000066400000000000000000000011011355237733400161240ustar00rootroot00000000000000[ { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.234.json000066400000000000000000000004471355237733400161410ustar00rootroot00000000000000[ { "category": "``rds-data``", "description": "[``botocore``] Update rds-data client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.235.json000066400000000000000000000007201355237733400161340ustar00rootroot00000000000000[ { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``comprehendmedical``", "description": "[``botocore``] Update comprehendmedical client to latest version", "type": "api-change" }, { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.236.json000066400000000000000000000007041355237733400161370ustar00rootroot00000000000000[ { "category": "``globalaccelerator``", "description": "[``botocore``] Update globalaccelerator client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.237.json000066400000000000000000000004451355237733400161420ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.238.json000066400000000000000000000004331355237733400161400ustar00rootroot00000000000000[ { "category": "``amplify``", "description": "[``botocore``] Update amplify client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.239.json000066400000000000000000000006321355237733400161420ustar00rootroot00000000000000[ { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.24.json000066400000000000000000000006701355237733400160540ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.240.json000066400000000000000000000002161355237733400161300ustar00rootroot00000000000000[ { "category": "``docdb``", "description": "[``botocore``] Update docdb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.241.json000066400000000000000000000002261355237733400161320ustar00rootroot00000000000000[ { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.242.json000066400000000000000000000011311355237733400161270ustar00rootroot00000000000000[ { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.243.json000066400000000000000000000006761355237733400161450ustar00rootroot00000000000000[ { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.244.json000066400000000000000000000016011355237733400161330ustar00rootroot00000000000000[ { "category": "``snowball``", "description": "[``botocore``] Update snowball client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.245.json000066400000000000000000000011231355237733400161330ustar00rootroot00000000000000[ { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" }, { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.246.json000066400000000000000000000007021355237733400161360ustar00rootroot00000000000000[ { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.247.json000066400000000000000000000011071355237733400161370ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``lex-runtime``", "description": "[``botocore``] Update lex-runtime client to latest version", "type": "api-change" }, { "category": "``fms``", "description": "[``botocore``] Update fms client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.248.json000066400000000000000000000002301355237733400161340ustar00rootroot00000000000000[ { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.249.json000066400000000000000000000004611355237733400161430ustar00rootroot00000000000000[ { "category": "``personalize``", "description": "[``botocore``] Update personalize client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.25.json000066400000000000000000000007021355237733400160510ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" }, { "category": "``resource-groups``", "description": "[``botocore``] Update resource-groups client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.250.json000066400000000000000000000002741355237733400161350ustar00rootroot00000000000000[ { "category": "``kinesis-video-archived-media``", "description": "[``botocore``] Update kinesis-video-archived-media client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.251.json000066400000000000000000000007361355237733400161410ustar00rootroot00000000000000[ { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" }, { "category": "``marketplacecommerceanalytics``", "description": "[``botocore``] Update marketplacecommerceanalytics client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.252.json000066400000000000000000000004271355237733400161370ustar00rootroot00000000000000[ { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.253.json000066400000000000000000000002301355237733400161300ustar00rootroot00000000000000[ { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.26.json000066400000000000000000000004471355237733400160600ustar00rootroot00000000000000[ { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.27.json000066400000000000000000000006741355237733400160630ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.28.json000066400000000000000000000004411355237733400160540ustar00rootroot00000000000000[ { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.29.json000066400000000000000000000004451355237733400160610ustar00rootroot00000000000000[ { "category": "``inspector``", "description": "[``botocore``] Update inspector client to latest version", "type": "api-change" }, { "category": "``shield``", "description": "[``botocore``] Update shield client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.3.json000066400000000000000000000010551355237733400157670ustar00rootroot00000000000000[ { "category": "``ses``", "description": "[``botocore``] Update ses client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``fms``", "description": "[``botocore``] Update fms client to latest version", "type": "api-change" }, { "category": "``connect``", "description": "[``botocore``] Update connect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.30.json000066400000000000000000000002121355237733400160410ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.31.json000066400000000000000000000004671355237733400160560ustar00rootroot00000000000000[ { "category": "``codestar``", "description": "[``botocore``] Update codestar client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.32.json000066400000000000000000000002121355237733400160430ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.33.json000066400000000000000000000007021355237733400160500ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.34.json000066400000000000000000000006401355237733400160520ustar00rootroot00000000000000[ { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.35.json000066400000000000000000000011471355237733400160560ustar00rootroot00000000000000[ { "category": "``mediastore-data``", "description": "[``botocore``] Update mediastore-data client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.36.json000066400000000000000000000005571355237733400160630ustar00rootroot00000000000000[ { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "Exceptions", "description": "[``botocore``] Add the ability to pickle botocore exceptions (`834 `__)", "type": "enhancement" } ]boto3-1.9.253/.changes/1.9.37.json000066400000000000000000000004711355237733400160570ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``clouddirectory``", "description": "[``botocore``] Update clouddirectory client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.38.json000066400000000000000000000010361355237733400160560ustar00rootroot00000000000000[ { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" }, { "category": "Configuration", "description": "[``botocore``] Added new configuration provider methods allowing for more flexibility in how a botocore session loads a particular configuration value.", "type": "enhancement" }, { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.39.json000066400000000000000000000020741355237733400160620ustar00rootroot00000000000000[ { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" }, { "category": "``apigateway``", "description": "[``botocore``] Update apigateway client to latest version", "type": "api-change" }, { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "session config", "description": "[``botocore``] Added the default session configuration tuples back to session.session_vars_map.", "type": "bugfix" } ]boto3-1.9.253/.changes/1.9.4.json000066400000000000000000000005361355237733400157730ustar00rootroot00000000000000[ { "category": "s3", "description": "[``botocore``] Adds encoding and decoding handlers for ListObjectsV2 `#1552 `__", "type": "enhancement" }, { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.40.json000066400000000000000000000006321355237733400160500ustar00rootroot00000000000000[ { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.41.json000066400000000000000000000006561355237733400160570ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.42.json000066400000000000000000000002341355237733400160500ustar00rootroot00000000000000[ { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.43.json000066400000000000000000000020021355237733400160440ustar00rootroot00000000000000[ { "category": "``polly``", "description": "[``botocore``] Update polly client to latest version", "type": "api-change" }, { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" }, { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" }, { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" }, { "category": "``codepipeline``", "description": "[``botocore``] Update codepipeline client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.44.json000066400000000000000000000006621355237733400160570ustar00rootroot00000000000000[ { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" }, { "category": "``budgets``", "description": "[``botocore``] Update budgets client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.45.json000066400000000000000000000020321355237733400160510ustar00rootroot00000000000000[ { "category": "``resource-groups``", "description": "[``botocore``] Update resource-groups client to latest version", "type": "api-change" }, { "category": "``autoscaling``", "description": "[``botocore``] Update autoscaling client to latest version", "type": "api-change" }, { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" }, { "category": "``sns``", "description": "[``botocore``] Update sns client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.46.json000066400000000000000000000042061355237733400160570ustar00rootroot00000000000000[ { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``sms-voice``", "description": "[``botocore``] Update sms-voice client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``s3control``", "description": "[``botocore``] Update s3control client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``ram``", "description": "[``botocore``] Update ram client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``route53resolver``", "description": "[``botocore``] Update route53resolver client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.47.json000066400000000000000000000013101355237733400160510ustar00rootroot00000000000000[ { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.48.json000066400000000000000000000035561355237733400160700ustar00rootroot00000000000000[ { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``workdocs``", "description": "[``botocore``] Update workdocs client to latest version", "type": "api-change" }, { "category": "``batch``", "description": "[``botocore``] Update batch client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``config``", "description": "[``botocore``] Update config client to latest version", "type": "api-change" }, { "category": "``cloudtrail``", "description": "[``botocore``] Update cloudtrail client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.49.json000066400000000000000000000031421355237733400160600ustar00rootroot00000000000000[ { "category": "``autoscaling-plans``", "description": "[``botocore``] Update autoscaling-plans client to latest version", "type": "api-change" }, { "category": "``xray``", "description": "[``botocore``] Update xray client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``rds-data``", "description": "[``botocore``] Update rds-data client to latest version", "type": "api-change" }, { "category": "``appsync``", "description": "[``botocore``] Update appsync client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``quicksight``", "description": "[``botocore``] Update quicksight client to latest version", "type": "api-change" }, { "category": "``cloudfront``", "description": "[``botocore``] Update cloudfront client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.5.json000066400000000000000000000020341355237733400157670ustar00rootroot00000000000000[ { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``elastictranscoder``", "description": "[``botocore``] Update elastictranscoder client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" }, { "category": "``elasticache``", "description": "[``botocore``] Update elasticache client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.50.json000066400000000000000000000002321355237733400160450ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.51.json000066400000000000000000000015471355237733400160600ustar00rootroot00000000000000[ { "category": "``amplify``", "description": "[``botocore``] Update amplify client to latest version", "type": "api-change" }, { "category": "``transfer``", "description": "[``botocore``] Update transfer client to latest version", "type": "api-change" }, { "category": "``snowball``", "description": "[``botocore``] Update snowball client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``datasync``", "description": "[``botocore``] Update datasync client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.52.json000066400000000000000000000022031355237733400160470ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``sms``", "description": "[``botocore``] Update sms client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" }, { "category": "``greengrass``", "description": "[``botocore``] Update greengrass client to latest version", "type": "api-change" }, { "category": "``kms``", "description": "[``botocore``] Update kms client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``globalaccelerator``", "description": "[``botocore``] Update globalaccelerator client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.53.json000066400000000000000000000027751355237733400160660ustar00rootroot00000000000000[ { "category": "``meteringmarketplace``", "description": "[``botocore``] Update meteringmarketplace client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" }, { "category": "``translate``", "description": "[``botocore``] Update translate client to latest version", "type": "api-change" }, { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``kinesisanalytics``", "description": "[``botocore``] Update kinesisanalytics client to latest version", "type": "api-change" }, { "category": "``comprehendmedical``", "description": "[``botocore``] Update comprehendmedical client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" }, { "category": "``kinesisanalyticsv2``", "description": "[``botocore``] Update kinesisanalyticsv2 client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.54.json000066400000000000000000000010771355237733400160610ustar00rootroot00000000000000[ { "category": "``securityhub``", "description": "[``botocore``] Update securityhub client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``fsx``", "description": "[``botocore``] Update fsx client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.55.json000066400000000000000000000016111355237733400160540ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" }, { "category": "``license-manager``", "description": "[``botocore``] Update license-manager client to latest version", "type": "api-change" }, { "category": "``servicediscovery``", "description": "[``botocore``] Update servicediscovery client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.56.json000066400000000000000000000022071355237733400160570ustar00rootroot00000000000000[ { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``stepfunctions``", "description": "[``botocore``] Update stepfunctions client to latest version", "type": "api-change" }, { "category": "``xray``", "description": "[``botocore``] Update xray client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``events``", "description": "[``botocore``] Update events client to latest version", "type": "api-change" }, { "category": "``serverlessrepo``", "description": "[``botocore``] Update serverlessrepo client to latest version", "type": "api-change" }, { "category": "``kafka``", "description": "[``botocore``] Update kafka client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.57.json000066400000000000000000000004371355237733400160630ustar00rootroot00000000000000[ { "category": "s3", "description": "[``botocore``] Add md5 header injection to new operations that require it", "type": "bugfix" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.58.json000066400000000000000000000011611355237733400160570ustar00rootroot00000000000000[ { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.59.json000066400000000000000000000004271355237733400160640ustar00rootroot00000000000000[ { "category": "``health``", "description": "[``botocore``] Update health client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.6.json000066400000000000000000000010361355237733400157710ustar00rootroot00000000000000[ { "category": "Serialization", "description": "[``botocore``] Fixes `#1557 `__. Fixed a regression in serialization where request bodies would be improperly encoded.", "type": "bugfix" }, { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.60.json000066400000000000000000000006501355237733400160520ustar00rootroot00000000000000[ { "category": "``mq``", "description": "[``botocore``] Update mq client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.61.json000066400000000000000000000011011355237733400160430ustar00rootroot00000000000000[ { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.62.json000066400000000000000000000015031355237733400160520ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "AssumeRole", "description": "[``botocore``] Add support for duration_seconds when assuming a role in the config file (`#1600 `__).", "type": "enhancement" }, { "category": "``iam``", "description": "[``botocore``] Update iam client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.63.json000066400000000000000000000006621355237733400160600ustar00rootroot00000000000000[ { "category": "``mediastore``", "description": "[``botocore``] Update mediastore client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``connect``", "description": "[``botocore``] Update connect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.64.json000066400000000000000000000010731355237733400160560ustar00rootroot00000000000000[ { "category": "``route53``", "description": "[``botocore``] Update route53 client to latest version", "type": "api-change" }, { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``eks``", "description": "[``botocore``] Update eks client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.65.json000066400000000000000000000004751355237733400160640ustar00rootroot00000000000000[ { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" }, { "category": "``pinpoint-email``", "description": "[``botocore``] Update pinpoint-email client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.66.json000066400000000000000000000007261355237733400160640ustar00rootroot00000000000000[ { "category": "``alexaforbusiness``", "description": "[``botocore``] Update alexaforbusiness client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" }, { "category": "``cloudformation``", "description": "[``botocore``] Update cloudformation client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.67.json000066400000000000000000000004411355237733400160570ustar00rootroot00000000000000[ { "category": "``quicksight``", "description": "[``botocore``] Update quicksight client to latest version", "type": "api-change" }, { "category": "``ecr``", "description": "[``botocore``] Update ecr client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.68.json000066400000000000000000000023211355237733400160570ustar00rootroot00000000000000[ { "category": "``apigatewayv2``", "description": "[``botocore``] Update apigatewayv2 client to latest version", "type": "api-change" }, { "category": "Credentials", "description": "[``botocore``] Fixes an issue where credentials would be checked when creating an anonymous client. Fixes `#1472 `__", "type": "bugfix" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``elasticbeanstalk``", "description": "[``botocore``] Update elasticbeanstalk client to latest version", "type": "api-change" }, { "category": "``globalaccelerator``", "description": "[``botocore``] Update globalaccelerator client to latest version", "type": "api-change" }, { "category": "StreamingBody", "description": "[``botocore``] Support iterating lines from a streaming response body with CRLF line endings", "type": "enhancement" }, { "category": "``apigatewaymanagementapi``", "description": "[``botocore``] Update apigatewaymanagementapi client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.69.json000066400000000000000000000011031355237733400160550ustar00rootroot00000000000000[ { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" }, { "category": "``waf-regional``", "description": "[``botocore``] Update waf-regional client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``waf``", "description": "[``botocore``] Update waf client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.7.json000066400000000000000000000006741355237733400160010ustar00rootroot00000000000000[ { "category": "``cloudwatch``", "description": "[``botocore``] Update cloudwatch client to latest version", "type": "api-change" }, { "category": "``s3``", "description": "[``botocore``] Update s3 client to latest version", "type": "api-change" }, { "category": "``organizations``", "description": "[``botocore``] Update organizations client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.70.json000066400000000000000000000016751355237733400160630ustar00rootroot00000000000000[ { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "EndpointDiscovery", "description": "[``botocore``] Add a config option, ``endpoint_discovery_enabled``, for automatically discovering endpoints", "type": "enhancement" }, { "category": "``comprehend``", "description": "[``botocore``] Update comprehend client to latest version", "type": "api-change" }, { "category": "``firehose``", "description": "[``botocore``] Update firehose client to latest version", "type": "api-change" }, { "category": "``transcribe``", "description": "[``botocore``] Update transcribe client to latest version", "type": "api-change" }, { "category": "``cognito-idp``", "description": "[``botocore``] Update cognito-idp client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.71.json000066400000000000000000000011271355237733400160540ustar00rootroot00000000000000[ { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" }, { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``sms-voice``", "description": "[``botocore``] Update sms-voice client to latest version", "type": "api-change" }, { "category": "``stepfunctions``", "description": "[``botocore``] Update stepfunctions client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.72.json000066400000000000000000000004371355237733400160600ustar00rootroot00000000000000[ { "category": "Paginator", "description": "[``botocore``] Added over 400 new paginators.", "type": "enhancement" }, { "category": "``opsworkscm``", "description": "[``botocore``] Update opsworkscm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.73.json000066400000000000000000000002341355237733400160540ustar00rootroot00000000000000[ { "category": "``iotanalytics``", "description": "[``botocore``] Update iotanalytics client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.74.json000066400000000000000000000004411355237733400160550ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.75.json000066400000000000000000000002221355237733400160530ustar00rootroot00000000000000[ { "category": "``appmesh``", "description": "[``botocore``] Update appmesh client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.76.json000066400000000000000000000004411355237733400160570ustar00rootroot00000000000000[ { "category": "``docdb``", "description": "[``botocore``] Update docdb client to latest version", "type": "api-change" }, { "category": "``redshift``", "description": "[``botocore``] Update redshift client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.77.json000066400000000000000000000010771355237733400160660ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``codedeploy``", "description": "[``botocore``] Update codedeploy client to latest version", "type": "api-change" }, { "category": "``sagemaker``", "description": "[``botocore``] Update sagemaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.78.json000066400000000000000000000004351355237733400160640ustar00rootroot00000000000000[ { "category": "``rds-data``", "description": "[``botocore``] Update rds-data client to latest version", "type": "api-change" }, { "category": "``emr``", "description": "[``botocore``] Update emr client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.79.json000066400000000000000000000004731355237733400160670ustar00rootroot00000000000000[ { "category": "``storagegateway``", "description": "[``botocore``] Update storagegateway client to latest version", "type": "api-change" }, { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.8.json000066400000000000000000000006321355237733400157740ustar00rootroot00000000000000[ { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.80.json000066400000000000000000000006521355237733400160560ustar00rootroot00000000000000[ { "category": "``dynamodb``", "description": "[``botocore``] Update dynamodb client to latest version", "type": "api-change" }, { "category": "``ce``", "description": "[``botocore``] Update ce client to latest version", "type": "api-change" }, { "category": "``backup``", "description": "[``botocore``] Update backup client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.81.json000066400000000000000000000011211355237733400160470ustar00rootroot00000000000000[ { "category": "``lightsail``", "description": "[``botocore``] Update lightsail client to latest version", "type": "api-change" }, { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" }, { "category": "``pinpoint``", "description": "[``botocore``] Update pinpoint client to latest version", "type": "api-change" }, { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.82.json000066400000000000000000000004251355237733400160560ustar00rootroot00000000000000[ { "category": "``glue``", "description": "[``botocore``] Update glue client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.83.json000066400000000000000000000013061355237733400160560ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``dms``", "description": "[``botocore``] Update dms client to latest version", "type": "api-change" }, { "category": "``fms``", "description": "[``botocore``] Update fms client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.84.json000066400000000000000000000007261355237733400160640ustar00rootroot00000000000000[ { "category": "``worklink``", "description": "[``botocore``] Update worklink client to latest version", "type": "api-change" }, { "category": "``apigatewaymanagementapi``", "description": "[``botocore``] Update apigatewaymanagementapi client to latest version", "type": "api-change" }, { "category": "``acm-pca``", "description": "[``botocore``] Update acm-pca client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.85.json000066400000000000000000000015251355237733400160630ustar00rootroot00000000000000[ { "category": "``logs``", "description": "[``botocore``] Update logs client to latest version", "type": "api-change" }, { "category": "``elbv2``", "description": "[``botocore``] Update elbv2 client to latest version", "type": "api-change" }, { "category": "``rds``", "description": "[``botocore``] Update rds client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``sms-voice``", "description": "[``botocore``] Update sms-voice client to latest version", "type": "api-change" }, { "category": "``ecr``", "description": "[``botocore``] Update ecr client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.86.json000066400000000000000000000011371355237733400160630ustar00rootroot00000000000000[ { "category": "``devicefarm``", "description": "[``botocore``] Update devicefarm client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``mediaconnect``", "description": "[``botocore``] Update mediaconnect client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.87.json000066400000000000000000000011511355237733400160600ustar00rootroot00000000000000[ { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``workspaces``", "description": "[``botocore``] Update workspaces client to latest version", "type": "api-change" }, { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.88.json000066400000000000000000000006701355237733400160660ustar00rootroot00000000000000[ { "category": "``shield``", "description": "[``botocore``] Update shield client to latest version", "type": "api-change" }, { "category": "``servicecatalog``", "description": "[``botocore``] Update servicecatalog client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.89.json000066400000000000000000000004231355237733400160630ustar00rootroot00000000000000[ { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" }, { "category": "``fsx``", "description": "[``botocore``] Update fsx client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.9.json000066400000000000000000000002341355237733400157730ustar00rootroot00000000000000[ { "category": "``mediaconvert``", "description": "[``botocore``] Update mediaconvert client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.90.json000066400000000000000000000011051355237733400160510ustar00rootroot00000000000000[ { "category": "``es``", "description": "[``botocore``] Update es client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" }, { "category": "``gamelift``", "description": "[``botocore``] Update gamelift client to latest version", "type": "api-change" }, { "category": "``robomaker``", "description": "[``botocore``] Update robomaker client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.91.json000066400000000000000000000006501355237733400160560ustar00rootroot00000000000000[ { "category": "``discovery``", "description": "[``botocore``] Update discovery client to latest version", "type": "api-change" }, { "category": "``ecs``", "description": "[``botocore``] Update ecs client to latest version", "type": "api-change" }, { "category": "``dlm``", "description": "[``botocore``] Update dlm client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.92.json000066400000000000000000000007061355237733400160610ustar00rootroot00000000000000[ { "category": "``appstream``", "description": "[``botocore``] Update appstream client to latest version", "type": "api-change" }, { "category": "``codebuild``", "description": "[``botocore``] Update codebuild client to latest version", "type": "api-change" }, { "category": "``mediapackage``", "description": "[``botocore``] Update mediapackage client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.93.json000066400000000000000000000002201355237733400160510ustar00rootroot00000000000000[ { "category": "``lambda``", "description": "[``botocore``] Update lambda client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.94.json000066400000000000000000000006741355237733400160670ustar00rootroot00000000000000[ { "category": "``rekognition``", "description": "[``botocore``] Update rekognition client to latest version", "type": "api-change" }, { "category": "``mediatailor``", "description": "[``botocore``] Update mediatailor client to latest version", "type": "api-change" }, { "category": "``efs``", "description": "[``botocore``] Update efs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.95.json000066400000000000000000000004451355237733400160640ustar00rootroot00000000000000[ { "category": "``kinesisvideo``", "description": "[``botocore``] Update kinesisvideo client to latest version", "type": "api-change" }, { "category": "``ec2``", "description": "[``botocore``] Update ec2 client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.96.json000066400000000000000000000007101355237733400160600ustar00rootroot00000000000000[ { "category": "``chime``", "description": "[``botocore``] Update chime client to latest version", "type": "api-change" }, { "category": "``application-autoscaling``", "description": "[``botocore``] Update application-autoscaling client to latest version", "type": "api-change" }, { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.97.json000066400000000000000000000004571355237733400160710ustar00rootroot00000000000000[ { "category": "``athena``", "description": "[``botocore``] Update athena client to latest version", "type": "api-change" }, { "category": "``secretsmanager``", "description": "[``botocore``] Update secretsmanager client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.98.json000066400000000000000000000012701355237733400160640ustar00rootroot00000000000000[ { "category": "``iot``", "description": "[``botocore``] Update iot client to latest version", "type": "api-change" }, { "category": "``ssm``", "description": "[``botocore``] Update ssm client to latest version", "type": "api-change" }, { "category": "``ds``", "description": "[``botocore``] Update ds client to latest version", "type": "api-change" }, { "category": "Paginator", "description": "[``botocore``] Add additional paginators for CloudFormation", "type": "enhancement" }, { "category": "``efs``", "description": "[``botocore``] Update efs client to latest version", "type": "api-change" } ]boto3-1.9.253/.changes/1.9.99.json000066400000000000000000000007121355237733400160650ustar00rootroot00000000000000[ { "category": "``codecommit``", "description": "[``botocore``] Update codecommit client to latest version", "type": "api-change" }, { "category": "``directconnect``", "description": "[``botocore``] Update directconnect client to latest version", "type": "api-change" }, { "category": "``medialive``", "description": "[``botocore``] Update medialive client to latest version", "type": "api-change" } ]boto3-1.9.253/.coveragerc000066400000000000000000000000521355237733400150530ustar00rootroot00000000000000[run] branch = True include = boto3/* boto3-1.9.253/.github/000077500000000000000000000000001355237733400142755ustar00rootroot00000000000000boto3-1.9.253/.github/no-response.yml000066400000000000000000000013031355237733400172650ustar00rootroot00000000000000# Configuration for probot-no-response - https://github.com/probot/no-response # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 7 # Label requiring a response responseRequiredLabel: closing-soon-if-no-response # Comment to post when closing an Issue for lack of response. Set to `false` to disable closeComment: > This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.boto3-1.9.253/.gitignore000066400000000000000000000004741355237733400147320ustar00rootroot00000000000000.DS_Store *.pyc __pycache__ dist build docs/build docs/source/reference/services tests/cover tests/.coverage *.egg-info # Test state / virtualenvs .tox .coverage coverage.xml nosetests.xml # Common virtualenv names venv env2 env3 # IntelliJ / PyCharm IDE .idea/ # Visual Studio used to edit docs docs/source/.vs boto3-1.9.253/.travis.yml000066400000000000000000000012621355237733400150470ustar00rootroot00000000000000language: python matrix: include: - python: 2.6 dist: trusty sudo: false - python: 2.7 dist: trusty sudo: false - python: 3.3 dist: trusty sudo: false - python: 3.4 dist: trusty sudo: false - python: 3.5 dist: trusty sudo: false - python: 3.6 dist: trusty sudo: false - python: 3.7 dist: xenial sudo: true before_install: - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then echo "No pull requests can be sent to the master branch" 1>&2; exit 1; fi install: - python scripts/ci/install script: python scripts/ci/run-tests boto3-1.9.253/CHANGELOG.rst000066400000000000000000004064201355237733400147640ustar00rootroot00000000000000========= CHANGELOG ========= 1.9.253 ======= * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version 1.9.252 ======= * api-change:``batch``: [``botocore``] Update batch client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.251 ======= * api-change:``kafka``: [``botocore``] Update kafka client to latest version * api-change:``marketplacecommerceanalytics``: [``botocore``] Update marketplacecommerceanalytics client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version 1.9.250 ======= * api-change:``kinesis-video-archived-media``: [``botocore``] Update kinesis-video-archived-media client to latest version 1.9.249 ======= * api-change:``personalize``: [``botocore``] Update personalize client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version 1.9.248 ======= * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version 1.9.247 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``lex-runtime``: [``botocore``] Update lex-runtime client to latest version * api-change:``fms``: [``botocore``] Update fms client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version 1.9.246 ======= * api-change:``kafka``: [``botocore``] Update kafka client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.245 ======= * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``firehose``: [``botocore``] Update firehose client to latest version * api-change:``datasync``: [``botocore``] Update datasync client to latest version 1.9.244 ======= * api-change:``snowball``: [``botocore``] Update snowball client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``firehose``: [``botocore``] Update firehose client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version 1.9.243 ======= * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.242 ======= * api-change:``es``: [``botocore``] Update es client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version 1.9.241 ======= * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version 1.9.240 ======= * api-change:``docdb``: [``botocore``] Update docdb client to latest version 1.9.239 ======= * api-change:``waf``: [``botocore``] Update waf client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``mq``: [``botocore``] Update mq client to latest version 1.9.238 ======= * api-change:``amplify``: [``botocore``] Update amplify client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.237 ======= * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version 1.9.236 ======= * api-change:``globalaccelerator``: [``botocore``] Update globalaccelerator client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.9.235 ======= * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``comprehendmedical``: [``botocore``] Update comprehendmedical client to latest version * api-change:``datasync``: [``botocore``] Update datasync client to latest version 1.9.234 ======= * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version 1.9.233 ======= * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.232 ======= * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.231 ======= * api-change:``ram``: [``botocore``] Update ram client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version 1.9.230 ======= * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``personalize``: [``botocore``] Update personalize client to latest version 1.9.229 ======= * api-change:``eks``: [``botocore``] Update eks client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.228 ======= * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``workmailmessageflow``: [``botocore``] Update workmailmessageflow client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.9.227 ======= * api-change:``stepfunctions``: [``botocore``] Update stepfunctions client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``ses``: [``botocore``] Update ses client to latest version * api-change:``config``: [``botocore``] Update config client to latest version 1.9.226 ======= * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version 1.9.225 ======= * api-change:``qldb``: [``botocore``] Update qldb client to latest version * api-change:``marketplacecommerceanalytics``: [``botocore``] Update marketplacecommerceanalytics client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``qldb-session``: [``botocore``] Update qldb-session client to latest version 1.9.224 ======= * api-change:``kinesisanalytics``: [``botocore``] Update kinesisanalytics client to latest version 1.9.223 ======= * api-change:``config``: [``botocore``] Update config client to latest version 1.9.222 ======= * api-change:``stepfunctions``: [``botocore``] Update stepfunctions client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.9.221 ======= * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``resourcegroupstaggingapi``: [``botocore``] Update resourcegroupstaggingapi client to latest version * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version 1.9.220 ======= * api-change:``mq``: [``botocore``] Update mq client to latest version * api-change:``apigatewaymanagementapi``: [``botocore``] Update apigatewaymanagementapi client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.219 ======= * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.218 ======= * api-change:``sqs``: [``botocore``] Update sqs client to latest version * api-change:``globalaccelerator``: [``botocore``] Update globalaccelerator client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.217 ======= * api-change:``organizations``: [``botocore``] Update organizations client to latest version 1.9.216 ======= * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``securityhub``: [``botocore``] Update securityhub client to latest version 1.9.215 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``mediapackage-vod``: [``botocore``] Update mediapackage-vod client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version 1.9.214 ======= * api-change:``datasync``: [``botocore``] Update datasync client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.213 ======= * api-change:``forecast``: [``botocore``] Update forecast client to latest version * api-change:``forecastquery``: [``botocore``] Update forecastquery client to latest version * api-change:``personalize-runtime``: [``botocore``] Update personalize-runtime client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``sqs``: [``botocore``] Update sqs client to latest version 1.9.212 ======= * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``transfer``: [``botocore``] Update transfer client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.9.211 ======= * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``cur``: [``botocore``] Update cur client to latest version 1.9.210 ======= * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``emr``: [``botocore``] Update emr client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.209 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version 1.9.208 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.207 ======= * api-change:``appsync``: [``botocore``] Update appsync client to latest version 1.9.206 ======= * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.9.205 ======= * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version * api-change:``lex-runtime``: [``botocore``] Update lex-runtime client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.204 ======= * api-change:``lakeformation``: [``botocore``] Update lakeformation client to latest version * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version 1.9.203 ======= * api-change:``application-insights``: [``botocore``] Update application-insights client to latest version 1.9.202 ======= * api-change:``batch``: [``botocore``] Update batch client to latest version 1.9.201 ======= * api-change:``datasync``: [``botocore``] Update datasync client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.200 ======= * api-change:``sts``: [``botocore``] Update sts client to latest version * enhancement:Credentials: [``botocore``] Add support for a credential provider that handles resolving credentials via STS AssumeRoleWithWebIdentity 1.9.199 ======= * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``route53``: [``botocore``] Update route53 client to latest version 1.9.198 ======= * bugfix:S3: [``botocore``] Fix an issue that would cause S3 list_object_versions to sometimes fail parsing responses with certain key values. * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version 1.9.197 ======= * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``batch``: [``botocore``] Update batch client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.196 ======= * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``ecr``: [``botocore``] Update ecr client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.195 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``sts``: [``botocore``] Update sts client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version 1.9.194 ======= * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version 1.9.193 ======= * api-change:``mq``: [``botocore``] Update mq client to latest version * api-change:``shield``: [``botocore``] Update shield client to latest version 1.9.192 ======= * bugfix:Dependency: [``botocore``] Fixed dependency issue with broken docutils aws/aws-cli`#4332 `__ 1.9.191 ======= * api-change:``sqs``: [``botocore``] Update sqs client to latest version * api-change:``iotevents``: [``botocore``] Update iotevents client to latest version 1.9.190 ======= * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.189 ======= * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version 1.9.188 ======= * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``apigatewayv2``: [``botocore``] Update apigatewayv2 client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``es``: [``botocore``] Update es client to latest version 1.9.187 ======= * api-change:``events``: [``botocore``] Update events client to latest version 1.9.186 ======= * api-change:``quicksight``: [``botocore``] Update quicksight client to latest version * api-change:``glacier``: [``botocore``] Update glacier client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version 1.9.185 ======= * api-change:``efs``: [``botocore``] Update efs client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``amplify``: [``botocore``] Update amplify client to latest version * api-change:``kinesis-video-archived-media``: [``botocore``] Update kinesis-video-archived-media client to latest version * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version * api-change:``kinesisvideo``: [``botocore``] Update kinesisvideo client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version 1.9.184 ======= * api-change:``ce``: [``botocore``] Update ce client to latest version 1.9.183 ======= * api-change:``swf``: [``botocore``] Update swf client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.182 ======= * enhancement:CSM: [``botocore``] Support configuration of the host used in client side metrics via AWS_CSM_HOST * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``mediastore``: [``botocore``] Update mediastore client to latest version 1.9.181 ======= * api-change:``docdb``: [``botocore``] Update docdb client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.180 ======= * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version 1.9.179 ======= * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``ec2-instance-connect``: [``botocore``] Update ec2-instance-connect client to latest version 1.9.178 ======= * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.9.177 ======= * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``apigatewayv2``: [``botocore``] Update apigatewayv2 client to latest version 1.9.176 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.9.175 ======= * api-change:``application-insights``: [``botocore``] Update application-insights client to latest version * api-change:``securityhub``: [``botocore``] Update securityhub client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``fsx``: [``botocore``] Update fsx client to latest version * api-change:``service-quotas``: [``botocore``] Update service-quotas client to latest version * api-change:``resourcegroupstaggingapi``: [``botocore``] Update resourcegroupstaggingapi client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``apigatewayv2``: [``botocore``] Update apigatewayv2 client to latest version 1.9.174 ======= * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version * api-change:``kinesis-video-media``: [``botocore``] Update kinesis-video-media client to latest version 1.9.173 ======= * api-change:``health``: [``botocore``] Update health client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``iotevents-data``: [``botocore``] Update iotevents-data client to latest version * api-change:``opsworks``: [``botocore``] Update opsworks client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version 1.9.172 ======= * api-change:``eks``: [``botocore``] Update eks client to latest version 1.9.171 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``resourcegroupstaggingapi``: [``botocore``] Update resourcegroupstaggingapi client to latest version 1.9.170 ======= * api-change:``neptune``: [``botocore``] Update neptune client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * bugfix:Paginator: [``botocore``] Fixes a bug where pagination tokens with three consecutive underscores would result in a parsing failure. Resolves boto/boto3`#1984 `__. 1.9.169 ======= * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version * api-change:``personalize``: [``botocore``] Update personalize client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.9.168 ======= * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version 1.9.167 ======= * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version 1.9.166 ======= * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.9.165 ======= * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``personalize-runtime``: [``botocore``] Update personalize-runtime client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``personalize-events``: [``botocore``] Update personalize-events client to latest version * api-change:``personalize``: [``botocore``] Update personalize client to latest version 1.9.164 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.163 ======= * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ses``: [``botocore``] Update ses client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version 1.9.162 ======= * api-change:``glue``: [``botocore``] Update glue client to latest version 1.9.161 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version 1.9.160 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.159 ======= * api-change:``iotevents-data``: [``botocore``] Update iotevents-data client to latest version * api-change:``iotevents``: [``botocore``] Update iotevents client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``kafka``: [``botocore``] Update kafka client to latest version 1.9.158 ======= * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``securityhub``: [``botocore``] Update securityhub client to latest version * api-change:``iotthingsgraph``: [``botocore``] Update iotthingsgraph client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.157 ======= * api-change:``groundstation``: [``botocore``] Update groundstation client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``chime``: [``botocore``] Update chime client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``sts``: [``botocore``] Update sts client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version 1.9.156 ======= * api-change:``mediastore-data``: [``botocore``] Update mediastore-data client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version 1.9.155 ======= * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.154 ======= * api-change:``efs``: [``botocore``] Update efs client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``worklink``: [``botocore``] Update worklink client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version 1.9.153 ======= * api-change:``datasync``: [``botocore``] Update datasync client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.9.152 ======= * api-change:``kafka``: [``botocore``] Update kafka client to latest version * api-change:``meteringmarketplace``: [``botocore``] Update meteringmarketplace client to latest version * api-change:``mediapackage-vod``: [``botocore``] Update mediapackage-vod client to latest version 1.9.151 ======= * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.9.150 ======= * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version 1.9.149 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * enhancement:Environment Variables: [``botocore``] Ignore env var credentials is values are empty (`#1680 `__) * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.148 ======= * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``chime``: [``botocore``] Update chime client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.147 ======= * api-change:``datasync``: [``botocore``] Update datasync client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version 1.9.146 ======= * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``sts``: [``botocore``] Update sts client to latest version 1.9.145 ======= * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``kinesisanalytics``: [``botocore``] Update kinesisanalytics client to latest version * api-change:``kinesisanalyticsv2``: [``botocore``] Update kinesisanalyticsv2 client to latest version 1.9.144 ======= * api-change:``appsync``: [``botocore``] Update appsync client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.9.143 ======= * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``sts``: [``botocore``] Update sts client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version 1.9.142 ======= * api-change:``workmail``: [``botocore``] Update workmail client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.141 ======= * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``kms``: [``botocore``] Update kms client to latest version 1.9.140 ======= * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``xray``: [``botocore``] Update xray client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.139 ======= * api-change:``neptune``: [``botocore``] Update neptune client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``managedblockchain``: [``botocore``] Update managedblockchain client to latest version * api-change:``s3control``: [``botocore``] Update s3control client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version 1.9.138 ======= * api-change:``transfer``: [``botocore``] Update transfer client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.137 ======= * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``sns``: [``botocore``] Update sns client to latest version 1.9.136 ======= * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``inspector``: [``botocore``] Update inspector client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``batch``: [``botocore``] Update batch client to latest version 1.9.135 ======= * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``route53``: [``botocore``] Update route53 client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``textract``: [``botocore``] Update textract client to latest version 1.9.134 ======= * api-change:``resource-groups``: [``botocore``] Update resource-groups client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version 1.9.133 ======= * api-change:``kafka``: [``botocore``] Update kafka client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``worklink``: [``botocore``] Update worklink client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version 1.9.132 ======= * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.131 ======= * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``mq``: [``botocore``] Update mq client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version 1.9.130 ======= * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``iot1click-devices``: [``botocore``] Update iot1click-devices client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.9.129 ======= * api-change:``eks``: [``botocore``] Update eks client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version 1.9.128 ======= * api-change:``batch``: [``botocore``] Update batch client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version 1.9.127 ======= * api-change:``securityhub``: [``botocore``] Update securityhub client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version 1.9.126 ======= * api-change:``emr``: [``botocore``] Update emr client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.125 ======= * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version 1.9.124 ======= * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version 1.9.123 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``transfer``: [``botocore``] Update transfer client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version 1.9.122 ======= * api-change:``workmail``: [``botocore``] Update workmail client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version 1.9.121 ======= * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``fms``: [``botocore``] Update fms client to latest version * api-change:``iot1click-devices``: [``botocore``] Update iot1click-devices client to latest version 1.9.120 ======= * api-change:``iot1click-projects``: [``botocore``] Update iot1click-projects client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version 1.9.119 ======= * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version 1.9.118 ======= * api-change:``cognito-identity``: [``botocore``] Update cognito-identity client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``meteringmarketplace``: [``botocore``] Update meteringmarketplace client to latest version 1.9.117 ======= * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.9.116 ======= * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``chime``: [``botocore``] Update chime client to latest version 1.9.115 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.9.114 ======= * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``logs``: [``botocore``] Update logs client to latest version 1.9.113 ======= * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version 1.9.112 ======= * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``quicksight``: [``botocore``] Update quicksight client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.9.111 ======= * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.9.110 ======= * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.109 ======= * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.108 ======= * api-change:``textract``: [``botocore``] Update textract client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version 1.9.107 ======= * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.106 ======= * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version 1.9.105 ======= * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``apigatewayv2``: [``botocore``] Update apigatewayv2 client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version 1.9.104 ======= * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version 1.9.103 ======= * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``resource-groups``: [``botocore``] Update resource-groups client to latest version * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``cur``: [``botocore``] Update cur client to latest version 1.9.102 ======= * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``mediastore``: [``botocore``] Update mediastore client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version 1.9.101 ======= * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``stepfunctions``: [``botocore``] Update stepfunctions client to latest version * api-change:``cloud9``: [``botocore``] Update cloud9 client to latest version 1.9.100 ======= * api-change:``kinesis-video-archived-media``: [``botocore``] Update kinesis-video-archived-media client to latest version * api-change:``workdocs``: [``botocore``] Update workdocs client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``kinesisvideo``: [``botocore``] Update kinesisvideo client to latest version * api-change:``kinesis-video-media``: [``botocore``] Update kinesis-video-media client to latest version * api-change:``transfer``: [``botocore``] Update transfer client to latest version 1.9.99 ====== * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.9.98 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ds``: [``botocore``] Update ds client to latest version * enhancement:Paginator: [``botocore``] Add additional paginators for CloudFormation * api-change:``efs``: [``botocore``] Update efs client to latest version 1.9.97 ====== * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version 1.9.96 ====== * api-change:``chime``: [``botocore``] Update chime client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version 1.9.95 ====== * api-change:``kinesisvideo``: [``botocore``] Update kinesisvideo client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.94 ====== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version * api-change:``efs``: [``botocore``] Update efs client to latest version 1.9.93 ====== * api-change:``lambda``: [``botocore``] Update lambda client to latest version 1.9.92 ====== * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version 1.9.91 ====== * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version 1.9.90 ====== * api-change:``es``: [``botocore``] Update es client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version 1.9.89 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``fsx``: [``botocore``] Update fsx client to latest version 1.9.88 ====== * api-change:``shield``: [``botocore``] Update shield client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.87 ====== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version 1.9.86 ====== * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version 1.9.85 ====== * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``sms-voice``: [``botocore``] Update sms-voice client to latest version * api-change:``ecr``: [``botocore``] Update ecr client to latest version 1.9.84 ====== * api-change:``worklink``: [``botocore``] Update worklink client to latest version * api-change:``apigatewaymanagementapi``: [``botocore``] Update apigatewaymanagementapi client to latest version * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version 1.9.83 ====== * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``fms``: [``botocore``] Update fms client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.82 ====== * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.81 ====== * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.9.80 ====== * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``backup``: [``botocore``] Update backup client to latest version 1.9.79 ====== * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.78 ====== * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``emr``: [``botocore``] Update emr client to latest version 1.9.77 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.9.76 ====== * api-change:``docdb``: [``botocore``] Update docdb client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version 1.9.75 ====== * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version 1.9.74 ====== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version 1.9.73 ====== * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version 1.9.72 ====== * enhancement:Paginator: [``botocore``] Added over 400 new paginators. * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version 1.9.71 ====== * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``sms-voice``: [``botocore``] Update sms-voice client to latest version * api-change:``stepfunctions``: [``botocore``] Update stepfunctions client to latest version 1.9.70 ====== * api-change:``medialive``: [``botocore``] Update medialive client to latest version * enhancement:EndpointDiscovery: [``botocore``] Add a config option, ``endpoint_discovery_enabled``, for automatically discovering endpoints * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``firehose``: [``botocore``] Update firehose client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version 1.9.69 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version 1.9.68 ====== * api-change:``apigatewayv2``: [``botocore``] Update apigatewayv2 client to latest version * bugfix:Credentials: [``botocore``] Fixes an issue where credentials would be checked when creating an anonymous client. Fixes `#1472 `__ * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version * api-change:``globalaccelerator``: [``botocore``] Update globalaccelerator client to latest version * enhancement:StreamingBody: [``botocore``] Support iterating lines from a streaming response body with CRLF line endings * api-change:``apigatewaymanagementapi``: [``botocore``] Update apigatewaymanagementapi client to latest version 1.9.67 ====== * api-change:``quicksight``: [``botocore``] Update quicksight client to latest version * api-change:``ecr``: [``botocore``] Update ecr client to latest version 1.9.66 ====== * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version 1.9.65 ====== * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version 1.9.64 ====== * api-change:``route53``: [``botocore``] Update route53 client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.9.63 ====== * api-change:``mediastore``: [``botocore``] Update mediastore client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``connect``: [``botocore``] Update connect client to latest version 1.9.62 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * enhancement:AssumeRole: [``botocore``] Add support for duration_seconds when assuming a role in the config file (`#1600 `__). * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.9.61 ====== * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.60 ====== * api-change:``mq``: [``botocore``] Update mq client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version 1.9.59 ====== * api-change:``health``: [``botocore``] Update health client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version 1.9.58 ====== * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version 1.9.57 ====== * bugfix:s3: [``botocore``] Add md5 header injection to new operations that require it * api-change:``s3``: [``botocore``] Update s3 client to latest version 1.9.56 ====== * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``stepfunctions``: [``botocore``] Update stepfunctions client to latest version * api-change:``xray``: [``botocore``] Update xray client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version * api-change:``kafka``: [``botocore``] Update kafka client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version 1.9.55 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version * api-change:``license-manager``: [``botocore``] Update license-manager client to latest version * api-change:``servicediscovery``: [``botocore``] Update servicediscovery client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version 1.9.54 ====== * api-change:``securityhub``: [``botocore``] Update securityhub client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``fsx``: [``botocore``] Update fsx client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.9.53 ====== * api-change:``meteringmarketplace``: [``botocore``] Update meteringmarketplace client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``translate``: [``botocore``] Update translate client to latest version * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``kinesisanalytics``: [``botocore``] Update kinesisanalytics client to latest version * api-change:``comprehendmedical``: [``botocore``] Update comprehendmedical client to latest version * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``kinesisanalyticsv2``: [``botocore``] Update kinesisanalyticsv2 client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.52 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``sms``: [``botocore``] Update sms client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``kms``: [``botocore``] Update kms client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``globalaccelerator``: [``botocore``] Update globalaccelerator client to latest version 1.9.51 ====== * api-change:``amplify``: [``botocore``] Update amplify client to latest version * api-change:``transfer``: [``botocore``] Update transfer client to latest version * api-change:``snowball``: [``botocore``] Update snowball client to latest version * api-change:``robomaker``: [``botocore``] Update robomaker client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``datasync``: [``botocore``] Update datasync client to latest version 1.9.50 ====== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.9.49 ====== * api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version * api-change:``xray``: [``botocore``] Update xray client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``appsync``: [``botocore``] Update appsync client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``quicksight``: [``botocore``] Update quicksight client to latest version * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version 1.9.48 ====== * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``workdocs``: [``botocore``] Update workdocs client to latest version * api-change:``batch``: [``botocore``] Update batch client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``cloudtrail``: [``botocore``] Update cloudtrail client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version 1.9.47 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.9.46 ====== * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``sms-voice``: [``botocore``] Update sms-voice client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``s3control``: [``botocore``] Update s3control client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``ram``: [``botocore``] Update ram client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``route53resolver``: [``botocore``] Update route53resolver client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version 1.9.45 ====== * api-change:``resource-groups``: [``botocore``] Update resource-groups client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version * api-change:``sns``: [``botocore``] Update sns client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.44 ====== * api-change:``chime``: [``botocore``] Update chime client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version 1.9.43 ====== * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``batch``: [``botocore``] Update batch client to latest version * api-change:``firehose``: [``botocore``] Update firehose client to latest version * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.42 ====== * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version 1.9.41 ====== * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version * api-change:``events``: [``botocore``] Update events client to latest version 1.9.40 ====== * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.39 ====== * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * bugfix:session config: [``botocore``] Added the default session configuration tuples back to session.session_vars_map. 1.9.38 ====== * api-change:``eks``: [``botocore``] Update eks client to latest version * enhancement:Configuration: [``botocore``] Added new configuration provider methods allowing for more flexibility in how a botocore session loads a particular configuration value. * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version 1.9.37 ====== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``clouddirectory``: [``botocore``] Update clouddirectory client to latest version 1.9.36 ====== * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * enhancement:Exceptions: [``botocore``] Add the ability to pickle botocore exceptions (`834 `__) 1.9.35 ====== * api-change:``mediastore-data``: [``botocore``] Update mediastore-data client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``config``: [``botocore``] Update config client to latest version 1.9.34 ====== * api-change:``chime``: [``botocore``] Update chime client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version 1.9.33 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.32 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.31 ====== * api-change:``codestar``: [``botocore``] Update codestar client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.9.30 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.29 ====== * api-change:``inspector``: [``botocore``] Update inspector client to latest version * api-change:``shield``: [``botocore``] Update shield client to latest version 1.9.28 ====== * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.27 ====== * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``route53``: [``botocore``] Update route53 client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.9.26 ====== * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version 1.9.25 ====== * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version * api-change:``resource-groups``: [``botocore``] Update resource-groups client to latest version 1.9.24 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version 1.9.23 ====== * api-change:``cloudtrail``: [``botocore``] Update cloudtrail client to latest version 1.9.22 ====== * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version 1.9.21 ====== * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``es``: [``botocore``] Update es client to latest version 1.9.20 ====== * enhancement:TLS: [``botocore``] Added support for configuring a client certificate and key when establishing TLS connections. * api-change:``ssm``: [``botocore``] Update ssm client to latest version * bugfix:InstanceMetadataFetcher: [``botocore``] Fix failure to retry on empty credentials and invalid JSON returned from IMDS `1049 `__ `1403 `__ 1.9.19 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``iot-jobs-data``: [``botocore``] Update iot-jobs-data client to latest version 1.9.18 ====== * api-change:``ds``: [``botocore``] Update ds client to latest version 1.9.17 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * enhancement:HTTP Session: [``botocore``] Added the ability to enable TCP Keepalive via the shared config file's ``tcp_keepalive`` option. * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version 1.9.16 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version 1.9.15 ====== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version 1.9.14 ====== * api-change:``codestar``: [``botocore``] Update codestar client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.13 ====== * api-change:``mq``: [``botocore``] Update mq client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * enhancement:Event: [``botocore``] Add the `before-send` event which allows finalized requests to be inspected before being sent across the wire and allows for custom responses to be returned. * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version 1.9.12 ====== * api-change:``sqs``: [``botocore``] Update sqs client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.11 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version * api-change:``ds``: [``botocore``] Update ds client to latest version 1.9.10 ====== * api-change:``connect``: [``botocore``] Update connect client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.9.9 ===== * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.9.8 ===== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ds``: [``botocore``] Update ds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.9.7 ===== * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version 1.9.6 ===== * bugfix:Serialization: [``botocore``] Fixes `#1557 `__. Fixed a regression in serialization where request bodies would be improperly encoded. * api-change:``es``: [``botocore``] Update es client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.9.5 ===== * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``elastictranscoder``: [``botocore``] Update elastictranscoder client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``elasticache``: [``botocore``] Update elasticache client to latest version 1.9.4 ===== * enhancement:s3: [``botocore``] Adds encoding and decoding handlers for ListObjectsV2 `#1552 `__ * api-change:``polly``: [``botocore``] Update polly client to latest version 1.9.3 ===== * api-change:``ses``: [``botocore``] Update ses client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``fms``: [``botocore``] Update fms client to latest version * api-change:``connect``: [``botocore``] Update connect client to latest version 1.9.2 ===== * api-change:``opsworkscm``: [``botocore``] Update opsworkscm client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.9.1 ===== * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``cloudhsmv2``: [``botocore``] Update cloudhsmv2 client to latest version 1.9.0 ===== * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * feature:Events: [``botocore``] This migrates the event system to using sevice ids instead of either client name or endpoint prefix. This prevents issues that might arise when a service changes their endpoint prefix, also fixes a long-standing bug where you could not register an event to a particular service if it happened to share its endpoint prefix with another service (e.g. ``autoscaling`` and ``application-autoscaling`` both use the endpoint prefix ``autoscaling``). Please see the `upgrade notes `_ to determine if you are impacted and how to proceed if you are. * feature:Events: This migrates the event system to using sevice ids instead of either client name or endpoint prefix. This prevents issues that might arise when a service changes their endpoint prefix, also fixes a long-standing bug where you could not register an event to a particular service if it happened to share its endpoint prefix with another service (e.g. ``autoscaling`` and ``application-autoscaling`` both use the endpoint prefix ``autoscaling``). Please see the `upgrade notes `_ to determine if you are impacted and how to proceed if you are. 1.8.9 ===== * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.8.8 ===== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``elb``: [``botocore``] Update elb client to latest version 1.8.7 ===== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.8.6 ===== * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.8.5 ===== * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * bugfix:signing: [``botocore``] Fix an issue where mixed endpoint casing could cause a SigV4 signature mismatch. 1.8.4 ===== * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``sagemaker-runtime``: [``botocore``] Update sagemaker-runtime client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version 1.8.3 ===== * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``xray``: [``botocore``] Update xray client to latest version 1.8.2 ===== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``signer``: [``botocore``] Update signer client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version 1.8.1 ===== * api-change:``glue``: [``botocore``] Update glue client to latest version 1.8.0 ===== * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * feature:urllib3: [``botocore``] The vendored version of requests and urllib3 are no longer being used and botocore now has a direct dependency on newer versions of upstream urllib3. 1.7.84 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``lex-models``: [``botocore``] Update lex-models client to latest version * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.7.83 ====== * api-change:``snowball``: [``botocore``] Update snowball client to latest version 1.7.82 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version 1.7.81 ====== * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.7.80 ====== * api-change:``dax``: [``botocore``] Update dax client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.7.79 ====== * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.7.78 ====== * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version 1.7.77 ====== * api-change:``es``: [``botocore``] Update es client to latest version * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version 1.7.76 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.7.75 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.7.74 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``dax``: [``botocore``] Update dax client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.7.73 ====== * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.7.72 ====== * api-change:``logs``: [``botocore``] Update logs client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version 1.7.71 ====== * api-change:``health``: [``botocore``] Update health client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.7.70 ====== * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.7.69 ====== * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``kinesis``: [``botocore``] Update kinesis client to latest version * api-change:``resource-groups``: [``botocore``] Update resource-groups client to latest version 1.7.68 ====== * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version 1.7.67 ====== * api-change:``kms``: [``botocore``] Update kms client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``es``: [``botocore``] Update es client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``connect``: [``botocore``] Update connect client to latest version 1.7.66 ====== * api-change:``directconnect``: [``botocore``] Update directconnect client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``cloudhsmv2``: [``botocore``] Update cloudhsmv2 client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``mq``: [``botocore``] Update mq client to latest version * enhancment:Timestamp Serialization: [``botocore``] Support explicit timestamp serialization per timestamp shape. * api-change:``glacier``: [``botocore``] Update glacier client to latest version 1.7.65 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``inspector``: [``botocore``] Update inspector client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version 1.7.64 ====== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.7.63 ====== * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.7.62 ====== * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version 1.7.61 ====== * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version 1.7.60 ====== * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version 1.7.59 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``snowball``: [``botocore``] Update snowball client to latest version 1.7.58 ====== * api-change:``kinesisvideo``: [``botocore``] Update kinesisvideo client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``kinesis-video-archived-media``: [``botocore``] Update kinesis-video-archived-media client to latest version 1.7.57 ====== * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``dlm``: [``botocore``] Update dlm client to latest version * api-change:``appsync``: [``botocore``] Update appsync client to latest version * api-change:``efs``: [``botocore``] Update efs client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``emr``: [``botocore``] Update emr client to latest version 1.7.56 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version 1.7.55 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``opsworks``: [``botocore``] Update opsworks client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.7.54 ====== * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version 1.7.53 ====== * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version 1.7.52 ====== * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version 1.7.51 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version 1.7.50 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version 1.7.49 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.7.48 ====== * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``lambda``: [``botocore``] Update lambda client to latest version 1.7.47 ====== * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version * api-change:``comprehend``: [``botocore``] Update comprehend client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * enhancement:StreamingResponses: [``botocore``] Add ``iter_lines()`` and ``iter_chunks()`` to streaming responses (`#1195 `__) 1.7.46 ====== * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``inspector``: [``botocore``] Update inspector client to latest version 1.7.45 ====== * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.7.44 ====== * api-change:``clouddirectory``: [``botocore``] Update clouddirectory client to latest version 1.7.43 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``macie``: [``botocore``] Update macie client to latest version * api-change:``neptune``: [``botocore``] Update neptune client to latest version 1.7.42 ====== * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.7.41 ====== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version 1.7.40 ====== * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version 1.7.39 ====== * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version 1.7.38 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version 1.7.37 ====== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version 1.7.36 ====== * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``clouddirectory``: [``botocore``] Update clouddirectory client to latest version 1.7.35 ====== * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version 1.7.34 ====== * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.7.33 ====== * api-change:``polly``: [``botocore``] Update polly client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``shield``: [``botocore``] Update shield client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.7.32 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``mgh``: [``botocore``] Update mgh client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``eks``: [``botocore``] Update eks client to latest version 1.7.31 ====== * api-change:``ds``: [``botocore``] Update ds client to latest version * api-change:``mediatailor``: [``botocore``] Update mediatailor client to latest version * api-change:``sns``: [``botocore``] Update sns client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version 1.7.30 ====== * api-change:``neptune``: [``botocore``] Update neptune client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version 1.7.29 ====== * api-change:``pi``: [``botocore``] Update pi client to latest version 1.7.28 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version 1.7.27 ====== * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version 1.7.26 ====== * api-change:``inspector``: [``botocore``] Update inspector client to latest version * enhancement:Credentials: [``botocore``] Disable proxy configuration when fetching container credentials * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.7.25 ====== * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version 1.7.24 ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ses``: [``botocore``] Update ses client to latest version 1.7.23 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version 1.7.22 ====== * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version 1.7.21 ====== * api-change:``config``: [``botocore``] Update config client to latest version 1.7.20 ====== * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``iot1click-devices``: [``botocore``] Update iot1click-devices client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``iot1click-projects``: [``botocore``] Update iot1click-projects client to latest version 1.7.19 ====== * api-change:``firehose``: [``botocore``] Update firehose client to latest version 1.7.18 ====== * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version 1.7.17 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version 1.7.16 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.7.15 ====== * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version * api-change:``es``: [``botocore``] Update es client to latest version 1.7.14 ====== * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version 1.7.13 ====== * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``appsync``: [``botocore``] Update appsync client to latest version 1.7.12 ====== * api-change:``acm``: [``botocore``] Update acm client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.7.11 ====== * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * api-change:``route53domains``: [``botocore``] Update route53domains client to latest version * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version 1.7.10 ====== * api-change:``glacier``: [``botocore``] Update glacier client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version 1.7.9 ===== * api-change:``rekognition``: [``botocore``] Update rekognition client to latest version * api-change:``xray``: [``botocore``] Update xray client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version 1.7.8 ===== * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version 1.7.7 ===== * api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version 1.7.6 ===== * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``firehose``: [``botocore``] Update firehose client to latest version 1.7.5 ===== * api-change:``ce``: [``botocore``] Update ce client to latest version * api-change:``codepipeline``: [``botocore``] Update codepipeline client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * bugfix:dynamodb: Fixes a bug causing dynamodb operations with no output to throw errors. 1.7.4 ===== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``workmail``: [``botocore``] Update workmail client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``mediapackage``: [``botocore``] Update mediapackage client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version 1.7.3 ===== * api-change:``clouddirectory``: [``botocore``] Update clouddirectory client to latest version 1.7.2 ===== * api-change:``batch``: [``botocore``] Update batch client to latest version 1.7.1 ===== * enhancement:shield: [``botocore``] Added paginator for list_protections operation. * api-change:``ssm``: [``botocore``] Update ssm client to latest version 1.7.0 ===== * api-change:``s3``: [``botocore``] Update s3 client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version * api-change:``secretsmanager``: [``botocore``] Update secretsmanager client to latest version * api-change:``acm-pca``: [``botocore``] Update acm-pca client to latest version * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version * feature:s3: Add support for S3 Select. Amazon S3 Select is an Amazon S3 feature that makes it easy to retrieve specific data from the contents of an object using simple SQL expressions without having to retrieve the entire object. With this release of the Amazon S3 SDK, S3 Select API (SelectObjectContent) is now generally available in all public regions. This release supports retrieval of a subset of data using SQL clauses, like SELECT and WHERE, from delimited text files and JSON objects in Amazon S3 through the SelectObjectContent API available in AWS S3 SDK. * api-change:``fms``: [``botocore``] Update fms client to latest version 1.6.23 ====== * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version * api-change:``translate``: [``botocore``] Update translate client to latest version 1.6.22 ====== * api-change:``cloudfront``: [``botocore``] Update cloudfront client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``es``: [``botocore``] Update es client to latest version 1.6.21 ====== * api-change:``connect``: [``botocore``] Update connect client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version 1.6.20 ====== * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``cloudformation``: [``botocore``] Update cloudformation client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version 1.6.19 ====== * api-change:``mturk``: [``botocore``] Update mturk client to latest version * api-change:``sts``: [``botocore``] Update sts client to latest version * api-change:``iam``: [``botocore``] Update iam client to latest version 1.6.18 ====== * api-change:``acm``: [``botocore``] Update acm client to latest version 1.6.17 ====== * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * bugfix:``s3``: [``botocore``] Fix bug where invalid head_object requests would cause an infinite loop (alternate fix to `#1400 `__) 1.6.16 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version 1.6.15 ====== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version 1.6.14 ====== * bugfix:``s3``: [``botocore``] Fix regression in redirects in using wrong region 1.6.13 ====== * bugfix:s3: [``botocore``] Fixed a bug where head object and bucket calls would attempt redirects incorrectly. * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version 1.6.12 ====== * api-change:``ce``: [``botocore``] Update ce client to latest version * enhancement:Credentials: [``botocore``] Add the ability to disable fetching credentials from EC2 metadata by setting the environment variable AWS_EC2_METADATA_DISABLED to 'true'. * api-change:``config``: [``botocore``] Update config client to latest version * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * bugfix:Credentials: [``botocore``] Fix a race condition related to assuming a role for the first time (`#1405 `__) * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.6.11 ====== * api-change:``elasticbeanstalk``: [``botocore``] Update elasticbeanstalk client to latest version 1.6.10 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version * api-change:``organizations``: [``botocore``] Update organizations client to latest version * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version 1.6.9 ===== * api-change:``lightsail``: [``botocore``] Update lightsail client to latest version 1.6.8 ===== * api-change:``servicediscovery``: [``botocore``] Update servicediscovery client to latest version 1.6.7 ===== * api-change:``cloudhsmv2``: [``botocore``] Update cloudhsmv2 client to latest version * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version 1.6.6 ===== * api-change:``pinpoint``: [``botocore``] Update pinpoint client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``mgh``: [``botocore``] Update mgh client to latest version 1.6.5 ===== * api-change:``medialive``: [``botocore``] Update medialive client to latest version 1.6.4 ===== * api-change:``ecs``: [``botocore``] Update ecs client to latest version 1.6.3 ===== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``events``: [``botocore``] Update events client to latest version * api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version 1.6.2 ===== * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version 1.6.1 ===== * api-change:``ecr``: [``botocore``] Update ecr client to latest version 1.6.0 ===== * enhancement:Stubber: [``botocore``] Added the ability to add items to response metadata with the stubber. * api-change:``sts``: [``botocore``] Update sts client to latest version * api-change:``route53``: [``botocore``] Update route53 client to latest version * feature:``s3``: [``botocore``] Default to virtual hosted addressing regardless of signature version (boto/botocore`#1387 `__) 1.5.36 ====== * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.5.35 ====== * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``ce``: [``botocore``] Update ce client to latest version 1.5.34 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``serverlessrepo``: [``botocore``] Update serverlessrepo client to latest version * api-change:``codecommit``: [``botocore``] Update codecommit client to latest version 1.5.33 ====== * api-change:``autoscaling``: [``botocore``] Update autoscaling client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``waf``: [``botocore``] Update waf client to latest version 1.5.32 ====== * api-change:``config``: [``botocore``] Update config client to latest version 1.5.31 ====== * api-change:``rds``: [``botocore``] Update rds client to latest version 1.5.30 ====== * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version 1.5.29 ====== * api-change:``appsync``: [``botocore``] Update appsync client to latest version * api-change:``lex-models``: [``botocore``] Update lex-models client to latest version 1.5.28 ====== * api-change:``glacier``: [``botocore``] Update glacier client to latest version * api-change:``route53``: [``botocore``] Update route53 client to latest version 1.5.27 ====== * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version * api-change:``cognito-idp``: [``botocore``] Update cognito-idp client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``kms``: [``botocore``] Update kms client to latest version 1.5.26 ====== * api-change:``lex-runtime``: [``botocore``] Update lex-runtime client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``lex-models``: [``botocore``] Update lex-models client to latest version 1.5.25 ====== * api-change:``ds``: [``botocore``] Update ds client to latest version * api-change:``appstream``: [``botocore``] Update appstream client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``budgets``: [``botocore``] Update budgets client to latest version * api-change:``gamelift``: [``botocore``] Update gamelift client to latest version * api-change:``dynamodb``: [``botocore``] Update dynamodb client to latest version * api-change:``dms``: [``botocore``] Update dms client to latest version * api-change:``mediastore``: [``botocore``] Update mediastore client to latest version 1.5.24 ====== * api-change:``servicediscovery``: [``botocore``] Update servicediscovery client to latest version * api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version 1.5.23 ====== * api-change:``cloud9``: [``botocore``] Update cloud9 client to latest version * api-change:``acm``: [``botocore``] Update acm client to latest version * api-change:``kinesis``: [``botocore``] Update kinesis client to latest version * api-change:``opsworks``: [``botocore``] Update opsworks client to latest version 1.5.22 ====== * api-change:``mturk``: [``botocore``] Update mturk client to latest version * api-change:``medialive``: [``botocore``] Update medialive client to latest version * api-change:``devicefarm``: [``botocore``] Update devicefarm client to latest version 1.5.21 ====== * api-change:``lambda``: [``botocore``] Update lambda client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version * api-change:``alexaforbusiness``: [``botocore``] Update alexaforbusiness client to latest version * bugfix:Presign: [``botocore``] Fix issue where some events were not fired during the presigning of a request thus not including a variety of customizations (`#1340 `__) * enhancement:Credentials: [``botocore``] Improved error message when the source profile for an assume role is misconfigured. Fixes aws/aws-cli`#2763 `__ * api-change:``guardduty``: [``botocore``] Update guardduty client to latest version * enhancment:Paginator: [``botocore``] Added paginators for a number of services where the result key is unambiguous. 1.5.20 ====== * api-change:``budgets``: [``botocore``] Update budgets client to latest version 1.5.19 ====== * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``transcribe``: [``botocore``] Update transcribe client to latest version 1.5.18 ====== * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.5.17 ====== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version 1.5.16 ====== * api-change:``application-autoscaling``: [``botocore``] Update application-autoscaling client to latest version * api-change:``autoscaling-plans``: [``botocore``] Update autoscaling-plans client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version 1.5.15 ====== * api-change:``lambda``: [``botocore``] Update lambda client to latest version * enhancement:cloudformation get_template template body ordering: [``botocore``] fixes boto/boto3`#1378 `__ 1.5.14 ====== * api-change:``glue``: [``botocore``] Update glue client to latest version 1.5.13 ====== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``elbv2``: [``botocore``] Update elbv2 client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version * api-change:``elb``: [``botocore``] Update elb client to latest version 1.5.12 ====== * api-change:``kms``: [``botocore``] Update kms client to latest version 1.5.11 ====== * api-change:``ds``: [``botocore``] Update ds client to latest version 1.5.10 ====== * api-change:``route53``: [``botocore``] Update route53 client to latest version * api-change:``discovery``: [``botocore``] Update discovery client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version 1.5.9 ===== * api-change:``ssm``: [``botocore``] Update ssm client to latest version * api-change:``inspector``: [``botocore``] Update inspector client to latest version * api-change:``snowball``: [``botocore``] Update snowball client to latest version 1.5.8 ===== * api-change:``rds``: [``botocore``] Update rds client to latest version 1.5.7 ===== * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version 1.5.6 ===== * api-change:``ecs``: [``botocore``] Update ecs client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``inspector``: [``botocore``] Update inspector client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version 1.5.5 ===== * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * enhancement:Paginator: [``botocore``] Added paginator support for lambda list aliases operation. * api-change:``kinesisanalytics``: [``botocore``] Update kinesisanalytics client to latest version * api-change:``codebuild``: [``botocore``] Update codebuild client to latest version 1.5.4 ===== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``config``: [``botocore``] Update config client to latest version 1.5.3 ===== * api-change:``route53``: [``botocore``] Update route53 client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version * api-change:``mediastore-data``: [``botocore``] Update mediastore-data client to latest version 1.5.2 ===== * bugfix:presigned-url: [``botocore``] Fixes a bug where content-type would be set on presigned requests for query services. * api-change:``cloudwatch``: [``botocore``] Update cloudwatch client to latest version 1.5.1 ===== * api-change:``appstream``: [``botocore``] Update appstream client to latest version 1.5.0 ===== * bugfix:Filters: Fixes a bug where parameters passed to resource collections could be mutated after the collections were created. * api-change:``ses``: [``botocore``] Update ses client to latest version * enhancement:credentials: [``botocore``] Moved the JSONFileCache from the CLI into botocore so that it can be used without importing from the cli. * feature:``botocore`` dependency: Update dependency strategy to always take a floor on the most recent version of ``botocore``. This means whenever there is a release of ``botocore``, ``boto3`` will release as well to account for the new version of ``botocore``. * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version 1.4.8 ===== * enhancement:``botocore``: Raised minor version dependency for botocore 1.4.7 ===== * enhancement:``botocore``: Raised minor version dependency for botocore 1.4.6 ===== * enhancement:Logging: Switch log levels from INFO to DEBUG (`#1208 `__) 1.4.5 ===== * enhancement:s3: Add a LifecycleConfiguration resource to resolve issues with the existing Lifecycle resource. 1.4.3 ===== * feature:``s3``: Add ability to disable thread use with ``use_threads`` option * bugfix:Resource: Fix resource hashing. 1.4.2 ===== * feature:ec2: Update client to latest version 1.4.1 ===== * feature:Session: Expose available_profiles property for Session (``#704 `__) * bugfix:s3: Fix issue when transfers would not exit quickly from signals * bugfix:``sqs.Queue``: Fix issue in DeadLetterSourceQueues collection 1.4.0 ===== * feature:DynamoDB: Add request auto de-duplication based on specified primary keys for batch_writer. (`#605 `__) * feature:s3: Add managed file-like object uploads to S3 client, Bucket, and Object. * bugfix:Session: Fixed Session.__repr__ region argument name. * feature:s3: Add managed copies to S3 client, Bucket, and Object. * feature:s3: Add managed downloads to file-like objects in the S3 client, Bucket, and Object. * bugfix:s3: Port ``s3.transfer`` module to use ``s3transfer`` package. Please refer to `Upgrading Notes `_ when upgrading. In porting the logic over, various performance issues and bugs were fixed. * feature:s3: Add ``io_chunksize`` parameter to ``TransferConfig`` 1.3.1 ===== * feature:S3: Add custom load to ObjectSummary * feature:Session: Add method to get session credentials * bugfix:DynamoDB: Ensure batch writer never sends more than flush_amount (`#483 `__) * feature:Resources: Add get_available_subresources to Resources (`#113 `__) 1.3.0 ===== * feature:``EC2``: Update resource model to include ``Route`` resources. (`issue 532 `__) 1.2.5 ===== * bugfix:``S3``: Forward ``extra_args`` when using multipart downloads. (`issue 503 `__) 1.2.4 ===== * feature:``Session``: Add ``region_name`` property on session. (`issue 414 `__) * bugfix:``S3``: Fix issue with hanging downloads. (`issue 471 `__) 1.2.3 ===== * feature:``CloudWatch``: Add resource model. (`issue 412 `__) * feature:``S3``: Add a start_restore() on Object and ObjectSummary resources. (`issue 408 `__) * feature:Documentation: Add examples for S3. (`issue 402 `__) * bugfix:Collections: Fix regression where filters could not be chained. (`issue 401 `__) * bugfix:``S3``: Progress callback will be triggered when rewinding stream. (`issue 395 `__) 1.2.2 ===== * feature:Dependencies: Relax version constraint of ``futures`` to support version 3.x. * feature:Resources: Allow ``config`` object to be provided when creating resources (`issue 325 `__) * feature:Documentation: Add docstrings for resource collections and waiters (`issue 267 `__, `issue 261 `__) 1.2.1 ===== * bugfix:setup.cfg: Fix issue in formatting that broke PyPI distributable 1.2.0 ===== * feature:Docstrings: Add docstrings for resource identifiers, attributes, references, and subresources. (`issue 239 `__) * feature:``S3``: Add ability to configure host addressing style when making requests to Amazon S3. (`botocore issue 673 `__) * bugfix:``IAM``: Fix model issue with attached groups, roles, and policies. (`issue 304 `__) * bugfix:``EC2.ServiceResource.create_key_pair``: Fix model issue where creating key pair does not have a ``key_material`` on ``KeyPair`` resource. (`issue 290 `__) 1.1.4 ===== * bugfix:Identifier: Make resource identifiers immutable. (`issue 246 `__) * feature:S3: Both S3 Bucket and Object obtain upload_file() and download_file() (`issue 243 `__) 1.1.3 ===== * feature:``aws storagegateway``: Add support for resource tagging. * feature:timeouts: Add support for customizable timeouts. 1.1.2 ===== * feature:``session.Session``: Add ``events`` property to access session's event emitter. (`issue 204 `__) * bugfix:``Glacier.Account``: Fix issue with resource model. (`issue 196 `__) * bugfix:``DynamoDB``: Fix misspelling of error class to ``DynamoDBOperationNotSupportedError``. (`issue 218 `__) 1.1.1 ===== * bugfix:``EC2.ServiceResource.create_tags``: Fix issue when creating multiple tags. (`issue 160 `__) 1.1.0 ===== * bugfix:``EC2.Vpc.filter``: Fix issue with clobbering of ``Filtering`` paramter. (`issue 154 `__) 0.0.22 ====== * bugfix:``s3.client.upload_file``: Fix double invocation of callbacks when using signature version 4. (`issue 133 `__) * bugfix:: ``s3.Bucket.load`` (`issue 128 `__) 0.0.21 ====== * bugfix:Installation: Fix regression when installing via older versions of pip on python 2.6. (`issue 132 `__) 0.0.20 ====== * feature:ec2: Update resource model. (`issue 129 `__) 0.0.19 ====== * breakingchange:Collections: Remove the ``page_count`` and ``limit`` arguments from ``all()``. Undocument support for the two arguments in the ``filter()`` method. (`issue 119 `__) * feature:DynamoDB: Add batch writer. (`issue 118 `__) 0.0.18 ====== * feature:DynamoDB: Add document level interface for Table resource (`issue 103 `__) * feature:DynamoDB: Add ConditionExpression interface for querying and filtering Table resource. (`issue 103 `__) * feature:Clients: Add support for passing of ``botocore.client.Config`` object to instantiation of clients. 0.0.17 ====== * feature:Botocore: Update to Botocore 0.107.0. 0.0.16 ====== * bugfix:Packaging: Fix release sdist and whl files from 0.0.15. * feature:Amazon Dynamodb: Add resource model for Amazon DynamoDB. 0.0.15 ====== * bugfix:Packaging: Fix an issue with the Amazon S3 ``upload_file`` and ``download_file`` customization. (`issue 85 `__) * bugfix:Resource: Fix an issue with the Amazon S3 ``BucketNofitication`` resource. * feature:Botocore: Update to Botocore 0.103.0. 0.0.14 ====== * feature:Resources: Update to the latest resource models for * feature:Amazon S3: Add an ``upload_file`` and ``download_file`` to S3 clients that transparently handle parallel multipart transfers. * feature:Botocore: Update to Botocore 0.102.0. 0.0.13 ====== * feature:Botocore: Update to Botocore 0.100.0. 0.0.12 ====== * feature:Resources: Add the ability to load resource data from a ``has`` relationship. This saves a call to ``load`` when available, and otherwise fixes a problem where there was no way to get at certain resource data. (`issue 74 `__, * feature:Botocore: Update to Botocore 0.99.0 0.0.11 ====== * feature:Resources: Add Amazon EC2 support for ClassicLink actions and add a delete action to EC2 ``Volume`` resources. * feature:Resources: Add a ``load`` operation and ``user`` reference to AWS IAM's ``CurrentUser`` resource. (`issue 72 `__, * feature:Resources: Add resources for AWS IAM managed policies. (`issue 71 `__) * feature:Botocore: Update to Botocore 0.97.0 0.0.10 ====== * bugfix:Documentation: Name collisions are now handled at the resource model layer instead of the factory, meaning that the documentation now uses the correct names. (`issue 67 `__) * feature:Session: Add a ``region_name`` option when creating a session. (`issue 69 `__, `issue 21 `__) * feature:Botocore: Update to Botocore 0.94.0 0.0.9 ===== * feature:Botocore: Update to Botocore 0.92.0 0.0.8 ===== * bugfix:Resources: Fix Amazon S3 resource identifier order. (`issue 62 `__) * bugfix:Resources: Fix collection resource hydration path. (`issue 61 `__) * bugfix:Resources: Re-enable service-level access to all resources, allowing e.g. ``obj = s3.Object('bucket', 'key')``. (`issue 60 `__) * feature:Botocore: Update to Botocore 0.87.0 0.0.7 ===== * feature:Resources: Enable support for Amazon Glacier. * feature:Resources: Support plural references and nested JMESPath queries for data members when building parameters and identifiers. (`issue 52 `__) * feature:Resources: Update to the latest resource JSON format. This is a **backward-incompatible** change as not all resources are exposed at the service level anymore. For example, ``s3.Object('bucket', 'key')`` is now ``s3.Bucket('bucket').Object('key')``. (`issue 51 `__) * feature:Resources: Make ``resource.meta`` a proper object. This allows you to do things like ``resource.meta.client``. This is a **backward- incompatible** change. (`issue 45 `__) * feature:Dependency: Update to JMESPath 0.6.1 * feature:Botocore: Update to Botocore 0.86.0 0.0.6 ===== * feature:Amazon SQS: Add ``purge`` action to queue resources * feature:Waiters: Add documentation for client and resource waiters (`issue 44 `__) * feature:Waiters: Add support for resource waiters (`issue 43 `__) * bugfix:Installation: Remove dependency on the unused ``six`` module (`issue 42 `__) * feature:Botocore: Update to Botocore 0.80.0 0.0.5 ===== * feature:Resources: Add support for batch actions on collections. (`issue 32 `__) * feature:Botocore: Update to Botocore 0.78.0 0.0.4 ===== * feature:Botocore: Update to Botocore 0.77.0 * feature:EC2: Update `Amazon EC2 `__) 0.0.3 ===== * feature:Botocore: Update to Botocore 0.76.0. 0.0.2 ===== * feature:Resources: Adds resources for `AWS CloudFormation `_ and `AWS OpsWorks `_. * feature:Botocore: Update to Botocore 0.73.0 and JMESPath 0.5.0 * feature:Clients: Adds support for `AWS CodeDeploy `_, `AWS Config `_, `AWS KMS `_, `AWS Lambda `_. * feature:UserAgent: Make requests with a customized HTTP user-agent 0.0.1 ===== * feature:Resources: Supports S3, EC2, SQS, SNS, and IAM resources * feature:Clients: Supports low-level clients for most services boto3-1.9.253/CONTRIBUTING.rst000066400000000000000000000025201355237733400153750ustar00rootroot00000000000000For more information, please see the official docs at https://boto3.amazonaws.com/v1/documentation/api/latest/index.html Contributing Code ----------------- A good pull request: - Is clear. - Works across all supported versions of Python. - Follows the existing style of the code base (PEP-8). - Has comments included as needed. - A test case that demonstrates the previous flaw that now passes with the included patch, or demonstrates the newly added feature. - If it adds/changes a public API, it must also include documentation for those changes. - Must be appropriately licensed (Apache 2.0). Reporting An Issue/Feature -------------------------- First, check to see if there's an existing issue/pull request for the bug/feature. All issues are at https://github.com/boto/boto3/issues and pull reqs are at https://github.com/boto/boto3/pulls. If there isn't an existing issue there, please file an issue. The ideal report includes: - A description of the problem/suggestion. - How to recreate the bug. - If relevant, including the versions of your: - Python interpreter - Boto 3 - Optionally of the other dependencies involved (e.g. Botocore) - If possible, create a pull request with a (failing) test case demonstrating what's wrong. This makes the process for fixing bugs quicker & gets issues resolved sooner. boto3-1.9.253/LICENSE000066400000000000000000000236761355237733400137600ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS boto3-1.9.253/MANIFEST.in000066400000000000000000000001711355237733400144720ustar00rootroot00000000000000include CONTRIBUTING.rst include README.rst include LICENSE include requirements.txt recursive-include boto3/data *.json boto3-1.9.253/NOTICE000066400000000000000000000001231355237733400136350ustar00rootroot00000000000000boto3 Copyright 2013-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. boto3-1.9.253/README.rst000066400000000000000000000072711355237733400144330ustar00rootroot00000000000000=============================== Boto 3 - The AWS SDK for Python =============================== |Build Status| |Version| |Gitter| Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Amazon S3 and Amazon EC2. You can find the latest, most up to date, documentation at our `doc site`_, including a list of services that are supported. .. _boto: https://docs.pythonboto.org/ .. _`doc site`: https://boto3.amazonaws.com/v1/documentation/api/latest/index.html .. |Build Status| image:: http://img.shields.io/travis/boto/boto3/develop.svg?style=flat :target: https://travis-ci.org/boto/boto3 :alt: Build Status .. |Gitter| image:: https://badges.gitter.im/boto/boto3.svg :target: https://gitter.im/boto/boto3 :alt: Gitter .. |Downloads| image:: http://img.shields.io/pypi/dm/boto3.svg?style=flat :target: https://pypi.python.org/pypi/boto3/ :alt: Downloads .. |Version| image:: http://img.shields.io/pypi/v/boto3.svg?style=flat :target: https://pypi.python.org/pypi/boto3/ :alt: Version .. |License| image:: http://img.shields.io/pypi/l/boto3.svg?style=flat :target: https://github.com/boto/boto3/blob/develop/LICENSE :alt: License Quick Start ----------- First, install the library and set a default region: .. code-block:: sh $ pip install boto3 Next, set up credentials (in e.g. ``~/.aws/credentials``): .. code-block:: ini [default] aws_access_key_id = YOUR_KEY aws_secret_access_key = YOUR_SECRET Then, set up a default region (in e.g. ``~/.aws/config``): .. code-block:: ini [default] region=us-east-1 Then, from a Python interpreter: .. code-block:: python >>> import boto3 >>> s3 = boto3.resource('s3') >>> for bucket in s3.buckets.all(): print(bucket.name) Development ----------- Getting Started ~~~~~~~~~~~~~~~ Assuming that you have Python and ``virtualenv`` installed, set up your environment and install the required dependencies like this instead of the ``pip install boto3`` defined above: .. code-block:: sh $ git clone https://github.com/boto/boto3.git $ cd boto3 $ virtualenv venv ... $ . venv/bin/activate $ pip install -r requirements.txt $ pip install -e . Running Tests ~~~~~~~~~~~~~ You can run tests in all supported Python versions using ``tox``. By default, it will run all of the unit and functional tests, but you can also specify your own ``nosetests`` options. Note that this requires that you have all supported versions of Python installed, otherwise you must pass ``-e`` or run the ``nosetests`` command directly: .. code-block:: sh $ tox $ tox -- unit/test_session.py $ tox -e py26,py33 -- integration/ You can also run individual tests with your default Python version: .. code-block:: sh $ nosetests tests/unit Generating Documentation ~~~~~~~~~~~~~~~~~~~~~~~~ Sphinx is used for documentation. You can generate HTML locally with the following: .. code-block:: sh $ pip install -r requirements-docs.txt $ cd docs $ make html Getting Help ------------ We use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them. Please use these community resources for getting help: * Ask a question on `Stack Overflow `__ and tag it with `boto3 `__ * Come join the AWS Python community chat on `gitter `__ * Open a support ticket with `AWS Support `__ * If it turns out that you may have found a bug, please `open an issue `__ boto3-1.9.253/boto3/000077500000000000000000000000001355237733400137635ustar00rootroot00000000000000boto3-1.9.253/boto3/__init__.py000066400000000000000000000064141355237733400161010ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import logging from boto3.session import Session __author__ = 'Amazon Web Services' __version__ = '1.9.253' # The default Boto3 session; autoloaded when needed. DEFAULT_SESSION = None def setup_default_session(**kwargs): """ Set up a default session, passing through any parameters to the session constructor. There is no need to call this unless you wish to pass custom parameters, because a default session will be created for you. """ global DEFAULT_SESSION DEFAULT_SESSION = Session(**kwargs) def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None): """ Add a stream handler for the given name and level to the logging module. By default, this logs all boto3 messages to ``stdout``. >>> import boto3 >>> boto3.set_stream_logger('boto3.resources', logging.INFO) For debugging purposes a good choice is to set the stream logger to ``''`` which is equivalent to saying "log everything". .. WARNING:: Be aware that when logging anything from ``'botocore'`` the full wire trace will appear in your logs. If your payloads contain sensitive data this should not be used in production. :type name: string :param name: Log name :type level: int :param level: Logging level, e.g. ``logging.INFO`` :type format_string: str :param format_string: Log message format """ if format_string is None: format_string = "%(asctime)s %(name)s [%(levelname)s] %(message)s" logger = logging.getLogger(name) logger.setLevel(level) handler = logging.StreamHandler() handler.setLevel(level) formatter = logging.Formatter(format_string) handler.setFormatter(formatter) logger.addHandler(handler) def _get_default_session(): """ Get the default session, creating one if needed. :rtype: :py:class:`~boto3.session.Session` :return: The default session """ if DEFAULT_SESSION is None: setup_default_session() return DEFAULT_SESSION def client(*args, **kwargs): """ Create a low-level service client by name using the default session. See :py:meth:`boto3.session.Session.client`. """ return _get_default_session().client(*args, **kwargs) def resource(*args, **kwargs): """ Create a resource service client by name using the default session. See :py:meth:`boto3.session.Session.resource`. """ return _get_default_session().resource(*args, **kwargs) # Set up logging to ``/dev/null`` like a library is supposed to. # http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library class NullHandler(logging.Handler): def emit(self, record): pass logging.getLogger('boto3').addHandler(NullHandler()) boto3-1.9.253/boto3/compat.py000066400000000000000000000030751355237733400156250ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import sys import os import errno import socket from botocore.vendored import six if six.PY3: # In python3, socket.error is OSError, which is too general # for what we want (i.e FileNotFoundError is a subclass of OSError). # In py3 all the socket related errors are in a newly created # ConnectionError SOCKET_ERROR = ConnectionError else: SOCKET_ERROR = socket.error if six.PY3: import collections.abc as collections_abc else: import collections as collections_abc if sys.platform.startswith('win'): def rename_file(current_filename, new_filename): try: os.remove(new_filename) except OSError as e: if not e.errno == errno.ENOENT: # We only want to a ignore trying to remove # a file that does not exist. If it fails # for any other reason we should be propagating # that exception. raise os.rename(current_filename, new_filename) else: rename_file = os.rename boto3-1.9.253/boto3/data/000077500000000000000000000000001355237733400146745ustar00rootroot00000000000000boto3-1.9.253/boto3/data/cloudformation/000077500000000000000000000000001355237733400177215ustar00rootroot00000000000000boto3-1.9.253/boto3/data/cloudformation/2010-05-15/000077500000000000000000000000001355237733400207505ustar00rootroot00000000000000boto3-1.9.253/boto3/data/cloudformation/2010-05-15/resources-1.json000066400000000000000000000117661355237733400240260ustar00rootroot00000000000000{ "service": { "actions": { "CreateStack": { "request": { "operation": "CreateStack" }, "resource": { "type": "Stack", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "StackName" } ] } } }, "has": { "Event": { "resource": { "type": "Event", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Stack": { "resource": { "type": "Stack", "identifiers": [ { "target": "Name", "source": "input" } ] } } }, "hasMany": { "Stacks": { "request": { "operation": "DescribeStacks" }, "resource": { "type": "Stack", "identifiers": [ { "target": "Name", "source": "response", "path": "Stacks[].StackName" } ], "path": "Stacks[]" } } } }, "resources": { "Event": { "identifiers": [ { "name": "Id", "memberName": "EventId" } ], "shape": "StackEvent" }, "Stack": { "identifiers": [ { "name": "Name", "memberName": "StackName" } ], "shape": "Stack", "load": { "request": { "operation": "DescribeStacks", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] }, "path": "Stacks[0]" }, "actions": { "CancelUpdate": { "request": { "operation": "CancelUpdateStack", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] } }, "Delete": { "request": { "operation": "DeleteStack", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] } }, "Update": { "request": { "operation": "UpdateStack", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] } } }, "has": { "Resource": { "resource": { "type": "StackResource", "identifiers": [ { "target": "StackName", "source": "identifier", "name": "Name" }, { "target": "LogicalId", "source": "input" } ] } } }, "hasMany": { "Events": { "request": { "operation": "DescribeStackEvents", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Event", "identifiers": [ { "target": "Id", "source": "response", "path": "StackEvents[].EventId" } ], "path": "StackEvents[]" } }, "ResourceSummaries": { "request": { "operation": "ListStackResources", "params": [ { "target": "StackName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "StackResourceSummary", "identifiers": [ { "target": "LogicalId", "source": "response", "path": "StackResourceSummaries[].LogicalResourceId" }, { "target": "StackName", "source": "requestParameter", "path": "StackName" } ], "path": "StackResourceSummaries[]" } } } }, "StackResource": { "identifiers": [ { "name": "StackName" }, { "name": "LogicalId", "memberName": "LogicalResourceId" } ], "shape": "StackResourceDetail", "load": { "request": { "operation": "DescribeStackResource", "params": [ { "target": "LogicalResourceId", "source": "identifier", "name": "LogicalId" }, { "target": "StackName", "source": "identifier", "name": "StackName" } ] }, "path": "StackResourceDetail" }, "has": { "Stack": { "resource": { "type": "Stack", "identifiers": [ { "target": "Name", "source": "identifier", "name": "StackName" } ] } } } }, "StackResourceSummary": { "identifiers": [ { "name": "StackName" }, { "name": "LogicalId", "memberName": "LogicalResourceId" } ], "shape": "StackResourceSummary", "has": { "Resource": { "resource": { "type": "StackResource", "identifiers": [ { "target": "LogicalId", "source": "identifier", "name": "LogicalId" }, { "target": "StackName", "source": "identifier", "name": "StackName" } ] } } } } } } boto3-1.9.253/boto3/data/cloudwatch/000077500000000000000000000000001355237733400170315ustar00rootroot00000000000000boto3-1.9.253/boto3/data/cloudwatch/2010-08-01/000077500000000000000000000000001355237733400200565ustar00rootroot00000000000000boto3-1.9.253/boto3/data/cloudwatch/2010-08-01/resources-1.json000066400000000000000000000266521355237733400231340ustar00rootroot00000000000000{ "service": { "has": { "Alarm": { "resource": { "type": "Alarm", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "Metric": { "resource": { "type": "Metric", "identifiers": [ { "target": "Namespace", "source": "input" }, { "target": "Name", "source": "input" } ] } } }, "hasMany": { "Alarms": { "request": { "operation": "DescribeAlarms" }, "resource": { "type": "Alarm", "identifiers": [ { "target": "Name", "source": "response", "path": "MetricAlarms[].AlarmName" } ], "path": "MetricAlarms[]" } }, "Metrics": { "request": { "operation": "ListMetrics" }, "resource": { "type": "Metric", "identifiers": [ { "target": "Namespace", "source": "response", "path": "Metrics[].Namespace" }, { "target": "Name", "source": "response", "path": "Metrics[].MetricName" } ], "path": "Metrics[]" } } } }, "resources": { "Alarm": { "identifiers": [ { "name": "Name", "memberName": "AlarmName" } ], "shape": "MetricAlarm", "load": { "request": { "operation": "DescribeAlarms", "params": [ { "target": "AlarmNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "MetricAlarms[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteAlarms", "params": [ { "target": "AlarmNames[0]", "source": "identifier", "name": "Name" } ] } }, "DescribeHistory": { "request": { "operation": "DescribeAlarmHistory", "params": [ { "target": "AlarmName", "source": "identifier", "name": "Name" } ] } }, "DisableActions": { "request": { "operation": "DisableAlarmActions", "params": [ { "target": "AlarmNames[0]", "source": "identifier", "name": "Name" } ] } }, "EnableActions": { "request": { "operation": "EnableAlarmActions", "params": [ { "target": "AlarmNames[0]", "source": "identifier", "name": "Name" } ] } }, "SetState": { "request": { "operation": "SetAlarmState", "params": [ { "target": "AlarmName", "source": "identifier", "name": "Name" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteAlarms", "params": [ { "target": "AlarmNames[]", "source": "identifier", "name": "Name" } ] } }, "DisableActions": { "request": { "operation": "DisableAlarmActions", "params": [ { "target": "AlarmNames[]", "source": "identifier", "name": "Name" } ] } }, "EnableActions": { "request": { "operation": "EnableAlarmActions", "params": [ { "target": "AlarmNames[]", "source": "identifier", "name": "Name" } ] } } }, "has": { "Metric": { "resource": { "type": "Metric", "identifiers": [ { "target": "Namespace", "source": "data", "path": "Namespace" }, { "target": "Name", "source": "data", "path": "MetricName" } ] } } } }, "Metric": { "identifiers": [ { "name": "Namespace", "memberName": "Namespace" }, { "name": "Name", "memberName": "MetricName" } ], "shape": "Metric", "load": { "request": { "operation": "ListMetrics", "params": [ { "target": "MetricName", "source": "identifier", "name": "Name" }, { "target": "Namespace", "source": "identifier", "name": "Namespace" } ] }, "path": "Metrics[0]" }, "actions": { "GetStatistics": { "request": { "operation": "GetMetricStatistics", "params": [ { "target": "Namespace", "source": "identifier", "name": "Namespace" }, { "target": "MetricName", "source": "identifier", "name": "Name" } ] } }, "PutAlarm": { "request": { "operation": "PutMetricAlarm", "params": [ { "target": "Namespace", "source": "identifier", "name": "Namespace" }, { "target": "MetricName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Alarm", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "AlarmName" } ] } }, "PutData": { "request": { "operation": "PutMetricData", "params": [ { "target": "Namespace", "source": "identifier", "name": "Namespace" }, { "target": "MetricData[].MetricName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Alarms": { "request": { "operation": "DescribeAlarmsForMetric", "params": [ { "target": "Namespace", "source": "identifier", "name": "Namespace" }, { "target": "MetricName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Alarm", "identifiers": [ { "target": "Name", "source": "response", "path": "MetricAlarms[].AlarmName" } ], "path": "MetricAlarms[]" } } } } } } boto3-1.9.253/boto3/data/dynamodb/000077500000000000000000000000001355237733400164715ustar00rootroot00000000000000boto3-1.9.253/boto3/data/dynamodb/2012-08-10/000077500000000000000000000000001355237733400175205ustar00rootroot00000000000000boto3-1.9.253/boto3/data/dynamodb/2012-08-10/resources-1.json000066400000000000000000000074111355237733400225660ustar00rootroot00000000000000{ "service": { "actions": { "BatchGetItem": { "request": { "operation": "BatchGetItem" } }, "BatchWriteItem": { "request": { "operation": "BatchWriteItem" } }, "CreateTable": { "request": { "operation": "CreateTable" }, "resource": { "type": "Table", "identifiers": [ { "target": "Name", "source": "response", "path": "TableDescription.TableName" } ], "path": "TableDescription" } } }, "has": { "Table": { "resource": { "type": "Table", "identifiers": [ { "target": "Name", "source": "input" } ] } } }, "hasMany": { "Tables": { "request": { "operation": "ListTables" }, "resource": { "type": "Table", "identifiers": [ { "target": "Name", "source": "response", "path": "TableNames[]" } ] } } } }, "resources": { "Table": { "identifiers": [ { "name": "Name", "memberName": "TableName" } ], "shape": "TableDescription", "load": { "request": { "operation": "DescribeTable", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] }, "path": "Table" }, "actions": { "Delete": { "request": { "operation": "DeleteTable", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "DeleteItem": { "request": { "operation": "DeleteItem", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "GetItem": { "request": { "operation": "GetItem", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "PutItem": { "request": { "operation": "PutItem", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "Query": { "request": { "operation": "Query", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "Scan": { "request": { "operation": "Scan", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } }, "Update": { "request": { "operation": "UpdateTable", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Table", "identifiers": [ { "target": "Name", "source": "identifier", "name": "Name" } ], "path": "TableDescription" } }, "UpdateItem": { "request": { "operation": "UpdateItem", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } } }, "waiters":{ "Exists": { "waiterName": "TableExists", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] }, "NotExists": { "waiterName": "TableNotExists", "params": [ { "target": "TableName", "source": "identifier", "name": "Name" } ] } } } } } boto3-1.9.253/boto3/data/ec2/000077500000000000000000000000001355237733400153455ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2014-10-01/000077500000000000000000000000001355237733400163675ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2014-10-01/resources-1.json000066400000000000000000002055651355237733400214470ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "requestParameter", "path": "Resources[]" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2015-03-01/000077500000000000000000000000001355237733400163725ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2015-03-01/resources-1.json000066400000000000000000002055651355237733400214520ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "requestParameter", "path": "Resources[]" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2015-04-15/000077500000000000000000000000001355237733400164005ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2015-04-15/resources-1.json000066400000000000000000002055651355237733400214600ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "requestParameter", "path": "Resources[]" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2015-10-01/000077500000000000000000000000001355237733400163705ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2015-10-01/resources-1.json000066400000000000000000002254241355237733400214440ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ], "path": "@" } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "ClassicAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "standard" } ] }, "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "response", "path": "Addresses[].PublicIp" } ], "path": "Addresses[]" } }, "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "vpc" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "ClassicAddress": { "identifiers": [ { "name": "PublicIp" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "PublicIps[]", "source": "identifier", "name": "PublicIp" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "PublicIp", "source": "identifier", "name": "PublicIp" } ] } }, "Disassociate": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } } } }, "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "ClassicAddress": { "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "data", "path": "PublicIpAddress" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "NetworkInterfaces": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "data", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPair", "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "KeyPairInfo": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "Association.AssociationId" } ], "path": "Association" } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterfaceAssociation": { "identifiers": [ { "name": "Id" } ], "shape": "InstanceNetworkInterfaceAssociation", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "association.association-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0].Association" }, "actions": { "Delete": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Address": { "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "Route": { "identifiers": [ { "name": "RouteTableId" }, { "name": "DestinationCidrBlock", "memberName": "DestinationCidrBlock" } ], "shape": "Route", "actions": { "Delete": { "request": { "operation": "DeleteRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } }, "Replace": { "request": { "operation": "ReplaceRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "identifier", "name": "RouteTableId" } ] } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "requestParameter", "path": "DestinationCidrBlock" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Routes": { "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "data", "path": "Routes[].DestinationCidrBlock" } ], "path": "Routes[]" } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "VpcPeeringConnectionExists", "params": [ { "target": "VpcPeeringConnectionIds[]", "source": "identifier", "name": "Id" } ], "path": "VpcPeeringConnections[0]" } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } }, "VpcAddress": { "identifiers": [ { "name": "AllocationId" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "AllocationIds[0]", "source": "identifier", "name": "AllocationId" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "AllocationId", "source": "identifier", "name": "AllocationId" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "AssociationId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2016-04-01/000077500000000000000000000000001355237733400163745ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2016-04-01/resources-1.json000066400000000000000000002254241355237733400214500ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ], "path": "@" } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "ClassicAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "standard" } ] }, "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "response", "path": "Addresses[].PublicIp" } ], "path": "Addresses[]" } }, "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "vpc" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "ClassicAddress": { "identifiers": [ { "name": "PublicIp" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "PublicIps[]", "source": "identifier", "name": "PublicIp" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "PublicIp", "source": "identifier", "name": "PublicIp" } ] } }, "Disassociate": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } } } }, "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "ClassicAddress": { "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "data", "path": "PublicIpAddress" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "NetworkInterfaces": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "data", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPair", "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "KeyPairInfo": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "Association.AssociationId" } ], "path": "Association" } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterfaceAssociation": { "identifiers": [ { "name": "Id" } ], "shape": "InstanceNetworkInterfaceAssociation", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "association.association-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0].Association" }, "actions": { "Delete": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Address": { "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "Route": { "identifiers": [ { "name": "RouteTableId" }, { "name": "DestinationCidrBlock", "memberName": "DestinationCidrBlock" } ], "shape": "Route", "actions": { "Delete": { "request": { "operation": "DeleteRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } }, "Replace": { "request": { "operation": "ReplaceRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "identifier", "name": "RouteTableId" } ] } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "requestParameter", "path": "DestinationCidrBlock" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Routes": { "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "data", "path": "Routes[].DestinationCidrBlock" } ], "path": "Routes[]" } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "VpcPeeringConnectionExists", "params": [ { "target": "VpcPeeringConnectionIds[]", "source": "identifier", "name": "Id" } ], "path": "VpcPeeringConnections[0]" } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } }, "VpcAddress": { "identifiers": [ { "name": "AllocationId" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "AllocationIds[0]", "source": "identifier", "name": "AllocationId" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "AllocationId", "source": "identifier", "name": "AllocationId" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "AssociationId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2016-09-15/000077500000000000000000000000001355237733400164065ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2016-09-15/resources-1.json000066400000000000000000002254241355237733400214620ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ], "path": "@" } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "ClassicAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "standard" } ] }, "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "response", "path": "Addresses[].PublicIp" } ], "path": "Addresses[]" } }, "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "vpc" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "ClassicAddress": { "identifiers": [ { "name": "PublicIp" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "PublicIps[]", "source": "identifier", "name": "PublicIp" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "PublicIp", "source": "identifier", "name": "PublicIp" } ] } }, "Disassociate": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } } } }, "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "ClassicAddress": { "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "data", "path": "PublicIpAddress" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "NetworkInterfaces": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "data", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPair", "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "KeyPairInfo": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "Association.AssociationId" } ], "path": "Association" } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterfaceAssociation": { "identifiers": [ { "name": "Id" } ], "shape": "InstanceNetworkInterfaceAssociation", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "association.association-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0].Association" }, "actions": { "Delete": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Address": { "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "Route": { "identifiers": [ { "name": "RouteTableId" }, { "name": "DestinationCidrBlock", "memberName": "DestinationCidrBlock" } ], "shape": "Route", "actions": { "Delete": { "request": { "operation": "DeleteRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } }, "Replace": { "request": { "operation": "ReplaceRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "identifier", "name": "RouteTableId" } ] } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "requestParameter", "path": "DestinationCidrBlock" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Routes": { "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "data", "path": "Routes[].DestinationCidrBlock" } ], "path": "Routes[]" } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Associations": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[0].Associations[].RouteTableAssociationId" } ], "path": "RouteTables[0].Associations[]" } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "VpcPeeringConnectionExists", "params": [ { "target": "VpcPeeringConnectionIds[]", "source": "identifier", "name": "Id" } ], "path": "VpcPeeringConnections[0]" } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } }, "VpcAddress": { "identifiers": [ { "name": "AllocationId" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "AllocationIds[0]", "source": "identifier", "name": "AllocationId" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "AllocationId", "source": "identifier", "name": "AllocationId" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "AssociationId" } ] } } } } } } boto3-1.9.253/boto3/data/ec2/2016-11-15/000077500000000000000000000000001355237733400163775ustar00rootroot00000000000000boto3-1.9.253/boto3/data/ec2/2016-11-15/resources-1.json000066400000000000000000002261721355237733400214540ustar00rootroot00000000000000{ "service": { "actions": { "CreateDhcpOptions": { "request": { "operation": "CreateDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions.DhcpOptionsId" } ], "path": "DhcpOptions" } }, "CreateInstances": { "request": { "operation": "RunInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateInternetGateway": { "request": { "operation": "CreateInternetGateway" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateway.InternetGatewayId" } ], "path": "InternetGateway" } }, "CreateKeyPair": { "request": { "operation": "CreateKeyPair" }, "resource": { "type": "KeyPair", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ], "path": "@" } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreatePlacementGroup": { "request": { "operation": "CreatePlacementGroup" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ] } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateSubnet": { "request": { "operation": "CreateSubnet" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags" } }, "CreateVolume": { "request": { "operation": "CreateVolume" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "VolumeId" } ], "path": "@" } }, "CreateVpc": { "request": { "operation": "CreateVpc" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpc.VpcId" } ], "path": "Vpc" } }, "CreateVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } }, "DisassociateRouteTable": { "request": { "operation": "DisassociateRouteTable" } }, "ImportKeyPair": { "request": { "operation": "ImportKeyPair" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyName" } ] } }, "RegisterImage": { "request": { "operation": "RegisterImage" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Instance": { "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "InternetGateway": { "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "NetworkAcl": { "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "NetworkInterface": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "RouteTableAssociation": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "SecurityGroup": { "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Snapshot": { "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "VpcPeeringConnection": { "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "ClassicAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "standard" } ] }, "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "response", "path": "Addresses[].PublicIp" } ], "path": "Addresses[]" } }, "DhcpOptionsSets": { "request": { "operation": "DescribeDhcpOptions" }, "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "response", "path": "DhcpOptions[].DhcpOptionsId" } ], "path": "DhcpOptions[]" } }, "Images": { "request": { "operation": "DescribeImages" }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "Images[].ImageId" } ], "path": "Images[]" } }, "Instances": { "request": { "operation": "DescribeInstances" }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways" }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "KeyPairs": { "request": { "operation": "DescribeKeyPairs" }, "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "response", "path": "KeyPairs[].KeyName" } ], "path": "KeyPairs[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls" }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces" }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroups": { "request": { "operation": "DescribePlacementGroups" }, "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "response", "path": "PlacementGroups[].GroupName" } ], "path": "PlacementGroups[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables" }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups" }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Snapshots": { "request": { "operation": "DescribeSnapshots" }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets" }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } }, "Volumes": { "request": { "operation": "DescribeVolumes" }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "domain" }, { "target": "Filters[0].Values[0]", "source": "string", "value": "vpc" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } }, "VpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections" }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Vpcs": { "request": { "operation": "DescribeVpcs" }, "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "response", "path": "Vpcs[].VpcId" } ], "path": "Vpcs[]" } } } }, "resources": { "ClassicAddress": { "identifiers": [ { "name": "PublicIp" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "PublicIps[]", "source": "identifier", "name": "PublicIp" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "PublicIp", "source": "identifier", "name": "PublicIp" } ] } }, "Disassociate": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "PublicIp", "source": "data", "path": "PublicIp" } ] } } } }, "DhcpOptions": { "identifiers": [ { "name": "Id", "memberName": "DhcpOptionsId" } ], "shape": "DhcpOptions", "load": { "request": { "operation": "DescribeDhcpOptions", "params": [ { "target": "DhcpOptionsIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "DhcpOptions[0]" }, "actions": { "AssociateWithVpc": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteDhcpOptions", "params": [ { "target": "DhcpOptionsId", "source": "identifier", "name": "Id" } ] } } } }, "Image": { "identifiers": [ { "name": "Id", "memberName": "ImageId" } ], "shape": "Image", "load": { "request": { "operation": "DescribeImages", "params": [ { "target": "ImageIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Images[0]" }, "actions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Deregister": { "request": { "operation": "DeregisterImage", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetImageAttribute", "params": [ { "target": "ImageId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "ImageExists", "params": [ { "target": "ImageIds[]", "source": "identifier", "name": "Id" } ], "path": "Images[0]" } } }, "Instance": { "identifiers": [ { "name": "Id", "memberName": "InstanceId" } ], "shape": "Instance", "load": { "request": { "operation": "DescribeInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Reservations[0].Instances[0]" }, "actions": { "AttachClassicLinkVpc": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "AttachVolume": { "request": { "operation": "AttachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ConsoleOutput": { "request": { "operation": "GetConsoleOutput", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "CreateImage": { "request": { "operation": "CreateImage", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "response", "path": "ImageId" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkVpc": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "DetachVolume": { "request": { "operation": "DetachVolume", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "PasswordData": { "request": { "operation": "GetPasswordData", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "ReportStatus": { "request": { "operation": "ReportInstanceStatus", "params": [ { "target": "Instances[0]", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" } ] } }, "ResetKernel": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "kernel" } ] } }, "ResetRamdisk": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "ramdisk" } ] } }, "ResetSourceDestCheck": { "request": { "operation": "ResetInstanceAttribute", "params": [ { "target": "InstanceId", "source": "identifier", "name": "Id" }, { "target": "Attribute", "source": "string", "value": "sourceDestCheck" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[0]", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "Id" } ] } }, "Monitor": { "request": { "operation": "MonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Reboot": { "request": { "operation": "RebootInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Start": { "request": { "operation": "StartInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Stop": { "request": { "operation": "StopInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Terminate": { "request": { "operation": "TerminateInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } }, "Unmonitor": { "request": { "operation": "UnmonitorInstances", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "InstanceExists", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Running": { "waiterName": "InstanceRunning", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Stopped": { "waiterName": "InstanceStopped", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" }, "Terminated": { "waiterName": "InstanceTerminated", "params": [ { "target": "InstanceIds[]", "source": "identifier", "name": "Id" } ], "path": "Reservations[0].Instances[0]" } }, "has": { "ClassicAddress": { "resource": { "type": "ClassicAddress", "identifiers": [ { "target": "PublicIp", "source": "data", "path": "PublicIpAddress" } ] } }, "Image": { "resource": { "type": "Image", "identifiers": [ { "target": "Id", "source": "data", "path": "ImageId" } ] } }, "KeyPair": { "resource": { "type": "KeyPairInfo", "identifiers": [ { "target": "Name", "source": "data", "path": "KeyName" } ] } }, "NetworkInterfaces": { "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "data", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "PlacementGroup": { "resource": { "type": "PlacementGroup", "identifiers": [ { "target": "Name", "source": "data", "path": "Placement.GroupName" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Volumes": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "response", "path": "Volumes[].VolumeId" } ], "path": "Volumes[]" } }, "VpcAddresses": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "instance-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "response", "path": "Addresses[].AllocationId" } ], "path": "Addresses[]" } } } }, "InternetGateway": { "identifiers": [ { "name": "Id", "memberName": "InternetGatewayId" } ], "shape": "InternetGateway", "load": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "InternetGatewayIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "InternetGateways[0]" }, "actions": { "AttachToVpc": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } }, "DetachFromVpc": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "InternetGatewayId", "source": "identifier", "name": "Id" } ] } } } }, "KeyPair": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPair", "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "KeyPairInfo": { "identifiers": [ { "name": "Name", "memberName": "KeyName" } ], "shape": "KeyPairInfo", "load": { "request": { "operation": "DescribeKeyPairs", "params": [ { "target": "KeyNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "KeyPairs[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteKeyPair", "params": [ { "target": "KeyName", "source": "identifier", "name": "Name" } ] } } } }, "NetworkAcl": { "identifiers": [ { "name": "Id", "memberName": "NetworkAclId" } ], "shape": "NetworkAcl", "load": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "NetworkAclIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkAcls[0]" }, "actions": { "CreateEntry": { "request": { "operation": "CreateNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkAcl", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "DeleteEntry": { "request": { "operation": "DeleteNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceAssociation": { "request": { "operation": "ReplaceNetworkAclAssociation", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } }, "ReplaceEntry": { "request": { "operation": "ReplaceNetworkAclEntry", "params": [ { "target": "NetworkAclId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterface": { "identifiers": [ { "name": "Id", "memberName": "NetworkInterfaceId" } ], "shape": "NetworkInterface", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "NetworkInterfaceIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0]" }, "actions": { "AssignPrivateIpAddresses": { "request": { "operation": "AssignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Attach": { "request": { "operation": "AttachNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteNetworkInterface", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "Detach": { "request": { "operation": "DetachNetworkInterface", "params": [ { "target": "AttachmentId", "source": "data", "path": "Attachment.AttachmentId" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetNetworkInterfaceAttribute", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } }, "UnassignPrivateIpAddresses": { "request": { "operation": "UnassignPrivateIpAddresses", "params": [ { "target": "NetworkInterfaceId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "Association.AssociationId" } ], "path": "Association" } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "NetworkInterfaceAssociation": { "identifiers": [ { "name": "Id" } ], "shape": "InstanceNetworkInterfaceAssociation", "load": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "association.association-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "path": "NetworkInterfaces[0].Association" }, "actions": { "Delete": { "request": { "operation": "DisassociateAddress", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Address": { "resource": { "type": "VpcAddress", "identifiers": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } } }, "PlacementGroup": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "PlacementGroup", "load": { "request": { "operation": "DescribePlacementGroups", "params": [ { "target": "GroupNames[0]", "source": "identifier", "name": "Name" } ] }, "path": "PlacementGroups[0]" }, "actions": { "Delete": { "request": { "operation": "DeletePlacementGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "placement-group-name" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } } } }, "Route": { "identifiers": [ { "name": "RouteTableId" }, { "name": "DestinationCidrBlock", "memberName": "DestinationCidrBlock" } ], "shape": "Route", "actions": { "Delete": { "request": { "operation": "DeleteRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } }, "Replace": { "request": { "operation": "ReplaceRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "RouteTableId" }, { "target": "DestinationCidrBlock", "source": "identifier", "name": "DestinationCidrBlock" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "identifier", "name": "RouteTableId" } ] } } } }, "RouteTable": { "identifiers": [ { "name": "Id", "memberName": "RouteTableId" } ], "shape": "RouteTable", "load": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "RouteTableIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "RouteTables[0]" }, "actions": { "AssociateWithSubnet": { "request": { "operation": "AssociateRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "AssociationId" } ] } }, "CreateRoute": { "request": { "operation": "CreateRoute", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "requestParameter", "path": "DestinationCidrBlock" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteRouteTable", "params": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Associations": { "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "Associations[].RouteTableAssociationId" } ], "path": "Associations[]" } }, "Routes": { "resource": { "type": "Route", "identifiers": [ { "target": "RouteTableId", "source": "identifier", "name": "Id" }, { "target": "DestinationCidrBlock", "source": "data", "path": "Routes[].DestinationCidrBlock" } ], "path": "Routes[]" } }, "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } } }, "RouteTableAssociation": { "identifiers": [ { "name": "Id", "memberName": "RouteTableAssociationId" } ], "shape": "RouteTableAssociation", "actions": { "Delete": { "request": { "operation": "DisassociateRouteTable", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] } }, "ReplaceSubnet": { "request": { "operation": "ReplaceRouteTableAssociation", "params": [ { "target": "AssociationId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTableAssociation", "identifiers": [ { "target": "Id", "source": "response", "path": "NewAssociationId" } ] } } }, "has": { "RouteTable": { "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "data", "path": "RouteTableId" } ] } }, "Subnet": { "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "data", "path": "SubnetId" } ] } } } }, "SecurityGroup": { "identifiers": [ { "name": "Id", "memberName": "GroupId" } ], "shape": "SecurityGroup", "load": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "GroupIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "SecurityGroups[0]" }, "actions": { "AuthorizeEgress": { "request": { "operation": "AuthorizeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "AuthorizeIngress": { "request": { "operation": "AuthorizeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSecurityGroup", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeEgress": { "request": { "operation": "RevokeSecurityGroupEgress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } }, "RevokeIngress": { "request": { "operation": "RevokeSecurityGroupIngress", "params": [ { "target": "GroupId", "source": "identifier", "name": "Id" } ] } } } }, "Snapshot": { "identifiers": [ { "name": "Id", "memberName": "SnapshotId" } ], "shape": "Snapshot", "load": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "SnapshotIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Snapshots[0]" }, "actions": { "Copy": { "request": { "operation": "CopySnapshot", "params": [ { "target": "SourceSnapshotId", "source": "identifier", "name": "Id" } ] } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSnapshot", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifySnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } }, "ResetAttribute": { "request": { "operation": "ResetSnapshotAttribute", "params": [ { "target": "SnapshotId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Completed": { "waiterName": "SnapshotCompleted", "params": [ { "target": "SnapshotIds[]", "source": "identifier", "name": "Id" } ], "path": "Snapshots[]" } }, "has": { "Volume": { "resource": { "type": "Volume", "identifiers": [ { "target": "Id", "source": "data", "path": "VolumeId" } ] } } } }, "Subnet": { "identifiers": [ { "name": "Id", "memberName": "SubnetId" } ], "shape": "Subnet", "load": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "SubnetIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Subnets[0]" }, "actions": { "CreateInstances": { "request": { "operation": "RunInstances", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Instances[].InstanceId" } ], "path": "Instances[]" } }, "CreateNetworkInterface": { "request": { "operation": "CreateNetworkInterface", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterface.NetworkInterfaceId" } ], "path": "NetworkInterface" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteSubnet", "params": [ { "target": "SubnetId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "VpcId" } ] } } }, "hasMany": { "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "subnet-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } } } }, "Tag": { "identifiers": [ { "name": "ResourceId", "memberName": "ResourceId" }, { "name": "Key", "memberName": "Key" }, { "name": "Value", "memberName": "Value" } ], "shape": "TagDescription", "load": { "request": { "operation": "DescribeTags", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "key" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Key" }, { "target": "Filters[1].Name", "source": "string", "value": "value" }, { "target": "Filters[1].Values[0]", "source": "identifier", "name": "Value" } ] }, "path": "Tags[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[0].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[0].Value", "source": "identifier", "name": "Value" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteTags", "params": [ { "target": "Resources[]", "source": "identifier", "name": "ResourceId" }, { "target": "Tags[*].Key", "source": "identifier", "name": "Key" }, { "target": "Tags[*].Value", "source": "identifier", "name": "Value" } ] } } } }, "Volume": { "identifiers": [ { "name": "Id", "memberName": "VolumeId" } ], "shape": "Volume", "load": { "request": { "operation": "DescribeVolumes", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Volumes[0]" }, "actions": { "AttachToInstance": { "request": { "operation": "AttachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "CreateSnapshot": { "request": { "operation": "CreateSnapshot", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "SnapshotId" } ], "path": "@" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "DescribeStatus": { "request": { "operation": "DescribeVolumeStatus", "params": [ { "target": "VolumeIds[0]", "source": "identifier", "name": "Id" } ] } }, "DetachFromInstance": { "request": { "operation": "DetachVolume", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "EnableIo": { "request": { "operation": "EnableVolumeIO", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVolumeAttribute", "params": [ { "target": "VolumeId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Snapshots": { "request": { "operation": "DescribeSnapshots", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "volume-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Snapshot", "identifiers": [ { "target": "Id", "source": "response", "path": "Snapshots[].SnapshotId" } ], "path": "Snapshots[]" } } } }, "Vpc": { "identifiers": [ { "name": "Id", "memberName": "VpcId" } ], "shape": "Vpc", "load": { "request": { "operation": "DescribeVpcs", "params": [ { "target": "VpcIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "Vpcs[0]" }, "actions": { "AssociateDhcpOptions": { "request": { "operation": "AssociateDhcpOptions", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachClassicLinkInstance": { "request": { "operation": "AttachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "AttachInternetGateway": { "request": { "operation": "AttachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "CreateNetworkAcl": { "request": { "operation": "CreateNetworkAcl", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcl.NetworkAclId" } ], "path": "NetworkAcl" } }, "CreateRouteTable": { "request": { "operation": "CreateRouteTable", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTable.RouteTableId" } ], "path": "RouteTable" } }, "CreateSecurityGroup": { "request": { "operation": "CreateSecurityGroup", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "GroupId" } ] } }, "CreateSubnet": { "request": { "operation": "CreateSubnet", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnet.SubnetId" } ], "path": "Subnet" } }, "CreateTags": { "request": { "operation": "CreateTags", "params": [ { "target": "Resources[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Tag", "identifiers": [ { "target": "ResourceId", "source": "identifier", "name": "Id" }, { "target": "Key", "source": "requestParameter", "path": "Tags[].Key" }, { "target": "Value", "source": "requestParameter", "path": "Tags[].Value" } ] } }, "Delete": { "request": { "operation": "DeleteVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DescribeAttribute": { "request": { "operation": "DescribeVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachClassicLinkInstance": { "request": { "operation": "DetachClassicLinkVpc", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DetachInternetGateway": { "request": { "operation": "DetachInternetGateway", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "DisableClassicLink": { "request": { "operation": "DisableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "EnableClassicLink": { "request": { "operation": "EnableVpcClassicLink", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "ModifyAttribute": { "request": { "operation": "ModifyVpcAttribute", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] } }, "RequestVpcPeeringConnection": { "request": { "operation": "CreateVpcPeeringConnection", "params": [ { "target": "VpcId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnection.VpcPeeringConnectionId" } ], "path": "VpcPeeringConnection" } } }, "waiters": { "Available": { "waiterName": "VpcAvailable", "params": [ { "target": "VpcIds[]", "source": "identifier", "name": "Id" } ] }, "Exists": { "waiterName": "VpcExists", "params": [ { "target": "VpcIds[]", "source": "identifier", "name": "Id" } ] } }, "has": { "DhcpOptions": { "resource": { "type": "DhcpOptions", "identifiers": [ { "target": "Id", "source": "data", "path": "DhcpOptionsId" } ] } } }, "hasMany": { "AcceptedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "accepter-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "Instances": { "request": { "operation": "DescribeInstances", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Instance", "identifiers": [ { "target": "Id", "source": "response", "path": "Reservations[].Instances[].InstanceId" } ], "path": "Reservations[].Instances[]" } }, "InternetGateways": { "request": { "operation": "DescribeInternetGateways", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "attachment.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "InternetGateway", "identifiers": [ { "target": "Id", "source": "response", "path": "InternetGateways[].InternetGatewayId" } ], "path": "InternetGateways[]" } }, "NetworkAcls": { "request": { "operation": "DescribeNetworkAcls", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkAcl", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkAcls[].NetworkAclId" } ], "path": "NetworkAcls[]" } }, "NetworkInterfaces": { "request": { "operation": "DescribeNetworkInterfaces", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "NetworkInterface", "identifiers": [ { "target": "Id", "source": "response", "path": "NetworkInterfaces[].NetworkInterfaceId" } ], "path": "NetworkInterfaces[]" } }, "RequestedVpcPeeringConnections": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "requester-vpc-info.vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "VpcPeeringConnection", "identifiers": [ { "target": "Id", "source": "response", "path": "VpcPeeringConnections[].VpcPeeringConnectionId" } ], "path": "VpcPeeringConnections[]" } }, "RouteTables": { "request": { "operation": "DescribeRouteTables", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "RouteTable", "identifiers": [ { "target": "Id", "source": "response", "path": "RouteTables[].RouteTableId" } ], "path": "RouteTables[]" } }, "SecurityGroups": { "request": { "operation": "DescribeSecurityGroups", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "SecurityGroup", "identifiers": [ { "target": "Id", "source": "response", "path": "SecurityGroups[].GroupId" } ], "path": "SecurityGroups[]" } }, "Subnets": { "request": { "operation": "DescribeSubnets", "params": [ { "target": "Filters[0].Name", "source": "string", "value": "vpc-id" }, { "target": "Filters[0].Values[0]", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Subnet", "identifiers": [ { "target": "Id", "source": "response", "path": "Subnets[].SubnetId" } ], "path": "Subnets[]" } } } }, "VpcPeeringConnection": { "identifiers": [ { "name": "Id", "memberName": "VpcPeeringConnectionId" } ], "shape": "VpcPeeringConnection", "load": { "request": { "operation": "DescribeVpcPeeringConnections", "params": [ { "target": "VpcPeeringConnectionIds[0]", "source": "identifier", "name": "Id" } ] }, "path": "VpcPeeringConnections[0]" }, "actions": { "Accept": { "request": { "operation": "AcceptVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Delete": { "request": { "operation": "DeleteVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } }, "Reject": { "request": { "operation": "RejectVpcPeeringConnection", "params": [ { "target": "VpcPeeringConnectionId", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Exists": { "waiterName": "VpcPeeringConnectionExists", "params": [ { "target": "VpcPeeringConnectionIds[]", "source": "identifier", "name": "Id" } ], "path": "VpcPeeringConnections[0]" } }, "has": { "AccepterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "AccepterVpcInfo.VpcId" } ] } }, "RequesterVpc": { "resource": { "type": "Vpc", "identifiers": [ { "target": "Id", "source": "data", "path": "RequesterVpcInfo.VpcId" } ] } } } }, "VpcAddress": { "identifiers": [ { "name": "AllocationId" } ], "shape": "Address", "load": { "request": { "operation": "DescribeAddresses", "params": [ { "target": "AllocationIds[0]", "source": "identifier", "name": "AllocationId" } ] }, "path": "Addresses[0]" }, "actions": { "Associate": { "request": { "operation": "AssociateAddress", "params": [ { "target": "AllocationId", "source": "identifier", "name": "AllocationId" } ] } }, "Release": { "request": { "operation": "ReleaseAddress", "params": [ { "target": "AllocationId", "source": "data", "path": "AllocationId" } ] } } }, "has": { "Association": { "resource": { "type": "NetworkInterfaceAssociation", "identifiers": [ { "target": "Id", "source": "data", "path": "AssociationId" } ] } } } } } } boto3-1.9.253/boto3/data/glacier/000077500000000000000000000000001355237733400163025ustar00rootroot00000000000000boto3-1.9.253/boto3/data/glacier/2012-06-01/000077500000000000000000000000001355237733400173275ustar00rootroot00000000000000boto3-1.9.253/boto3/data/glacier/2012-06-01/resources-1.json000066400000000000000000000467441355237733400224110ustar00rootroot00000000000000{ "service": { "actions": { "CreateVault": { "request": { "operation": "CreateVault", "params": [ { "target": "accountId", "source": "string", "value": "-" } ] }, "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "requestParameter", "path": "accountId" }, { "target": "Name", "source": "requestParameter", "path": "vaultName" } ] } } }, "has": { "Account": { "resource": { "type": "Account", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "Vaults": { "request": { "operation": "ListVaults", "params": [ { "target": "accountId", "source": "string", "value": "-" } ] }, "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "requestParameter", "path": "accountId" }, { "target": "Name", "source": "response", "path": "VaultList[].VaultName" } ], "path": "VaultList[]" } } } }, "resources": { "Account": { "identifiers": [ { "name": "Id" } ], "actions": { "CreateVault": { "request": { "operation": "CreateVault", "params": [ { "target": "accountId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "Id" }, { "target": "Name", "source": "requestParameter", "path": "vaultName" } ] } } }, "has": { "Vault": { "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "Id" }, { "target": "Name", "source": "input" } ] } } }, "hasMany": { "Vaults": { "request": { "operation": "ListVaults", "params": [ { "target": "accountId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "Id" }, { "target": "Name", "source": "response", "path": "VaultList[].VaultName" } ], "path": "VaultList[]" } } } }, "Archive": { "identifiers": [ { "name": "AccountId" }, { "name": "VaultName" }, { "name": "Id" } ], "actions": { "Delete": { "request": { "operation": "DeleteArchive", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "archiveId", "source": "identifier", "name": "Id" } ] } }, "InitiateArchiveRetrieval": { "request": { "operation": "InitiateJob", "params": [ { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "jobParameters.Type", "source": "string", "value": "archive-retrieval" }, { "target": "jobParameters.ArchiveId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "Id", "source": "response", "path": "jobId" }, { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "VaultName" } ] } } }, "has": { "Vault": { "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "Name", "source": "identifier", "name": "VaultName" } ] } } } }, "Job": { "identifiers": [ { "name": "AccountId" }, { "name": "VaultName" }, { "name": "Id", "memberName": "JobId" } ], "shape": "GlacierJobDescription", "load": { "request": { "operation": "DescribeJob", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "jobId", "source": "identifier", "name": "Id" } ] }, "path": "@" }, "actions": { "GetOutput": { "request": { "operation": "GetJobOutput", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "jobId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vault": { "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "Name", "source": "identifier", "name": "VaultName" } ] } } } }, "MultipartUpload": { "identifiers": [ { "name": "AccountId" }, { "name": "VaultName" }, { "name": "Id", "memberName": "MultipartUploadId" } ], "shape": "UploadListElement", "actions": { "Abort": { "request": { "operation": "AbortMultipartUpload", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "uploadId", "source": "identifier", "name": "Id" } ] } }, "Complete": { "request": { "operation": "CompleteMultipartUpload", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "uploadId", "source": "identifier", "name": "Id" } ] } }, "Parts": { "request": { "operation": "ListParts", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "uploadId", "source": "identifier", "name": "Id" } ] } }, "UploadPart": { "request": { "operation": "UploadMultipartPart", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" }, { "target": "uploadId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Vault": { "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "Name", "source": "identifier", "name": "VaultName" } ] } } } }, "Notification": { "identifiers": [ { "name": "AccountId" }, { "name": "VaultName" } ], "shape": "VaultNotificationConfig", "load": { "request": { "operation": "GetVaultNotifications", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" } ] }, "path": "vaultNotificationConfig" }, "actions": { "Delete": { "request": { "operation": "DeleteVaultNotifications", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" } ] } }, "Set": { "request": { "operation": "SetVaultNotifications", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "VaultName" } ] } } }, "has": { "Vault": { "resource": { "type": "Vault", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "Name", "source": "identifier", "name": "VaultName" } ] } } } }, "Vault": { "identifiers": [ { "name": "AccountId" }, { "name": "Name", "memberName": "VaultName" } ], "shape": "DescribeVaultOutput", "load": { "request": { "operation": "DescribeVault", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] }, "path": "@" }, "actions": { "Create": { "request": { "operation": "CreateVault", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] } }, "Delete": { "request": { "operation": "DeleteVault", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] } }, "InitiateInventoryRetrieval": { "request": { "operation": "InitiateJob", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "jobParameters.Type", "source": "string", "value": "inventory-retrieval" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "Id", "source": "response", "path": "jobId" }, { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" } ] } }, "InitiateMultipartUpload": { "request": { "operation": "InitiateMultipartUpload", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "Id", "source": "response", "path": "uploadId" }, { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" } ] } }, "UploadArchive": { "request": { "operation": "UploadArchive", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] }, "resource": { "type": "Archive", "identifiers": [ { "target": "Id", "source": "response", "path": "archiveId" }, { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" } ] } } }, "has": { "Account": { "resource": { "type": "Account", "identifiers": [ { "target": "Id", "source": "identifier", "name": "AccountId" } ] } }, "Archive": { "resource": { "type": "Archive", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "input" } ] } }, "Job": { "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "input" } ] } }, "MultipartUpload": { "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "input" } ] } }, "Notification": { "resource": { "type": "Notification", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "CompletedJobs": { "request": { "operation": "ListJobs", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "completed", "source": "string", "value": "true" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "JobList[].JobId" } ], "path": "JobList[]" } }, "FailedJobs": { "request": { "operation": "ListJobs", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "statuscode", "source": "string", "value": "Failed" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "JobList[].JobId" } ], "path": "JobList[]" } }, "Jobs": { "request": { "operation": "ListJobs", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "JobList[].JobId" } ], "path": "JobList[]" } }, "JobsInProgress": { "request": { "operation": "ListJobs", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "statuscode", "source": "string", "value": "InProgress" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "JobList[].JobId" } ], "path": "JobList[]" } }, "MultipartUplaods": { "request": { "operation": "ListMultipartUploads", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "UploadsList[].MultipartUploadId" } ], "path": "UploadsList[]" } }, "MultipartUploads": { "request": { "operation": "ListMultipartUploads", "params": [ { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "accountId", "source": "identifier", "name": "AccountId" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "UploadsList[].MultipartUploadId" } ], "path": "UploadsList[]" } }, "SucceededJobs": { "request": { "operation": "ListJobs", "params": [ { "target": "accountId", "source": "identifier", "name": "AccountId" }, { "target": "vaultName", "source": "identifier", "name": "Name" }, { "target": "statuscode", "source": "string", "value": "Succeeded" } ] }, "resource": { "type": "Job", "identifiers": [ { "target": "AccountId", "source": "identifier", "name": "AccountId" }, { "target": "VaultName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "JobList[].JobId" } ], "path": "JobList[]" } } } } } } boto3-1.9.253/boto3/data/iam/000077500000000000000000000000001355237733400154425ustar00rootroot00000000000000boto3-1.9.253/boto3/data/iam/2010-05-08/000077500000000000000000000000001355237733400164735ustar00rootroot00000000000000boto3-1.9.253/boto3/data/iam/2010-05-08/resources-1.json000066400000000000000000001422651355237733400215500ustar00rootroot00000000000000{ "service": { "actions": { "ChangePassword": { "request": { "operation": "ChangePassword" } }, "CreateAccountAlias": { "request": { "operation": "CreateAccountAlias" } }, "CreateAccountPasswordPolicy": { "request": { "operation": "UpdateAccountPasswordPolicy" }, "resource": { "type": "AccountPasswordPolicy", "identifiers": [ ] } }, "CreateGroup": { "request": { "operation": "CreateGroup" }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ], "path": "Group" } }, "CreateInstanceProfile": { "request": { "operation": "CreateInstanceProfile" }, "resource": { "type": "InstanceProfile", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "InstanceProfileName" } ], "path": "InstanceProfile" } }, "CreatePolicy": { "request": { "operation": "CreatePolicy" }, "resource": { "type": "Policy", "identifiers": [ { "target": "Arn", "source": "response", "path": "Policy.Arn" } ] } }, "CreateRole": { "request": { "operation": "CreateRole" }, "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "RoleName" } ], "path": "Role" } }, "CreateSamlProvider": { "request": { "operation": "CreateSAMLProvider" }, "resource": { "type": "SamlProvider", "identifiers": [ { "target": "Arn", "source": "response", "path": "SAMLProviderArn" } ] } }, "CreateServerCertificate": { "request": { "operation": "UploadServerCertificate" }, "resource": { "type": "ServerCertificate", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "ServerCertificateName" } ] } }, "CreateSigningCertificate": { "request": { "operation": "UploadSigningCertificate" }, "resource": { "type": "SigningCertificate", "identifiers": [ { "target": "Id", "source": "response", "path": "Certificate.CertificateId" } ], "path": "Certificate" } }, "CreateUser": { "request": { "operation": "CreateUser" }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "UserName" } ], "path": "User" } }, "CreateVirtualMfaDevice": { "request": { "operation": "CreateVirtualMFADevice" }, "resource": { "type": "VirtualMfaDevice", "identifiers": [ { "target": "SerialNumber", "source": "response", "path": "VirtualMFADevice.SerialNumber" } ], "path": "VirtualMFADevice" } } }, "has": { "AccountPasswordPolicy": { "resource": { "type": "AccountPasswordPolicy", "identifiers": [ ] } }, "AccountSummary": { "resource": { "type": "AccountSummary", "identifiers": [ ] } }, "CurrentUser": { "resource": { "type": "CurrentUser", "identifiers": [ ] } }, "Group": { "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "InstanceProfile": { "resource": { "type": "InstanceProfile", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "Policy": { "resource": { "type": "Policy", "identifiers": [ { "target": "PolicyArn", "source": "input" } ] } }, "Role": { "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "SamlProvider": { "resource": { "type": "SamlProvider", "identifiers": [ { "target": "Arn", "source": "input" } ] } }, "ServerCertificate": { "resource": { "type": "ServerCertificate", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "input" } ] } }, "VirtualMfaDevice": { "resource": { "type": "VirtualMfaDevice", "identifiers": [ { "target": "SerialNumber", "source": "input" } ] } } }, "hasMany": { "Groups": { "request": { "operation": "ListGroups" }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "response", "path": "Groups[].GroupName" } ], "path": "Groups[]" } }, "InstanceProfiles": { "request": { "operation": "ListInstanceProfiles" }, "resource": { "type": "InstanceProfile", "identifiers": [ { "target": "Name", "source": "response", "path": "InstanceProfiles[].InstanceProfileName" } ], "path": "InstanceProfiles[]" } }, "Policies": { "request": { "operation": "ListPolicies" }, "resource": { "type": "Policy", "identifiers": [ { "target": "Arn", "source": "response", "path": "Policies[].Arn" } ], "path": "Policies[]" } }, "Roles": { "request": { "operation": "ListRoles" }, "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "response", "path": "Roles[].RoleName" } ], "path": "Roles[]" } }, "SamlProviders": { "request": { "operation": "ListSAMLProviders" }, "resource": { "type": "SamlProvider", "identifiers": [ { "target": "Arn", "source": "response", "path": "SAMLProviderList[].Arn" } ] } }, "ServerCertificates": { "request": { "operation": "ListServerCertificates" }, "resource": { "type": "ServerCertificate", "identifiers": [ { "target": "Name", "source": "response", "path": "ServerCertificateMetadataList[].ServerCertificateName" } ] } }, "Users": { "request": { "operation": "ListUsers" }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "response", "path": "Users[].UserName" } ], "path": "Users[]" } }, "VirtualMfaDevices": { "request": { "operation": "ListVirtualMFADevices" }, "resource": { "type": "VirtualMfaDevice", "identifiers": [ { "target": "SerialNumber", "source": "response", "path": "VirtualMFADevices[].SerialNumber" } ], "path": "VirtualMFADevices[]" } } } }, "resources": { "AccessKey": { "identifiers": [ { "name": "UserName", "memberName": "UserName" }, { "name": "Id", "memberName": "AccessKeyId" } ], "shape": "AccessKeyMetadata", "actions": { "Activate": { "request": { "operation": "UpdateAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Active" } ] } }, "Deactivate": { "request": { "operation": "UpdateAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Inactive" } ] } }, "Delete": { "request": { "operation": "DeleteAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "identifier", "name": "UserName" } ] } } } }, "AccessKeyPair": { "identifiers": [ { "name": "UserName", "memberName": "UserName" }, { "name": "Id", "memberName": "AccessKeyId" }, { "name": "Secret", "memberName": "SecretAccessKey" } ], "shape": "AccessKey", "actions": { "Activate": { "request": { "operation": "UpdateAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Active" } ] } }, "Deactivate": { "request": { "operation": "UpdateAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Inactive" } ] } }, "Delete": { "request": { "operation": "DeleteAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "AccessKeyId", "source": "identifier", "name": "Id" } ] } } } }, "AccountPasswordPolicy": { "identifiers": [ ], "shape": "PasswordPolicy", "load": { "request": { "operation": "GetAccountPasswordPolicy" }, "path": "PasswordPolicy" }, "actions": { "Delete": { "request": { "operation": "DeleteAccountPasswordPolicy" } }, "Update": { "request": { "operation": "UpdateAccountPasswordPolicy" } } } }, "AccountSummary": { "identifiers": [ ], "shape": "GetAccountSummaryResponse", "load": { "request": { "operation": "GetAccountSummary" }, "path": "@" } }, "AssumeRolePolicy": { "identifiers": [ { "name": "RoleName" } ], "actions": { "Update": { "request": { "operation": "UpdateAssumeRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "RoleName" } ] } } }, "has": { "Role": { "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "identifier", "name": "RoleName" } ] } } } }, "CurrentUser": { "identifiers": [ ], "shape": "User", "load": { "request": { "operation": "GetUser" }, "path": "User" }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "data", "path": "UserName" } ] } } }, "hasMany": { "AccessKeys": { "request": { "operation": "ListAccessKeys" }, "resource": { "type": "AccessKey", "identifiers": [ { "target": "UserName", "source": "response", "path": "AccessKeyMetadata[].UserName" }, { "target": "Id", "source": "response", "path": "AccessKeyMetadata[].AccessKeyId" } ], "path": "AccessKeyMetadata[]" } }, "MfaDevices": { "request": { "operation": "ListMFADevices" }, "resource": { "type": "MfaDevice", "identifiers": [ { "target": "UserName", "source": "response", "path": "MFADevices[].UserName" }, { "target": "SerialNumber", "source": "response", "path": "MFADevices[].SerialNumber" } ], "path": "MFADevices[]" } }, "SigningCertificates": { "request": { "operation": "ListSigningCertificates" }, "resource": { "type": "SigningCertificate", "identifiers": [ { "target": "UserName", "source": "response", "path": "Certificates[].UserName" }, { "target": "Id", "source": "response", "path": "Certificates[].CertificateId" } ], "path": "Certificates[]" } } } }, "Group": { "identifiers": [ { "name": "Name", "memberName": "GroupName" } ], "shape": "Group", "load": { "request": { "operation": "GetGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "path": "Group" }, "actions": { "AddUser": { "request": { "operation": "AddUserToGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } }, "AttachPolicy": { "request": { "operation": "AttachGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } }, "Create": { "request": { "operation": "CreateGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "GroupName" } ], "path": "Group" } }, "CreatePolicy": { "request": { "operation": "PutGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "GroupPolicy", "identifiers": [ { "target": "GroupName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "requestParameter", "path": "PolicyName" } ] } }, "Delete": { "request": { "operation": "DeleteGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } }, "DetachPolicy": { "request": { "operation": "DetachGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } }, "RemoveUser": { "request": { "operation": "RemoveUserFromGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] } }, "Update": { "request": { "operation": "UpdateGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "NewGroupName" } ] } } }, "has": { "Policy": { "resource": { "type": "GroupPolicy", "identifiers": [ { "target": "GroupName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "input" } ] } } }, "hasMany": { "AttachedPolicies": { "request": { "operation": "ListAttachedGroupPolicies", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Policy", "identifiers": [ { "target": "Arn", "source": "response", "path": "AttachedPolicies[].PolicyArn" } ] } }, "Policies": { "request": { "operation": "ListGroupPolicies", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "GroupPolicy", "identifiers": [ { "target": "GroupName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "response", "path": "PolicyNames[]" } ] } }, "Users": { "request": { "operation": "GetGroup", "params": [ { "target": "GroupName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "response", "path": "Users[].UserName" } ], "path": "Users[]" } } } }, "GroupPolicy": { "identifiers": [ { "name": "GroupName", "memberName": "GroupName" }, { "name": "Name", "memberName": "PolicyName" } ], "shape": "GetGroupPolicyResponse", "load": { "request": { "operation": "GetGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "GroupName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "GroupName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } }, "Put": { "request": { "operation": "PutGroupPolicy", "params": [ { "target": "GroupName", "source": "identifier", "name": "GroupName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } } }, "has": { "Group": { "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "identifier", "name": "GroupName" } ] } } } }, "InstanceProfile": { "identifiers": [ { "name": "Name", "memberName": "InstanceProfileName" } ], "shape": "InstanceProfile", "load": { "request": { "operation": "GetInstanceProfile", "params": [ { "target": "InstanceProfileName", "source": "identifier", "name": "Name" } ] }, "path": "InstanceProfile" }, "actions": { "AddRole": { "request": { "operation": "AddRoleToInstanceProfile", "params": [ { "target": "InstanceProfileName", "source": "identifier", "name": "Name" } ] } }, "Delete": { "request": { "operation": "DeleteInstanceProfile", "params": [ { "target": "InstanceProfileName", "source": "identifier", "name": "Name" } ] } }, "RemoveRole": { "request": { "operation": "RemoveRoleFromInstanceProfile", "params": [ { "target": "InstanceProfileName", "source": "identifier", "name": "Name" } ] } } }, "has": { "Roles": { "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "data", "path": "Roles[].RoleName" } ], "path": "Roles[]" } } } }, "LoginProfile": { "identifiers": [ { "name": "UserName", "memberName": "UserName" } ], "shape": "LoginProfile", "load": { "request": { "operation": "GetLoginProfile", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" } ] }, "path": "LoginProfile" }, "actions": { "Create": { "request": { "operation": "CreateLoginProfile", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" } ] }, "resource": { "type": "LoginProfile", "identifiers": [ { "target": "UserName", "source": "response", "path": "LoginProfile.UserName" } ], "path": "LoginProfile" } }, "Delete": { "request": { "operation": "DeleteLoginProfile", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" } ] } }, "Update": { "request": { "operation": "UpdateLoginProfile", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "identifier", "name": "UserName" } ] } } } }, "MfaDevice": { "identifiers": [ { "name": "UserName", "memberName": "UserName" }, { "name": "SerialNumber", "memberName": "SerialNumber" } ], "shape": "MFADevice", "actions": { "Associate": { "request": { "operation": "EnableMFADevice", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "SerialNumber", "source": "identifier", "name": "SerialNumber" } ] } }, "Disassociate": { "request": { "operation": "DeactivateMFADevice", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "SerialNumber", "source": "identifier", "name": "SerialNumber" } ] } }, "Resync": { "request": { "operation": "ResyncMFADevice", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "SerialNumber", "source": "identifier", "name": "SerialNumber" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "identifier", "name": "UserName" } ] } } } }, "Policy": { "identifiers": [ { "name": "Arn", "memberName": "Arn" } ], "shape": "Policy", "load": { "request": { "operation": "GetPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] }, "path": "Policy" }, "actions": { "AttachGroup": { "request": { "operation": "AttachGroupPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "AttachRole": { "request": { "operation": "AttachRolePolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "AttachUser": { "request": { "operation": "AttachUserPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "CreateVersion": { "request": { "operation": "CreatePolicyVersion", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "PolicyVersion", "identifiers": [ { "target": "Arn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "response", "path": "PolicyVersion.VersionId" } ] } }, "Delete": { "request": { "operation": "DeletePolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "DetachGroup": { "request": { "operation": "DetachGroupPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "DetachRole": { "request": { "operation": "DetachRolePolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } }, "DetachUser": { "request": { "operation": "DetachUserPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] } } }, "has": { "DefaultVersion": { "resource": { "type": "PolicyVersion", "identifiers": [ { "target": "Arn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "data", "path": "DefaultVersionId" } ] } } }, "hasMany": { "AttachedGroups": { "request": { "operation": "ListEntitiesForPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "EntityFilter", "source": "string", "value": "Group" } ] }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "response", "path": "PolicyGroups[].GroupName" } ] } }, "AttachedRoles": { "request": { "operation": "ListEntitiesForPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "EntityFilter", "source": "string", "value": "Role" } ] }, "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "response", "path": "PolicyRoles[].RoleName" } ] } }, "AttachedUsers": { "request": { "operation": "ListEntitiesForPolicy", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "EntityFilter", "source": "string", "value": "User" } ] }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "response", "path": "PolicyUsers[].UserName" } ] } }, "Versions": { "request": { "operation": "ListPolicyVersions", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "PolicyVersion", "identifiers": [ { "target": "Arn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "response", "path": "Versions[].VersionId" } ], "path": "Versions[]" } } } }, "PolicyVersion": { "identifiers": [ { "name": "Arn" }, { "name": "VersionId" } ], "shape": "PolicyVersion", "load": { "request": { "operation": "GetPolicyVersion", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "identifier", "name": "VersionId" } ] }, "path": "PolicyVersion" }, "actions": { "Delete": { "request": { "operation": "DeletePolicyVersion", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "identifier", "name": "VersionId" } ] } }, "SetAsDefault": { "request": { "operation": "SetDefaultPolicyVersion", "params": [ { "target": "PolicyArn", "source": "identifier", "name": "Arn" }, { "target": "VersionId", "source": "identifier", "name": "VersionId" } ] } } } }, "Role": { "identifiers": [ { "name": "Name", "memberName": "RoleName" } ], "shape": "Role", "load": { "request": { "operation": "GetRole", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] }, "path": "Role" }, "actions": { "AttachPolicy": { "request": { "operation": "AttachRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] } }, "Delete": { "request": { "operation": "DeleteRole", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] } }, "DetachPolicy": { "request": { "operation": "DetachRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] } } }, "has": { "AssumeRolePolicy": { "resource": { "type": "AssumeRolePolicy", "identifiers": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] } }, "Policy": { "resource": { "type": "RolePolicy", "identifiers": [ { "target": "RoleName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "input" } ] } } }, "hasMany": { "AttachedPolicies": { "request": { "operation": "ListAttachedRolePolicies", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Policy", "identifiers": [ { "target": "Arn", "source": "response", "path": "AttachedPolicies[].PolicyArn" } ] } }, "InstanceProfiles": { "request": { "operation": "ListInstanceProfilesForRole", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "InstanceProfile", "identifiers": [ { "target": "Name", "source": "response", "path": "InstanceProfiles[].InstanceProfileName" } ], "path": "InstanceProfiles[]" } }, "Policies": { "request": { "operation": "ListRolePolicies", "params": [ { "target": "RoleName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "RolePolicy", "identifiers": [ { "target": "RoleName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "response", "path": "PolicyNames[]" } ] } } } }, "RolePolicy": { "identifiers": [ { "name": "RoleName", "memberName": "RoleName" }, { "name": "Name", "memberName": "PolicyName" } ], "shape": "GetRolePolicyResponse", "load": { "request": { "operation": "GetRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "RoleName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "RoleName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } }, "Put": { "request": { "operation": "PutRolePolicy", "params": [ { "target": "RoleName", "source": "identifier", "name": "RoleName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } } }, "has": { "Role": { "resource": { "type": "Role", "identifiers": [ { "target": "Name", "source": "identifier", "name": "RoleName" } ] } } } }, "SamlProvider": { "identifiers": [ { "name": "Arn" } ], "shape": "GetSAMLProviderResponse", "load": { "request": { "operation": "GetSAMLProvider", "params": [ { "target": "SAMLProviderArn", "source": "identifier", "name": "Arn" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteSAMLProvider", "params": [ { "target": "SAMLProviderArn", "source": "identifier", "name": "Arn" } ] } }, "Update": { "request": { "operation": "UpdateSAMLProvider", "params": [ { "target": "SAMLProviderArn", "source": "identifier", "name": "Arn" } ] } } } }, "ServerCertificate": { "identifiers": [ { "name": "Name" } ], "shape": "ServerCertificate", "load": { "request": { "operation": "GetServerCertificate", "params": [ { "target": "ServerCertificateName", "source": "identifier", "name": "Name" } ] }, "path": "ServerCertificate" }, "actions": { "Delete": { "request": { "operation": "DeleteServerCertificate", "params": [ { "target": "ServerCertificateName", "source": "identifier", "name": "Name" } ] } }, "Update": { "request": { "operation": "UpdateServerCertificate", "params": [ { "target": "ServerCertificateName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "ServerCertificate", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "NewServerCertificateName" } ] } } } }, "SigningCertificate": { "identifiers": [ { "name": "UserName", "memberName": "UserName" }, { "name": "Id", "memberName": "CertificateId" } ], "shape": "SigningCertificate", "actions": { "Activate": { "request": { "operation": "UpdateSigningCertificate", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "CertificateId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Active" } ] } }, "Deactivate": { "request": { "operation": "UpdateSigningCertificate", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "CertificateId", "source": "identifier", "name": "Id" }, { "target": "Status", "source": "string", "value": "Inactive" } ] } }, "Delete": { "request": { "operation": "DeleteSigningCertificate", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "CertificateId", "source": "identifier", "name": "Id" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "identifier", "name": "UserName" } ] } } } }, "User": { "identifiers": [ { "name": "Name", "memberName": "UserName" } ], "shape": "User", "load": { "request": { "operation": "GetUser", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "path": "User" }, "actions": { "AddGroup": { "request": { "operation": "AddUserToGroup", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "AttachPolicy": { "request": { "operation": "AttachUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "Create": { "request": { "operation": "CreateUser", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "UserName" } ], "path": "User" } }, "CreateAccessKeyPair": { "request": { "operation": "CreateAccessKey", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "AccessKeyPair", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "AccessKey.AccessKeyId" }, { "target": "Secret", "source": "response", "path": "AccessKey.SecretAccessKey" } ], "path": "AccessKey" } }, "CreateLoginProfile": { "request": { "operation": "CreateLoginProfile", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "LoginProfile", "identifiers": [ { "target": "UserName", "source": "response", "path": "LoginProfile.UserName" } ], "path": "LoginProfile" } }, "CreatePolicy": { "request": { "operation": "PutUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "UserPolicy", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "requestParameter", "path": "PolicyName" } ] } }, "Delete": { "request": { "operation": "DeleteUser", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "DetachPolicy": { "request": { "operation": "DetachUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "EnableMfa": { "request": { "operation": "EnableMFADevice", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "MfaDevice", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "SerialNumber", "source": "requestParameter", "path": "SerialNumber" } ] } }, "RemoveGroup": { "request": { "operation": "RemoveUserFromGroup", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "Update": { "request": { "operation": "UpdateUser", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "NewUserName" } ] } } }, "has": { "AccessKey": { "resource": { "type": "AccessKey", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "input" } ] } }, "LoginProfile": { "resource": { "type": "LoginProfile", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] } }, "MfaDevice": { "resource": { "type": "MfaDevice", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "SerialNumber", "source": "input" } ] } }, "Policy": { "resource": { "type": "UserPolicy", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "input" } ] } }, "SigningCertificate": { "resource": { "type": "SigningCertificate", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "input" } ] } } }, "hasMany": { "AccessKeys": { "request": { "operation": "ListAccessKeys", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "AccessKey", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "AccessKeyMetadata[].AccessKeyId" } ], "path": "AccessKeyMetadata[]" } }, "AttachedPolicies": { "request": { "operation": "ListAttachedUserPolicies", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Policy", "identifiers": [ { "target": "Arn", "source": "response", "path": "AttachedPolicies[].PolicyArn" } ] } }, "Groups": { "request": { "operation": "ListGroupsForUser", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Group", "identifiers": [ { "target": "Name", "source": "response", "path": "Groups[].GroupName" } ], "path": "Groups[]" } }, "MfaDevices": { "request": { "operation": "ListMFADevices", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "MfaDevice", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "SerialNumber", "source": "response", "path": "MFADevices[].SerialNumber" } ], "path": "MFADevices[]" } }, "Policies": { "request": { "operation": "ListUserPolicies", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "UserPolicy", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Name", "source": "response", "path": "PolicyNames[]" } ] } }, "SigningCertificates": { "request": { "operation": "ListSigningCertificates", "params": [ { "target": "UserName", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "SigningCertificate", "identifiers": [ { "target": "UserName", "source": "identifier", "name": "Name" }, { "target": "Id", "source": "response", "path": "Certificates[].CertificateId" } ], "path": "Certificates[]" } } } }, "UserPolicy": { "identifiers": [ { "name": "UserName", "memberName": "UserName" }, { "name": "Name", "memberName": "PolicyName" } ], "shape": "GetUserPolicyResponse", "load": { "request": { "operation": "GetUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } }, "Put": { "request": { "operation": "PutUserPolicy", "params": [ { "target": "UserName", "source": "identifier", "name": "UserName" }, { "target": "PolicyName", "source": "identifier", "name": "Name" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "identifier", "name": "UserName" } ] } } } }, "VirtualMfaDevice": { "identifiers": [ { "name": "SerialNumber", "memberName": "SerialNumber" } ], "shape": "VirtualMFADevice", "actions": { "Delete": { "request": { "operation": "DeleteVirtualMFADevice", "params": [ { "target": "SerialNumber", "source": "identifier", "name": "SerialNumber" } ] } } }, "has": { "User": { "resource": { "type": "User", "identifiers": [ { "target": "Name", "source": "data", "path": "User.UserName" } ] } } } } } } boto3-1.9.253/boto3/data/opsworks/000077500000000000000000000000001355237733400165635ustar00rootroot00000000000000boto3-1.9.253/boto3/data/opsworks/2013-02-18/000077500000000000000000000000001355237733400176155ustar00rootroot00000000000000boto3-1.9.253/boto3/data/opsworks/2013-02-18/resources-1.json000066400000000000000000000100501355237733400226540ustar00rootroot00000000000000{ "service": { "actions": { "CreateStack": { "request": { "operation": "CreateStack" }, "resource": { "type": "Stack", "identifiers": [ { "target": "Id", "source": "response", "path": "StackId" } ] } } }, "has": { "Layer": { "resource": { "type": "Layer", "identifiers": [ { "target": "Id", "source": "input" } ] } }, "Stack": { "resource": { "type": "Stack", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "Stacks": { "request": { "operation": "DescribeStacks" }, "resource": { "type": "Stack", "identifiers": [ { "target": "Id", "source": "response", "path": "Stacks[].StackId" } ], "path": "Stacks[]" } } } }, "resources": { "Layer": { "identifiers": [ { "name": "Id" } ], "shape": "Layer", "load": { "request": { "operation": "DescribeLayers", "params": [ { "target": "LayerIds[]", "source": "identifier", "name": "Id" } ] }, "path": "Layers[0]" }, "actions": { "Delete": { "request": { "operation": "DeleteLayer", "params": [ { "target": "LayerId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Stack": { "resource": { "type": "Stack", "identifiers": [ { "target": "Id", "source": "data", "path": "StackId" } ] } } } }, "Stack": { "identifiers": [ { "name": "Id" } ], "shape": "Stack", "load": { "request": { "operation": "DescribeStacks", "params": [ { "target": "StackIds[]", "source": "identifier", "name": "Id" } ] }, "path": "Stacks[0]" }, "actions": { "CreateLayer": { "request": { "operation": "CreateLayer", "params": [ { "target": "StackId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Layer", "identifiers": [ { "target": "Id", "source": "response", "path": "LayerId" } ] } }, "Delete": { "request": { "operation": "DeleteStack", "params": [ { "target": "StackId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Summary": { "resource": { "type": "StackSummary", "identifiers": [ { "target": "StackId", "source": "identifier", "name": "Id" } ] } } }, "hasMany": { "Layers": { "request": { "operation": "DescribeLayers", "params": [ { "target": "StackId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Layer", "identifiers": [ { "target": "Id", "source": "response", "path": "Layers[].LayerId" } ], "path": "Layers[]" } } } }, "StackSummary": { "identifiers": [ { "name": "StackId" } ], "shape": "StackSummary", "load": { "request": { "operation": "DescribeStackSummary", "params": [ { "target": "StackId", "source": "identifier", "name": "StackId" } ] }, "path": "StackSummary" }, "has": { "Stack": { "resource": { "type": "Stack", "identifiers": [ { "target": "Id", "source": "identifier", "name": "StackId" } ] } } } } } } boto3-1.9.253/boto3/data/s3/000077500000000000000000000000001355237733400152215ustar00rootroot00000000000000boto3-1.9.253/boto3/data/s3/2006-03-01/000077500000000000000000000000001355237733400162465ustar00rootroot00000000000000boto3-1.9.253/boto3/data/s3/2006-03-01/resources-1.json000066400000000000000000001105241355237733400213140ustar00rootroot00000000000000{ "service": { "actions": { "CreateBucket": { "request": { "operation": "CreateBucket" }, "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "requestParameter", "path": "Bucket" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "input" } ] } } }, "hasMany": { "Buckets": { "request": { "operation": "ListBuckets" }, "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "response", "path": "Buckets[].Name" } ], "path": "Buckets[]" } } } }, "resources": { "Bucket": { "identifiers": [ { "name": "Name" } ], "shape": "Bucket", "actions": { "Create": { "request": { "operation": "CreateBucket", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] } }, "Delete": { "request": { "operation": "DeleteBucket", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] } }, "DeleteObjects": { "request": { "operation": "DeleteObjects", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] } }, "PutObject": { "request": { "operation": "PutObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" }, { "target": "Key", "source": "requestParameter", "path": "Key" } ] } } }, "waiters": { "Exists": { "waiterName": "BucketExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] }, "NotExists": { "waiterName": "BucketNotExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] } }, "has": { "Acl": { "resource": { "type": "BucketAcl", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Cors": { "resource": { "type": "BucketCors", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Lifecycle": { "resource": { "type": "BucketLifecycle", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "LifecycleConfiguration": { "resource": { "type": "BucketLifecycleConfiguration", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Logging": { "resource": { "type": "BucketLogging", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Notification": { "resource": { "type": "BucketNotification", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Object": { "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" }, { "target": "Key", "source": "input" } ] } }, "Policy": { "resource": { "type": "BucketPolicy", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "RequestPayment": { "resource": { "type": "BucketRequestPayment", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Tagging": { "resource": { "type": "BucketTagging", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Versioning": { "resource": { "type": "BucketVersioning", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } }, "Website": { "resource": { "type": "BucketWebsite", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" } ] } } }, "hasMany": { "MultipartUploads": { "request": { "operation": "ListMultipartUploads", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" }, { "target": "ObjectKey", "source": "response", "path": "Uploads[].Key" }, { "target": "Id", "source": "response", "path": "Uploads[].UploadId" } ], "path": "Uploads[]" } }, "ObjectVersions": { "request": { "operation": "ListObjectVersions", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "ObjectVersion", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" }, { "target": "ObjectKey", "source": "response", "path": "[Versions,DeleteMarkers]|[].Key" }, { "target": "Id", "source": "response", "path": "[Versions,DeleteMarkers]|[].VersionId" } ], "path": "[Versions,DeleteMarkers]|[]" } }, "Objects": { "request": { "operation": "ListObjects", "params": [ { "target": "Bucket", "source": "identifier", "name": "Name" } ] }, "resource": { "type": "ObjectSummary", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "Name" }, { "target": "Key", "source": "response", "path": "Contents[].Key" } ], "path": "Contents[]" } } } }, "BucketAcl": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketAclOutput", "load": { "request": { "operation": "GetBucketAcl", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Put": { "request": { "operation": "PutBucketAcl", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketCors": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketCorsOutput", "load": { "request": { "operation": "GetBucketCors", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketCors", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketCors", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketLifecycle": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketLifecycleOutput", "load": { "request": { "operation": "GetBucketLifecycle", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketLifecycle", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketLifecycle", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketLifecycleConfiguration": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketLifecycleConfigurationOutput", "load": { "request": { "operation": "GetBucketLifecycleConfiguration", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketLifecycle", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketLifecycleConfiguration", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketLogging": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketLoggingOutput", "load": { "request": { "operation": "GetBucketLogging", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Put": { "request": { "operation": "PutBucketLogging", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketNotification": { "identifiers": [ { "name": "BucketName" } ], "shape": "NotificationConfiguration", "load": { "request": { "operation": "GetBucketNotificationConfiguration", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Put": { "request": { "operation": "PutBucketNotificationConfiguration", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketPolicy": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketPolicyOutput", "load": { "request": { "operation": "GetBucketPolicy", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketPolicy", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketPolicy", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketRequestPayment": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketRequestPaymentOutput", "load": { "request": { "operation": "GetBucketRequestPayment", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Put": { "request": { "operation": "PutBucketRequestPayment", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketTagging": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketTaggingOutput", "load": { "request": { "operation": "GetBucketTagging", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketTagging", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketTagging", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketVersioning": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketVersioningOutput", "load": { "request": { "operation": "GetBucketVersioning", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Enable": { "request": { "operation": "PutBucketVersioning", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "VersioningConfiguration.Status", "source": "string", "value": "Enabled" } ] } }, "Put": { "request": { "operation": "PutBucketVersioning", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Suspend": { "request": { "operation": "PutBucketVersioning", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "VersioningConfiguration.Status", "source": "string", "value": "Suspended" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "BucketWebsite": { "identifiers": [ { "name": "BucketName" } ], "shape": "GetBucketWebsiteOutput", "load": { "request": { "operation": "GetBucketWebsite", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteBucketWebsite", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } }, "Put": { "request": { "operation": "PutBucketWebsite", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" } ] } } }, "has": { "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } } } }, "MultipartUpload": { "identifiers": [ { "name": "BucketName" }, { "name": "ObjectKey" }, { "name": "Id" } ], "shape": "MultipartUpload", "actions": { "Abort": { "request": { "operation": "AbortMultipartUpload", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "UploadId", "source": "identifier", "name": "Id" } ] } }, "Complete": { "request": { "operation": "CompleteMultipartUpload", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "UploadId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] } } }, "has": { "Object": { "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] } }, "Part": { "resource": { "type": "MultipartUploadPart", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "ObjectKey" }, { "target": "MultipartUploadId", "source": "identifier", "name": "Id" }, { "target": "PartNumber", "source": "input" } ] } } }, "hasMany": { "Parts": { "request": { "operation": "ListParts", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "UploadId", "source": "identifier", "name": "Id" } ] }, "resource": { "type": "MultipartUploadPart", "identifiers": [ { "target": "BucketName", "source": "requestParameter", "path": "Bucket" }, { "target": "ObjectKey", "source": "requestParameter", "path": "Key" }, { "target": "MultipartUploadId", "source": "requestParameter", "path": "UploadId" }, { "target": "PartNumber", "source": "response", "path": "Parts[].PartNumber" } ], "path": "Parts[]" } } } }, "MultipartUploadPart": { "identifiers": [ { "name": "BucketName" }, { "name": "ObjectKey" }, { "name": "MultipartUploadId" }, { "name": "PartNumber", "type": "integer", "memberName": "PartNumber" } ], "shape": "Part", "actions": { "CopyFrom": { "request": { "operation": "UploadPartCopy", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "UploadId", "source": "identifier", "name": "MultipartUploadId" }, { "target": "PartNumber", "source": "identifier", "name": "PartNumber" } ] } }, "Upload": { "request": { "operation": "UploadPart", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "UploadId", "source": "identifier", "name": "MultipartUploadId" }, { "target": "PartNumber", "source": "identifier", "name": "PartNumber" } ] } } }, "has": { "MultipartUpload": { "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "ObjectKey" }, { "target": "Id", "source": "identifier", "name": "MultipartUploadId" } ] } } } }, "Object": { "identifiers": [ { "name": "BucketName" }, { "name": "Key" } ], "shape": "HeadObjectOutput", "load": { "request": { "operation": "HeadObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] }, "path": "@" }, "actions": { "CopyFrom": { "request": { "operation": "CopyObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "Delete": { "request": { "operation": "DeleteObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "Get": { "request": { "operation": "GetObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "InitiateMultipartUpload": { "request": { "operation": "CreateMultipartUpload", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "response", "path": "UploadId" } ] } }, "Put": { "request": { "operation": "PutObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "RestoreObject": { "request": { "operation": "RestoreObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteObjects", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Delete.Objects[].Key", "source": "identifier", "name": "Key" } ] } } }, "waiters": { "Exists": { "waiterName": "ObjectExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] }, "NotExists": { "waiterName": "ObjectNotExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "has": { "Acl": { "resource": { "type": "ObjectAcl", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" } ] } }, "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } }, "MultipartUpload": { "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "input" } ] } }, "Version": { "resource": { "type": "ObjectVersion", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "input" } ] } } } }, "ObjectAcl": { "identifiers": [ { "name": "BucketName" }, { "name": "ObjectKey" } ], "shape": "GetObjectAclOutput", "load": { "request": { "operation": "GetObjectAcl", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] }, "path": "@" }, "actions": { "Put": { "request": { "operation": "PutObjectAcl", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] } } }, "has": { "Object": { "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] } } } }, "ObjectSummary": { "identifiers": [ { "name": "BucketName" }, { "name": "Key" } ], "shape": "Object", "actions": { "CopyFrom": { "request": { "operation": "CopyObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "Delete": { "request": { "operation": "DeleteObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "Get": { "request": { "operation": "GetObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "InitiateMultipartUpload": { "request": { "operation": "CreateMultipartUpload", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] }, "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "response", "path": "UploadId" } ] } }, "Put": { "request": { "operation": "PutObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "RestoreObject": { "request": { "operation": "RestoreObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteObjects", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Delete.Objects[].Key", "source": "identifier", "name": "Key" } ] } } }, "waiters": { "Exists": { "waiterName": "ObjectExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] }, "NotExists": { "waiterName": "ObjectNotExists", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "has": { "Acl": { "resource": { "type": "ObjectAcl", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" } ] } }, "Bucket": { "resource": { "type": "Bucket", "identifiers": [ { "target": "Name", "source": "identifier", "name": "BucketName" } ] } }, "MultipartUpload": { "resource": { "type": "MultipartUpload", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "input" } ] } }, "Object": { "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "Key" } ] } }, "Version": { "resource": { "type": "ObjectVersion", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "ObjectKey", "source": "identifier", "name": "Key" }, { "target": "Id", "source": "input" } ] } } } }, "ObjectVersion": { "identifiers": [ { "name": "BucketName" }, { "name": "ObjectKey" }, { "name": "Id" } ], "shape": "ObjectVersion", "actions": { "Delete": { "request": { "operation": "DeleteObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "VersionId", "source": "identifier", "name": "Id" } ] } }, "Get": { "request": { "operation": "GetObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "VersionId", "source": "identifier", "name": "Id" } ] } }, "Head": { "request": { "operation": "HeadObject", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" }, { "target": "VersionId", "source": "identifier", "name": "Id" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteObjects", "params": [ { "target": "Bucket", "source": "identifier", "name": "BucketName" }, { "target": "Delete.Objects[*].Key", "source": "identifier", "name": "ObjectKey" }, { "target": "Delete.Objects[*].VersionId", "source": "identifier", "name": "Id" } ] } } }, "has": { "Object": { "resource": { "type": "Object", "identifiers": [ { "target": "BucketName", "source": "identifier", "name": "BucketName" }, { "target": "Key", "source": "identifier", "name": "ObjectKey" } ] } } } } } } boto3-1.9.253/boto3/data/sns/000077500000000000000000000000001355237733400154775ustar00rootroot00000000000000boto3-1.9.253/boto3/data/sns/2010-03-31/000077500000000000000000000000001355237733400165225ustar00rootroot00000000000000boto3-1.9.253/boto3/data/sns/2010-03-31/resources-1.json000066400000000000000000000216031355237733400215670ustar00rootroot00000000000000{ "service": { "actions": { "CreatePlatformApplication": { "request": { "operation": "CreatePlatformApplication" }, "resource": { "type": "PlatformApplication", "identifiers": [ { "target": "Arn", "source": "response", "path": "PlatformApplicationArn" } ] } }, "CreateTopic": { "request": { "operation": "CreateTopic" }, "resource": { "type": "Topic", "identifiers": [ { "target": "Arn", "source": "response", "path": "TopicArn" } ] } } }, "has": { "PlatformApplication": { "resource": { "type": "PlatformApplication", "identifiers": [ { "target": "Arn", "source": "input" } ] } }, "PlatformEndpoint": { "resource": { "type": "PlatformEndpoint", "identifiers": [ { "target": "Arn", "source": "input" } ] } }, "Subscription": { "resource": { "type": "Subscription", "identifiers": [ { "target": "Arn", "source": "input" } ] } }, "Topic": { "resource": { "type": "Topic", "identifiers": [ { "target": "Arn", "source": "input" } ] } } }, "hasMany": { "PlatformApplications": { "request": { "operation": "ListPlatformApplications" }, "resource": { "type": "PlatformApplication", "identifiers": [ { "target": "Arn", "source": "response", "path": "PlatformApplications[].PlatformApplicationArn" } ] } }, "Subscriptions": { "request": { "operation": "ListSubscriptions" }, "resource": { "type": "Subscription", "identifiers": [ { "target": "Arn", "source": "response", "path": "Subscriptions[].SubscriptionArn" } ] } }, "Topics": { "request": { "operation": "ListTopics" }, "resource": { "type": "Topic", "identifiers": [ { "target": "Arn", "source": "response", "path": "Topics[].TopicArn" } ] } } } }, "resources": { "PlatformApplication": { "identifiers": [ { "name": "Arn" } ], "shape": "GetPlatformApplicationAttributesResponse", "load": { "request": { "operation": "GetPlatformApplicationAttributes", "params": [ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" } ] }, "path": "@" }, "actions": { "CreatePlatformEndpoint": { "request": { "operation": "CreatePlatformEndpoint", "params": [ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "PlatformEndpoint", "identifiers": [ { "target": "Arn", "source": "response", "path": "EndpointArn" } ] } }, "Delete": { "request": { "operation": "DeletePlatformApplication", "params": [ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" } ] } }, "SetAttributes": { "request": { "operation": "SetPlatformApplicationAttributes", "params": [ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" } ] } } }, "hasMany": { "Endpoints": { "request": { "operation": "ListEndpointsByPlatformApplication", "params": [ { "target": "PlatformApplicationArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "PlatformEndpoint", "identifiers": [ { "target": "Arn", "source": "response", "path": "Endpoints[].EndpointArn" } ] } } } }, "PlatformEndpoint": { "identifiers": [ { "name": "Arn" } ], "shape": "GetEndpointAttributesResponse", "load": { "request": { "operation": "GetEndpointAttributes", "params": [ { "target": "EndpointArn", "source": "identifier", "name": "Arn" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "DeleteEndpoint", "params": [ { "target": "EndpointArn", "source": "identifier", "name": "Arn" } ] } }, "Publish": { "request": { "operation": "Publish", "params": [ { "target": "TargetArn", "source": "identifier", "name": "Arn" } ] } }, "SetAttributes": { "request": { "operation": "SetEndpointAttributes", "params": [ { "target": "EndpointArn", "source": "identifier", "name": "Arn" } ] } } } }, "Subscription": { "identifiers": [ { "name": "Arn" } ], "shape": "GetSubscriptionAttributesResponse", "load": { "request": { "operation": "GetSubscriptionAttributes", "params": [ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" } ] }, "path": "@" }, "actions": { "Delete": { "request": { "operation": "Unsubscribe", "params": [ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" } ] } }, "SetAttributes": { "request": { "operation": "SetSubscriptionAttributes", "params": [ { "target": "SubscriptionArn", "source": "identifier", "name": "Arn" } ] } } } }, "Topic": { "identifiers": [ { "name": "Arn" } ], "shape": "GetTopicAttributesResponse", "load": { "request": { "operation": "GetTopicAttributes", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] }, "path": "@" }, "actions": { "AddPermission": { "request": { "operation": "AddPermission", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] } }, "ConfirmSubscription": { "request": { "operation": "ConfirmSubscription", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "Subscription", "identifiers": [ { "target": "Arn", "source": "response", "path": "SubscriptionArn" } ] } }, "Delete": { "request": { "operation": "DeleteTopic", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] } }, "Publish": { "request": { "operation": "Publish", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] } }, "RemovePermission": { "request": { "operation": "RemovePermission", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] } }, "SetAttributes": { "request": { "operation": "SetTopicAttributes", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] } }, "Subscribe": { "request": { "operation": "Subscribe", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "Subscription", "identifiers": [ { "target": "Arn", "source": "response", "path": "SubscriptionArn" } ] } } }, "hasMany": { "Subscriptions": { "request": { "operation": "ListSubscriptionsByTopic", "params": [ { "target": "TopicArn", "source": "identifier", "name": "Arn" } ] }, "resource": { "type": "Subscription", "identifiers": [ { "target": "Arn", "source": "response", "path": "Subscriptions[].SubscriptionArn" } ] } } } } } } boto3-1.9.253/boto3/data/sqs/000077500000000000000000000000001355237733400155025ustar00rootroot00000000000000boto3-1.9.253/boto3/data/sqs/2012-11-05/000077500000000000000000000000001355237733400165275ustar00rootroot00000000000000boto3-1.9.253/boto3/data/sqs/2012-11-05/resources-1.json000066400000000000000000000146211355237733400215760ustar00rootroot00000000000000{ "service": { "actions": { "CreateQueue": { "request": { "operation": "CreateQueue" }, "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "response", "path": "QueueUrl" } ] } }, "GetQueueByName": { "request": { "operation": "GetQueueUrl" }, "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "response", "path": "QueueUrl" } ] } } }, "has": { "Queue": { "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "input" } ] } } }, "hasMany": { "Queues": { "request": { "operation": "ListQueues" }, "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "response", "path": "QueueUrls[]" } ] } } } }, "resources": { "Message": { "identifiers": [ { "name": "QueueUrl" }, { "name": "ReceiptHandle", "memberName": "ReceiptHandle" } ], "shape": "Message", "actions": { "ChangeVisibility": { "request": { "operation": "ChangeMessageVisibility", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" }, { "target": "ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" } ] } }, "Delete": { "request": { "operation": "DeleteMessage", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" }, { "target": "ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" } ] } } }, "batchActions": { "Delete": { "request": { "operation": "DeleteMessageBatch", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "QueueUrl" }, { "target": "Entries[*].Id", "source": "data", "path": "MessageId" }, { "target": "Entries[*].ReceiptHandle", "source": "identifier", "name": "ReceiptHandle" } ] } } }, "has": { "Queue": { "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "identifier", "name": "QueueUrl" } ] } } } }, "Queue": { "identifiers": [ { "name": "Url" } ], "shape": "GetQueueAttributesResult", "load": { "request": { "operation": "GetQueueAttributes", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" }, { "target": "AttributeNames[]", "source": "string", "value": "All" } ] }, "path": "@" }, "actions": { "AddPermission": { "request": { "operation": "AddPermission", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "ChangeMessageVisibilityBatch": { "request": { "operation": "ChangeMessageVisibilityBatch", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "Delete": { "request": { "operation": "DeleteQueue", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "DeleteMessages": { "request": { "operation": "DeleteMessageBatch", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "Purge": { "request": { "operation": "PurgeQueue", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "ReceiveMessages": { "request": { "operation": "ReceiveMessage", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] }, "resource": { "type": "Message", "identifiers": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" }, { "target": "ReceiptHandle", "source": "response", "path": "Messages[].ReceiptHandle" } ], "path": "Messages[]" } }, "RemovePermission": { "request": { "operation": "RemovePermission", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "SendMessage": { "request": { "operation": "SendMessage", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "SendMessages": { "request": { "operation": "SendMessageBatch", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } }, "SetAttributes": { "request": { "operation": "SetQueueAttributes", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] } } }, "has": { "Message": { "resource": { "type": "Message", "identifiers": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" }, { "target": "ReceiptHandle", "source": "input" } ] } } }, "hasMany": { "DeadLetterSourceQueues": { "request": { "operation": "ListDeadLetterSourceQueues", "params": [ { "target": "QueueUrl", "source": "identifier", "name": "Url" } ] }, "resource": { "type": "Queue", "identifiers": [ { "target": "Url", "source": "response", "path": "queueUrls[]" } ] } } } } } } boto3-1.9.253/boto3/docs/000077500000000000000000000000001355237733400147135ustar00rootroot00000000000000boto3-1.9.253/boto3/docs/__init__.py000066400000000000000000000027711355237733400170330ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import os from boto3.docs.service import ServiceDocumenter def generate_docs(root_dir, session): """Generates the reference documentation for botocore This will go through every available AWS service and output ReSTructured text files documenting each service. :param root_dir: The directory to write the reference files to. Each service's reference documentation is loacated at root_dir/reference/services/service-name.rst :param session: The boto3 session """ services_doc_path = os.path.join(root_dir, 'reference', 'services') if not os.path.exists(services_doc_path): os.makedirs(services_doc_path) for service_name in session.get_available_services(): docs = ServiceDocumenter(service_name, session).document_service() service_doc_path = os.path.join( services_doc_path, service_name + '.rst') with open(service_doc_path, 'wb') as f: f.write(docs) boto3-1.9.253/boto3/docs/action.py000066400000000000000000000140321355237733400165420ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import xform_name from botocore.model import OperationModel from botocore.utils import get_service_module_name from botocore.docs.method import document_model_driven_method from botocore.docs.method import document_custom_method from boto3.docs.base import BaseDocumenter from boto3.docs.method import document_model_driven_resource_method from boto3.docs.utils import get_resource_ignore_params from boto3.docs.utils import get_resource_public_actions from boto3.docs.utils import add_resource_type_overview class ActionDocumenter(BaseDocumenter): def document_actions(self, section): modeled_actions_list = self._resource_model.actions modeled_actions = {} for modeled_action in modeled_actions_list: modeled_actions[modeled_action.name] = modeled_action resource_actions = get_resource_public_actions( self._resource.__class__) self.member_map['actions'] = sorted(resource_actions) add_resource_type_overview( section=section, resource_type='Actions', description=( 'Actions call operations on resources. They may ' 'automatically handle the passing in of arguments set ' 'from identifiers and some attributes.'), intro_link='actions_intro') for action_name in sorted(resource_actions): action_section = section.add_new_section(action_name) if action_name in ['load', 'reload'] and self._resource_model.load: document_load_reload_action( section=action_section, action_name=action_name, resource_name=self._resource_name, event_emitter=self._resource.meta.client.meta.events, load_model=self._resource_model.load, service_model=self._service_model ) elif action_name in modeled_actions: document_action( section=action_section, resource_name=self._resource_name, event_emitter=self._resource.meta.client.meta.events, action_model=modeled_actions[action_name], service_model=self._service_model, ) else: document_custom_method( action_section, action_name, resource_actions[action_name]) def document_action(section, resource_name, event_emitter, action_model, service_model, include_signature=True): """Documents a resource action :param section: The section to write to :param resource_name: The name of the resource :param event_emitter: The event emitter to use to emit events :param action_model: The model of the action :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ operation_model = service_model.operation_model( action_model.request.operation) ignore_params = get_resource_ignore_params(action_model.request.params) example_return_value = 'response' if action_model.resource: example_return_value = xform_name(action_model.resource.type) example_resource_name = xform_name(resource_name) if service_model.service_name == resource_name: example_resource_name = resource_name example_prefix = '%s = %s.%s' % ( example_return_value, example_resource_name, action_model.name) document_model_driven_resource_method( section=section, method_name=action_model.name, operation_model=operation_model, event_emitter=event_emitter, method_description=operation_model.documentation, example_prefix=example_prefix, exclude_input=ignore_params, resource_action_model=action_model, include_signature=include_signature ) def document_load_reload_action(section, action_name, resource_name, event_emitter, load_model, service_model, include_signature=True): """Documents the resource load action :param section: The section to write to :param action_name: The name of the loading action should be load or reload :param resource_name: The name of the resource :param event_emitter: The event emitter to use to emit events :param load_model: The model of the load action :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ description = ( 'Calls :py:meth:`%s.Client.%s` to update the attributes of the' ' %s resource. Note that the load and reload methods are ' 'the same method and can be used interchangeably.' % ( get_service_module_name(service_model), xform_name(load_model.request.operation), resource_name) ) example_resource_name = xform_name(resource_name) if service_model.service_name == resource_name: example_resource_name = resource_name example_prefix = '%s.%s' % (example_resource_name, action_name) document_model_driven_method( section=section, method_name=action_name, operation_model=OperationModel({}, service_model), event_emitter=event_emitter, method_description=description, example_prefix=example_prefix, include_signature=include_signature ) boto3-1.9.253/boto3/docs/attr.py000066400000000000000000000042511355237733400162410ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.docs.params import ResponseParamsDocumenter from boto3.docs.utils import get_identifier_description class ResourceShapeDocumenter(ResponseParamsDocumenter): EVENT_NAME = 'resource-shape' def document_attribute(section, service_name, resource_name, attr_name, event_emitter, attr_model, include_signature=True): if include_signature: section.style.start_sphinx_py_attr(attr_name) # Note that an attribute may have one, may have many, or may have no # operations that back the resource's shape. So we just set the # operation_name to the resource name if we ever to hook in and modify # a particular attribute. ResourceShapeDocumenter( service_name=service_name, operation_name=resource_name, event_emitter=event_emitter).document_params( section=section, shape=attr_model) def document_identifier(section, resource_name, identifier_model, include_signature=True): if include_signature: section.style.start_sphinx_py_attr(identifier_model.name) description = get_identifier_description( resource_name, identifier_model.name) description = '*(string)* ' + description section.write(description) def document_reference(section, reference_model, include_signature=True): if include_signature: section.style.start_sphinx_py_attr(reference_model.name) reference_type = '(:py:class:`%s`) ' % reference_model.resource.type section.write(reference_type) section.include_doc_string( 'The related %s if set, otherwise ``None``.' % reference_model.name ) boto3-1.9.253/boto3/docs/base.py000066400000000000000000000024621355237733400162030ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.compat import OrderedDict class BaseDocumenter(object): def __init__(self, resource): self._resource = resource self._client = self._resource.meta.client self._resource_model = self._resource.meta.resource_model self._service_model = self._client.meta.service_model self._resource_name = self._resource.meta.resource_model.name self._service_name = self._service_model.service_name self._service_docs_name = self._client.__class__.__name__ self.member_map = OrderedDict() self.represents_service_resource = ( self._service_name == self._resource_name) @property def class_name(self): return '%s.%s' % (self._service_docs_name, self._resource_name) boto3-1.9.253/boto3/docs/client.py000066400000000000000000000020501355237733400165400ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.docs.client import ClientDocumenter class Boto3ClientDocumenter(ClientDocumenter): def _add_client_creation_example(self, section): section.style.start_codeblock() section.style.new_line() section.write('import boto3') section.style.new_line() section.style.new_line() section.write( 'client = boto3.client(\'{service}\')'.format( service=self._service_name) ) section.style.end_codeblock() boto3-1.9.253/boto3/docs/collection.py000066400000000000000000000227711355237733400174310ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import xform_name from botocore.docs.method import get_instance_public_methods from botocore.docs.utils import DocumentedShape from boto3.docs.base import BaseDocumenter from boto3.docs.utils import get_resource_ignore_params from boto3.docs.method import document_model_driven_resource_method from boto3.docs.utils import add_resource_type_overview class CollectionDocumenter(BaseDocumenter): def document_collections(self, section): collections = self._resource.meta.resource_model.collections collections_list = [] add_resource_type_overview( section=section, resource_type='Collections', description=( 'Collections provide an interface to iterate over and ' 'manipulate groups of resources. '), intro_link='guide_collections') self.member_map['collections'] = collections_list for collection in collections: collection_section = section.add_new_section(collection.name) collections_list.append(collection.name) self._document_collection(collection_section, collection) def _document_collection(self, section, collection): methods = get_instance_public_methods( getattr(self._resource, collection.name)) document_collection_object(section, collection) batch_actions = {} for batch_action in collection.batch_actions: batch_actions[batch_action.name] = batch_action for method in sorted(methods): method_section = section.add_new_section(method) if method in batch_actions: document_batch_action( section=method_section, resource_name=self._resource_name, event_emitter=self._resource.meta.client.meta.events, batch_action_model=batch_actions[method], collection_model=collection, service_model=self._resource.meta.client.meta.service_model ) else: document_collection_method( section=method_section, resource_name=self._resource_name, action_name=method, event_emitter=self._resource.meta.client.meta.events, collection_model=collection, service_model=self._resource.meta.client.meta.service_model ) def document_collection_object(section, collection_model, include_signature=True): """Documents a collection resource object :param section: The section to write to :param collection_model: The model of the collection :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ if include_signature: section.style.start_sphinx_py_attr(collection_model.name) section.include_doc_string( 'A collection of %s resources' % collection_model.resource.type) def document_batch_action(section, resource_name, event_emitter, batch_action_model, service_model, collection_model, include_signature=True): """Documents a collection's batch action :param section: The section to write to :param resource_name: The name of the resource :param action_name: The name of collection action. Currently only can be all, filter, limit, or page_size :param event_emitter: The event emitter to use to emit events :param batch_action_model: The model of the batch action :param collection_model: The model of the collection :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ operation_model = service_model.operation_model( batch_action_model.request.operation) ignore_params = get_resource_ignore_params( batch_action_model.request.params) example_return_value = 'response' if batch_action_model.resource: example_return_value = xform_name(batch_action_model.resource.type) example_resource_name = xform_name(resource_name) if service_model.service_name == resource_name: example_resource_name = resource_name example_prefix = '%s = %s.%s.%s' % ( example_return_value, example_resource_name, collection_model.name, batch_action_model.name ) document_model_driven_resource_method( section=section, method_name=batch_action_model.name, operation_model=operation_model, event_emitter=event_emitter, method_description=operation_model.documentation, example_prefix=example_prefix, exclude_input=ignore_params, resource_action_model=batch_action_model, include_signature=include_signature ) def document_collection_method(section, resource_name, action_name, event_emitter, collection_model, service_model, include_signature=True): """Documents a collection method :param section: The section to write to :param resource_name: The name of the resource :param action_name: The name of collection action. Currently only can be all, filter, limit, or page_size :param event_emitter: The event emitter to use to emit events :param collection_model: The model of the collection :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ operation_model = service_model.operation_model( collection_model.request.operation) underlying_operation_members = [] if operation_model.input_shape: underlying_operation_members = operation_model.input_shape.members example_resource_name = xform_name(resource_name) if service_model.service_name == resource_name: example_resource_name = resource_name custom_action_info_dict = { 'all': { 'method_description': ( 'Creates an iterable of all %s resources ' 'in the collection.' % collection_model.resource.type), 'example_prefix': '%s_iterator = %s.%s.all' % ( xform_name(collection_model.resource.type), example_resource_name, collection_model.name), 'exclude_input': underlying_operation_members }, 'filter': { 'method_description': ( 'Creates an iterable of all %s resources ' 'in the collection filtered by kwargs passed to ' 'method.' % collection_model.resource.type), 'example_prefix': '%s_iterator = %s.%s.filter' % ( xform_name(collection_model.resource.type), example_resource_name, collection_model.name), 'exclude_input': get_resource_ignore_params( collection_model.request.params) }, 'limit': { 'method_description': ( 'Creates an iterable up to a specified amount of ' '%s resources in the collection.' % collection_model.resource.type), 'example_prefix': '%s_iterator = %s.%s.limit' % ( xform_name(collection_model.resource.type), example_resource_name, collection_model.name), 'include_input': [ DocumentedShape( name='count', type_name='integer', documentation=( 'The limit to the number of resources ' 'in the iterable.'))], 'exclude_input': underlying_operation_members }, 'page_size': { 'method_description': ( 'Creates an iterable of all %s resources ' 'in the collection, but limits the number of ' 'items returned by each service call by the specified ' 'amount.' % collection_model.resource.type), 'example_prefix': '%s_iterator = %s.%s.page_size' % ( xform_name(collection_model.resource.type), example_resource_name, collection_model.name), 'include_input': [ DocumentedShape( name='count', type_name='integer', documentation=( 'The number of items returned by each ' 'service call'))], 'exclude_input': underlying_operation_members } } if action_name in custom_action_info_dict: action_info = custom_action_info_dict[action_name] document_model_driven_resource_method( section=section, method_name=action_name, operation_model=operation_model, event_emitter=event_emitter, resource_action_model=collection_model, include_signature=include_signature, **action_info ) boto3-1.9.253/boto3/docs/docstring.py000066400000000000000000000051011355237733400172560ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.docs.docstring import LazyLoadedDocstring from boto3.docs.action import document_action from boto3.docs.action import document_load_reload_action from boto3.docs.subresource import document_sub_resource from boto3.docs.attr import document_attribute from boto3.docs.attr import document_identifier from boto3.docs.attr import document_reference from boto3.docs.collection import document_collection_object from boto3.docs.collection import document_collection_method from boto3.docs.collection import document_batch_action from boto3.docs.waiter import document_resource_waiter class ActionDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_action(*args, **kwargs) class LoadReloadDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_load_reload_action(*args, **kwargs) class SubResourceDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_sub_resource(*args, **kwargs) class AttributeDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_attribute(*args, **kwargs) class IdentifierDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_identifier(*args, **kwargs) class ReferenceDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_reference(*args, **kwargs) class CollectionDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_collection_object(*args, **kwargs) class CollectionMethodDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_collection_method(*args, **kwargs) class BatchActionDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_batch_action(*args, **kwargs) class ResourceWaiterDocstring(LazyLoadedDocstring): def _write_docstring(self, *args, **kwargs): document_resource_waiter(*args, **kwargs) boto3-1.9.253/boto3/docs/method.py000066400000000000000000000053201355237733400165450ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.docs.method import document_model_driven_method def document_model_driven_resource_method( section, method_name, operation_model, event_emitter, method_description=None, example_prefix=None, include_input=None, include_output=None, exclude_input=None, exclude_output=None, document_output=True, resource_action_model=None, include_signature=True): document_model_driven_method( section=section, method_name=method_name, operation_model=operation_model, event_emitter=event_emitter, method_description=method_description, example_prefix=example_prefix, include_input=include_input, include_output=include_output, exclude_input=exclude_input, exclude_output=exclude_output, document_output=document_output, include_signature=include_signature ) # If this action returns a resource modify the return example to # appropriately reflect that. if resource_action_model.resource: if 'return' in section.available_sections: section.delete_section('return') resource_type = resource_action_model.resource.type new_return_section = section.add_new_section('return') return_resource_type = '%s.%s' % ( operation_model.service_model.service_name, resource_type) return_type = ':py:class:`%s`' % return_resource_type return_description = '%s resource' % (resource_type) if _method_returns_resource_list(resource_action_model.resource): return_type = 'list(%s)' % return_type return_description = 'A list of %s resources' % ( resource_type) new_return_section.style.new_line() new_return_section.write( ':rtype: %s' % return_type) new_return_section.style.new_line() new_return_section.write( ':returns: %s' % return_description) new_return_section.style.new_line() def _method_returns_resource_list(resource): for identifier in resource.identifiers: if identifier.path and '[]' in identifier.path: return True return False boto3-1.9.253/boto3/docs/resource.py000066400000000000000000000253541355237733400171250ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import xform_name from botocore.docs.utils import get_official_service_name from boto3.docs.base import BaseDocumenter from boto3.docs.action import ActionDocumenter from boto3.docs.waiter import WaiterResourceDocumenter from boto3.docs.collection import CollectionDocumenter from boto3.docs.subresource import SubResourceDocumenter from boto3.docs.attr import document_attribute from boto3.docs.attr import document_identifier from boto3.docs.attr import document_reference from boto3.docs.utils import get_identifier_args_for_signature from boto3.docs.utils import get_identifier_values_for_example from boto3.docs.utils import get_identifier_description from boto3.docs.utils import add_resource_type_overview class ResourceDocumenter(BaseDocumenter): def __init__(self, resource, botocore_session): super(ResourceDocumenter, self).__init__(resource) self._botocore_session = botocore_session def document_resource(self, section): self._add_title(section) self._add_intro(section) overview_section = section.add_new_section('member-overview') self._add_identifiers(section) self._add_attributes(section) self._add_references(section) self._add_actions(section) self._add_sub_resources(section) self._add_collections(section) self._add_waiters(section) self._add_overview_of_members(overview_section) def _add_title(self, section): section.style.h2(self._resource_name) def _add_intro(self, section): identifier_names = [] if self._resource_model.identifiers: for identifier in self._resource_model.identifiers: identifier_names.append(identifier.name) # Write out the class signature. class_args = get_identifier_args_for_signature(identifier_names) section.style.start_sphinx_py_class( class_name='%s(%s)' % (self.class_name, class_args)) # Add as short description about the resource description_section = section.add_new_section('description') self._add_description(description_section) # Add an example of how to instantiate the resource example_section = section.add_new_section('example') self._add_example(example_section, identifier_names) # Add the description for the parameters to instantiate the # resource. param_section = section.add_new_section('params') self._add_params_description(param_section, identifier_names) def _add_description(self, section): official_service_name = get_official_service_name( self._service_model) section.write( 'A resource representing an %s %s' % ( official_service_name, self._resource_name)) def _add_example(self, section, identifier_names): section.style.start_codeblock() section.style.new_line() section.write('import boto3') section.style.new_line() section.style.new_line() section.write( '%s = boto3.resource(\'%s\')' % ( self._service_name, self._service_name) ) section.style.new_line() example_values = get_identifier_values_for_example(identifier_names) section.write( '%s = %s.%s(%s)' % ( xform_name(self._resource_name), self._service_name, self._resource_name, example_values)) section.style.end_codeblock() def _add_params_description(self, section, identifier_names): for identifier_name in identifier_names: description = get_identifier_description( self._resource_name, identifier_name) section.write(':type %s: string' % identifier_name) section.style.new_line() section.write(':param %s: %s' % ( identifier_name, description)) section.style.new_line() def _add_overview_of_members(self, section): for resource_member_type in self.member_map: section.style.new_line() section.write('These are the resource\'s available %s:' % ( resource_member_type)) section.style.new_line() for member in self.member_map[resource_member_type]: if resource_member_type in ['identifiers', 'attributes', 'references', 'collections']: section.style.li(':py:attr:`%s`' % member) else: section.style.li(':py:meth:`%s()`' % member) def _add_identifiers(self, section): identifiers = self._resource.meta.resource_model.identifiers section = section.add_new_section('identifiers') member_list = [] if identifiers: self.member_map['identifiers'] = member_list add_resource_type_overview( section=section, resource_type='Identifiers', description=( 'Identifiers are properties of a resource that are ' 'set upon instantation of the resource.'), intro_link='identifiers_attributes_intro') for identifier in identifiers: identifier_section = section.add_new_section(identifier.name) member_list.append(identifier.name) document_identifier( section=identifier_section, resource_name=self._resource_name, identifier_model=identifier ) def _add_attributes(self, section): service_model = self._resource.meta.client.meta.service_model attributes = {} if self._resource.meta.resource_model.shape: shape = service_model.shape_for( self._resource.meta.resource_model.shape) attributes = self._resource.meta.resource_model.get_attributes( shape) section = section.add_new_section('attributes') attribute_list = [] if attributes: add_resource_type_overview( section=section, resource_type='Attributes', description=( 'Attributes provide access' ' to the properties of a resource. Attributes are lazy-' 'loaded the first time one is accessed via the' ' :py:meth:`load` method.'), intro_link='identifiers_attributes_intro') self.member_map['attributes'] = attribute_list for attr_name in sorted(attributes): _, attr_shape = attributes[attr_name] attribute_section = section.add_new_section(attr_name) attribute_list.append(attr_name) document_attribute( section=attribute_section, service_name=self._service_name, resource_name=self._resource_name, attr_name=attr_name, event_emitter=self._resource.meta.client.meta.events, attr_model=attr_shape ) def _add_references(self, section): section = section.add_new_section('references') references = self._resource.meta.resource_model.references reference_list = [] if references: add_resource_type_overview( section=section, resource_type='References', description=( 'References are related resource instances that have ' 'a belongs-to relationship.'), intro_link='references_intro') self.member_map['references'] = reference_list for reference in references: reference_section = section.add_new_section(reference.name) reference_list.append(reference.name) document_reference( section=reference_section, reference_model=reference ) def _add_actions(self, section): section = section.add_new_section('actions') actions = self._resource.meta.resource_model.actions if actions: documenter = ActionDocumenter(self._resource) documenter.member_map = self.member_map documenter.document_actions(section) def _add_sub_resources(self, section): section = section.add_new_section('sub-resources') sub_resources = self._resource.meta.resource_model.subresources if sub_resources: documenter = SubResourceDocumenter(self._resource) documenter.member_map = self.member_map documenter.document_sub_resources(section) def _add_collections(self, section): section = section.add_new_section('collections') collections = self._resource.meta.resource_model.collections if collections: documenter = CollectionDocumenter(self._resource) documenter.member_map = self.member_map documenter.document_collections(section) def _add_waiters(self, section): section = section.add_new_section('waiters') waiters = self._resource.meta.resource_model.waiters if waiters: service_waiter_model = self._botocore_session.get_waiter_model( self._service_name) documenter = WaiterResourceDocumenter( self._resource, service_waiter_model) documenter.member_map = self.member_map documenter.document_resource_waiters(section) class ServiceResourceDocumenter(ResourceDocumenter): @property def class_name(self): return '%s.ServiceResource' % self._service_docs_name def _add_title(self, section): section.style.h2('Service Resource') def _add_description(self, section): official_service_name = get_official_service_name( self._service_model) section.write( 'A resource representing %s' % official_service_name) def _add_example(self, section, identifier_names): section.style.start_codeblock() section.style.new_line() section.write('import boto3') section.style.new_line() section.style.new_line() section.write( '%s = boto3.resource(\'%s\')' % ( self._service_name, self._service_name)) section.style.end_codeblock() boto3-1.9.253/boto3/docs/service.py000066400000000000000000000125471355237733400167360ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import os import boto3 from botocore.exceptions import DataNotFoundError from botocore.docs.service import ServiceDocumenter as BaseServiceDocumenter from botocore.docs.bcdoc.restdoc import DocumentStructure from boto3.utils import ServiceContext from boto3.docs.client import Boto3ClientDocumenter from boto3.docs.resource import ResourceDocumenter from boto3.docs.resource import ServiceResourceDocumenter class ServiceDocumenter(BaseServiceDocumenter): # The path used to find examples EXAMPLE_PATH = os.path.join(os.path.dirname(boto3.__file__), 'examples') def __init__(self, service_name, session): super(ServiceDocumenter, self).__init__( service_name=service_name, # I know that this is an internal attribute, but the botocore session # is needed to load the paginator and waiter models. session=session._session, ) self._boto3_session = session self._client = self._boto3_session.client(service_name) self._service_resource = None if self._service_name in self._boto3_session.get_available_resources(): self._service_resource = self._boto3_session.resource(service_name) self.sections = [ 'title', 'table-of-contents', 'client', 'paginators', 'waiters', 'service-resource', 'resources', 'examples' ] def document_service(self): """Documents an entire service. :returns: The reStructured text of the documented service. """ doc_structure = DocumentStructure( self._service_name, section_names=self.sections, target='html') self.title(doc_structure.get_section('title')) self.table_of_contents(doc_structure.get_section('table-of-contents')) self.client_api(doc_structure.get_section('client')) self.paginator_api(doc_structure.get_section('paginators')) self.waiter_api(doc_structure.get_section('waiters')) if self._service_resource: self._document_service_resource( doc_structure.get_section('service-resource')) self._document_resources(doc_structure.get_section('resources')) self._document_examples(doc_structure.get_section('examples')) return doc_structure.flush_structure() def client_api(self, section): examples = None try: examples = self.get_examples(self._service_name) except DataNotFoundError: pass Boto3ClientDocumenter(self._client, examples).document_client(section) def _document_service_resource(self, section): ServiceResourceDocumenter( self._service_resource, self._session).document_resource( section) def _document_resources(self, section): temp_identifier_value = 'foo' loader = self._session.get_component('data_loader') json_resource_model = loader.load_service_model( self._service_name, 'resources-1') service_model = self._service_resource.meta.client.meta.service_model for resource_name in json_resource_model['resources']: resource_model = json_resource_model['resources'][resource_name] resource_cls = self._boto3_session.resource_factory.\ load_from_definition( resource_name=resource_name, single_resource_json_definition=resource_model, service_context=ServiceContext( service_name=self._service_name, resource_json_definitions=json_resource_model[ 'resources'], service_model=service_model, service_waiter_model=None ) ) identifiers = resource_cls.meta.resource_model.identifiers args = [] for _ in identifiers: args.append(temp_identifier_value) resource = resource_cls(*args, client=self._client) ResourceDocumenter( resource, self._session).document_resource( section.add_new_section(resource.meta.resource_model.name)) def _get_example_file(self): return os.path.realpath( os.path.join(self.EXAMPLE_PATH, self._service_name + '.rst')) def _document_examples(self, section): examples_file = self._get_example_file() if os.path.isfile(examples_file): section.style.h2('Examples') section.style.new_line() section.write(".. contents::\n :local:\n :depth: 1") section.style.new_line() section.style.new_line() with open(examples_file, 'r') as f: section.write(f.read()) boto3-1.9.253/boto3/docs/subresource.py000066400000000000000000000110141355237733400176230ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import xform_name from botocore.utils import get_service_module_name from boto3.docs.base import BaseDocumenter from boto3.docs.utils import get_identifier_args_for_signature from boto3.docs.utils import get_identifier_values_for_example from boto3.docs.utils import get_identifier_description from boto3.docs.utils import add_resource_type_overview class SubResourceDocumenter(BaseDocumenter): def document_sub_resources(self, section): add_resource_type_overview( section=section, resource_type='Sub-resources', description=( 'Sub-resources are methods that create a new instance of a' ' child resource. This resource\'s identifiers get passed' ' along to the child.'), intro_link='subresources_intro') sub_resources = sorted( self._resource.meta.resource_model.subresources, key=lambda sub_resource: sub_resource.name ) sub_resources_list = [] self.member_map['sub-resources'] = sub_resources_list for sub_resource in sub_resources: sub_resource_section = section.add_new_section(sub_resource.name) sub_resources_list.append(sub_resource.name) document_sub_resource( section=sub_resource_section, resource_name=self._resource_name, sub_resource_model=sub_resource, service_model=self._service_model ) def document_sub_resource(section, resource_name, sub_resource_model, service_model, include_signature=True): """Documents a resource action :param section: The section to write to :param resource_name: The name of the resource :param sub_resource_model: The model of the subresource :param service_model: The model of the service :param include_signature: Whether or not to include the signature. It is useful for generating docstrings. """ identifiers_needed = [] for identifier in sub_resource_model.resource.identifiers: if identifier.source == 'input': identifiers_needed.append(xform_name(identifier.target)) if include_signature: signature_args = get_identifier_args_for_signature(identifiers_needed) section.style.start_sphinx_py_method( sub_resource_model.name, signature_args) method_intro_section = section.add_new_section( 'method-intro') description = 'Creates a %s resource.' % sub_resource_model.resource.type method_intro_section.include_doc_string(description) example_section = section.add_new_section('example') example_values = get_identifier_values_for_example(identifiers_needed) example_resource_name = xform_name(resource_name) if service_model.service_name == resource_name: example_resource_name = resource_name example = '%s = %s.%s(%s)' % ( xform_name(sub_resource_model.resource.type), example_resource_name, sub_resource_model.name, example_values ) example_section.style.start_codeblock() example_section.write(example) example_section.style.end_codeblock() param_section = section.add_new_section('params') for identifier in identifiers_needed: description = get_identifier_description( sub_resource_model.name, identifier) param_section.write(':type %s: string' % identifier) param_section.style.new_line() param_section.write(':param %s: %s' % ( identifier, description)) param_section.style.new_line() return_section = section.add_new_section('return') return_section.style.new_line() return_section.write( ':rtype: :py:class:`%s.%s`' % ( get_service_module_name(service_model), sub_resource_model.resource.type)) return_section.style.new_line() return_section.write( ':returns: A %s resource' % sub_resource_model.resource.type) return_section.style.new_line() boto3-1.9.253/boto3/docs/utils.py000066400000000000000000000131161355237733400164270ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import inspect import jmespath from botocore.compat import six def get_resource_ignore_params(params): """Helper method to determine which parameters to ignore for actions :returns: A list of the parameter names that does not need to be included in a resource's method call for documentation purposes. """ ignore_params = [] for param in params: result = jmespath.compile(param.target) current = result.parsed # Use JMESPath to find the left most element in the target expression # which will be the parameter to ignore in the action call. while current['children']: current = current['children'][0] # Make sure the parameter we are about to ignore is a field. # If it is not, we should ignore the result to avoid false positives. if current['type'] == 'field': ignore_params.append(current['value']) return ignore_params def is_resource_action(action_handle): if six.PY3: return inspect.isfunction(action_handle) else: return inspect.ismethod(action_handle) def get_resource_public_actions(resource_class): resource_class_members = inspect.getmembers(resource_class) resource_methods = {} for name, member in resource_class_members: if not name.startswith('_'): if not name[0].isupper(): if not name.startswith('wait_until'): if is_resource_action(member): resource_methods[name] = member return resource_methods def get_identifier_values_for_example(identifier_names): example_values = ['\'%s\'' % identifier for identifier in identifier_names] return ','.join(example_values) def get_identifier_args_for_signature(identifier_names): return ','.join(identifier_names) def get_identifier_description(resource_name, identifier_name): return "The %s's %s identifier. This **must** be set." % ( resource_name, identifier_name) def add_resource_type_overview(section, resource_type, description, intro_link=None): section.style.new_line() section.write('.. rst-class:: admonition-title') section.style.new_line() section.style.new_line() section.write(resource_type) section.style.new_line() section.style.new_line() section.write(description) section.style.new_line() if intro_link is not None: section.write('For more information about %s refer to the ' ':ref:`Resources Introduction Guide<%s>`.' % ( resource_type.lower(), intro_link)) section.style.new_line() class DocumentModifiedShape(object): def __init__(self, shape_name, new_type, new_description, new_example_value): self._shape_name = shape_name self._new_type = new_type self._new_description = new_description self._new_example_value = new_example_value def replace_documentation_for_matching_shape(self, event_name, section, **kwargs): if self._shape_name == section.context.get('shape'): self._replace_documentation(event_name, section) for section_name in section.available_sections: sub_section = section.get_section(section_name) if self._shape_name == sub_section.context.get('shape'): self._replace_documentation(event_name, sub_section) else: self.replace_documentation_for_matching_shape( event_name, sub_section) def _replace_documentation(self, event_name, section): if event_name.startswith('docs.request-example') or \ event_name.startswith('docs.response-example'): section.remove_all_sections() section.clear_text() section.write(self._new_example_value) if event_name.startswith('docs.request-params') or \ event_name.startswith('docs.response-params'): for section_name in section.available_sections: # Delete any extra members as a new shape is being # used. if section_name not in ['param-name', 'param-documentation', 'end-structure', 'param-type', 'end-param']: section.delete_section(section_name) # Update the documentation description_section = section.get_section('param-documentation') description_section.clear_text() description_section.write(self._new_description) # Update the param type type_section = section.get_section('param-type') if type_section.getvalue().decode('utf-8').startswith(':type'): type_section.clear_text() type_section.write(':type %s: %s' % ( section.name, self._new_type)) else: type_section.clear_text() type_section.style.italics('(%s) -- ' % self._new_type) boto3-1.9.253/boto3/docs/waiter.py000066400000000000000000000077161355237733400165730ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import xform_name from botocore.utils import get_service_module_name from botocore.docs.method import document_model_driven_method from boto3.docs.base import BaseDocumenter from boto3.docs.utils import get_resource_ignore_params from boto3.docs.utils import add_resource_type_overview class WaiterResourceDocumenter(BaseDocumenter): def __init__(self, resource, service_waiter_model): super(WaiterResourceDocumenter, self).__init__(resource) self._service_waiter_model = service_waiter_model def document_resource_waiters(self, section): waiters = self._resource.meta.resource_model.waiters add_resource_type_overview( section=section, resource_type='Waiters', description=( 'Waiters provide an interface to wait for a resource' ' to reach a specific state.'), intro_link='waiters_intro') waiter_list = [] self.member_map['waiters'] = waiter_list for waiter in waiters: waiter_section = section.add_new_section(waiter.name) waiter_list.append(waiter.name) document_resource_waiter( section=waiter_section, resource_name=self._resource_name, event_emitter=self._resource.meta.client.meta.events, service_model=self._service_model, resource_waiter_model=waiter, service_waiter_model=self._service_waiter_model ) def document_resource_waiter(section, resource_name, event_emitter, service_model, resource_waiter_model, service_waiter_model, include_signature=True): waiter_model = service_waiter_model.get_waiter( resource_waiter_model.waiter_name) operation_model = service_model.operation_model( waiter_model.operation) ignore_params = get_resource_ignore_params(resource_waiter_model.params) service_module_name = get_service_module_name(service_model) description = ( 'Waits until this %s is %s. This method calls ' ':py:meth:`%s.Waiter.%s.wait` which polls. ' ':py:meth:`%s.Client.%s` every %s seconds until ' 'a successful state is reached. An error is returned ' 'after %s failed checks.' % ( resource_name, ' '.join(resource_waiter_model.name.split('_')[2:]), service_module_name, xform_name(resource_waiter_model.waiter_name), service_module_name, xform_name(waiter_model.operation), waiter_model.delay, waiter_model.max_attempts)) example_prefix = '%s.%s' % ( xform_name(resource_name), resource_waiter_model.name) document_model_driven_method( section=section, method_name=resource_waiter_model.name, operation_model=operation_model, event_emitter=event_emitter, example_prefix=example_prefix, method_description=description, exclude_input=ignore_params, include_signature=include_signature ) if 'return' in section.available_sections: # Waiters do not return anything so we should remove # any sections that may document the underlying return # value of the client method. return_section = section.get_section('return') return_section.clear_text() return_section.remove_all_sections() return_section.write(':returns: None') boto3-1.9.253/boto3/dynamodb/000077500000000000000000000000001355237733400155605ustar00rootroot00000000000000boto3-1.9.253/boto3/dynamodb/__init__.py000066400000000000000000000010611355237733400176670ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/boto3/dynamodb/conditions.py000066400000000000000000000350331355237733400203070ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from collections import namedtuple import re from boto3.exceptions import DynamoDBOperationNotSupportedError from boto3.exceptions import DynamoDBNeedsConditionError from boto3.exceptions import DynamoDBNeedsKeyConditionError ATTR_NAME_REGEX = re.compile(r'[^.\[\]]+(?![^\[]*\])') class ConditionBase(object): expression_format = '' expression_operator = '' has_grouped_values = False def __init__(self, *values): self._values = values def __and__(self, other): if not isinstance(other, ConditionBase): raise DynamoDBOperationNotSupportedError('AND', other) return And(self, other) def __or__(self, other): if not isinstance(other, ConditionBase): raise DynamoDBOperationNotSupportedError('OR', other) return Or(self, other) def __invert__(self): return Not(self) def get_expression(self): return {'format': self.expression_format, 'operator': self.expression_operator, 'values': self._values} def __eq__(self, other): if isinstance(other, type(self)): if self._values == other._values: return True return False def __ne__(self, other): return not self.__eq__(other) class AttributeBase(object): def __init__(self, name): self.name = name def __and__(self, value): raise DynamoDBOperationNotSupportedError('AND', self) def __or__(self, value): raise DynamoDBOperationNotSupportedError('OR', self) def __invert__(self): raise DynamoDBOperationNotSupportedError('NOT', self) def eq(self, value): """Creates a condition where the attribute is equal to the value. :param value: The value that the attribute is equal to. """ return Equals(self, value) def lt(self, value): """Creates a condition where the attribute is less than the value. :param value: The value that the attribute is less than. """ return LessThan(self, value) def lte(self, value): """Creates a condition where the attribute is less than or equal to the value. :param value: The value that the attribute is less than or equal to. """ return LessThanEquals(self, value) def gt(self, value): """Creates a condition where the attribute is greater than the value. :param value: The value that the attribute is greater than. """ return GreaterThan(self, value) def gte(self, value): """Creates a condition where the attribute is greater than or equal to the value. :param value: The value that the attribute is greater than or equal to. """ return GreaterThanEquals(self, value) def begins_with(self, value): """Creates a condition where the attribute begins with the value. :param value: The value that the attribute begins with. """ return BeginsWith(self, value) def between(self, low_value, high_value): """Creates a condition where the attribute is greater than or equal to the low value and less than or equal to the high value. :param low_value: The value that the attribute is greater than. :param high_value: The value that the attribute is less than. """ return Between(self, low_value, high_value) def __eq__(self, other): return isinstance(other, type(self)) and self.name == other.name def __ne__(self, other): return not self.__eq__(other) class ConditionAttributeBase(ConditionBase, AttributeBase): """This base class is for conditions that can have attribute methods. One example is the Size condition. To complete a condition, you need to apply another AttributeBase method like eq(). """ def __init__(self, *values): ConditionBase.__init__(self, *values) # This is assuming the first value to the condition is the attribute # in which can be used to generate its attribute base. AttributeBase.__init__(self, values[0].name) def __eq__(self, other): return ConditionBase.__eq__(self, other) and \ AttributeBase.__eq__(self, other) def __ne__(self, other): return not self.__eq__(other) class ComparisonCondition(ConditionBase): expression_format = '{0} {operator} {1}' class Equals(ComparisonCondition): expression_operator = '=' class NotEquals(ComparisonCondition): expression_operator = '<>' class LessThan(ComparisonCondition): expression_operator = '<' class LessThanEquals(ComparisonCondition): expression_operator = '<=' class GreaterThan(ComparisonCondition): expression_operator = '>' class GreaterThanEquals(ComparisonCondition): expression_operator = '>=' class In(ComparisonCondition): expression_operator = 'IN' has_grouped_values = True class Between(ConditionBase): expression_operator = 'BETWEEN' expression_format = '{0} {operator} {1} AND {2}' class BeginsWith(ConditionBase): expression_operator = 'begins_with' expression_format = '{operator}({0}, {1})' class Contains(ConditionBase): expression_operator = 'contains' expression_format = '{operator}({0}, {1})' class Size(ConditionAttributeBase): expression_operator = 'size' expression_format = '{operator}({0})' class AttributeType(ConditionBase): expression_operator = 'attribute_type' expression_format = '{operator}({0}, {1})' class AttributeExists(ConditionBase): expression_operator = 'attribute_exists' expression_format = '{operator}({0})' class AttributeNotExists(ConditionBase): expression_operator = 'attribute_not_exists' expression_format = '{operator}({0})' class And(ConditionBase): expression_operator = 'AND' expression_format = '({0} {operator} {1})' class Or(ConditionBase): expression_operator = 'OR' expression_format = '({0} {operator} {1})' class Not(ConditionBase): expression_operator = 'NOT' expression_format = '({operator} {0})' class Key(AttributeBase): pass class Attr(AttributeBase): """Represents an DynamoDB item's attribute.""" def ne(self, value): """Creates a condition where the attribute is not equal to the value :param value: The value that the attribute is not equal to. """ return NotEquals(self, value) def is_in(self, value): """Creates a condition where the attribute is in the value, :type value: list :param value: The value that the attribute is in. """ return In(self, value) def exists(self): """Creates a condition where the attribute exists.""" return AttributeExists(self) def not_exists(self): """Creates a condition where the attribute does not exist.""" return AttributeNotExists(self) def contains(self, value): """Creates a condition where the attribute contains the value. :param value: The value the attribute contains. """ return Contains(self, value) def size(self): """Creates a condition for the attribute size. Note another AttributeBase method must be called on the returned size condition to be a valid DynamoDB condition. """ return Size(self) def attribute_type(self, value): """Creates a condition for the attribute type. :param value: The type of the attribute. """ return AttributeType(self, value) BuiltConditionExpression = namedtuple( 'BuiltConditionExpression', ['condition_expression', 'attribute_name_placeholders', 'attribute_value_placeholders'] ) class ConditionExpressionBuilder(object): """This class is used to build condition expressions with placeholders""" def __init__(self): self._name_count = 0 self._value_count = 0 self._name_placeholder = 'n' self._value_placeholder = 'v' def _get_name_placeholder(self): return '#' + self._name_placeholder + str(self._name_count) def _get_value_placeholder(self): return ':' + self._value_placeholder + str(self._value_count) def reset(self): """Resets the placeholder name and values""" self._name_count = 0 self._value_count = 0 def build_expression(self, condition, is_key_condition=False): """Builds the condition expression and the dictionary of placeholders. :type condition: ConditionBase :param condition: A condition to be built into a condition expression string with any necessary placeholders. :type is_key_condition: Boolean :param is_key_condition: True if the expression is for a KeyConditionExpression. False otherwise. :rtype: (string, dict, dict) :returns: Will return a string representing the condition with placeholders inserted where necessary, a dictionary of placeholders for attribute names, and a dictionary of placeholders for attribute values. Here is a sample return value: ('#n0 = :v0', {'#n0': 'myattribute'}, {':v1': 'myvalue'}) """ if not isinstance(condition, ConditionBase): raise DynamoDBNeedsConditionError(condition) attribute_name_placeholders = {} attribute_value_placeholders = {} condition_expression = self._build_expression( condition, attribute_name_placeholders, attribute_value_placeholders, is_key_condition=is_key_condition) return BuiltConditionExpression( condition_expression=condition_expression, attribute_name_placeholders=attribute_name_placeholders, attribute_value_placeholders=attribute_value_placeholders ) def _build_expression(self, condition, attribute_name_placeholders, attribute_value_placeholders, is_key_condition): expression_dict = condition.get_expression() replaced_values = [] for value in expression_dict['values']: # Build the necessary placeholders for that value. # Placeholders are built for both attribute names and values. replaced_value = self._build_expression_component( value, attribute_name_placeholders, attribute_value_placeholders, condition.has_grouped_values, is_key_condition) replaced_values.append(replaced_value) # Fill out the expression using the operator and the # values that have been replaced with placeholders. return expression_dict['format'].format( *replaced_values, operator=expression_dict['operator']) def _build_expression_component(self, value, attribute_name_placeholders, attribute_value_placeholders, has_grouped_values, is_key_condition): # Continue to recurse if the value is a ConditionBase in order # to extract out all parts of the expression. if isinstance(value, ConditionBase): return self._build_expression( value, attribute_name_placeholders, attribute_value_placeholders, is_key_condition) # If it is not a ConditionBase, we can recurse no further. # So we check if it is an attribute and add placeholders for # its name elif isinstance(value, AttributeBase): if is_key_condition and not isinstance(value, Key): raise DynamoDBNeedsKeyConditionError( 'Attribute object %s is of type %s. ' 'KeyConditionExpression only supports Attribute objects ' 'of type Key' % (value.name, type(value))) return self._build_name_placeholder( value, attribute_name_placeholders) # If it is anything else, we treat it as a value and thus placeholders # are needed for the value. else: return self._build_value_placeholder( value, attribute_value_placeholders, has_grouped_values) def _build_name_placeholder(self, value, attribute_name_placeholders): attribute_name = value.name # Figure out which parts of the attribute name that needs replacement. attribute_name_parts = ATTR_NAME_REGEX.findall(attribute_name) # Add a temporary placeholder for each of these parts. placeholder_format = ATTR_NAME_REGEX.sub('%s', attribute_name) str_format_args = [] for part in attribute_name_parts: name_placeholder = self._get_name_placeholder() self._name_count += 1 str_format_args.append(name_placeholder) # Add the placeholder and value to dictionary of name placeholders. attribute_name_placeholders[name_placeholder] = part # Replace the temporary placeholders with the designated placeholders. return placeholder_format % tuple(str_format_args) def _build_value_placeholder(self, value, attribute_value_placeholders, has_grouped_values=False): # If the values are grouped, we need to add a placeholder for # each element inside of the actual value. if has_grouped_values: placeholder_list = [] for v in value: value_placeholder = self._get_value_placeholder() self._value_count += 1 placeholder_list.append(value_placeholder) attribute_value_placeholders[value_placeholder] = v # Assuming the values are grouped by parenthesis. # IN is the currently the only one that uses this so it maybe # needed to be changed in future. return '(' + ', '.join(placeholder_list) + ')' # Otherwise, treat the value as a single value that needs only # one placeholder. else: value_placeholder = self._get_value_placeholder() self._value_count += 1 attribute_value_placeholders[value_placeholder] = value return value_placeholder boto3-1.9.253/boto3/dynamodb/table.py000066400000000000000000000142251355237733400172250ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import logging logger = logging.getLogger(__name__) def register_table_methods(base_classes, **kwargs): base_classes.insert(0, TableResource) # This class can be used to add any additional methods we want # onto a table resource. Ideally to avoid creating a new # base class for every method we can just update this # class instead. Just be sure to move the bulk of the # actual method implementation to another class. class TableResource(object): def __init__(self, *args, **kwargs): super(TableResource, self).__init__(*args, **kwargs) def batch_writer(self, overwrite_by_pkeys=None): """Create a batch writer object. This method creates a context manager for writing objects to Amazon DynamoDB in batch. The batch writer will automatically handle buffering and sending items in batches. In addition, the batch writer will also automatically handle any unprocessed items and resend them as needed. All you need to do is call ``put_item`` for any items you want to add, and ``delete_item`` for any items you want to delete. Example usage:: with table.batch_writer() as batch: for _ in xrange(1000000): batch.put_item(Item={'HashKey': '...', 'Otherstuff': '...'}) # You can also delete_items in a batch. batch.delete_item(Key={'HashKey': 'SomeHashKey'}) :type overwrite_by_pkeys: list(string) :param overwrite_by_pkeys: De-duplicate request items in buffer if match new request item on specified primary keys. i.e ``["partition_key1", "sort_key2", "sort_key3"]`` """ return BatchWriter(self.name, self.meta.client, overwrite_by_pkeys=overwrite_by_pkeys) class BatchWriter(object): """Automatically handle batch writes to DynamoDB for a single table.""" def __init__(self, table_name, client, flush_amount=25, overwrite_by_pkeys=None): """ :type table_name: str :param table_name: The name of the table. The class handles batch writes to a single table. :type client: ``botocore.client.Client`` :param client: A botocore client. Note this client **must** have the dynamodb customizations applied to it for transforming AttributeValues into the wire protocol. What this means in practice is that you need to use a client that comes from a DynamoDB resource if you're going to instantiate this class directly, i.e ``boto3.resource('dynamodb').Table('foo').meta.client``. :type flush_amount: int :param flush_amount: The number of items to keep in a local buffer before sending a batch_write_item request to DynamoDB. :type overwrite_by_pkeys: list(string) :param overwrite_by_pkeys: De-duplicate request items in buffer if match new request item on specified primary keys. i.e ``["partition_key1", "sort_key2", "sort_key3"]`` """ self._table_name = table_name self._client = client self._items_buffer = [] self._flush_amount = flush_amount self._overwrite_by_pkeys = overwrite_by_pkeys def put_item(self, Item): self._add_request_and_process({'PutRequest': {'Item': Item}}) def delete_item(self, Key): self._add_request_and_process({'DeleteRequest': {'Key': Key}}) def _add_request_and_process(self, request): if self._overwrite_by_pkeys: self._remove_dup_pkeys_request_if_any(request) self._items_buffer.append(request) self._flush_if_needed() def _remove_dup_pkeys_request_if_any(self, request): pkey_values_new = self._extract_pkey_values(request) for item in self._items_buffer: if self._extract_pkey_values(item) == pkey_values_new: self._items_buffer.remove(item) logger.debug("With overwrite_by_pkeys enabled, skipping " "request:%s", item) def _extract_pkey_values(self, request): if request.get('PutRequest'): return [request['PutRequest']['Item'][key] for key in self._overwrite_by_pkeys] elif request.get('DeleteRequest'): return [request['DeleteRequest']['Key'][key] for key in self._overwrite_by_pkeys] return None def _flush_if_needed(self): if len(self._items_buffer) >= self._flush_amount: self._flush() def _flush(self): items_to_send = self._items_buffer[:self._flush_amount] self._items_buffer = self._items_buffer[self._flush_amount:] response = self._client.batch_write_item( RequestItems={self._table_name: items_to_send}) unprocessed_items = response['UnprocessedItems'] if unprocessed_items and unprocessed_items[self._table_name]: # Any unprocessed_items are immediately added to the # next batch we send. self._items_buffer.extend(unprocessed_items[self._table_name]) else: self._items_buffer = [] logger.debug("Batch write sent %s, unprocessed: %s", len(items_to_send), len(self._items_buffer)) def __enter__(self): return self def __exit__(self, exc_type, exc_value, tb): # When we exit, we need to keep flushing whatever's left # until there's nothing left in our items buffer. while self._items_buffer: self._flush() boto3-1.9.253/boto3/dynamodb/transform.py000066400000000000000000000301241355237733400201450ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import copy from boto3.compat import collections_abc from boto3.dynamodb.types import TypeSerializer, TypeDeserializer from boto3.dynamodb.conditions import ConditionBase from boto3.dynamodb.conditions import ConditionExpressionBuilder from boto3.docs.utils import DocumentModifiedShape def register_high_level_interface(base_classes, **kwargs): base_classes.insert(0, DynamoDBHighLevelResource) def copy_dynamodb_params(params, **kwargs): return copy.deepcopy(params) class DynamoDBHighLevelResource(object): def __init__(self, *args, **kwargs): super(DynamoDBHighLevelResource, self).__init__(*args, **kwargs) # Apply handler that creates a copy of the user provided dynamodb # item such that it can be modified. self.meta.client.meta.events.register( 'provide-client-params.dynamodb', copy_dynamodb_params, unique_id='dynamodb-create-params-copy' ) self._injector = TransformationInjector() # Apply the handler that generates condition expressions including # placeholders. self.meta.client.meta.events.register( 'before-parameter-build.dynamodb', self._injector.inject_condition_expressions, unique_id='dynamodb-condition-expression') # Apply the handler that serializes the request from python # types to dynamodb types. self.meta.client.meta.events.register( 'before-parameter-build.dynamodb', self._injector.inject_attribute_value_input, unique_id='dynamodb-attr-value-input') # Apply the handler that deserializes the response from dynamodb # types to python types. self.meta.client.meta.events.register( 'after-call.dynamodb', self._injector.inject_attribute_value_output, unique_id='dynamodb-attr-value-output') # Apply the documentation customizations to account for # the transformations. attr_value_shape_docs = DocumentModifiedShape( 'AttributeValue', new_type='valid DynamoDB type', new_description=( '- The value of the attribute. The valid value types are ' 'listed in the ' ':ref:`DynamoDB Reference Guide`.' ), new_example_value=( '\'string\'|123|Binary(b\'bytes\')|True|None|set([\'string\'])' '|set([123])|set([Binary(b\'bytes\')])|[]|{}') ) key_expression_shape_docs = DocumentModifiedShape( 'KeyExpression', new_type=( 'condition from :py:class:`boto3.dynamodb.conditions.Key` ' 'method' ), new_description=( 'The condition(s) a key(s) must meet. Valid conditions are ' 'listed in the ' ':ref:`DynamoDB Reference Guide`.' ), new_example_value='Key(\'mykey\').eq(\'myvalue\')' ) con_expression_shape_docs = DocumentModifiedShape( 'ConditionExpression', new_type=( 'condition from :py:class:`boto3.dynamodb.conditions.Attr` ' 'method' ), new_description=( 'The condition(s) an attribute(s) must meet. Valid conditions ' 'are listed in the ' ':ref:`DynamoDB Reference Guide`.' ), new_example_value='Attr(\'myattribute\').eq(\'myvalue\')' ) self.meta.client.meta.events.register( 'docs.*.dynamodb.*.complete-section', attr_value_shape_docs.replace_documentation_for_matching_shape, unique_id='dynamodb-attr-value-docs') self.meta.client.meta.events.register( 'docs.*.dynamodb.*.complete-section', key_expression_shape_docs.replace_documentation_for_matching_shape, unique_id='dynamodb-key-expression-docs') self.meta.client.meta.events.register( 'docs.*.dynamodb.*.complete-section', con_expression_shape_docs.replace_documentation_for_matching_shape, unique_id='dynamodb-cond-expression-docs') class TransformationInjector(object): """Injects the transformations into the user provided parameters.""" def __init__(self, transformer=None, condition_builder=None, serializer=None, deserializer=None): self._transformer = transformer if transformer is None: self._transformer = ParameterTransformer() self._condition_builder = condition_builder if condition_builder is None: self._condition_builder = ConditionExpressionBuilder() self._serializer = serializer if serializer is None: self._serializer = TypeSerializer() self._deserializer = deserializer if deserializer is None: self._deserializer = TypeDeserializer() def inject_condition_expressions(self, params, model, **kwargs): """Injects the condition expression transformation into the parameters This injection includes transformations for ConditionExpression shapes and KeyExpression shapes. It also handles any placeholder names and values that are generated when transforming the condition expressions. """ self._condition_builder.reset() generated_names = {} generated_values = {} # Create and apply the Condition Expression transformation. transformation = ConditionExpressionTransformation( self._condition_builder, placeholder_names=generated_names, placeholder_values=generated_values, is_key_condition=False ) self._transformer.transform( params, model.input_shape, transformation, 'ConditionExpression') # Create and apply the Key Condition Expression transformation. transformation = ConditionExpressionTransformation( self._condition_builder, placeholder_names=generated_names, placeholder_values=generated_values, is_key_condition=True ) self._transformer.transform( params, model.input_shape, transformation, 'KeyExpression') expr_attr_names_input = 'ExpressionAttributeNames' expr_attr_values_input = 'ExpressionAttributeValues' # Now that all of the condition expression transformation are done, # update the placeholder dictionaries in the request. if expr_attr_names_input in params: params[expr_attr_names_input].update(generated_names) else: if generated_names: params[expr_attr_names_input] = generated_names if expr_attr_values_input in params: params[expr_attr_values_input].update(generated_values) else: if generated_values: params[expr_attr_values_input] = generated_values def inject_attribute_value_input(self, params, model, **kwargs): """Injects DynamoDB serialization into parameter input""" self._transformer.transform( params, model.input_shape, self._serializer.serialize, 'AttributeValue') def inject_attribute_value_output(self, parsed, model, **kwargs): """Injects DynamoDB deserialization into responses""" if model.output_shape is not None: self._transformer.transform( parsed, model.output_shape, self._deserializer.deserialize, 'AttributeValue' ) class ConditionExpressionTransformation(object): """Provides a transformation for condition expressions The ``ParameterTransformer`` class can call this class directly to transform the condition expressions in the parameters provided. """ def __init__(self, condition_builder, placeholder_names, placeholder_values, is_key_condition=False): self._condition_builder = condition_builder self._placeholder_names = placeholder_names self._placeholder_values = placeholder_values self._is_key_condition = is_key_condition def __call__(self, value): if isinstance(value, ConditionBase): # Create a conditional expression string with placeholders # for the provided condition. built_expression = self._condition_builder.build_expression( value, is_key_condition=self._is_key_condition) self._placeholder_names.update( built_expression.attribute_name_placeholders) self._placeholder_values.update( built_expression.attribute_value_placeholders) return built_expression.condition_expression # Use the user provided value if it is not a ConditonBase object. return value class ParameterTransformer(object): """Transforms the input to and output from botocore based on shape""" def transform(self, params, model, transformation, target_shape): """Transforms the dynamodb input to or output from botocore It applies a specified transformation whenever a specific shape name is encountered while traversing the parameters in the dictionary. :param params: The parameters structure to transform. :param model: The operation model. :param transformation: The function to apply the parameter :param target_shape: The name of the shape to apply the transformation to """ self._transform_parameters( model, params, transformation, target_shape) def _transform_parameters(self, model, params, transformation, target_shape): type_name = model.type_name if type_name in ['structure', 'map', 'list']: getattr(self, '_transform_%s' % type_name)( model, params, transformation, target_shape) def _transform_structure(self, model, params, transformation, target_shape): if not isinstance(params, collections_abc.Mapping): return for param in params: if param in model.members: member_model = model.members[param] member_shape = member_model.name if member_shape == target_shape: params[param] = transformation(params[param]) else: self._transform_parameters( member_model, params[param], transformation, target_shape) def _transform_map(self, model, params, transformation, target_shape): if not isinstance(params, collections_abc.Mapping): return value_model = model.value value_shape = value_model.name for key, value in params.items(): if value_shape == target_shape: params[key] = transformation(value) else: self._transform_parameters( value_model, params[key], transformation, target_shape) def _transform_list(self, model, params, transformation, target_shape): if not isinstance(params, collections_abc.MutableSequence): return member_model = model.member member_shape = member_model.name for i, item in enumerate(params): if member_shape == target_shape: params[i] = transformation(item) else: self._transform_parameters( member_model, params[i], transformation, target_shape) boto3-1.9.253/boto3/dynamodb/types.py000066400000000000000000000227151355237733400173050ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from decimal import Decimal, Context, Clamped from decimal import Overflow, Inexact, Underflow, Rounded from boto3.compat import collections_abc from botocore.compat import six STRING = 'S' NUMBER = 'N' BINARY = 'B' STRING_SET = 'SS' NUMBER_SET = 'NS' BINARY_SET = 'BS' NULL = 'NULL' BOOLEAN = 'BOOL' MAP = 'M' LIST = 'L' DYNAMODB_CONTEXT = Context( Emin=-128, Emax=126, prec=38, traps=[Clamped, Overflow, Inexact, Rounded, Underflow]) BINARY_TYPES = (bytearray, six.binary_type) class Binary(object): """A class for representing Binary in dynamodb Especially for Python 2, use this class to explicitly specify binary data for item in DynamoDB. It is essentially a wrapper around binary. Unicode and Python 3 string types are not allowed. """ def __init__(self, value): if not isinstance(value, BINARY_TYPES): raise TypeError('Value must be of the following types: %s.' % ', '.join([str(t) for t in BINARY_TYPES])) self.value = value def __eq__(self, other): if isinstance(other, Binary): return self.value == other.value return self.value == other def __ne__(self, other): return not self.__eq__(other) def __repr__(self): return 'Binary(%r)' % self.value def __str__(self): return self.value def __hash__(self): return hash(self.value) class TypeSerializer(object): """This class serializes Python data types to DynamoDB types.""" def serialize(self, value): """The method to serialize the Python data types. :param value: A python value to be serialized to DynamoDB. Here are the various conversions: Python DynamoDB ------ -------- None {'NULL': True} True/False {'BOOL': True/False} int/Decimal {'N': str(value)} string {'S': string} Binary/bytearray/bytes (py3 only) {'B': bytes} set([int/Decimal]) {'NS': [str(value)]} set([string]) {'SS': [string]) set([Binary/bytearray/bytes]) {'BS': [bytes]} list {'L': list} dict {'M': dict} For types that involve numbers, it is recommended that ``Decimal`` objects are used to be able to round-trip the Python type. For types that involve binary, it is recommended that ``Binary`` objects are used to be able to round-trip the Python type. :rtype: dict :returns: A dictionary that represents a dynamoDB data type. These dictionaries can be directly passed to botocore methods. """ dynamodb_type = self._get_dynamodb_type(value) serializer = getattr(self, '_serialize_%s' % dynamodb_type.lower()) return {dynamodb_type: serializer(value)} def _get_dynamodb_type(self, value): dynamodb_type = None if self._is_null(value): dynamodb_type = NULL elif self._is_boolean(value): dynamodb_type = BOOLEAN elif self._is_number(value): dynamodb_type = NUMBER elif self._is_string(value): dynamodb_type = STRING elif self._is_binary(value): dynamodb_type = BINARY elif self._is_type_set(value, self._is_number): dynamodb_type = NUMBER_SET elif self._is_type_set(value, self._is_string): dynamodb_type = STRING_SET elif self._is_type_set(value, self._is_binary): dynamodb_type = BINARY_SET elif self._is_map(value): dynamodb_type = MAP elif self._is_list(value): dynamodb_type = LIST else: msg = 'Unsupported type "%s" for value "%s"' % (type(value), value) raise TypeError(msg) return dynamodb_type def _is_null(self, value): if value is None: return True return False def _is_boolean(self, value): if isinstance(value, bool): return True return False def _is_number(self, value): if isinstance(value, (six.integer_types, Decimal)): return True elif isinstance(value, float): raise TypeError( 'Float types are not supported. Use Decimal types instead.') return False def _is_string(self, value): if isinstance(value, six.string_types): return True return False def _is_binary(self, value): if isinstance(value, Binary): return True elif isinstance(value, bytearray): return True elif six.PY3 and isinstance(value, six.binary_type): return True return False def _is_set(self, value): if isinstance(value, collections_abc.Set): return True return False def _is_type_set(self, value, type_validator): if self._is_set(value): if False not in map(type_validator, value): return True return False def _is_map(self, value): if isinstance(value, collections_abc.Mapping): return True return False def _is_list(self, value): if isinstance(value, list): return True return False def _serialize_null(self, value): return True def _serialize_bool(self, value): return value def _serialize_n(self, value): number = str(DYNAMODB_CONTEXT.create_decimal(value)) if number in ['Infinity', 'NaN']: raise TypeError('Infinity and NaN not supported') return number def _serialize_s(self, value): return value def _serialize_b(self, value): if isinstance(value, Binary): value = value.value return value def _serialize_ss(self, value): return [self._serialize_s(s) for s in value] def _serialize_ns(self, value): return [self._serialize_n(n) for n in value] def _serialize_bs(self, value): return [self._serialize_b(b) for b in value] def _serialize_l(self, value): return [self.serialize(v) for v in value] def _serialize_m(self, value): return dict([(k, self.serialize(v)) for k, v in value.items()]) class TypeDeserializer(object): """This class deserializes DynamoDB types to Python types.""" def deserialize(self, value): """The method to deserialize the DynamoDB data types. :param value: A DynamoDB value to be deserialized to a pythonic value. Here are the various conversions: DynamoDB Python -------- ------ {'NULL': True} None {'BOOL': True/False} True/False {'N': str(value)} Decimal(str(value)) {'S': string} string {'B': bytes} Binary(bytes) {'NS': [str(value)]} set([Decimal(str(value))]) {'SS': [string]} set([string]) {'BS': [bytes]} set([bytes]) {'L': list} list {'M': dict} dict :returns: The pythonic value of the DynamoDB type. """ if not value: raise TypeError('Value must be a nonempty dictionary whose key ' 'is a valid dynamodb type.') dynamodb_type = list(value.keys())[0] try: deserializer = getattr( self, '_deserialize_%s' % dynamodb_type.lower()) except AttributeError: raise TypeError( 'Dynamodb type %s is not supported' % dynamodb_type) return deserializer(value[dynamodb_type]) def _deserialize_null(self, value): return None def _deserialize_bool(self, value): return value def _deserialize_n(self, value): return DYNAMODB_CONTEXT.create_decimal(value) def _deserialize_s(self, value): return value def _deserialize_b(self, value): return Binary(value) def _deserialize_ns(self, value): return set(map(self._deserialize_n, value)) def _deserialize_ss(self, value): return set(map(self._deserialize_s, value)) def _deserialize_bs(self, value): return set(map(self._deserialize_b, value)) def _deserialize_l(self, value): return [self.deserialize(v) for v in value] def _deserialize_m(self, value): return dict([(k, self.deserialize(v)) for k, v in value.items()]) boto3-1.9.253/boto3/ec2/000077500000000000000000000000001355237733400144345ustar00rootroot00000000000000boto3-1.9.253/boto3/ec2/__init__.py000066400000000000000000000010611355237733400165430ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/boto3/ec2/createtags.py000066400000000000000000000030501355237733400171260ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. def inject_create_tags(event_name, class_attributes, **kwargs): """This injects a custom create_tags method onto the ec2 service resource This is needed because the resource model is not able to express creating multiple tag resources based on the fact you can apply a set of tags to multiple ec2 resources. """ class_attributes['create_tags'] = create_tags def create_tags(self, **kwargs): # Call the client method self.meta.client.create_tags(**kwargs) resources = kwargs.get('Resources', []) tags = kwargs.get('Tags', []) tag_resources = [] # Generate all of the tag resources that just were created with the # preceding client call. for resource in resources: for tag in tags: # Add each tag from the tag set for each resource to the list # that is returned by the method. tag_resource = self.Tag(resource, tag['Key'], tag['Value']) tag_resources.append(tag_resource) return tag_resources boto3-1.9.253/boto3/ec2/deletetags.py000066400000000000000000000022131355237733400171250ustar00rootroot00000000000000# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from boto3.resources.action import CustomModeledAction def inject_delete_tags(event_emitter, **kwargs): action_model = { 'request': { 'operation': 'DeleteTags', 'params': [{ 'target': 'Resources[0]', 'source': 'identifier', 'name': 'Id' }] } } action = CustomModeledAction( 'delete_tags', action_model, delete_tags, event_emitter) action.inject(**kwargs) def delete_tags(self, **kwargs): kwargs['Resources'] = [self.id] return self.meta.client.delete_tags(**kwargs) boto3-1.9.253/boto3/examples/000077500000000000000000000000001355237733400156015ustar00rootroot00000000000000boto3-1.9.253/boto3/examples/cloudfront.rst000066400000000000000000000025551355237733400205210ustar00rootroot00000000000000Generate a signed URL for Amazon CloudFront ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following example shows how to generate a signed URL for Amazon CloudFront. Note that you will need the ``cryptography`` `library `__ to follow this example:: import datetime from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import padding from botocore.signers import CloudFrontSigner def rsa_signer(message): with open('path/to/key.pem', 'rb') as key_file: private_key = serialization.load_pem_private_key( key_file.read(), password=None, backend=default_backend() ) return private_key.sign(message, padding.PKCS1v15(), hashes.SHA1()) key_id = 'AKIAIOSFODNN7EXAMPLE' url = 'http://d2949o5mkkp72v.cloudfront.net/hello.txt' expire_date = datetime.datetime(2017, 1, 1) cloudfront_signer = CloudFrontSigner(key_id, rsa_signer) # Create a signed url that will be valid until the specfic expiry date # provided using a canned policy. signed_url = cloudfront_signer.generate_presigned_url( url, date_less_than=expire_date) print(signed_url) boto3-1.9.253/boto3/examples/s3.rst000066400000000000000000000107041355237733400166620ustar00rootroot00000000000000List objects in an Amazon S3 bucket ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following example shows how to use an Amazon S3 bucket resource to list the objects in the bucket. .. code-block:: python import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('my-bucket') for obj in bucket.objects.all(): print(obj.key) List top-level common prefixes in Amazon S3 bucket ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This example shows how to list all of the top-level common prefixes in an Amazon S3 bucket: .. code-block:: python import boto3 client = boto3.client('s3') paginator = client.get_paginator('list_objects') result = paginator.paginate(Bucket='my-bucket', Delimiter='/') for prefix in result.search('CommonPrefixes'): print(prefix.get('Prefix')) Restore Glacier objects in an Amazon S3 bucket ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following example shows how to initiate restoration of glacier objects in an Amazon S3 bucket, determine if a restoration is on-going, and determine if a restoration is finished. .. code-block:: python import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('glacier-bucket') for obj_sum in bucket.objects.all(): obj = s3.Object(obj_sum.bucket_name, obj_sum.key) if obj.storage_class == 'GLACIER': # Try to restore the object if the storage class is glacier and # the object does not have a completed or ongoing restoration # request. if obj.restore is None: print('Submitting restoration request: %s' % obj.key) obj.restore_object(RestoreRequest={'Days': 1}) # Print out objects whose restoration is on-going elif 'ongoing-request="true"' in obj.restore: print('Restoration in-progress: %s' % obj.key) # Print out objects whose restoration is complete elif 'ongoing-request="false"' in obj.restore: print('Restoration complete: %s' % obj.key) Uploading/downloading files using SSE KMS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This example shows how to use SSE-KMS to upload objects using server side encryption with a key managed by KMS. We can either use the default KMS master key, or create a custom key in AWS and use it to encrypt the object by passing in its key id. With KMS, nothing else needs to be provided for getting the object; S3 already knows how to decrypt the object. .. code-block:: python import boto3 import os BUCKET = 'your-bucket-name' s3 = boto3.client('s3') keyid = '' print("Uploading S3 object with SSE-KMS") s3.put_object(Bucket=BUCKET, Key='encrypt-key', Body=b'foobar', ServerSideEncryption='aws:kms', # Optional: SSEKMSKeyId SSEKMSKeyId=keyid) print("Done") # Getting the object: print("Getting S3 object...") response = s3.get_object(Bucket=BUCKET, Key='encrypt-key') print("Done, response body:") print(response['Body'].read()) Uploading/downloading files using SSE Customer Keys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This example shows how to use SSE-C to upload objects using server side encryption with a customer provided key. First, we'll need a 32 byte key. For this example, we'll randomly generate a key but you can use any 32 byte key you want. Remember, you must the same key to download the object. If you lose the encryption key, you lose the object. Also note how we don't have to provide the SSECustomerKeyMD5. Boto3 will automatically compute this value for us. .. code-block:: python import boto3 import os BUCKET = 'your-bucket-name' KEY = os.urandom(32) s3 = boto3.client('s3') print("Uploading S3 object with SSE-C") s3.put_object(Bucket=BUCKET, Key='encrypt-key', Body=b'foobar', SSECustomerKey=KEY, SSECustomerAlgorithm='AES256') print("Done") # Getting the object: print("Getting S3 object...") # Note how we're using the same ``KEY`` we # created earlier. response = s3.get_object(Bucket=BUCKET, Key='encrypt-key', SSECustomerKey=KEY, SSECustomerAlgorithm='AES256') print("Done, response body:") print(response['Body'].read()) boto3-1.9.253/boto3/exceptions.py000066400000000000000000000076311355237733400165250ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. # All exceptions in this class should subclass from Boto3Error. import botocore.exceptions # All exceptions should subclass from Boto3Error in this module. class Boto3Error(Exception): """Base class for all Boto3 errors.""" class ResourceLoadException(Boto3Error): pass # NOTE: This doesn't appear to be used anywhere. # It's probably safe to remove this. class NoVersionFound(Boto3Error): pass # We're subclassing from botocore.exceptions.DataNotFoundError # to keep backwards compatibility with anyone that was catching # this low level Botocore error before this exception was # introduced in boto3. # Same thing for ResourceNotExistsError below. class UnknownAPIVersionError(Boto3Error, botocore.exceptions.DataNotFoundError): def __init__(self, service_name, bad_api_version, available_api_versions): msg = ( "The '%s' resource does not an API version of: %s\n" "Valid API versions are: %s" % (service_name, bad_api_version, available_api_versions) ) # Not using super because we don't want the DataNotFoundError # to be called, it has a different __init__ signature. Boto3Error.__init__(self, msg) class ResourceNotExistsError(Boto3Error, botocore.exceptions.DataNotFoundError): """Raised when you attempt to create a resource that does not exist.""" def __init__(self, service_name, available_services, has_low_level_client): msg = ( "The '%s' resource does not exist.\n" "The available resources are:\n" " - %s\n" % (service_name, '\n - '.join(available_services)) ) if has_low_level_client: msg += ( "\nConsider using a boto3.client('%s') instead " "of a resource for '%s'" % (service_name, service_name)) # Not using super because we don't want the DataNotFoundError # to be called, it has a different __init__ signature. Boto3Error.__init__(self, msg) class RetriesExceededError(Boto3Error): def __init__(self, last_exception, msg='Max Retries Exceeded'): super(RetriesExceededError, self).__init__(msg) self.last_exception = last_exception class S3TransferFailedError(Boto3Error): pass class S3UploadFailedError(Boto3Error): pass class DynamoDBOperationNotSupportedError(Boto3Error): """Raised for operantions that are not supported for an operand""" def __init__(self, operation, value): msg = ( '%s operation cannot be applied to value %s of type %s directly. ' 'Must use AttributeBase object methods (i.e. Attr().eq()). to ' 'generate ConditionBase instances first.' % (operation, value, type(value))) Exception.__init__(self, msg) # FIXME: Backward compatibility DynanmoDBOperationNotSupportedError = DynamoDBOperationNotSupportedError class DynamoDBNeedsConditionError(Boto3Error): """Raised when input is not a condition""" def __init__(self, value): msg = ( 'Expecting a ConditionBase object. Got %s of type %s. ' 'Use AttributeBase object methods (i.e. Attr().eq()). to ' 'generate ConditionBase instances.' % (value, type(value))) Exception.__init__(self, msg) class DynamoDBNeedsKeyConditionError(Boto3Error): pass boto3-1.9.253/boto3/resources/000077500000000000000000000000001355237733400157755ustar00rootroot00000000000000boto3-1.9.253/boto3/resources/__init__.py000066400000000000000000000000001355237733400200740ustar00rootroot00000000000000boto3-1.9.253/boto3/resources/action.py000066400000000000000000000224341355237733400176310ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import logging from botocore import xform_name from .params import create_request_parameters from .response import RawHandler, ResourceHandler from .model import Action from boto3.docs.docstring import ActionDocstring from boto3.utils import inject_attribute logger = logging.getLogger(__name__) class ServiceAction(object): """ A class representing a callable action on a resource, for example ``sqs.get_queue_by_name(...)`` or ``s3.Bucket('foo').delete()``. The action may construct parameters from existing resource identifiers and may return either a raw response or a new resource instance. :type action_model: :py:class`~boto3.resources.model.Action` :param action_model: The action model. :type factory: ResourceFactory :param factory: The factory that created the resource class to which this action is attached. :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service """ def __init__(self, action_model, factory=None, service_context=None): self._action_model = action_model # In the simplest case we just return the response, but if a # resource is defined, then we must create these before returning. resource_response_model = action_model.resource if resource_response_model: self._response_handler = ResourceHandler( search_path=resource_response_model.path, factory=factory, resource_model=resource_response_model, service_context=service_context, operation_name=action_model.request.operation ) else: self._response_handler = RawHandler(action_model.path) def __call__(self, parent, *args, **kwargs): """ Perform the action's request operation after building operation parameters and build any defined resources from the response. :type parent: :py:class:`~boto3.resources.base.ServiceResource` :param parent: The resource instance to which this action is attached. :rtype: dict or ServiceResource or list(ServiceResource) :return: The response, either as a raw dict or resource instance(s). """ operation_name = xform_name(self._action_model.request.operation) # First, build predefined params and then update with the # user-supplied kwargs, which allows overriding the pre-built # params if needed. params = create_request_parameters(parent, self._action_model.request) params.update(kwargs) logger.debug('Calling %s:%s with %r', parent.meta.service_name, operation_name, params) response = getattr(parent.meta.client, operation_name)(**params) logger.debug('Response: %r', response) return self._response_handler(parent, params, response) class BatchAction(ServiceAction): """ An action which operates on a batch of items in a collection, typically a single page of results from the collection's underlying service operation call. For example, this allows you to delete up to 999 S3 objects in a single operation rather than calling ``.delete()`` on each one individually. :type action_model: :py:class`~boto3.resources.model.Action` :param action_model: The action model. :type factory: ResourceFactory :param factory: The factory that created the resource class to which this action is attached. :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service """ def __call__(self, parent, *args, **kwargs): """ Perform the batch action's operation on every page of results from the collection. :type parent: :py:class:`~boto3.resources.collection.ResourceCollection` :param parent: The collection iterator to which this action is attached. :rtype: list(dict) :return: A list of low-level response dicts from each call. """ service_name = None client = None responses = [] operation_name = xform_name(self._action_model.request.operation) # Unlike the simple action above, a batch action must operate # on batches (or pages) of items. So we get each page, construct # the necessary parameters and call the batch operation. for page in parent.pages(): params = {} for index, resource in enumerate(page): # There is no public interface to get a service name # or low-level client from a collection, so we get # these from the first resource in the collection. if service_name is None: service_name = resource.meta.service_name if client is None: client = resource.meta.client create_request_parameters( resource, self._action_model.request, params=params, index=index) if not params: # There are no items, no need to make a call. break params.update(kwargs) logger.debug('Calling %s:%s with %r', service_name, operation_name, params) response = getattr(client, operation_name)(**params) logger.debug('Response: %r', response) responses.append( self._response_handler(parent, params, response)) return responses class WaiterAction(object): """ A class representing a callable waiter action on a resource, for example ``s3.Bucket('foo').wait_until_bucket_exists()``. The waiter action may construct parameters from existing resource identifiers. :type waiter_model: :py:class`~boto3.resources.model.Waiter` :param waiter_model: The action waiter. :type waiter_resource_name: string :param waiter_resource_name: The name of the waiter action for the resource. It usually begins with a ``wait_until_`` """ def __init__(self, waiter_model, waiter_resource_name): self._waiter_model = waiter_model self._waiter_resource_name = waiter_resource_name def __call__(self, parent, *args, **kwargs): """ Perform the wait operation after building operation parameters. :type parent: :py:class:`~boto3.resources.base.ServiceResource` :param parent: The resource instance to which this action is attached. """ client_waiter_name = xform_name(self._waiter_model.waiter_name) # First, build predefined params and then update with the # user-supplied kwargs, which allows overriding the pre-built # params if needed. params = create_request_parameters(parent, self._waiter_model) params.update(kwargs) logger.debug('Calling %s:%s with %r', parent.meta.service_name, self._waiter_resource_name, params) client = parent.meta.client waiter = client.get_waiter(client_waiter_name) response = waiter.wait(**params) logger.debug('Response: %r', response) class CustomModeledAction(object): """A custom, modeled action to inject into a resource.""" def __init__(self, action_name, action_model, function, event_emitter): """ :type action_name: str :param action_name: The name of the action to inject, e.g. 'delete_tags' :type action_model: dict :param action_model: A JSON definition of the action, as if it were part of the resource model. :type function: function :param function: The function to perform when the action is called. The first argument should be 'self', which will be the resource the function is to be called on. :type event_emitter: :py:class:`botocore.hooks.BaseEventHooks` :param event_emitter: The session event emitter. """ self.name = action_name self.model = action_model self.function = function self.emitter = event_emitter def inject(self, class_attributes, service_context, event_name, **kwargs): resource_name = event_name.rsplit(".")[-1] action = Action(self.name, self.model, {}) self.function.__name__ = self.name self.function.__doc__ = ActionDocstring( resource_name=resource_name, event_emitter=self.emitter, action_model=action, service_model=service_context.service_model, include_signature=False ) inject_attribute(class_attributes, self.name, self.function) boto3-1.9.253/boto3/resources/base.py000066400000000000000000000116761355237733400172740ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import logging import boto3 logger = logging.getLogger(__name__) class ResourceMeta(object): """ An object containing metadata about a resource. """ def __init__(self, service_name, identifiers=None, client=None, data=None, resource_model=None): #: (``string``) The service name, e.g. 's3' self.service_name = service_name if identifiers is None: identifiers = [] #: (``list``) List of identifier names self.identifiers = identifiers #: (:py:class:`~botocore.client.BaseClient`) Low-level Botocore client self.client = client #: (``dict``) Loaded resource data attributes self.data = data # The resource model for that resource self.resource_model = resource_model def __repr__(self): return 'ResourceMeta(\'{0}\', identifiers={1})'.format( self.service_name, self.identifiers) def __eq__(self, other): # Two metas are equal if their components are all equal if other.__class__.__name__ != self.__class__.__name__: return False return self.__dict__ == other.__dict__ def copy(self): """ Create a copy of this metadata object. """ params = self.__dict__.copy() service_name = params.pop('service_name') return ResourceMeta(service_name, **params) class ServiceResource(object): """ A base class for resources. :type client: botocore.client :param client: A low-level Botocore client instance """ meta = None """ Stores metadata about this resource instance, such as the ``service_name``, the low-level ``client`` and any cached ``data`` from when the instance was hydrated. For example:: # Get a low-level client from a resource instance client = resource.meta.client response = client.operation(Param='foo') # Print the resource instance's service short name print(resource.meta.service_name) See :py:class:`ResourceMeta` for more information. """ def __init__(self, *args, **kwargs): # Always work on a copy of meta, otherwise we would affect other # instances of the same subclass. self.meta = self.meta.copy() # Create a default client if none was passed if kwargs.get('client') is not None: self.meta.client = kwargs.get('client') else: self.meta.client = boto3.client(self.meta.service_name) # Allow setting identifiers as positional arguments in the order # in which they were defined in the ResourceJSON. for i, value in enumerate(args): setattr(self, '_' + self.meta.identifiers[i], value) # Allow setting identifiers via keyword arguments. Here we need # extra logic to ignore other keyword arguments like ``client``. for name, value in kwargs.items(): if name == 'client': continue if name not in self.meta.identifiers: raise ValueError('Unknown keyword argument: {0}'.format(name)) setattr(self, '_' + name, value) # Validate that all identifiers have been set. for identifier in self.meta.identifiers: if getattr(self, identifier) is None: raise ValueError( 'Required parameter {0} not set'.format(identifier)) def __repr__(self): identifiers = [] for identifier in self.meta.identifiers: identifiers.append('{0}={1}'.format( identifier, repr(getattr(self, identifier)))) return "{0}({1})".format( self.__class__.__name__, ', '.join(identifiers), ) def __eq__(self, other): # Should be instances of the same resource class if other.__class__.__name__ != self.__class__.__name__: return False # Each of the identifiers should have the same value in both # instances, e.g. two buckets need the same name to be equal. for identifier in self.meta.identifiers: if getattr(self, identifier) != getattr(other, identifier): return False return True def __hash__(self): identifiers = [] for identifier in self.meta.identifiers: identifiers.append(getattr(self, identifier)) return hash((self.__class__.__name__, tuple(identifiers))) boto3-1.9.253/boto3/resources/collection.py000066400000000000000000000451511355237733400205100ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import copy import logging from botocore import xform_name from botocore.utils import merge_dicts from .action import BatchAction from .params import create_request_parameters from .response import ResourceHandler from ..docs import docstring logger = logging.getLogger(__name__) class ResourceCollection(object): """ Represents a collection of resources, which can be iterated through, optionally with filtering. Collections automatically handle pagination for you. See :ref:`guide_collections` for a high-level overview of collections, including when remote service requests are performed. :type model: :py:class:`~boto3.resources.model.Collection` :param model: Collection model :type parent: :py:class:`~boto3.resources.base.ServiceResource` :param parent: The collection's parent resource :type handler: :py:class:`~boto3.resources.response.ResourceHandler` :param handler: The resource response handler used to create resource instances """ def __init__(self, model, parent, handler, **kwargs): self._model = model self._parent = parent self._py_operation_name = xform_name( model.request.operation) self._handler = handler self._params = copy.deepcopy(kwargs) def __repr__(self): return '{0}({1}, {2})'.format( self.__class__.__name__, self._parent, '{0}.{1}'.format( self._parent.meta.service_name, self._model.resource.type ) ) def __iter__(self): """ A generator which yields resource instances after doing the appropriate service operation calls and handling any pagination on your behalf. Page size, item limit, and filter parameters are applied if they have previously been set. >>> bucket = s3.Bucket('boto3') >>> for obj in bucket.objects.all(): ... print(obj.key) 'key1' 'key2' """ limit = self._params.get('limit', None) count = 0 for page in self.pages(): for item in page: yield item # If the limit is set and has been reached, then # we stop processing items here. count += 1 if limit is not None and count >= limit: return def _clone(self, **kwargs): """ Create a clone of this collection. This is used by the methods below to provide a chainable interface that returns copies rather than the original. This allows things like: >>> base = collection.filter(Param1=1) >>> query1 = base.filter(Param2=2) >>> query2 = base.filter(Param3=3) >>> query1.params {'Param1': 1, 'Param2': 2} >>> query2.params {'Param1': 1, 'Param3': 3} :rtype: :py:class:`ResourceCollection` :return: A clone of this resource collection """ params = copy.deepcopy(self._params) merge_dicts(params, kwargs, append_lists=True) clone = self.__class__(self._model, self._parent, self._handler, **params) return clone def pages(self): """ A generator which yields pages of resource instances after doing the appropriate service operation calls and handling any pagination on your behalf. Non-paginated calls will return a single page of items. Page size, item limit, and filter parameters are applied if they have previously been set. >>> bucket = s3.Bucket('boto3') >>> for page in bucket.objects.pages(): ... for obj in page: ... print(obj.key) 'key1' 'key2' :rtype: list(:py:class:`~boto3.resources.base.ServiceResource`) :return: List of resource instances """ client = self._parent.meta.client cleaned_params = self._params.copy() limit = cleaned_params.pop('limit', None) page_size = cleaned_params.pop('page_size', None) params = create_request_parameters( self._parent, self._model.request) merge_dicts(params, cleaned_params, append_lists=True) # Is this a paginated operation? If so, we need to get an # iterator for the various pages. If not, then we simply # call the operation and return the result as a single # page in a list. For non-paginated results, we just ignore # the page size parameter. if client.can_paginate(self._py_operation_name): logger.debug('Calling paginated %s:%s with %r', self._parent.meta.service_name, self._py_operation_name, params) paginator = client.get_paginator(self._py_operation_name) pages = paginator.paginate( PaginationConfig={ 'MaxItems': limit, 'PageSize': page_size}, **params) else: logger.debug('Calling %s:%s with %r', self._parent.meta.service_name, self._py_operation_name, params) pages = [getattr(client, self._py_operation_name)(**params)] # Now that we have a page iterator or single page of results # we start processing and yielding individual items. count = 0 for page in pages: page_items = [] for item in self._handler(self._parent, params, page): page_items.append(item) # If the limit is set and has been reached, then # we stop processing items here. count += 1 if limit is not None and count >= limit: break yield page_items # Stop reading pages if we've reached out limit if limit is not None and count >= limit: break def all(self): """ Get all items from the collection, optionally with a custom page size and item count limit. This method returns an iterable generator which yields individual resource instances. Example use:: # Iterate through items >>> for queue in sqs.queues.all(): ... print(queue.url) 'https://url1' 'https://url2' # Convert to list >>> queues = list(sqs.queues.all()) >>> len(queues) 2 """ return self._clone() def filter(self, **kwargs): """ Get items from the collection, passing keyword arguments along as parameters to the underlying service operation, which are typically used to filter the results. This method returns an iterable generator which yields individual resource instances. Example use:: # Iterate through items >>> for queue in sqs.queues.filter(Param='foo'): ... print(queue.url) 'https://url1' 'https://url2' # Convert to list >>> queues = list(sqs.queues.filter(Param='foo')) >>> len(queues) 2 :rtype: :py:class:`ResourceCollection` """ return self._clone(**kwargs) def limit(self, count): """ Return at most this many resources. >>> for bucket in s3.buckets.limit(5): ... print(bucket.name) 'bucket1' 'bucket2' 'bucket3' 'bucket4' 'bucket5' :type count: int :param count: Return no more than this many items :rtype: :py:class:`ResourceCollection` """ return self._clone(limit=count) def page_size(self, count): """ Fetch at most this many resources per service request. >>> for obj in s3.Bucket('boto3').objects.page_size(100): ... print(obj.key) :type count: int :param count: Fetch this many items per request :rtype: :py:class:`ResourceCollection` """ return self._clone(page_size=count) class CollectionManager(object): """ A collection manager provides access to resource collection instances, which can be iterated and filtered. The manager exposes some convenience functions that are also found on resource collections, such as :py:meth:`~ResourceCollection.all` and :py:meth:`~ResourceCollection.filter`. Get all items:: >>> for bucket in s3.buckets.all(): ... print(bucket.name) Get only some items via filtering:: >>> for queue in sqs.queues.filter(QueueNamePrefix='AWS'): ... print(queue.url) Get whole pages of items: >>> for page in s3.Bucket('boto3').objects.pages(): ... for obj in page: ... print(obj.key) A collection manager is not iterable. You **must** call one of the methods that return a :py:class:`ResourceCollection` before trying to iterate, slice, or convert to a list. See the :ref:`guide_collections` guide for a high-level overview of collections, including when remote service requests are performed. :type collection_model: :py:class:`~boto3.resources.model.Collection` :param model: Collection model :type parent: :py:class:`~boto3.resources.base.ServiceResource` :param parent: The collection's parent resource :type factory: :py:class:`~boto3.resources.factory.ResourceFactory` :param factory: The resource factory to create new resources :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service """ # The class to use when creating an iterator _collection_cls = ResourceCollection def __init__(self, collection_model, parent, factory, service_context): self._model = collection_model operation_name = self._model.request.operation self._parent = parent search_path = collection_model.resource.path self._handler = ResourceHandler( search_path=search_path, factory=factory, resource_model=collection_model.resource, service_context=service_context, operation_name=operation_name ) def __repr__(self): return '{0}({1}, {2})'.format( self.__class__.__name__, self._parent, '{0}.{1}'.format( self._parent.meta.service_name, self._model.resource.type ) ) def iterator(self, **kwargs): """ Get a resource collection iterator from this manager. :rtype: :py:class:`ResourceCollection` :return: An iterable representing the collection of resources """ return self._collection_cls(self._model, self._parent, self._handler, **kwargs) # Set up some methods to proxy ResourceCollection methods def all(self): return self.iterator() all.__doc__ = ResourceCollection.all.__doc__ def filter(self, **kwargs): return self.iterator(**kwargs) filter.__doc__ = ResourceCollection.filter.__doc__ def limit(self, count): return self.iterator(limit=count) limit.__doc__ = ResourceCollection.limit.__doc__ def page_size(self, count): return self.iterator(page_size=count) page_size.__doc__ = ResourceCollection.page_size.__doc__ def pages(self): return self.iterator().pages() pages.__doc__ = ResourceCollection.pages.__doc__ class CollectionFactory(object): """ A factory to create new :py:class:`CollectionManager` and :py:class:`ResourceCollection` subclasses from a :py:class:`~boto3.resources.model.Collection` model. These subclasses include methods to perform batch operations. """ def load_from_definition(self, resource_name, collection_model, service_context, event_emitter): """ Loads a collection from a model, creating a new :py:class:`CollectionManager` subclass with the correct properties and methods, named based on the service and resource name, e.g. ec2.InstanceCollectionManager. It also creates a new :py:class:`ResourceCollection` subclass which is used by the new manager class. :type resource_name: string :param resource_name: Name of the resource to look up. For services, this should match the ``service_name``. :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service :type event_emitter: :py:class:`~botocore.hooks.HierarchialEmitter` :param event_emitter: An event emitter :rtype: Subclass of :py:class:`CollectionManager` :return: The collection class. """ attrs = {} collection_name = collection_model.name # Create the batch actions for a collection self._load_batch_actions( attrs, resource_name, collection_model, service_context.service_model, event_emitter) # Add the documentation to the collection class's methods self._load_documented_collection_methods( attrs=attrs, resource_name=resource_name, collection_model=collection_model, service_model=service_context.service_model, event_emitter=event_emitter, base_class=ResourceCollection) if service_context.service_name == resource_name: cls_name = '{0}.{1}Collection'.format( service_context.service_name, collection_name) else: cls_name = '{0}.{1}.{2}Collection'.format( service_context.service_name, resource_name, collection_name) collection_cls = type(str(cls_name), (ResourceCollection,), attrs) # Add the documentation to the collection manager's methods self._load_documented_collection_methods( attrs=attrs, resource_name=resource_name, collection_model=collection_model, service_model=service_context.service_model, event_emitter=event_emitter, base_class=CollectionManager) attrs['_collection_cls'] = collection_cls cls_name += 'Manager' return type(str(cls_name), (CollectionManager,), attrs) def _load_batch_actions(self, attrs, resource_name, collection_model, service_model, event_emitter): """ Batch actions on the collection become methods on both the collection manager and iterators. """ for action_model in collection_model.batch_actions: snake_cased = xform_name(action_model.name) attrs[snake_cased] = self._create_batch_action( resource_name, snake_cased, action_model, collection_model, service_model, event_emitter) def _load_documented_collection_methods( factory_self, attrs, resource_name, collection_model, service_model, event_emitter, base_class): # The base class already has these methods defined. However # the docstrings are generic and not based for a particular service # or resource. So we override these methods by proxying to the # base class's builtin method and adding a docstring # that pertains to the resource. # A collection's all() method. def all(self): return base_class.all(self) all.__doc__ = docstring.CollectionMethodDocstring( resource_name=resource_name, action_name='all', event_emitter=event_emitter, collection_model=collection_model, service_model=service_model, include_signature=False ) attrs['all'] = all # The collection's filter() method. def filter(self, **kwargs): return base_class.filter(self, **kwargs) filter.__doc__ = docstring.CollectionMethodDocstring( resource_name=resource_name, action_name='filter', event_emitter=event_emitter, collection_model=collection_model, service_model=service_model, include_signature=False ) attrs['filter'] = filter # The collection's limit method. def limit(self, count): return base_class.limit(self, count) limit.__doc__ = docstring.CollectionMethodDocstring( resource_name=resource_name, action_name='limit', event_emitter=event_emitter, collection_model=collection_model, service_model=service_model, include_signature=False ) attrs['limit'] = limit # The collection's page_size method. def page_size(self, count): return base_class.page_size(self, count) page_size.__doc__ = docstring.CollectionMethodDocstring( resource_name=resource_name, action_name='page_size', event_emitter=event_emitter, collection_model=collection_model, service_model=service_model, include_signature=False ) attrs['page_size'] = page_size def _create_batch_action(factory_self, resource_name, snake_cased, action_model, collection_model, service_model, event_emitter): """ Creates a new method which makes a batch operation request to the underlying service API. """ action = BatchAction(action_model) def batch_action(self, *args, **kwargs): return action(self, *args, **kwargs) batch_action.__name__ = str(snake_cased) batch_action.__doc__ = docstring.BatchActionDocstring( resource_name=resource_name, event_emitter=event_emitter, batch_action_model=action_model, service_model=service_model, collection_model=collection_model, include_signature=False ) return batch_action boto3-1.9.253/boto3/resources/factory.py000066400000000000000000000536011355237733400200230ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import logging from functools import partial from .action import ServiceAction from .action import WaiterAction from .base import ResourceMeta, ServiceResource from .collection import CollectionFactory from .model import ResourceModel from .response import build_identifiers, ResourceHandler from ..exceptions import ResourceLoadException from ..docs import docstring logger = logging.getLogger(__name__) class ResourceFactory(object): """ A factory to create new :py:class:`~boto3.resources.base.ServiceResource` classes from a :py:class:`~boto3.resources.model.ResourceModel`. There are two types of lookups that can be done: one on the service itself (e.g. an SQS resource) and another on models contained within the service (e.g. an SQS Queue resource). """ def __init__(self, emitter): self._collection_factory = CollectionFactory() self._emitter = emitter def load_from_definition(self, resource_name, single_resource_json_definition, service_context): """ Loads a resource from a model, creating a new :py:class:`~boto3.resources.base.ServiceResource` subclass with the correct properties and methods, named based on the service and resource name, e.g. EC2.Instance. :type resource_name: string :param resource_name: Name of the resource to look up. For services, this should match the ``service_name``. :type single_resource_json_definition: dict :param single_resource_json_definition: The loaded json of a single service resource or resource definition. :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service :rtype: Subclass of :py:class:`~boto3.resources.base.ServiceResource` :return: The service or resource class. """ logger.debug('Loading %s:%s', service_context.service_name, resource_name) # Using the loaded JSON create a ResourceModel object. resource_model = ResourceModel( resource_name, single_resource_json_definition, service_context.resource_json_definitions ) # Do some renaming of the shape if there was a naming collision # that needed to be accounted for. shape = None if resource_model.shape: shape = service_context.service_model.shape_for( resource_model.shape) resource_model.load_rename_map(shape) # Set some basic info meta = ResourceMeta( service_context.service_name, resource_model=resource_model) attrs = { 'meta': meta, } # Create and load all of attributes of the resource class based # on the models. # Identifiers self._load_identifiers( attrs=attrs, meta=meta, resource_name=resource_name, resource_model=resource_model ) # Load/Reload actions self._load_actions( attrs=attrs, resource_name=resource_name, resource_model=resource_model, service_context=service_context ) # Attributes that get auto-loaded self._load_attributes( attrs=attrs, meta=meta, resource_name=resource_name, resource_model=resource_model, service_context=service_context) # Collections and their corresponding methods self._load_collections( attrs=attrs, resource_model=resource_model, service_context=service_context) # References and Subresources self._load_has_relations( attrs=attrs, resource_name=resource_name, resource_model=resource_model, service_context=service_context ) # Waiter resource actions self._load_waiters( attrs=attrs, resource_name=resource_name, resource_model=resource_model, service_context=service_context ) # Create the name based on the requested service and resource cls_name = resource_name if service_context.service_name == resource_name: cls_name = 'ServiceResource' cls_name = service_context.service_name + '.' + cls_name base_classes = [ServiceResource] if self._emitter is not None: self._emitter.emit( 'creating-resource-class.%s' % cls_name, class_attributes=attrs, base_classes=base_classes, service_context=service_context) return type(str(cls_name), tuple(base_classes), attrs) def _load_identifiers(self, attrs, meta, resource_model, resource_name): """ Populate required identifiers. These are arguments without which the resource cannot be used. Identifiers become arguments for operations on the resource. """ for identifier in resource_model.identifiers: meta.identifiers.append(identifier.name) attrs[identifier.name] = self._create_identifier( identifier, resource_name) def _load_actions(self, attrs, resource_name, resource_model, service_context): """ Actions on the resource become methods, with the ``load`` method being a special case which sets internal data for attributes, and ``reload`` is an alias for ``load``. """ if resource_model.load: attrs['load'] = self._create_action( action_model=resource_model.load, resource_name=resource_name, service_context=service_context, is_load=True) attrs['reload'] = attrs['load'] for action in resource_model.actions: attrs[action.name] = self._create_action( action_model=action, resource_name=resource_name, service_context=service_context) def _load_attributes(self, attrs, meta, resource_name, resource_model, service_context): """ Load resource attributes based on the resource shape. The shape name is referenced in the resource JSON, but the shape itself is defined in the Botocore service JSON, hence the need for access to the ``service_model``. """ if not resource_model.shape: return shape = service_context.service_model.shape_for( resource_model.shape) identifiers = dict( (i.member_name, i) for i in resource_model.identifiers if i.member_name) attributes = resource_model.get_attributes(shape) for name, (orig_name, member) in attributes.items(): if name in identifiers: prop = self._create_identifier_alias( resource_name=resource_name, identifier=identifiers[name], member_model=member, service_context=service_context ) else: prop = self._create_autoload_property( resource_name=resource_name, name=orig_name, snake_cased=name, member_model=member, service_context=service_context ) attrs[name] = prop def _load_collections(self, attrs, resource_model, service_context): """ Load resource collections from the model. Each collection becomes a :py:class:`~boto3.resources.collection.CollectionManager` instance on the resource instance, which allows you to iterate and filter through the collection's items. """ for collection_model in resource_model.collections: attrs[collection_model.name] = self._create_collection( resource_name=resource_model.name, collection_model=collection_model, service_context=service_context ) def _load_has_relations(self, attrs, resource_name, resource_model, service_context): """ Load related resources, which are defined via a ``has`` relationship but conceptually come in two forms: 1. A reference, which is a related resource instance and can be ``None``, such as an EC2 instance's ``vpc``. 2. A subresource, which is a resource constructor that will always return a resource instance which shares identifiers/data with this resource, such as ``s3.Bucket('name').Object('key')``. """ for reference in resource_model.references: # This is a dangling reference, i.e. we have all # the data we need to create the resource, so # this instance becomes an attribute on the class. attrs[reference.name] = self._create_reference( reference_model=reference, resource_name=resource_name, service_context=service_context ) for subresource in resource_model.subresources: # This is a sub-resource class you can create # by passing in an identifier, e.g. s3.Bucket(name). attrs[subresource.name] = self._create_class_partial( subresource_model=subresource, resource_name=resource_name, service_context=service_context ) self._create_available_subresources_command( attrs, resource_model.subresources) def _create_available_subresources_command(self, attrs, subresources): _subresources = [subresource.name for subresource in subresources] _subresources = sorted(_subresources) def get_available_subresources(factory_self): """ Returns a list of all the available sub-resources for this Resource. :returns: A list containing the name of each sub-resource for this resource :rtype: list of str """ return _subresources attrs['get_available_subresources'] = get_available_subresources def _load_waiters(self, attrs, resource_name, resource_model, service_context): """ Load resource waiters from the model. Each waiter allows you to wait until a resource reaches a specific state by polling the state of the resource. """ for waiter in resource_model.waiters: attrs[waiter.name] = self._create_waiter( resource_waiter_model=waiter, resource_name=resource_name, service_context=service_context ) def _create_identifier(factory_self, identifier, resource_name): """ Creates a read-only property for identifier attributes. """ def get_identifier(self): # The default value is set to ``None`` instead of # raising an AttributeError because when resources are # instantiated a check is made such that none of the # identifiers have a value ``None``. If any are ``None``, # a more informative user error than a generic AttributeError # is raised. return getattr(self, '_' + identifier.name, None) get_identifier.__name__ = str(identifier.name) get_identifier.__doc__ = docstring.IdentifierDocstring( resource_name=resource_name, identifier_model=identifier, include_signature=False ) return property(get_identifier) def _create_identifier_alias(factory_self, resource_name, identifier, member_model, service_context): """ Creates a read-only property that aliases an identifier. """ def get_identifier(self): return getattr(self, '_' + identifier.name, None) get_identifier.__name__ = str(identifier.member_name) get_identifier.__doc__ = docstring.AttributeDocstring( service_name=service_context.service_name, resource_name=resource_name, attr_name=identifier.member_name, event_emitter=factory_self._emitter, attr_model=member_model, include_signature=False ) return property(get_identifier) def _create_autoload_property(factory_self, resource_name, name, snake_cased, member_model, service_context): """ Creates a new property on the resource to lazy-load its value via the resource's ``load`` method (if it exists). """ # The property loader will check to see if this resource has already # been loaded and return the cached value if possible. If not, then # it first checks to see if it CAN be loaded (raise if not), then # calls the load before returning the value. def property_loader(self): if self.meta.data is None: if hasattr(self, 'load'): self.load() else: raise ResourceLoadException( '{0} has no load method'.format( self.__class__.__name__)) return self.meta.data.get(name) property_loader.__name__ = str(snake_cased) property_loader.__doc__ = docstring.AttributeDocstring( service_name=service_context.service_name, resource_name=resource_name, attr_name=snake_cased, event_emitter=factory_self._emitter, attr_model=member_model, include_signature=False ) return property(property_loader) def _create_waiter(factory_self, resource_waiter_model, resource_name, service_context): """ Creates a new wait method for each resource where both a waiter and resource model is defined. """ waiter = WaiterAction(resource_waiter_model, waiter_resource_name=resource_waiter_model.name) def do_waiter(self, *args, **kwargs): waiter(self, *args, **kwargs) do_waiter.__name__ = str(resource_waiter_model.name) do_waiter.__doc__ = docstring.ResourceWaiterDocstring( resource_name=resource_name, event_emitter=factory_self._emitter, service_model=service_context.service_model, resource_waiter_model=resource_waiter_model, service_waiter_model=service_context.service_waiter_model, include_signature=False ) return do_waiter def _create_collection(factory_self, resource_name, collection_model, service_context): """ Creates a new property on the resource to lazy-load a collection. """ cls = factory_self._collection_factory.load_from_definition( resource_name=resource_name, collection_model=collection_model, service_context=service_context, event_emitter=factory_self._emitter) def get_collection(self): return cls( collection_model=collection_model, parent=self, factory=factory_self, service_context=service_context) get_collection.__name__ = str(collection_model.name) get_collection.__doc__ = docstring.CollectionDocstring( collection_model=collection_model, include_signature=False) return property(get_collection) def _create_reference(factory_self, reference_model, resource_name, service_context): """ Creates a new property on the resource to lazy-load a reference. """ # References are essentially an action with no request # or response, so we can re-use the response handlers to # build up resources from identifiers and data members. handler = ResourceHandler( search_path=reference_model.resource.path, factory=factory_self, resource_model=reference_model.resource, service_context=service_context ) # Are there any identifiers that need access to data members? # This is important when building the resource below since # it requires the data to be loaded. needs_data = any(i.source == 'data' for i in reference_model.resource.identifiers) def get_reference(self): # We need to lazy-evaluate the reference to handle circular # references between resources. We do this by loading the class # when first accessed. # This is using a *response handler* so we need to make sure # our data is loaded (if possible) and pass that data into # the handler as if it were a response. This allows references # to have their data loaded properly. if needs_data and self.meta.data is None and hasattr(self, 'load'): self.load() return handler(self, {}, self.meta.data) get_reference.__name__ = str(reference_model.name) get_reference.__doc__ = docstring.ReferenceDocstring( reference_model=reference_model, include_signature=False ) return property(get_reference) def _create_class_partial(factory_self, subresource_model, resource_name, service_context): """ Creates a new method which acts as a functools.partial, passing along the instance's low-level `client` to the new resource class' constructor. """ name = subresource_model.resource.type def create_resource(self, *args, **kwargs): # We need a new method here because we want access to the # instance's client. positional_args = [] # We lazy-load the class to handle circular references. json_def = service_context.resource_json_definitions.get(name, {}) resource_cls = factory_self.load_from_definition( resource_name=name, single_resource_json_definition=json_def, service_context=service_context ) # Assumes that identifiers are in order, which lets you do # e.g. ``sqs.Queue('foo').Message('bar')`` to create a new message # linked with the ``foo`` queue and which has a ``bar`` receipt # handle. If we did kwargs here then future positional arguments # would lead to failure. identifiers = subresource_model.resource.identifiers if identifiers is not None: for identifier, value in build_identifiers(identifiers, self): positional_args.append(value) return partial(resource_cls, *positional_args, client=self.meta.client)(*args, **kwargs) create_resource.__name__ = str(name) create_resource.__doc__ = docstring.SubResourceDocstring( resource_name=resource_name, sub_resource_model=subresource_model, service_model=service_context.service_model, include_signature=False ) return create_resource def _create_action(factory_self, action_model, resource_name, service_context, is_load=False): """ Creates a new method which makes a request to the underlying AWS service. """ # Create the action in in this closure but before the ``do_action`` # method below is invoked, which allows instances of the resource # to share the ServiceAction instance. action = ServiceAction( action_model, factory=factory_self, service_context=service_context ) # A resource's ``load`` method is special because it sets # values on the resource instead of returning the response. if is_load: # We need a new method here because we want access to the # instance via ``self``. def do_action(self, *args, **kwargs): response = action(self, *args, **kwargs) self.meta.data = response # Create the docstring for the load/reload mehtods. lazy_docstring = docstring.LoadReloadDocstring( action_name=action_model.name, resource_name=resource_name, event_emitter=factory_self._emitter, load_model=action_model, service_model=service_context.service_model, include_signature=False ) else: # We need a new method here because we want access to the # instance via ``self``. def do_action(self, *args, **kwargs): response = action(self, *args, **kwargs) if hasattr(self, 'load'): # Clear cached data. It will be reloaded the next # time that an attribute is accessed. # TODO: Make this configurable in the future? self.meta.data = None return response lazy_docstring = docstring.ActionDocstring( resource_name=resource_name, event_emitter=factory_self._emitter, action_model=action_model, service_model=service_context.service_model, include_signature=False ) do_action.__name__ = str(action_model.name) do_action.__doc__ = lazy_docstring return do_action boto3-1.9.253/boto3/resources/model.py000066400000000000000000000503031355237733400174500ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. """ The models defined in this file represent the resource JSON description format and provide a layer of abstraction from the raw JSON. The advantages of this are: * Pythonic interface (e.g. ``action.request.operation``) * Consumers need not change for minor JSON changes (e.g. renamed field) These models are used both by the resource factory to generate resource classes as well as by the documentation generator. """ import logging from botocore import xform_name logger = logging.getLogger(__name__) class Identifier(object): """ A resource identifier, given by its name. :type name: string :param name: The name of the identifier """ def __init__(self, name, member_name=None): #: (``string``) The name of the identifier self.name = name self.member_name = member_name class Action(object): """ A service operation action. :type name: string :param name: The name of the action :type definition: dict :param definition: The JSON definition :type resource_defs: dict :param resource_defs: All resources defined in the service """ def __init__(self, name, definition, resource_defs): self._definition = definition #: (``string``) The name of the action self.name = name #: (:py:class:`Request`) This action's request or ``None`` self.request = None if 'request' in definition: self.request = Request(definition.get('request', {})) #: (:py:class:`ResponseResource`) This action's resource or ``None`` self.resource = None if 'resource' in definition: self.resource = ResponseResource(definition.get('resource', {}), resource_defs) #: (``string``) The JMESPath search path or ``None`` self.path = definition.get('path') class DefinitionWithParams(object): """ An item which has parameters exposed via the ``params`` property. A request has an operation and parameters, while a waiter has a name, a low-level waiter name and parameters. :type definition: dict :param definition: The JSON definition """ def __init__(self, definition): self._definition = definition @property def params(self): """ Get a list of auto-filled parameters for this request. :type: list(:py:class:`Parameter`) """ params = [] for item in self._definition.get('params', []): params.append(Parameter(**item)) return params class Parameter(object): """ An auto-filled parameter which has a source and target. For example, the ``QueueUrl`` may be auto-filled from a resource's ``url`` identifier when making calls to ``queue.receive_messages``. :type target: string :param target: The destination parameter name, e.g. ``QueueUrl`` :type source_type: string :param source_type: Where the source is defined. :type source: string :param source: The source name, e.g. ``Url`` """ def __init__(self, target, source, name=None, path=None, value=None, **kwargs): #: (``string``) The destination parameter name self.target = target #: (``string``) Where the source is defined self.source = source #: (``string``) The name of the source, if given self.name = name #: (``string``) The JMESPath query of the source self.path = path #: (``string|int|float|bool``) The source constant value self.value = value # Complain if we encounter any unknown values. if kwargs: logger.warning('Unknown parameter options found: %s', kwargs) class Request(DefinitionWithParams): """ A service operation action request. :type definition: dict :param definition: The JSON definition """ def __init__(self, definition): super(Request, self).__init__(definition) #: (``string``) The name of the low-level service operation self.operation = definition.get('operation') class Waiter(DefinitionWithParams): """ An event waiter specification. :type name: string :param name: Name of the waiter :type definition: dict :param definition: The JSON definition """ PREFIX = 'WaitUntil' def __init__(self, name, definition): super(Waiter, self).__init__(definition) #: (``string``) The name of this waiter self.name = name #: (``string``) The name of the underlying event waiter self.waiter_name = definition.get('waiterName') class ResponseResource(object): """ A resource response to create after performing an action. :type definition: dict :param definition: The JSON definition :type resource_defs: dict :param resource_defs: All resources defined in the service """ def __init__(self, definition, resource_defs): self._definition = definition self._resource_defs = resource_defs #: (``string``) The name of the response resource type self.type = definition.get('type') #: (``string``) The JMESPath search query or ``None`` self.path = definition.get('path') @property def identifiers(self): """ A list of resource identifiers. :type: list(:py:class:`Identifier`) """ identifiers = [] for item in self._definition.get('identifiers', []): identifiers.append( Parameter(**item)) return identifiers @property def model(self): """ Get the resource model for the response resource. :type: :py:class:`ResourceModel` """ return ResourceModel(self.type, self._resource_defs[self.type], self._resource_defs) class Collection(Action): """ A group of resources. See :py:class:`Action`. :type name: string :param name: The name of the collection :type definition: dict :param definition: The JSON definition :type resource_defs: dict :param resource_defs: All resources defined in the service """ @property def batch_actions(self): """ Get a list of batch actions supported by the resource type contained in this action. This is a shortcut for accessing the same information through the resource model. :rtype: list(:py:class:`Action`) """ return self.resource.model.batch_actions class ResourceModel(object): """ A model representing a resource, defined via a JSON description format. A resource has identifiers, attributes, actions, sub-resources, references and collections. For more information on resources, see :ref:`guide_resources`. :type name: string :param name: The name of this resource, e.g. ``sqs`` or ``Queue`` :type definition: dict :param definition: The JSON definition :type resource_defs: dict :param resource_defs: All resources defined in the service """ def __init__(self, name, definition, resource_defs): self._definition = definition self._resource_defs = resource_defs self._renamed = {} #: (``string``) The name of this resource self.name = name #: (``string``) The service shape name for this resource or ``None`` self.shape = definition.get('shape') def load_rename_map(self, shape=None): """ Load a name translation map given a shape. This will set up renamed values for any collisions, e.g. if the shape, an action, and a subresource all are all named ``foo`` then the resource will have an action ``foo``, a subresource named ``Foo`` and a property named ``foo_attribute``. This is the order of precedence, from most important to least important: * Load action (resource.load) * Identifiers * Actions * Subresources * References * Collections * Waiters * Attributes (shape members) Batch actions are only exposed on collections, so do not get modified here. Subresources use upper camel casing, so are unlikely to collide with anything but other subresources. Creates a structure like this:: renames = { ('action', 'id'): 'id_action', ('collection', 'id'): 'id_collection', ('attribute', 'id'): 'id_attribute' } # Get the final name for an action named 'id' name = renames.get(('action', 'id'), 'id') :type shape: botocore.model.Shape :param shape: The underlying shape for this resource. """ # Meta is a reserved name for resources names = set(['meta']) self._renamed = {} if self._definition.get('load'): names.add('load') for item in self._definition.get('identifiers', []): self._load_name_with_category(names, item['name'], 'identifier') for name in self._definition.get('actions', {}): self._load_name_with_category(names, name, 'action') for name, ref in self._get_has_definition().items(): # Subresources require no data members, just typically # identifiers and user input. data_required = False for identifier in ref['resource']['identifiers']: if identifier['source'] == 'data': data_required = True break if not data_required: self._load_name_with_category(names, name, 'subresource', snake_case=False) else: self._load_name_with_category(names, name, 'reference') for name in self._definition.get('hasMany', {}): self._load_name_with_category(names, name, 'collection') for name in self._definition.get('waiters', {}): self._load_name_with_category(names, Waiter.PREFIX + name, 'waiter') if shape is not None: for name in shape.members.keys(): self._load_name_with_category(names, name, 'attribute') def _load_name_with_category(self, names, name, category, snake_case=True): """ Load a name with a given category, possibly renaming it if that name is already in use. The name will be stored in ``names`` and possibly be set up in ``self._renamed``. :type names: set :param names: Existing names (Python attributes, properties, or methods) on the resource. :type name: string :param name: The original name of the value. :type category: string :param category: The value type, such as 'identifier' or 'action' :type snake_case: bool :param snake_case: True (default) if the name should be snake cased. """ if snake_case: name = xform_name(name) if name in names: logger.debug('Renaming %s %s %s' % (self.name, category, name)) self._renamed[(category, name)] = name + '_' + category name += '_' + category if name in names: # This isn't good, let's raise instead of trying to keep # renaming this value. raise ValueError('Problem renaming {0} {1} to {2}!'.format( self.name, category, name)) names.add(name) def _get_name(self, category, name, snake_case=True): """ Get a possibly renamed value given a category and name. This uses the rename map set up in ``load_rename_map``, so that method must be called once first. :type category: string :param category: The value type, such as 'identifier' or 'action' :type name: string :param name: The original name of the value :type snake_case: bool :param snake_case: True (default) if the name should be snake cased. :rtype: string :return: Either the renamed value if it is set, otherwise the original name. """ if snake_case: name = xform_name(name) return self._renamed.get((category, name), name) def get_attributes(self, shape): """ Get a dictionary of attribute names to original name and shape models that represent the attributes of this resource. Looks like the following: { 'some_name': ('SomeName', ) } :type shape: botocore.model.Shape :param shape: The underlying shape for this resource. :rtype: dict :return: Mapping of resource attributes. """ attributes = {} identifier_names = [i.name for i in self.identifiers] for name, member in shape.members.items(): snake_cased = xform_name(name) if snake_cased in identifier_names: # Skip identifiers, these are set through other means continue snake_cased = self._get_name('attribute', snake_cased, snake_case=False) attributes[snake_cased] = (name, member) return attributes @property def identifiers(self): """ Get a list of resource identifiers. :type: list(:py:class:`Identifier`) """ identifiers = [] for item in self._definition.get('identifiers', []): name = self._get_name('identifier', item['name']) member_name = item.get('memberName', None) if member_name: member_name = self._get_name('attribute', member_name) identifiers.append(Identifier(name, member_name)) return identifiers @property def load(self): """ Get the load action for this resource, if it is defined. :type: :py:class:`Action` or ``None`` """ action = self._definition.get('load') if action is not None: action = Action('load', action, self._resource_defs) return action @property def actions(self): """ Get a list of actions for this resource. :type: list(:py:class:`Action`) """ actions = [] for name, item in self._definition.get('actions', {}).items(): name = self._get_name('action', name) actions.append(Action(name, item, self._resource_defs)) return actions @property def batch_actions(self): """ Get a list of batch actions for this resource. :type: list(:py:class:`Action`) """ actions = [] for name, item in self._definition.get('batchActions', {}).items(): name = self._get_name('batch_action', name) actions.append(Action(name, item, self._resource_defs)) return actions def _get_has_definition(self): """ Get a ``has`` relationship definition from a model, where the service resource model is treated special in that it contains a relationship to every resource defined for the service. This allows things like ``s3.Object('bucket-name', 'key')`` to work even though the JSON doesn't define it explicitly. :rtype: dict :return: Mapping of names to subresource and reference definitions. """ if self.name not in self._resource_defs: # This is the service resource, so let us expose all of # the defined resources as subresources. definition = {} for name, resource_def in self._resource_defs.items(): # It's possible for the service to have renamed a # resource or to have defined multiple names that # point to the same resource type, so we need to # take that into account. found = False has_items = self._definition.get('has', {}).items() for has_name, has_def in has_items: if has_def.get('resource', {}).get('type') == name: definition[has_name] = has_def found = True if not found: # Create a relationship definition and attach it # to the model, such that all identifiers must be # supplied by the user. It will look something like: # # { # 'resource': { # 'type': 'ResourceName', # 'identifiers': [ # {'target': 'Name1', 'source': 'input'}, # {'target': 'Name2', 'source': 'input'}, # ... # ] # } # } # fake_has = { 'resource': { 'type': name, 'identifiers': [] } } for identifier in resource_def.get('identifiers', []): fake_has['resource']['identifiers'].append({ 'target': identifier['name'], 'source': 'input' }) definition[name] = fake_has else: definition = self._definition.get('has', {}) return definition def _get_related_resources(self, subresources): """ Get a list of sub-resources or references. :type subresources: bool :param subresources: ``True`` to get sub-resources, ``False`` to get references. :rtype: list(:py:class:`ResponseResource`) """ resources = [] for name, definition in self._get_has_definition().items(): if subresources: name = self._get_name('subresource', name, snake_case=False) else: name = self._get_name('reference', name) action = Action(name, definition, self._resource_defs) data_required = False for identifier in action.resource.identifiers: if identifier.source == 'data': data_required = True break if subresources and not data_required: resources.append(action) elif not subresources and data_required: resources.append(action) return resources @property def subresources(self): """ Get a list of sub-resources. :type: list(:py:class:`ResponseResource`) """ return self._get_related_resources(True) @property def references(self): """ Get a list of reference resources. :type: list(:py:class:`ResponseResource`) """ return self._get_related_resources(False) @property def collections(self): """ Get a list of collections for this resource. :type: list(:py:class:`Collection`) """ collections = [] for name, item in self._definition.get('hasMany', {}).items(): name = self._get_name('collection', name) collections.append(Collection(name, item, self._resource_defs)) return collections @property def waiters(self): """ Get a list of waiters for this resource. :type: list(:py:class:`Waiter`) """ waiters = [] for name, item in self._definition.get('waiters', {}).items(): name = self._get_name('waiter', Waiter.PREFIX + name) waiters.append(Waiter(name, item)) return waiters boto3-1.9.253/boto3/resources/params.py000066400000000000000000000137641355237733400176450ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import re import jmespath from botocore import xform_name from ..exceptions import ResourceLoadException INDEX_RE = re.compile('\[(.*)\]$') def get_data_member(parent, path): """ Get a data member from a parent using a JMESPath search query, loading the parent if required. If the parent cannot be loaded and no data is present then an exception is raised. :type parent: ServiceResource :param parent: The resource instance to which contains data we are interested in. :type path: string :param path: The JMESPath expression to query :raises ResourceLoadException: When no data is present and the resource cannot be loaded. :returns: The queried data or ``None``. """ # Ensure the parent has its data loaded, if possible. if parent.meta.data is None: if hasattr(parent, 'load'): parent.load() else: raise ResourceLoadException( '{0} has no load method!'.format(parent.__class__.__name__)) return jmespath.search(path, parent.meta.data) def create_request_parameters(parent, request_model, params=None, index=None): """ Handle request parameters that can be filled in from identifiers, resource data members or constants. By passing ``params``, you can invoke this method multiple times and build up a parameter dict over time, which is particularly useful for reverse JMESPath expressions that append to lists. :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type request_model: :py:class:`~boto3.resources.model.Request` :param request_model: The action request model. :type params: dict :param params: If set, then add to this existing dict. It is both edited in-place and returned. :type index: int :param index: The position of an item within a list :rtype: dict :return: Pre-filled parameters to be sent to the request operation. """ if params is None: params = {} for param in request_model.params: source = param.source target = param.target if source == 'identifier': # Resource identifier, e.g. queue.url value = getattr(parent, xform_name(param.name)) elif source == 'data': # If this is a data member then it may incur a load # action before returning the value. value = get_data_member(parent, param.path) elif source in ['string', 'integer', 'boolean']: # These are hard-coded values in the definition value = param.value elif source == 'input': # This is provided by the user, so ignore it here continue else: raise NotImplementedError( 'Unsupported source type: {0}'.format(source)) build_param_structure(params, target, value, index) return params def build_param_structure(params, target, value, index=None): """ This method provides a basic reverse JMESPath implementation that lets you go from a JMESPath-like string to a possibly deeply nested object. The ``params`` are mutated in-place, so subsequent calls can modify the same element by its index. >>> build_param_structure(params, 'test[0]', 1) >>> print(params) {'test': [1]} >>> build_param_structure(params, 'foo.bar[0].baz', 'hello world') >>> print(params) {'test': [1], 'foo': {'bar': [{'baz': 'hello, world'}]}} """ pos = params parts = target.split('.') # First, split into parts like 'foo', 'bar[0]', 'baz' and process # each piece. It can either be a list or a dict, depending on if # an index like `[0]` is present. We detect this via a regular # expression, and keep track of where we are in params via the # pos variable, walking down to the last item. Once there, we # set the value. for i, part in enumerate(parts): # Is it indexing an array? result = INDEX_RE.search(part) if result: if result.group(1): if result.group(1) == '*': part = part[:-3] else: # We have an explicit index index = int(result.group(1)) part = part[:-len(str(index) + '[]')] else: # Index will be set after we know the proper part # name and that it's a list instance. index = None part = part[:-2] if part not in pos or not isinstance(pos[part], list): pos[part] = [] # This means we should append, e.g. 'foo[]' if index is None: index = len(pos[part]) while len(pos[part]) <= index: # Assume it's a dict until we set the final value below pos[part].append({}) # Last item? Set the value, otherwise set the new position if i == len(parts) - 1: pos[part][index] = value else: # The new pos is the *item* in the array, not the array! pos = pos[part][index] else: if part not in pos: pos[part] = {} # Last item? Set the value, otherwise set the new position if i == len(parts) - 1: pos[part] = value else: pos = pos[part] boto3-1.9.253/boto3/resources/response.py000066400000000000000000000264611355237733400202160ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import jmespath from botocore import xform_name from .params import get_data_member def all_not_none(iterable): """ Return True if all elements of the iterable are not None (or if the iterable is empty). This is like the built-in ``all``, except checks against None, so 0 and False are allowable values. """ for element in iterable: if element is None: return False return True def build_identifiers(identifiers, parent, params=None, raw_response=None): """ Builds a mapping of identifier names to values based on the identifier source location, type, and target. Identifier values may be scalars or lists depending on the source type and location. :type identifiers: list :param identifiers: List of :py:class:`~boto3.resources.model.Parameter` definitions :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type params: dict :param params: Request parameters sent to the service. :type raw_response: dict :param raw_response: Low-level operation response. :rtype: list :return: An ordered list of ``(name, value)`` identifier tuples. """ results = [] for identifier in identifiers: source = identifier.source target = identifier.target if source == 'response': value = jmespath.search(identifier.path, raw_response) elif source == 'requestParameter': value = jmespath.search(identifier.path, params) elif source == 'identifier': value = getattr(parent, xform_name(identifier.name)) elif source == 'data': # If this is a data member then it may incur a load # action before returning the value. value = get_data_member(parent, identifier.path) elif source == 'input': # This value is set by the user, so ignore it here continue else: raise NotImplementedError( 'Unsupported source type: {0}'.format(source)) results.append((xform_name(target), value)) return results def build_empty_response(search_path, operation_name, service_model): """ Creates an appropriate empty response for the type that is expected, based on the service model's shape type. For example, a value that is normally a list would then return an empty list. A structure would return an empty dict, and a number would return None. :type search_path: string :param search_path: JMESPath expression to search in the response :type operation_name: string :param operation_name: Name of the underlying service operation. :type service_model: :ref:`botocore.model.ServiceModel` :param service_model: The Botocore service model :rtype: dict, list, or None :return: An appropriate empty value """ response = None operation_model = service_model.operation_model(operation_name) shape = operation_model.output_shape if search_path: # Walk the search path and find the final shape. For example, given # a path of ``foo.bar[0].baz``, we first find the shape for ``foo``, # then the shape for ``bar`` (ignoring the indexing), and finally # the shape for ``baz``. for item in search_path.split('.'): item = item.strip('[0123456789]$') if shape.type_name == 'structure': shape = shape.members[item] elif shape.type_name == 'list': shape = shape.member else: raise NotImplementedError( 'Search path hits shape type {0} from {1}'.format( shape.type_name, item)) # Anything not handled here is set to None if shape.type_name == 'structure': response = {} elif shape.type_name == 'list': response = [] elif shape.type_name == 'map': response = {} return response class RawHandler(object): """ A raw action response handler. This passed through the response dictionary, optionally after performing a JMESPath search if one has been defined for the action. :type search_path: string :param search_path: JMESPath expression to search in the response :rtype: dict :return: Service response """ def __init__(self, search_path): self.search_path = search_path def __call__(self, parent, params, response): """ :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type params: dict :param params: Request parameters sent to the service. :type response: dict :param response: Low-level operation response. """ # TODO: Remove the '$' check after JMESPath supports it if self.search_path and self.search_path != '$': response = jmespath.search(self.search_path, response) return response class ResourceHandler(object): """ Creates a new resource or list of new resources from the low-level response based on the given response resource definition. :type search_path: string :param search_path: JMESPath expression to search in the response :type factory: ResourceFactory :param factory: The factory that created the resource class to which this action is attached. :type resource_model: :py:class:`~boto3.resources.model.ResponseResource` :param resource_model: Response resource model. :type service_context: :py:class:`~boto3.utils.ServiceContext` :param service_context: Context about the AWS service :type operation_name: string :param operation_name: Name of the underlying service operation, if it exists. :rtype: ServiceResource or list :return: New resource instance(s). """ def __init__(self, search_path, factory, resource_model, service_context, operation_name=None): self.search_path = search_path self.factory = factory self.resource_model = resource_model self.operation_name = operation_name self.service_context = service_context def __call__(self, parent, params, response): """ :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type params: dict :param params: Request parameters sent to the service. :type response: dict :param response: Low-level operation response. """ resource_name = self.resource_model.type json_definition = self.service_context.resource_json_definitions.get( resource_name) # Load the new resource class that will result from this action. resource_cls = self.factory.load_from_definition( resource_name=resource_name, single_resource_json_definition=json_definition, service_context=self.service_context ) raw_response = response search_response = None # Anytime a path is defined, it means the response contains the # resource's attributes, so resource_data gets set here. It # eventually ends up in resource.meta.data, which is where # the attribute properties look for data. if self.search_path: search_response = jmespath.search(self.search_path, raw_response) # First, we parse all the identifiers, then create the individual # response resources using them. Any identifiers that are lists # will have one item consumed from the front of the list for each # resource that is instantiated. Items which are not a list will # be set as the same value on each new resource instance. identifiers = dict(build_identifiers( self.resource_model.identifiers, parent, params, raw_response)) # If any of the identifiers is a list, then the response is plural plural = [v for v in identifiers.values() if isinstance(v, list)] if plural: response = [] # The number of items in an identifier that is a list will # determine how many resource instances to create. for i in range(len(plural[0])): # Response item data is *only* available if a search path # was given. This prevents accidentally loading unrelated # data that may be in the response. response_item = None if search_response: response_item = search_response[i] response.append( self.handle_response_item(resource_cls, parent, identifiers, response_item)) elif all_not_none(identifiers.values()): # All identifiers must always exist, otherwise the resource # cannot be instantiated. response = self.handle_response_item( resource_cls, parent, identifiers, search_response) else: # The response should be empty, but that may mean an # empty dict, list, or None based on whether we make # a remote service call and what shape it is expected # to return. response = None if self.operation_name is not None: # A remote service call was made, so try and determine # its shape. response = build_empty_response( self.search_path, self.operation_name, self.service_context.service_model) return response def handle_response_item(self, resource_cls, parent, identifiers, resource_data): """ Handles the creation of a single response item by setting parameters and creating the appropriate resource instance. :type resource_cls: ServiceResource subclass :param resource_cls: The resource class to instantiate. :type parent: ServiceResource :param parent: The resource instance to which this action is attached. :type identifiers: dict :param identifiers: Map of identifier names to value or values. :type resource_data: dict or None :param resource_data: Data for resource attributes. :rtype: ServiceResource :return: New resource instance. """ kwargs = { 'client': parent.meta.client, } for name, value in identifiers.items(): # If value is a list, then consume the next item if isinstance(value, list): value = value.pop(0) kwargs[name] = value resource = resource_cls(**kwargs) if resource_data is not None: resource.meta.data = resource_data return resource boto3-1.9.253/boto3/s3/000077500000000000000000000000001355237733400143105ustar00rootroot00000000000000boto3-1.9.253/boto3/s3/__init__.py000066400000000000000000000010611355237733400164170ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/boto3/s3/inject.py000066400000000000000000000631001355237733400161360ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.exceptions import ClientError from boto3.s3.transfer import create_transfer_manager from boto3.s3.transfer import TransferConfig, S3Transfer from boto3.s3.transfer import ProgressCallbackInvoker from boto3 import utils def inject_s3_transfer_methods(class_attributes, **kwargs): utils.inject_attribute(class_attributes, 'upload_file', upload_file) utils.inject_attribute(class_attributes, 'download_file', download_file) utils.inject_attribute(class_attributes, 'copy', copy) utils.inject_attribute(class_attributes, 'upload_fileobj', upload_fileobj) utils.inject_attribute( class_attributes, 'download_fileobj', download_fileobj) def inject_bucket_methods(class_attributes, **kwargs): utils.inject_attribute(class_attributes, 'load', bucket_load) utils.inject_attribute(class_attributes, 'upload_file', bucket_upload_file) utils.inject_attribute( class_attributes, 'download_file', bucket_download_file) utils.inject_attribute(class_attributes, 'copy', bucket_copy) utils.inject_attribute( class_attributes, 'upload_fileobj', bucket_upload_fileobj) utils.inject_attribute( class_attributes, 'download_fileobj', bucket_download_fileobj) def inject_object_methods(class_attributes, **kwargs): utils.inject_attribute(class_attributes, 'upload_file', object_upload_file) utils.inject_attribute( class_attributes, 'download_file', object_download_file) utils.inject_attribute(class_attributes, 'copy', object_copy) utils.inject_attribute( class_attributes, 'upload_fileobj', object_upload_fileobj) utils.inject_attribute( class_attributes, 'download_fileobj', object_download_fileobj) def inject_object_summary_methods(class_attributes, **kwargs): utils.inject_attribute(class_attributes, 'load', object_summary_load) def bucket_load(self, *args, **kwargs): """ Calls s3.Client.list_buckets() to update the attributes of the Bucket resource. """ # The docstring above is phrased this way to match what the autogenerated # docs produce. # We can't actually get the bucket's attributes from a HeadBucket, # so we need to use a ListBuckets and search for our bucket. # However, we may fail if we lack permissions to ListBuckets # or the bucket is in another account. In which case, creation_date # will be None. self.meta.data = {} try: response = self.meta.client.list_buckets() for bucket_data in response['Buckets']: if bucket_data['Name'] == self.name: self.meta.data = bucket_data break except ClientError as e: if not e.response.get('Error', {}).get('Code') == 'AccessDenied': raise def object_summary_load(self, *args, **kwargs): """ Calls s3.Client.head_object to update the attributes of the ObjectSummary resource. """ response = self.meta.client.head_object( Bucket=self.bucket_name, Key=self.key) if 'ContentLength' in response: response['Size'] = response.pop('ContentLength') self.meta.data = response def upload_file(self, Filename, Bucket, Key, ExtraArgs=None, Callback=None, Config=None): """Upload a file to an S3 object. Usage:: import boto3 s3 = boto3.resource('s3') s3.meta.client.upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt') Similar behavior as S3Transfer's upload_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Filename: str :param Filename: The path to the file to upload. :type Bucket: str :param Bucket: The name of the bucket to upload to. :type Key: str :param Key: The name of the key to upload to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ with S3Transfer(self, Config) as transfer: return transfer.upload_file( filename=Filename, bucket=Bucket, key=Key, extra_args=ExtraArgs, callback=Callback) def download_file(self, Bucket, Key, Filename, ExtraArgs=None, Callback=None, Config=None): """Download an S3 object to a file. Usage:: import boto3 s3 = boto3.resource('s3') s3.meta.client.download_file('mybucket', 'hello.txt', '/tmp/hello.txt') Similar behavior as S3Transfer's download_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Bucket: str :param Bucket: The name of the bucket to download from. :type Key: str :param Key: The name of the key to download from. :type Filename: str :param Filename: The path to the file to download to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ with S3Transfer(self, Config) as transfer: return transfer.download_file( bucket=Bucket, key=Key, filename=Filename, extra_args=ExtraArgs, callback=Callback) def bucket_upload_file(self, Filename, Key, ExtraArgs=None, Callback=None, Config=None): """Upload a file to an S3 object. Usage:: import boto3 s3 = boto3.resource('s3') s3.Bucket('mybucket').upload_file('/tmp/hello.txt', 'hello.txt') Similar behavior as S3Transfer's upload_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Filename: str :param Filename: The path to the file to upload. :type Key: str :param Key: The name of the key to upload to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ return self.meta.client.upload_file( Filename=Filename, Bucket=self.name, Key=Key, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def bucket_download_file(self, Key, Filename, ExtraArgs=None, Callback=None, Config=None): """Download an S3 object to a file. Usage:: import boto3 s3 = boto3.resource('s3') s3.Bucket('mybucket').download_file('hello.txt', '/tmp/hello.txt') Similar behavior as S3Transfer's download_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Key: str :param Key: The name of the key to download from. :type Filename: str :param Filename: The path to the file to download to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ return self.meta.client.download_file( Bucket=self.name, Key=Key, Filename=Filename, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def object_upload_file(self, Filename, ExtraArgs=None, Callback=None, Config=None): """Upload a file to an S3 object. Usage:: import boto3 s3 = boto3.resource('s3') s3.Object('mybucket', 'hello.txt').upload_file('/tmp/hello.txt') Similar behavior as S3Transfer's upload_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Filename: str :param Filename: The path to the file to upload. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ return self.meta.client.upload_file( Filename=Filename, Bucket=self.bucket_name, Key=self.key, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def object_download_file(self, Filename, ExtraArgs=None, Callback=None, Config=None): """Download an S3 object to a file. Usage:: import boto3 s3 = boto3.resource('s3') s3.Object('mybucket', 'hello.txt').download_file('/tmp/hello.txt') Similar behavior as S3Transfer's download_file() method, except that parameters are capitalized. Detailed examples can be found at :ref:`S3Transfer's Usage `. :type Filename: str :param Filename: The path to the file to download to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the transfer. """ return self.meta.client.download_file( Bucket=self.bucket_name, Key=self.key, Filename=Filename, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def copy(self, CopySource, Bucket, Key, ExtraArgs=None, Callback=None, SourceClient=None, Config=None): """Copy an object from one S3 location to another. This is a managed transfer which will perform a multipart copy in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') copy_source = { 'Bucket': 'mybucket', 'Key': 'mykey' } s3.meta.client.copy(copy_source, 'otherbucket', 'otherkey') :type CopySource: dict :param CopySource: The name of the source bucket, key name of the source object, and optional version ID of the source object. The dictionary format is: ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note that the ``VersionId`` key is optional and may be omitted. :type Bucket: str :param Bucket: The name of the bucket to copy to :type Key: str :param Key: The name of the key to copy to :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the copy. :type SourceClient: botocore or boto3 Client :param SourceClient: The client to be used for operation that may happen at the source object. For example, this client is used for the head_object that determines the size of the copy. If no client is provided, the current client is used as the client for the source object. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the copy. """ subscribers = None if Callback is not None: subscribers = [ProgressCallbackInvoker(Callback)] config = Config if config is None: config = TransferConfig() with create_transfer_manager(self, config) as manager: future = manager.copy( copy_source=CopySource, bucket=Bucket, key=Key, extra_args=ExtraArgs, subscribers=subscribers, source_client=SourceClient) return future.result() def bucket_copy(self, CopySource, Key, ExtraArgs=None, Callback=None, SourceClient=None, Config=None): """Copy an object from one S3 location to an object in this bucket. This is a managed transfer which will perform a multipart copy in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') copy_source = { 'Bucket': 'mybucket', 'Key': 'mykey' } bucket = s3.Bucket('otherbucket') bucket.copy(copy_source, 'otherkey') :type CopySource: dict :param CopySource: The name of the source bucket, key name of the source object, and optional version ID of the source object. The dictionary format is: ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note that the ``VersionId`` key is optional and may be omitted. :type Key: str :param Key: The name of the key to copy to :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the copy. :type SourceClient: botocore or boto3 Client :param SourceClient: The client to be used for operation that may happen at the source object. For example, this client is used for the head_object that determines the size of the copy. If no client is provided, the current client is used as the client for the source object. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the copy. """ return self.meta.client.copy( CopySource=CopySource, Bucket=self.name, Key=Key, ExtraArgs=ExtraArgs, Callback=Callback, SourceClient=SourceClient, Config=Config) def object_copy(self, CopySource, ExtraArgs=None, Callback=None, SourceClient=None, Config=None): """Copy an object from one S3 location to this object. This is a managed transfer which will perform a multipart copy in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') copy_source = { 'Bucket': 'mybucket', 'Key': 'mykey' } bucket = s3.Bucket('otherbucket') obj = bucket.Object('otherkey') obj.copy(copy_source) :type CopySource: dict :param CopySource: The name of the source bucket, key name of the source object, and optional version ID of the source object. The dictionary format is: ``{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}``. Note that the ``VersionId`` key is optional and may be omitted. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the copy. :type SourceClient: botocore or boto3 Client :param SourceClient: The client to be used for operation that may happen at the source object. For example, this client is used for the head_object that determines the size of the copy. If no client is provided, the current client is used as the client for the source object. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the copy. """ return self.meta.client.copy( CopySource=CopySource, Bucket=self.bucket_name, Key=self.key, ExtraArgs=ExtraArgs, Callback=Callback, SourceClient=SourceClient, Config=Config) def upload_fileobj(self, Fileobj, Bucket, Key, ExtraArgs=None, Callback=None, Config=None): """Upload a file-like object to S3. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart upload in multiple threads if necessary. Usage:: import boto3 s3 = boto3.client('s3') with open('filename', 'rb') as data: s3.upload_fileobj(data, 'mybucket', 'mykey') :type Fileobj: a file-like object :param Fileobj: A file-like object to upload. At a minimum, it must implement the `read` method, and must return bytes. :type Bucket: str :param Bucket: The name of the bucket to upload to. :type Key: str :param Key: The name of the key to upload to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the upload. """ if not hasattr(Fileobj, 'read'): raise ValueError('Fileobj must implement read') subscribers = None if Callback is not None: subscribers = [ProgressCallbackInvoker(Callback)] config = Config if config is None: config = TransferConfig() with create_transfer_manager(self, config) as manager: future = manager.upload( fileobj=Fileobj, bucket=Bucket, key=Key, extra_args=ExtraArgs, subscribers=subscribers) return future.result() def bucket_upload_fileobj(self, Fileobj, Key, ExtraArgs=None, Callback=None, Config=None): """Upload a file-like object to this bucket. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart upload in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('mybucket') with open('filename', 'rb') as data: bucket.upload_fileobj(data, 'mykey') :type Fileobj: a file-like object :param Fileobj: A file-like object to upload. At a minimum, it must implement the `read` method, and must return bytes. :type Key: str :param Key: The name of the key to upload to. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the upload. """ return self.meta.client.upload_fileobj( Fileobj=Fileobj, Bucket=self.name, Key=Key, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def object_upload_fileobj(self, Fileobj, ExtraArgs=None, Callback=None, Config=None): """Upload a file-like object to this object. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart upload in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('mybucket') obj = bucket.Object('mykey') with open('filename', 'rb') as data: obj.upload_fileobj(data) :type Fileobj: a file-like object :param Fileobj: A file-like object to upload. At a minimum, it must implement the `read` method, and must return bytes. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the upload. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the upload. """ return self.meta.client.upload_fileobj( Fileobj=Fileobj, Bucket=self.bucket_name, Key=self.key, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def download_fileobj(self, Bucket, Key, Fileobj, ExtraArgs=None, Callback=None, Config=None): """Download an object from S3 to a file-like object. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart download in multiple threads if necessary. Usage:: import boto3 s3 = boto3.client('s3') with open('filename', 'wb') as data: s3.download_fileobj('mybucket', 'mykey', data) :type Fileobj: a file-like object :param Fileobj: A file-like object to download into. At a minimum, it must implement the `write` method and must accept bytes. :type Bucket: str :param Bucket: The name of the bucket to download from. :type Key: str :param Key: The name of the key to download from. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the download. """ if not hasattr(Fileobj, 'write'): raise ValueError('Fileobj must implement write') subscribers = None if Callback is not None: subscribers = [ProgressCallbackInvoker(Callback)] config = Config if config is None: config = TransferConfig() with create_transfer_manager(self, config) as manager: future = manager.download( bucket=Bucket, key=Key, fileobj=Fileobj, extra_args=ExtraArgs, subscribers=subscribers) return future.result() def bucket_download_fileobj(self, Key, Fileobj, ExtraArgs=None, Callback=None, Config=None): """Download an object from this bucket to a file-like-object. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart download in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('mybucket') with open('filename', 'wb') as data: bucket.download_fileobj('mykey', data) :type Fileobj: a file-like object :param Fileobj: A file-like object to download into. At a minimum, it must implement the `write` method and must accept bytes. :type Key: str :param Key: The name of the key to download from. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the download. """ return self.meta.client.download_fileobj( Bucket=self.name, Key=Key, Fileobj=Fileobj, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) def object_download_fileobj(self, Fileobj, ExtraArgs=None, Callback=None, Config=None): """Download this object from S3 to a file-like object. The file-like object must be in binary mode. This is a managed transfer which will perform a multipart download in multiple threads if necessary. Usage:: import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('mybucket') obj = bucket.Object('mykey') with open('filename', 'wb') as data: obj.download_fileobj(data) :type Fileobj: a file-like object :param Fileobj: A file-like object to download into. At a minimum, it must implement the `write` method and must accept bytes. :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. :type Callback: function :param Callback: A method which takes a number of bytes transferred to be periodically called during the download. :type Config: boto3.s3.transfer.TransferConfig :param Config: The transfer configuration to be used when performing the download. """ return self.meta.client.download_fileobj( Bucket=self.bucket_name, Key=self.key, Fileobj=Fileobj, ExtraArgs=ExtraArgs, Callback=Callback, Config=Config) boto3-1.9.253/boto3/s3/transfer.py000066400000000000000000000310141355237733400165050ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. """Abstractions over S3's upload/download operations. This module provides high level abstractions for efficient uploads/downloads. It handles several things for the user: * Automatically switching to multipart transfers when a file is over a specific size threshold * Uploading/downloading a file in parallel * Progress callbacks to monitor transfers * Retries. While botocore handles retries for streaming uploads, it is not possible for it to handle retries for streaming downloads. This module handles retries for both cases so you don't need to implement any retry logic yourself. This module has a reasonable set of defaults. It also allows you to configure many aspects of the transfer process including: * Multipart threshold size * Max parallel downloads * Socket timeouts * Retry amounts There is no support for s3->s3 multipart copies at this time. .. _ref_s3transfer_usage: Usage ===== The simplest way to use this module is: .. code-block:: python client = boto3.client('s3', 'us-west-2') transfer = S3Transfer(client) # Upload /tmp/myfile to s3://bucket/key transfer.upload_file('/tmp/myfile', 'bucket', 'key') # Download s3://bucket/key to /tmp/myfile transfer.download_file('bucket', 'key', '/tmp/myfile') The ``upload_file`` and ``download_file`` methods also accept ``**kwargs``, which will be forwarded through to the corresponding client operation. Here are a few examples using ``upload_file``:: # Making the object public transfer.upload_file('/tmp/myfile', 'bucket', 'key', extra_args={'ACL': 'public-read'}) # Setting metadata transfer.upload_file('/tmp/myfile', 'bucket', 'key', extra_args={'Metadata': {'a': 'b', 'c': 'd'}}) # Setting content type transfer.upload_file('/tmp/myfile.json', 'bucket', 'key', extra_args={'ContentType': "application/json"}) The ``S3Transfer`` class also supports progress callbacks so you can provide transfer progress to users. Both the ``upload_file`` and ``download_file`` methods take an optional ``callback`` parameter. Here's an example of how to print a simple progress percentage to the user: .. code-block:: python class ProgressPercentage(object): def __init__(self, filename): self._filename = filename self._size = float(os.path.getsize(filename)) self._seen_so_far = 0 self._lock = threading.Lock() def __call__(self, bytes_amount): # To simplify we'll assume this is hooked up # to a single filename. with self._lock: self._seen_so_far += bytes_amount percentage = (self._seen_so_far / self._size) * 100 sys.stdout.write( "\r%s %s / %s (%.2f%%)" % ( self._filename, self._seen_so_far, self._size, percentage)) sys.stdout.flush() transfer = S3Transfer(boto3.client('s3', 'us-west-2')) # Upload /tmp/myfile to s3://bucket/key and print upload progress. transfer.upload_file('/tmp/myfile', 'bucket', 'key', callback=ProgressPercentage('/tmp/myfile')) You can also provide a TransferConfig object to the S3Transfer object that gives you more fine grained control over the transfer. For example: .. code-block:: python client = boto3.client('s3', 'us-west-2') config = TransferConfig( multipart_threshold=8 * 1024 * 1024, max_concurrency=10, num_download_attempts=10, ) transfer = S3Transfer(client, config) transfer.upload_file('/tmp/foo', 'bucket', 'key') """ from botocore.exceptions import ClientError from botocore.compat import six from s3transfer.exceptions import RetriesExceededError as \ S3TransferRetriesExceededError from s3transfer.manager import TransferConfig as S3TransferConfig from s3transfer.manager import TransferManager from s3transfer.futures import NonThreadedExecutor from s3transfer.subscribers import BaseSubscriber from s3transfer.utils import OSUtils from boto3.exceptions import RetriesExceededError, S3UploadFailedError KB = 1024 MB = KB * KB def create_transfer_manager(client, config, osutil=None): """Creates a transfer manager based on configuration :type client: boto3.client :param client: The S3 client to use :type config: boto3.s3.transfer.TransferConfig :param config: The transfer config to use :type osutil: s3transfer.utils.OSUtils :param osutil: The os utility to use :rtype: s3transfer.manager.TransferManager :returns: A transfer manager based on parameters provided """ executor_cls = None if not config.use_threads: executor_cls = NonThreadedExecutor return TransferManager(client, config, osutil, executor_cls) class TransferConfig(S3TransferConfig): ALIAS = { 'max_concurrency': 'max_request_concurrency', 'max_io_queue': 'max_io_queue_size' } def __init__(self, multipart_threshold=8 * MB, max_concurrency=10, multipart_chunksize=8 * MB, num_download_attempts=5, max_io_queue=100, io_chunksize=256 * KB, use_threads=True): """Configuration object for managed S3 transfers :param multipart_threshold: The transfer size threshold for which multipart uploads, downloads, and copies will automatically be triggered. :param max_concurrency: The maximum number of threads that will be making requests to perform a transfer. If ``use_threads`` is set to ``False``, the value provided is ignored as the transfer will only ever use the main thread. :param multipart_chunksize: The partition size of each part for a multipart transfer. :param num_download_attempts: The number of download attempts that will be retried upon errors with downloading an object in S3. Note that these retries account for errors that occur when streaming down the data from s3 (i.e. socket errors and read timeouts that occur after recieving an OK response from s3). Other retryable exceptions such as throttling errors and 5xx errors are already retried by botocore (this default is 5). This does not take into account the number of exceptions retried by botocore. :param max_io_queue: The maximum amount of read parts that can be queued in memory to be written for a download. The size of each of these read parts is at most the size of ``io_chunksize``. :param io_chunksize: The max size of each chunk in the io queue. Currently, this is size used when ``read`` is called on the downloaded stream as well. :param use_threads: If True, threads will be used when performing S3 transfers. If False, no threads will be used in performing transfers: all logic will be ran in the main thread. """ super(TransferConfig, self).__init__( multipart_threshold=multipart_threshold, max_request_concurrency=max_concurrency, multipart_chunksize=multipart_chunksize, num_download_attempts=num_download_attempts, max_io_queue_size=max_io_queue, io_chunksize=io_chunksize, ) # Some of the argument names are not the same as the inherited # S3TransferConfig so we add aliases so you can still access the # old version of the names. for alias in self.ALIAS: setattr(self, alias, getattr(self, self.ALIAS[alias])) self.use_threads = use_threads def __setattr__(self, name, value): # If the alias name is used, make sure we set the name that it points # to as that is what actually is used in governing the TransferManager. if name in self.ALIAS: super(TransferConfig, self).__setattr__(self.ALIAS[name], value) # Always set the value of the actual name provided. super(TransferConfig, self).__setattr__(name, value) class S3Transfer(object): ALLOWED_DOWNLOAD_ARGS = TransferManager.ALLOWED_DOWNLOAD_ARGS ALLOWED_UPLOAD_ARGS = TransferManager.ALLOWED_UPLOAD_ARGS def __init__(self, client=None, config=None, osutil=None, manager=None): if not client and not manager: raise ValueError( 'Either a boto3.Client or s3transfer.manager.TransferManager ' 'must be provided' ) if manager and any([client, config, osutil]): raise ValueError( 'Manager cannot be provided with client, config, ' 'nor osutil. These parameters are mutually exclusive.' ) if config is None: config = TransferConfig() if osutil is None: osutil = OSUtils() if manager: self._manager = manager else: self._manager = create_transfer_manager(client, config, osutil) def upload_file(self, filename, bucket, key, callback=None, extra_args=None): """Upload a file to an S3 object. Variants have also been injected into S3 client, Bucket and Object. You don't have to use S3Transfer.upload_file() directly. .. seealso:: :py:meth:`S3.Client.upload_file` :py:meth:`S3.Client.upload_fileobj` """ if not isinstance(filename, six.string_types): raise ValueError('Filename must be a string') subscribers = self._get_subscribers(callback) future = self._manager.upload( filename, bucket, key, extra_args, subscribers) try: future.result() # If a client error was raised, add the backwards compatibility layer # that raises a S3UploadFailedError. These specific errors were only # ever thrown for upload_parts but now can be thrown for any related # client error. except ClientError as e: raise S3UploadFailedError( "Failed to upload %s to %s: %s" % ( filename, '/'.join([bucket, key]), e)) def download_file(self, bucket, key, filename, extra_args=None, callback=None): """Download an S3 object to a file. Variants have also been injected into S3 client, Bucket and Object. You don't have to use S3Transfer.download_file() directly. .. seealso:: :py:meth:`S3.Client.download_file` :py:meth:`S3.Client.download_fileobj` """ if not isinstance(filename, six.string_types): raise ValueError('Filename must be a string') subscribers = self._get_subscribers(callback) future = self._manager.download( bucket, key, filename, extra_args, subscribers) try: future.result() # This is for backwards compatibility where when retries are # exceeded we need to throw the same error from boto3 instead of # s3transfer's built in RetriesExceededError as current users are # catching the boto3 one instead of the s3transfer exception to do # their own retries. except S3TransferRetriesExceededError as e: raise RetriesExceededError(e.last_exception) def _get_subscribers(self, callback): if not callback: return None return [ProgressCallbackInvoker(callback)] def __enter__(self): return self def __exit__(self, *args): self._manager.__exit__(*args) class ProgressCallbackInvoker(BaseSubscriber): """A back-compat wrapper to invoke a provided callback via a subscriber :param callback: A callable that takes a single positional argument for how many bytes were transferred. """ def __init__(self, callback): self._callback = callback def on_progress(self, bytes_transferred, **kwargs): self._callback(bytes_transferred) boto3-1.9.253/boto3/session.py000066400000000000000000000462361355237733400160330ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import copy import os import botocore.session from botocore.client import Config from botocore.exceptions import DataNotFoundError, UnknownServiceError import boto3 import boto3.utils from boto3.exceptions import ResourceNotExistsError, UnknownAPIVersionError from .resources.factory import ResourceFactory class Session(object): """ A session stores configuration state and allows you to create service clients and resources. :type aws_access_key_id: string :param aws_access_key_id: AWS access key ID :type aws_secret_access_key: string :param aws_secret_access_key: AWS secret access key :type aws_session_token: string :param aws_session_token: AWS temporary session token :type region_name: string :param region_name: Default region when creating new connections :type botocore_session: botocore.session.Session :param botocore_session: Use this Botocore session instead of creating a new default one. :type profile_name: string :param profile_name: The name of a profile to use. If not given, then the default profile is used. """ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, region_name=None, botocore_session=None, profile_name=None): if botocore_session is not None: self._session = botocore_session else: # Create a new default session self._session = botocore.session.get_session() # Setup custom user-agent string if it isn't already customized if self._session.user_agent_name == 'Botocore': botocore_info = 'Botocore/{0}'.format( self._session.user_agent_version) if self._session.user_agent_extra: self._session.user_agent_extra += ' ' + botocore_info else: self._session.user_agent_extra = botocore_info self._session.user_agent_name = 'Boto3' self._session.user_agent_version = boto3.__version__ if profile_name is not None: self._session.set_config_variable('profile', profile_name) if aws_access_key_id or aws_secret_access_key or aws_session_token: self._session.set_credentials( aws_access_key_id, aws_secret_access_key, aws_session_token) if region_name is not None: self._session.set_config_variable('region', region_name) self.resource_factory = ResourceFactory( self._session.get_component('event_emitter')) self._setup_loader() self._register_default_handlers() def __repr__(self): return '{0}(region_name={1})'.format( self.__class__.__name__, repr(self._session.get_config_variable('region'))) @property def profile_name(self): """ The **read-only** profile name. """ return self._session.profile or 'default' @property def region_name(self): """ The **read-only** region name. """ return self._session.get_config_variable('region') @property def events(self): """ The event emitter for a session """ return self._session.get_component('event_emitter') @property def available_profiles(self): """ The profiles available to the session credentials """ return self._session.available_profiles def _setup_loader(self): """ Setup loader paths so that we can load resources. """ self._loader = self._session.get_component('data_loader') self._loader.search_paths.append( os.path.join(os.path.dirname(__file__), 'data')) def get_available_services(self): """ Get a list of available services that can be loaded as low-level clients via :py:meth:`Session.client`. :rtype: list :return: List of service names """ return self._session.get_available_services() def get_available_resources(self): """ Get a list of available services that can be loaded as resource clients via :py:meth:`Session.resource`. :rtype: list :return: List of service names """ return self._loader.list_available_services(type_name='resources-1') def get_available_partitions(self): """Lists the available partitions :rtype: list :return: Returns a list of partition names (e.g., ["aws", "aws-cn"]) """ return self._session.get_available_partitions() def get_available_regions(self, service_name, partition_name='aws', allow_non_regional=False): """Lists the region and endpoint names of a particular partition. :type service_name: string :param service_name: Name of a service to list endpoint for (e.g., s3). :type partition_name: string :param partition_name: Name of the partition to limit endpoints to. (e.g., aws for the public AWS endpoints, aws-cn for AWS China endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc.) :type allow_non_regional: bool :param allow_non_regional: Set to True to include endpoints that are not regional endpoints (e.g., s3-external-1, fips-us-gov-west-1, etc). :return: Returns a list of endpoint names (e.g., ["us-east-1"]). """ return self._session.get_available_regions( service_name=service_name, partition_name=partition_name, allow_non_regional=allow_non_regional) def get_credentials(self): """ Return the :class:`botocore.credential.Credential` object associated with this session. If the credentials have not yet been loaded, this will attempt to load them. If they have already been loaded, this will return the cached credentials. """ return self._session.get_credentials() def client(self, service_name, region_name=None, api_version=None, use_ssl=True, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, config=None): """ Create a low-level service client by name. :type service_name: string :param service_name: The name of a service, e.g. 's3' or 'ec2'. You can get a list of available services via :py:meth:`get_available_services`. :type region_name: string :param region_name: The name of the region associated with the client. A client is associated with a single region. :type api_version: string :param api_version: The API version to use. By default, botocore will use the latest API version when creating a client. You only need to specify this parameter if you want to use a previous API version of the client. :type use_ssl: boolean :param use_ssl: Whether or not to use SSL. By default, SSL is used. Note that not all services support non-ssl connections. :type verify: boolean/string :param verify: Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: * False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. * path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. :type endpoint_url: string :param endpoint_url: The complete URL to use for the constructed client. Normally, botocore will automatically construct the appropriate URL to use when communicating with a service. You can specify a complete URL (including the "http/https" scheme) to override this behavior. If this value is provided, then ``use_ssl`` is ignored. :type aws_access_key_id: string :param aws_access_key_id: The access key to use when creating the client. This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. You only need to provide this argument if you want to override the credentials used for this specific client. :type aws_secret_access_key: string :param aws_secret_access_key: The secret key to use when creating the client. Same semantics as aws_access_key_id above. :type aws_session_token: string :param aws_session_token: The session token to use when creating the client. Same semantics as aws_access_key_id above. :type config: botocore.client.Config :param config: Advanced client configuration options. If region_name is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a region_name value passed explicitly to the method. See `botocore config documentation `_ for more details. :return: Service client instance """ return self._session.create_client( service_name, region_name=region_name, api_version=api_version, use_ssl=use_ssl, verify=verify, endpoint_url=endpoint_url, aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=config) def resource(self, service_name, region_name=None, api_version=None, use_ssl=True, verify=None, endpoint_url=None, aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, config=None): """ Create a resource service client by name. :type service_name: string :param service_name: The name of a service, e.g. 's3' or 'ec2'. You can get a list of available services via :py:meth:`get_available_resources`. :type region_name: string :param region_name: The name of the region associated with the client. A client is associated with a single region. :type api_version: string :param api_version: The API version to use. By default, botocore will use the latest API version when creating a client. You only need to specify this parameter if you want to use a previous API version of the client. :type use_ssl: boolean :param use_ssl: Whether or not to use SSL. By default, SSL is used. Note that not all services support non-ssl connections. :type verify: boolean/string :param verify: Whether or not to verify SSL certificates. By default SSL certificates are verified. You can provide the following values: * False - do not validate SSL certificates. SSL will still be used (unless use_ssl is False), but SSL certificates will not be verified. * path/to/cert/bundle.pem - A filename of the CA cert bundle to uses. You can specify this argument if you want to use a different CA cert bundle than the one used by botocore. :type endpoint_url: string :param endpoint_url: The complete URL to use for the constructed client. Normally, botocore will automatically construct the appropriate URL to use when communicating with a service. You can specify a complete URL (including the "http/https" scheme) to override this behavior. If this value is provided, then ``use_ssl`` is ignored. :type aws_access_key_id: string :param aws_access_key_id: The access key to use when creating the client. This is entirely optional, and if not provided, the credentials configured for the session will automatically be used. You only need to provide this argument if you want to override the credentials used for this specific client. :type aws_secret_access_key: string :param aws_secret_access_key: The secret key to use when creating the client. Same semantics as aws_access_key_id above. :type aws_session_token: string :param aws_session_token: The session token to use when creating the client. Same semantics as aws_access_key_id above. :type config: botocore.client.Config :param config: Advanced client configuration options. If region_name is specified in the client config, its value will take precedence over environment variables and configuration values, but not over a region_name value passed explicitly to the method. If user_agent_extra is specified in the client config, it overrides the default user_agent_extra provided by the resource API. See `botocore config documentation `_ for more details. :return: Subclass of :py:class:`~boto3.resources.base.ServiceResource` """ try: resource_model = self._loader.load_service_model( service_name, 'resources-1', api_version) except UnknownServiceError: available = self.get_available_resources() has_low_level_client = ( service_name in self.get_available_services()) raise ResourceNotExistsError(service_name, available, has_low_level_client) except DataNotFoundError: # This is because we've provided an invalid API version. available_api_versions = self._loader.list_api_versions( service_name, 'resources-1') raise UnknownAPIVersionError( service_name, api_version, ', '.join(available_api_versions)) if api_version is None: # Even though botocore's load_service_model() can handle # using the latest api_version if not provided, we need # to track this api_version in boto3 in order to ensure # we're pairing a resource model with a client model # of the same API version. It's possible for the latest # API version of a resource model in boto3 to not be # the same API version as a service model in botocore. # So we need to look up the api_version if one is not # provided to ensure we load the same API version of the # client. # # Note: This is relying on the fact that # loader.load_service_model(..., api_version=None) # and loader.determine_latest_version(..., 'resources-1') # both load the same api version of the file. api_version = self._loader.determine_latest_version( service_name, 'resources-1') # Creating a new resource instance requires the low-level client # and service model, the resource version and resource JSON data. # We pass these to the factory and get back a class, which is # instantiated on top of the low-level client. if config is not None: if config.user_agent_extra is None: config = copy.deepcopy(config) config.user_agent_extra = 'Resource' else: config = Config(user_agent_extra='Resource') client = self.client( service_name, region_name=region_name, api_version=api_version, use_ssl=use_ssl, verify=verify, endpoint_url=endpoint_url, aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, aws_session_token=aws_session_token, config=config) service_model = client.meta.service_model # Create a ServiceContext object to serve as a reference to # important read-only information about the general service. service_context = boto3.utils.ServiceContext( service_name=service_name, service_model=service_model, resource_json_definitions=resource_model['resources'], service_waiter_model=boto3.utils.LazyLoadedWaiterModel( self._session, service_name, api_version) ) # Create the service resource class. cls = self.resource_factory.load_from_definition( resource_name=service_name, single_resource_json_definition=resource_model['service'], service_context=service_context ) return cls(client=client) def _register_default_handlers(self): # S3 customizations self._session.register( 'creating-client-class.s3', boto3.utils.lazy_call( 'boto3.s3.inject.inject_s3_transfer_methods')) self._session.register( 'creating-resource-class.s3.Bucket', boto3.utils.lazy_call( 'boto3.s3.inject.inject_bucket_methods')) self._session.register( 'creating-resource-class.s3.Object', boto3.utils.lazy_call( 'boto3.s3.inject.inject_object_methods')) self._session.register( 'creating-resource-class.s3.ObjectSummary', boto3.utils.lazy_call( 'boto3.s3.inject.inject_object_summary_methods')) # DynamoDb customizations self._session.register( 'creating-resource-class.dynamodb', boto3.utils.lazy_call( 'boto3.dynamodb.transform.register_high_level_interface'), unique_id='high-level-dynamodb') self._session.register( 'creating-resource-class.dynamodb.Table', boto3.utils.lazy_call( 'boto3.dynamodb.table.register_table_methods'), unique_id='high-level-dynamodb-table') # EC2 Customizations self._session.register( 'creating-resource-class.ec2.ServiceResource', boto3.utils.lazy_call( 'boto3.ec2.createtags.inject_create_tags')) self._session.register( 'creating-resource-class.ec2.Instance', boto3.utils.lazy_call( 'boto3.ec2.deletetags.inject_delete_tags', event_emitter=self.events)) boto3-1.9.253/boto3/utils.py000066400000000000000000000060271355237733400155020ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import sys from collections import namedtuple _ServiceContext = namedtuple( 'ServiceContext', ['service_name', 'service_model', 'service_waiter_model', 'resource_json_definitions'] ) class ServiceContext(_ServiceContext): """Provides important service-wide, read-only information about a service :type service_name: str :param service_name: The name of the service :type service_model: :py:class:`botocore.model.ServiceModel` :param service_model: The model of the service. :type service_waiter_model: :py:class:`botocore.waiter.WaiterModel` or a waiter model-like object such as :py:class:`boto3.utils.LazyLoadedWaiterModel` :param service_waiter_model: The waiter model of the service. :type resource_json_definitions: dict :param resource_json_definitions: The loaded json models of all resource shapes for a service. It is equivalient of loading a ``resource-1.json`` and retrieving the value at the key "resources". """ pass def import_module(name): """Import module given a name. Does not support relative imports. """ __import__(name) return sys.modules[name] def lazy_call(full_name, **kwargs): parent_kwargs = kwargs def _handler(**kwargs): module, function_name = full_name.rsplit('.', 1) module = import_module(module) kwargs.update(parent_kwargs) return getattr(module, function_name)(**kwargs) return _handler def inject_attribute(class_attributes, name, value): if name in class_attributes: raise RuntimeError( 'Cannot inject class attribute "%s", attribute ' 'already exists in class dict.' % name) else: class_attributes[name] = value class LazyLoadedWaiterModel(object): """A lazily loaded waiter model This does not load the service waiter model until an attempt is made to retrieve the waiter model for a specific waiter. This is helpful in docstring generation where we do not need to actually need to grab the waiter-2.json until it is accessed through a ``get_waiter`` call when the docstring is generated/accessed. """ def __init__(self, bc_session, service_name, api_version): self._session = bc_session self._service_name = service_name self._api_version = api_version def get_waiter(self, waiter_name): return self._session.get_waiter_model( self._service_name, self._api_version).get_waiter(waiter_name) boto3-1.9.253/docs/000077500000000000000000000000001355237733400136655ustar00rootroot00000000000000boto3-1.9.253/docs/Makefile000066400000000000000000000127011355237733400153260ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Boto3.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Boto3.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Boto3" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Boto3" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." boto3-1.9.253/docs/make.bat000066400000000000000000000117571355237733400153050ustar00rootroot00000000000000@ECHO OFF REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set BUILDDIR=build set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source set I18NSPHINXOPTS=%SPHINXOPTS% source if NOT "%PAPER%" == "" ( set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% ) if "%1" == "" goto help if "%1" == "help" ( :help echo.Please use `make ^` where ^ is one of echo. html to make standalone HTML files echo. dirhtml to make HTML files named index.html in directories echo. singlehtml to make a single large HTML file echo. pickle to make pickle files echo. json to make JSON files echo. htmlhelp to make HTML files and a HTML help project echo. qthelp to make HTML files and a qthelp project echo. devhelp to make HTML files and a Devhelp project echo. epub to make an epub echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter echo. text to make text files echo. man to make manual pages echo. texinfo to make Texinfo files echo. gettext to make PO message catalogs echo. changes to make an overview over all changed/added/deprecated items echo. linkcheck to check all external links for integrity echo. doctest to run all doctests embedded in the documentation if enabled goto end ) if "%1" == "clean" ( for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i del /q /s %BUILDDIR%\* goto end ) if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/html. goto end ) if "%1" == "dirhtml" ( %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. goto end ) if "%1" == "singlehtml" ( %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml if errorlevel 1 exit /b 1 echo. echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. goto end ) if "%1" == "pickle" ( %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the pickle files. goto end ) if "%1" == "json" ( %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can process the JSON files. goto end ) if "%1" == "htmlhelp" ( %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run HTML Help Workshop with the ^ .hhp project file in %BUILDDIR%/htmlhelp. goto end ) if "%1" == "qthelp" ( %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp if errorlevel 1 exit /b 1 echo. echo.Build finished; now you can run "qcollectiongenerator" with the ^ .qhcp project file in %BUILDDIR%/qthelp, like this: echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Boto3.qhcp echo.To view the help file: echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Boto3.ghc goto end ) if "%1" == "devhelp" ( %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp if errorlevel 1 exit /b 1 echo. echo.Build finished. goto end ) if "%1" == "epub" ( %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub if errorlevel 1 exit /b 1 echo. echo.Build finished. The epub file is in %BUILDDIR%/epub. goto end ) if "%1" == "latex" ( %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex if errorlevel 1 exit /b 1 echo. echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. goto end ) if "%1" == "text" ( %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text if errorlevel 1 exit /b 1 echo. echo.Build finished. The text files are in %BUILDDIR%/text. goto end ) if "%1" == "man" ( %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man if errorlevel 1 exit /b 1 echo. echo.Build finished. The manual pages are in %BUILDDIR%/man. goto end ) if "%1" == "texinfo" ( %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo if errorlevel 1 exit /b 1 echo. echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. goto end ) if "%1" == "gettext" ( %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale if errorlevel 1 exit /b 1 echo. echo.Build finished. The message catalogs are in %BUILDDIR%/locale. goto end ) if "%1" == "changes" ( %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes if errorlevel 1 exit /b 1 echo. echo.The overview file is in %BUILDDIR%/changes. goto end ) if "%1" == "linkcheck" ( %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck if errorlevel 1 exit /b 1 echo. echo.Link check complete; look for any errors in the above output ^ or in %BUILDDIR%/linkcheck/output.txt. goto end ) if "%1" == "doctest" ( %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest if errorlevel 1 exit /b 1 echo. echo.Testing of doctests in the sources finished, look at the ^ results in %BUILDDIR%/doctest/output.txt. goto end ) :end boto3-1.9.253/docs/source/000077500000000000000000000000001355237733400151655ustar00rootroot00000000000000boto3-1.9.253/docs/source/_static/000077500000000000000000000000001355237733400166135ustar00rootroot00000000000000boto3-1.9.253/docs/source/_static/404.html000066400000000000000000000013151355237733400200100ustar00rootroot00000000000000 Page Not Found

Page Not Found

Sorry, the page you requested could not be found.

boto3-1.9.253/docs/source/_templates/000077500000000000000000000000001355237733400173225ustar00rootroot00000000000000boto3-1.9.253/docs/source/_templates/globaltoc.html000066400000000000000000000004471355237733400221630ustar00rootroot00000000000000 boto3-1.9.253/docs/source/_templates/layout.html000066400000000000000000000007611355237733400215310ustar00rootroot00000000000000{%- extends "!layout.html" %} {%- block breadcrumbs %} {{ super() }} {%- endblock %} {%- block footer %} {{ super() }} {%- endblock %} boto3-1.9.253/docs/source/conf.py000066400000000000000000000206461355237733400164740ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Boto3 documentation build configuration file, created by # sphinx-quickstart on Wed Sep 3 11:11:30 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import os import boto3 import boto3.session from boto3.docs import generate_docs session = boto3.session.Session(region_name='us-east-1') generate_docs(os.path.dirname(os.path.abspath(__file__)), session) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = 'Boto 3 Docs' copyright = '2019, Amazon Web Services, Inc' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = boto3.__version__ # The full version, including alpha/beta/rc tags. release = boto3.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] import guzzle_sphinx_theme extensions.append("guzzle_sphinx_theme") html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator' html_theme_path = guzzle_sphinx_theme.html_theme_path() html_theme = 'guzzle_sphinx_theme' # Guzzle theme options (see theme.conf for more information) html_theme_options = { # hack to add tracking "google_analytics_account": os.getenv('TRACKING', False), "base_url": "http://docs.aws.amazon.com/aws-sdk-php/guide/latest/" } # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. #html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_show_sourcelink = False html_sidebars = { '**': ['logo-text.html', 'globaltoc.html', 'searchbox.html'] } # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'Boto3doc' # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'Boto3.tex', 'Boto3 Documentation', 'Amazon.com, Inc.', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'boto3', 'Boto3 Documentation', ['Amazon.com, Inc.'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'Boto3', 'Boto3 Documentation', 'Amazon.com, Inc.', 'Boto3', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' autoclass_content = 'both' boto3-1.9.253/docs/source/guide/000077500000000000000000000000001355237733400162625ustar00rootroot00000000000000boto3-1.9.253/docs/source/guide/clients.rst000066400000000000000000000064341355237733400204640ustar00rootroot00000000000000.. _guide_clients: Low-level Clients ================= Clients provide a low-level interface to AWS whose methods map close to 1:1 with service APIs. All service operations are supported by clients. Clients are generated from a JSON service definition file. Creating Clients ---------------- Clients are created in a similar fashion to resources:: import boto3 # Create a low-level client with the service name sqs = boto3.client('sqs') It is also possible to access the low-level client from an existing resource:: # Create the resource sqs_resource = boto3.resource('sqs') # Get the client from the resource sqs = sqs_resource.meta.client Service Operations ------------------ Service operations map to client methods of the same name and provide access to the same operation parameters via keyword arguments:: # Make a call using the low-level client response = sqs.send_message(QueueUrl='...', MessageBody='...') As can be seen above, the method arguments map directly to the associated `SQS API `_. .. note:: The method names have been snake-cased for better looking Python code. Parameters **must** be sent as keyword arguments. They will not work as positional arguments. Handling Responses ------------------ Responses are returned as python dictionaries. It is up to you to traverse or otherwise process the response for the data you need, keeping in mind that responses may not always include all of the expected data. In the example below, ``response.get('QueueUrls', [])`` is used to ensure that a list is always returned, even when the response has no key ``'QueueUrls'``:: # List all your queues response = sqs.list_queues() for url in response.get('QueueUrls', []): print(url) The ``response`` in the example above looks something like this: .. code-block:: json { "QueueUrls": [ "http://url1", "http://url2", "http://url3" ] } Waiters ------- Waiters use a client's service operations to poll the status of an AWS resource and suspend execution until the AWS resource reaches the state that the waiter is polling for or a failure occurs while polling. Using clients, you can learn the name of each waiter that a client has access to:: import boto3 s3 = boto3.client('s3') sqs = boto3.client('sqs') # List all of the possible waiters for both clients print("s3 waiters:") s3.waiter_names print("sqs waiters:") sqs.waiter_names Note if a client does not have any waiters, it will return an empty list when accessing its ``waiter_names`` attribute:: s3 waiters: [u'bucket_exists', u'bucket_not_exists', u'object_exists', u'object_not_exists'] sqs waiters: [] Using a client's ``get_waiter()`` method, you can obtain a specific waiter from its list of possible waiters:: # Retrieve waiter instance that will wait till a specified # S3 bucket exists s3_bucket_exists_waiter = s3.get_waiter('bucket_exists') Then to actually start waiting, you must call the waiter's ``wait()`` method with the method's appropriate parameters passed in:: # Begin waiting for the S3 bucket, mybucket, to exist s3_bucket_exists_waiter.wait(Bucket='mybucket') boto3-1.9.253/docs/source/guide/cloud9.rst000066400000000000000000000115001355237733400202100ustar00rootroot00000000000000.. _cloud9_guide: Cloud9 ====== You can use AWS Cloud9 with Boto 3 to write, run, and debug your Python code using just a browser. AWS Cloud9 provides an integrated development environment (IDE) that includes tools such as a code editor, debugger, and terminal. Because the AWS Cloud9 IDE is cloud based, you can work on your Python projects from your office, home, or anywhere using an internet-connected machine. For general information about AWS Cloud9, see the `AWS Cloud9 User Guide `_. Prerequisites ------------- You must already have an AWS account. If you don't have one, do this to create it: #. Go to https://aws.amazon.com. #. Choose **Sign In to the Console**. #. Choose **Create a new AWS account**. #. Follow the on-screen instructions to finish creating the account. Step 1: Set Up Your AWS Account ------------------------------- Start to use AWS Cloud9 by signing in to the AWS Cloud9 console as an AWS Identity and Access Management (IAM) entity (for example, an IAM user) in your AWS account who has access permissions for AWS Cloud9. To set up an IAM entity in your AWS account to access AWS Cloud9, and to sign in to the AWS Cloud9 console, see `Team Setup `_ in the *AWS Cloud9 User Guide*. Step 2: Create an Environment ----------------------------- After you sign in to the AWS Cloud9 console, use the console to create an AWS Cloud9 development environment. (A *development environment* is is a place where you store your project's files and where you run the tools to develop your apps.) After you create the environment, AWS Cloud9 automatically opens the IDE for that environment. To create an AWS Cloud9 development environment, see `Creating an Environment `_ in the *AWS Cloud9 User Guide*. Step 3: Set Up Credentials -------------------------- To call AWS services from Python code in your environment, you must provide a set of AWS authentication credentials along with each call that your code makes. If you created an AWS Cloud9 EC2 development environment in the previous step, then AWS Cloud9 automatically set up these credentials in your environment, and you can skip ahead to the next step. If, however, you created an AWS Cloud9 SSH development environment, you must manually set up these credentials in your environment. To set up these credentials, see `Call AWS Services from an Environment `_ in the *AWS Cloud9 User Guide*. Step 4: Install Boto 3 ---------------------- After AWS Cloud9 opens the IDE for your development environment, use the IDE to set up Boto 3. To do this, use the terminal in the IDE to run this command: sudo pip install boto3 If the terminal isn't already open in the IDE, open it. To do this, on the menu bar in the IDE, choose **Window, New Terminal**. You can also install a specific version: sudo pip install boto3==1.0.0 .. note:: The latest development version can always be found on `GitHub `_. Step 5: Download Example Code ----------------------------- Use the terminal that you opened in the previous step, download example code for Boto 3 into your AWS Cloud9 development environment. To do this, use the terminal in the IDE to run this command: git clone https://github.com/awsdocs/aws-doc-sdk-examples.git This command downloads a copy of many of the code examples used across the official AWS SDK documentation into your environment's root directory. To find the code examples for Boto 3, use the **Environment** window to open the :code:`your-environment-name/aws-doc-sdk-examples/python/example_code` directory, where :code:`your-environment-name` is the name of your development environment. To learn how to work with these and other code examples, see :ref:`Code Examples `. Step 6: Run and Debug Code -------------------------- To run your Python code in your AWS Cloud9 development environment, see `Run Your Code `_ in the *AWS Cloud9 User Guide*. To debug your Python code, see `Debug Your Code `_ in the *AWS Cloud9 User Guide*. Next Steps ---------- Explore these resources to learn more about AWS Cloud9: * Experiment with the `Python Sample `_ in the *AWS Cloud9 User Guide*. * Learn how to use the AWS Cloud9 IDE by completing the `IDE Tutorial `_ in the *AWS Cloud9 User Guide*.boto3-1.9.253/docs/source/guide/collections.rst000066400000000000000000000101741355237733400213350ustar00rootroot00000000000000.. _guide_collections: Collections =========== Overview -------- A collection provides an iterable interface to a group of resources. Collections behave similarly to `Django QuerySets `_ and expose a similar API. A collection seamlessly handles pagination for you, making it possible to easily iterate over all items from all pages of data. Example of a collection:: # SQS list all queues sqs = boto3.resource('sqs') for queue in sqs.queues.all(): print(queue.url) When Collections Make Requests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Collections can be created and manipulated without any request being made to the underlying service. A collection makes a remote service request under the following conditions: * **Iteration**:: for bucket in s3.buckets.all(): print(bucket.name) * **Conversion to list()**:: buckets = list(s3.buckets.all()) * **Batch actions (see below)**:: s3.Bucket('my-bucket').objects.delete() Filtering --------- Some collections support extra arguments to filter the returned data set, which are passed into the underlying service operation. Use the :py:meth:`~boto3.resources.collection.Collection.filter` method to filter the results:: # S3 list all keys with the prefix 'photos/' s3 = boto3.resource('s3') for bucket in s3.buckets.all(): for obj in bucket.objects.filter(Prefix='photos/'): print('{0}:{1}'.format(bucket.name, obj.key)) .. warning:: Behind the scenes, the above example will call ``ListBuckets``, ``ListObjects``, and ``HeadObject`` many times. If you have a large number of S3 objects then this could incur a significant cost. Chainability ------------ Collection methods are chainable. They return copies of the collection rather than modifying the collection, including a deep copy of any associated operation parameters. For example, this allows you to build up multiple collections from a base which they all have in common:: # EC2 find instances ec2 = boto3.resource('ec2') base = ec2.instances.filter(InstanceIds=['id1', 'id2', 'id3']) filters = [{ 'name': 'tenancy', 'value': 'dedicated' }] filtered1 = base.filter(Filters=filters) # Note, this does NOT modify the filters in ``filtered1``! filters.append({'name': 'instance-type', 'value': 't1.micro'}) filtered2 = base.filter(Filters=filters) print('All instances:') for instance in base: print(instance.id) print('Dedicated instances:') for instance in filtered1: print(instance.id) print('Dedicated micro instances:') for instance in filtered2: print(instance.id) Limiting Results ---------------- It is possible to limit the number of items returned from a collection by using either the :py:meth:`~boto3.resources.collection.ResourceCollection.limit` method:: # S3 iterate over first ten buckets for bucket in s3.buckets.limit(10): print(bucket.name) In both cases, up to 10 items total will be returned. If you do not have 10 buckets, then all of your buckets will be returned. Controlling Page Size --------------------- Collections automatically handle paging through results, but you may want to control the number of items returned from a single service operation call. You can do so using the :py:meth:`~boto3.resources.collection.ResourceCollection.page_size` method:: # S3 iterate over all objects 100 at a time for obj in bucket.objects.page_size(100): print(obj.key) By default, S3 will return 1000 objects at a time, so the above code would let you process the items in smaller batches, which could be beneficial for slow or unreliable internet connections. Batch Actions ------------- Some collections support batch actions, which are actions that operate on an entire page of results at a time. They will automatically handle pagination:: # S3 delete everything in `my-bucket` s3 = boto3.resource('s3') s3.Bucket('my-bucket').objects.delete() .. danger:: The above example will **completely erase all data** in the ``my-bucket`` bucket! Please be careful with batch actions. boto3-1.9.253/docs/source/guide/configuration.rst000066400000000000000000000607701355237733400216750ustar00rootroot00000000000000.. _guide_configuration: Credentials =========== Boto can be configured in multiple ways. Regardless of the source or sources that you choose, you **must** have AWS credentials and a region set in order to make requests. Interactive Configuration ------------------------- If you have the `AWS CLI `_, then you can use its interactive ``configure`` command to set up your credentials and default region:: aws configure Follow the prompts and it will generate configuration files in the correct locations for you. Configuring Credentials ----------------------- There are two types of configuration data in boto3: credentials and non-credentials. Credentials include items such as ``aws_access_key_id``, ``aws_secret_access_key``, and ``aws_session_token``. Non-credential configuration includes items such as which ``region`` to use or which addressing style to use for Amazon S3. The distinction between credentials and non-credentials configuration is important because the lookup process is slightly different. Boto3 will look in several additional locations when searching for credentials that do not apply when searching for non-credential configuration. The mechanism in which boto3 looks for credentials is to search through a list of possible locations and stop as soon as it finds credentials. The order in which Boto3 searches for credentials is: #. Passing credentials as parameters in the ``boto.client()`` method #. Passing credentials as parameters when creating a ``Session`` object #. Environment variables #. Shared credential file (``~/.aws/credentials``) #. AWS config file (``~/.aws/config``) #. Assume Role provider #. Boto2 config file (``/etc/boto.cfg`` and ``~/.boto``) #. Instance metadata service on an Amazon EC2 instance that has an IAM role configured. Each of those locations is discussed in more detail below. Method Parameters ~~~~~~~~~~~~~~~~~ The first option for providing credentials to boto3 is passing them as parameters when creating clients or when creating a ``Session``. For example:: import boto3 client = boto3.client( 's3', aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY, aws_session_token=SESSION_TOKEN, ) # Or via the Session session = boto3.Session( aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY, aws_session_token=SESSION_TOKEN, ) where ``ACCESS_KEY``, ``SECRET_KEY`` and ``SESSION_TOKEN`` are variables that contain your access key, secret key, and optional session token. Note that the examples above do not have hard coded credentials. We do not recommend hard coding credentials in your source code. For example:: # Do not hard code credentials client = boto3.client( 's3', # Hard coded strings as credentials, not recommended. aws_access_key_id='AKIAIO5FODNN7EXAMPLE', aws_secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE' ) Valid uses cases for providing credentials to the ``client()`` method and ``Session`` objects include: * Retrieving temporary credentials using AWS STS (such as ``sts.get_session_token()``). * Loading credentials from some external location, e.g the OS keychain. Environment Variables ~~~~~~~~~~~~~~~~~~~~~ Boto3 will check these environment variables for credentials: ``AWS_ACCESS_KEY_ID`` The access key for your AWS account. ``AWS_SECRET_ACCESS_KEY`` The secret key for your AWS account. ``AWS_SESSION_TOKEN`` The session key for your AWS account. This is only needed when you are using temporary credentials. The ``AWS_SECURITY_TOKEN`` environment variable can also be used, but is only supported for backwards compatibility purposes. ``AWS_SESSION_TOKEN`` is supported by multiple AWS SDKs besides python. Shared Credentials File ~~~~~~~~~~~~~~~~~~~~~~~ The shared credentials file has a default location of ``~/.aws/credentials``. You can change the location of the shared credentials file by setting the ``AWS_SHARED_CREDENTIALS_FILE`` environment variable. This file is an INI formatted file with section names corresponding to profiles. With each section, the three configuration variables shown above can be specified: ``aws_access_key_id``, ``aws_secret_access_key``, ``aws_session_token``. **These are the only supported values in the shared credential file.** Below is an minimal example of the shared credentials file:: [default] aws_access_key_id=foo aws_secret_access_key=bar aws_session_token=baz The shared credentials file also supports the concept of ``profiles``. Profiles represent logical groups of configuration. The shared credential file can have multiple profiles defined:: [default] aws_access_key_id=foo aws_secret_access_key=bar [dev] aws_access_key_id=foo2 aws_secret_access_key=bar2 [prod] aws_access_key_id=foo3 aws_secret_access_key=bar3 You can then specify a profile name via the ``AWS_PROFILE`` environment variable or the ``profile_name`` argument when creating a Session:: session = boto3.Session(profile_name='dev') # Any clients created from this session will use credentials # from the [dev] section of ~/.aws/credentials. dev_s3_client = session.client('s3') AWS Config File ~~~~~~~~~~~~~~~ Boto3 can also load credentials from ``~/.aws/config``. You can change this default location by setting the ``AWS_CONFIG_FILE`` environment variable. The config file is an INI format, with the same keys supported by the shared credentials file. The only difference is that profile sections **must** have the format of ``[profile profile-name]``, except for the default profile. For example:: # Example ~/.aws/config file. [default] aws_access_key_id=foo aws_secret_access_key=bar [profile dev] aws_access_key_id=foo2 aws_secret_access_key=bar2 [profile prod] aws_access_key_id=foo3 aws_secret_access_key=bar3 The reason that section names must start with ``profile`` in the ``~/.aws/config`` file is because there are other sections in this file that are permitted that aren't profile configurations. Assume Role Provider ~~~~~~~~~~~~~~~~~~~~ .. note:: This is a different set of credentials configuration than using IAM roles for EC2 instances, which is discussed in a section below. Within the ``~/.aws/config`` file, you can also configure a profile to indicate that boto3 should assume a role. When you do this, boto3 will automatically make the corresponding ``AssumeRole`` calls to AWS STS on your behalf. It will handle in memory caching as well as refreshing credentials as needed. You can specify the following configuration values for configuring an IAM role in boto3. For more information about a particular setting, see the section `Configuration File`_. * ``role_arn`` - The ARN of the role you want to assume. * ``source_profile`` - The boto3 profile that contains credentials we should use for the initial ``AssumeRole`` call. * ``credential_source`` - The resource (Amazon EC2 instance profile, Amazon ECS container role, or environment variable) that contains the credentials to use for the initial ``AssumeRole`` call. * ``external_id`` - A unique identifier that is used by third parties to assume a role in their customers' accounts. This maps to the ``ExternalId`` parameter in the ``AssumeRole`` operation. This is an optional parameter. * ``mfa_serial`` - The identification number of the MFA device to use when assuming a role. This is an optional parameter. Specify this value if the trust policy of the role being assumed includes a condition that requires MFA authentication. The value is either the serial number for a hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). * ``role_session_name`` - The name applied to this assume-role session. This value affects the assumed role user ARN (such as arn:aws:sts::123456789012:assumed-role/role_name/role_session_name). This maps to the ``RoleSessionName`` parameter in the ``AssumeRole`` operation. This is an optional parameter. If you do not provide this value, a session name will be automatically generated. * ``duration_seconds`` - The length of time in seconds of the role session. If MFA authentication is not enabled then you only need to specify a ``role_arn`` and a ``source_profile``. When you specify a profile that has IAM role configuration, boto3 will make an ``AssumeRole`` call to retrieve temporary credentials. Subsequent boto3 API calls will use the cached temporary credentials until they expire, in which case boto3 will automatically refresh credentials. boto3 does not write these temporary credentials to disk. This means that temporary credentials from the ``AssumeRole`` calls are only cached in memory within a single ``Session``. All clients created from that session will share the same temporary credentials. If you specify ``mfa_serial``, then the first time an ``AssumeRole`` call is made, you will be prompted to enter the MFA code. **Program execution will block until you enter the MFA code.** You'll need to keep this in mind if you have an ``mfa_serial`` device configured, but would like to use boto3 in an automated script. Below is an example configuration for the minimal amount of configuration needed to configure an assume role profile:: # In ~/.aws/credentials: [development] aws_access_key_id=foo aws_access_key_id=bar # In ~/.aws/config [profile crossaccount] role_arn=arn:aws:iam:... source_profile=development See `Using IAM Roles`_ for general information on IAM roles. Assume Role With Web Identity Provider ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Within the ``~/.aws/config`` file, you can also configure a profile to indicate that boto3 should assume a role. When you do this, boto3 will automatically make the corresponding ``AssumeRoleWithWebIdentity`` calls to AWS STS on your behalf. It will handle in memory caching as well as refreshing credentials as needed. You can specify the following configuration values for configuring an IAM role in boto3: * ``role_arn`` - The ARN of the role you want to assume. * ``web_identity_token_file`` - The path to a file which contains an OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity provider. The contents of this file will be loaded and passed as the ``WebIdentityToken`` argument to the ``AssumeRoleWithWebIdentity`` operation. * ``role_session_name`` - The name applied to this assume-role session. This value affects the assumed role user ARN (such as arn:aws:sts::123456789012:assumed-role/role_name/role_session_name). This maps to the ``RoleSessionName`` parameter in the ``AssumeRoleWithWebIdentity`` operation. This is an optional parameter. If you do not provide this value, a session name will be automatically generated. Below is an example configuration for the minimal amount of configuration needed to configure an assume role with web identity profile:: # In ~/.aws/config [profile web-identity] role_arn=arn:aws:iam:... web_identity_token_file=/path/to/a/token This provider can also be configured via the environment: ``AWS_ROLE_ARN`` The ARN of the role you want to assume. ``AWS_WEB_IDENTITY_TOKEN_FILE`` The path to the web identity token file. ``AWS_ROLE_SESSION_NAME`` The name applied to this assume-role session. .. note:: These environment variables currently only apply to the assume role with web identity provider and do not apply to the general assume role provider configuration. Boto2 Config ~~~~~~~~~~~~ Boto3 will attempt to load credentials from the Boto2 config file. It first checks the file pointed to by ``BOTO_CONFIG`` if set, otherwise it will check ``/etc/boto.cfg`` and ``~/.boto``. Note that *only* the ``[Credentials]`` section of the boto config file is used. All other configuration data in the boto config file is ignored. Example:: # Example ~/.boto file [Credentials] aws_access_key_id = foo aws_secret_access_key = bar This credential provider is primarily for backwards compatibility purposes with boto2. IAM Role ~~~~~~~~ If you are running on Amazon EC2 and no credentials have been found by any of the providers above, boto3 will try to load credentials from the instance metadata service. In order to take advantage of this feature, you must have specified an IAM role to use when you launched your EC2 instance. For more information on how to configure IAM roles on EC2 instances, see the `IAM Roles for Amazon EC2`_ guide. Note that if you've launched an EC2 instance with an IAM role configured, there's no explicit configuration you need to set in boto3 to use these credentials. Boto3 will automatically use IAM role credentials if it does not find credentials in any of the other places listed above. Best Practices for Configuring Credentials ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you're running on an EC2 instance, use AWS IAM roles. See the `IAM Roles for Amazon EC2`_ guide for more information on how to set this up. If you want to interoperate with multiple AWS SDKs (e.g Java, Javascript, Ruby, PHP, .NET, AWS CLI, Go, C++), use the shared credentials file (``~/.aws/credentials``). By using the shared credentials file, you can use a single file for credentials that will work in all the AWS SDKs. Configuration ============= In addition to credentials, you can also configure non-credential values. In general, boto3 follows the same approach used in credential lookup: try various locations until a value is found. Boto3 uses these sources for configuration: * Explicitly passed as the ``config`` parameter when creating a client. * Environment variables * The ``~/.aws/config`` file. Environment Variable Configuration ---------------------------------- ``AWS_ACCESS_KEY_ID`` The access key for your AWS account. ``AWS_SECRET_ACCESS_KEY`` The secret key for your AWS account. ``AWS_SESSION_TOKEN`` The session key for your AWS account. This is only needed when you are using temporary credentials. The ``AWS_SECURITY_TOKEN`` environment variable can also be used, but is only supported for backwards compatibility purposes. ``AWS_SESSION_TOKEN`` is supported by multiple AWS SDKs besides python. ``AWS_DEFAULT_REGION`` The default region to use, e.g. ``us-west-1``, ``us-west-2``, etc. ``AWS_PROFILE`` The default profile to use, if any. If no value is specified, boto3 will attempt to search the shared credentials file and the config file for the ``default`` profile. ``AWS_CONFIG_FILE`` The location of the config file used by boto3. By default this value is ``~/.aws/config``. You only need to set this variable if you want to change this location. ``AWS_SHARED_CREDENTIALS_FILE`` The location of the shared credentials file. By default this value is ``~/.aws/credentials``. You only need to set this variable if you want to change this location. ``BOTO_CONFIG`` The location of the boto2 credentials file. This is not set by default. You only need to set this variable if want to use credentials stored in boto2 format in a location other than ``/etc/boto.cfg`` or ``~/.boto``. ``AWS_CA_BUNDLE`` The path to a custom certificate bundle to use when establishing SSL/TLS connections. Boto3 includes a bundled CA bundle it will use by default, but you can set this environment variable to use a different CA bundle. ``AWS_METADATA_SERVICE_TIMEOUT`` The number of seconds before a connection to the instance metadata service should time out. When attempting to retrieve credentials on an EC2 instance that has been configured with an IAM role, a connection to the instance metadata service will time out after 1 second by default. If you know you are running on an EC2 instance with an IAM role configured, you can increase this value if needed. ``AWS_METADATA_SERVICE_NUM_ATTEMPTS`` When attempting to retrieve credentials on an EC2 instance that has been configured with an IAM role, boto3 will only make one attempt to retrieve credentials from the instance metadata service before giving up. If you know your code will be running on an EC2 instance, you can increase this value to make boto3 retry multiple times before giving up. ``AWS_DATA_PATH`` A list of **additional** directories to check when loading botocore data. You typically do not need to set this value. There's two built in search paths: ``/data/`` and ``~/.aws/models``. Setting this environment variable indicates additional directories to first check before falling back to the built in search paths. Multiple entries should be separated with the ``os.pathsep`` character which is ``:`` on linux and ``;`` on windows. Configuration File ~~~~~~~~~~~~~~~~~~ Boto3 will also search the ``~/.aws/config`` file when looking for configuration values. You can change the location of this file by setting the ``AWS_CONFIG_FILE`` environment variable. This file is an INI formatted file that contains at least one section: ``[default]``. You can create multiple profiles (logical groups of configuration) by creating sections named ``[profile profile-name]``. If your profile name has spaces, you'll need to surround this value in quotes: ``[profile "my profile name"]``. Below are all the config variables supported in the ``~/.aws/config`` file: ``api_versions`` Specifies the API version to use for a particular AWS service. The ``api_versions`` settings are nested configuration values that require special formatting in the AWS configuration file. If the values are set by the AWS CLI or programmatically by an SDK, the formatting is handled automatically. If they are set by manually editing the AWS configuration file, the required format is shown below. Notice the indentation of each value. :: [default] region = us-east-1 api_versions = ec2 = 2015-03-01 cloudfront = 2015-09-17 ``aws_access_key_id`` The access key to use. ``aws_secret_access_key`` The secret access key to use. ``aws_session_token`` The session token to use. This is typically needed only when using temporary credentials. Note ``aws_security_token`` is supported for backward compatibility. ``ca_bundle`` The CA bundle to use. For more information, see the above description of the ``AWS_CA_BUNDLE`` environment variable. ``credential_process`` Specifies an external command to run to generate or retrieve authentication credentials. For more information, see `Sourcing Credentials with an External Process`_. ``credential_source`` To invoke an AWS service from an Amazon EC2 instance, you can use an IAM role attached to either an EC2 instance profile or an Amazon ECS container. In such a scenario, use the ``credential_source`` setting to specify where to find the credentials. The ``credential_source`` and ``source_profile`` settings are mutually exclusive. The following values are supported. ``Ec2InstanceMetadata`` Use the IAM role attached to the Amazon EC2 instance profile. ``EcsContainer`` Use the IAM role attached to the Amazon ESC container. ``Environment`` Retrieve the credentials from environment variables. ``duration_seconds`` The length of time in seconds of the role session. The value can range from 900 seconds (15 minutes) to the maximum session duration setting for the role. The default value is 3600 seconds (one hour). ``external_id`` Unique identifier to pass when making ``AssumeRole`` calls. ``metadata_service_timeout`` The number of seconds before timing out when retrieving data from the instance metadata service. See the docs above on ``AWS_METADATA_SERVICE_TIMEOUT`` for more information. ``metadata_service_num_attempts`` The number of attempts to make before giving up when retrieving data from the instance metadata service. See the docs above on ``AWS_METADATA_SERVICE_NUM_ATTEMPTS`` for more information. ``mfa_serial`` Serial number of ARN of an MFA device to use when assuming a role. ``parameter_validation`` Disable parameter validation (default is true; parameters are validated by default). This is a boolean value that can have a value of either ``true`` or ``false``. Whenever you make an API call using a client, the parameters you provide are run through a set of validation checks including (but not limited to): required parameters provided, type checking, no unknown parameters, minimum length checks, etc. You generally should leave parameter validation enabled. ``region`` The default region to use, e.g. ``us-west-1``, ``us-west-2``, etc. When specifying a region inline during client initialization, this property is named ``region_name`` ``role_arn`` The ARN of the role you want to assume. ``role_session_name`` The role name to use when assuming a role. If this value is not provided, a session name will be automatically generated. ``web_identity_token_file`` The path to a file which contains an OAuth 2.0 access token or OpenID Connect ID token that is provided by the identity provider. The contents of this file will be loaded and passed as the ``WebIdentityToken`` argument to the ``AssumeRoleWithWebIdentity`` operation. ``s3`` Set S3-specific configuration data. Typically, these values do not need to be set. The ``s3`` settings are nested configuration values that require special formatting in the AWS configuration file. If the values are set by the AWS CLI or programmatically by an SDK, the formatting is handled automatically. If they are set by manually editing the AWS configuration file, the required format is shown below. Notice the indentation of each value. :: [default] region = us-east-1 s3 = addressing_style = path signature_version = s3v4 * ``addressing_style``: The S3 addressing style. When necessary, Boto automatically switches the addressing style to an appropriate value. The following values are supported. ``auto`` (Default) Attempts to use ``virtual``, but falls back to ``path`` if necessary. ``path`` Bucket name is included in the URI path. ``virtual`` Bucket name is included in the hostname. * ``payload_signing_enabled``: Specifies whether to include an SHA-256 checksum with Amazon Signature Version 4 payloads. Valid settings are ``true`` or ``false``. For streaming uploads (``UploadPart`` and ``PutObject``) that use HTTPS and include a ``content-md5`` header, this setting is disabled by default. * ``signature_version``: The AWS signature version to use when signing requests. When necessary, Boto automatically switches the signature version to an appropriate value. The following values are recognized. ``s3v4`` (Default) Signature Version 4 ``s3`` (Deprecated) Signature Version 2 * ``use_accelerate_endpoint``: Specifies whether to use the S3 Accelerate endpoint. The bucket must be enabled to use S3 Accelerate. Valid settings are ``true`` or ``false``. Default: ``false`` Either ``use_accelerate_endpoint`` or ``use_dualstack_endpoint`` can be enabled, but not both. * ``use_dualstack_endpoint``: Specifies whether to direct all Amazon S3 requests to the dual IPv4/IPv6 endpoint for the configured region. Valid settings are ``true`` or ``false``. Default: ``false`` Either ``use_accelerate_endpoint`` or ``use_dualstack_endpoint`` can be enabled, but not both. ``source_profile`` The profile name that contains credentials to use for the initial ``AssumeRole`` call. The ``credential_source`` and ``source_profile`` settings are mutually exclusive. ``tcp_keepalive`` Toggles the TCP Keep-Alive socket option used when creating connections. By default this value is ``false``; TCP Keep-Alive will not be used when creating connections. To enable TCP Keep-Alive set this value to ``true``, enabling TCP Keep-Alive with the system default configurations. .. _IAM Roles for Amazon EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html .. _Using IAM Roles: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html .. _Sourcing Credentials with an External Process: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html boto3-1.9.253/docs/source/guide/cw-example-creating-alarms.rst000066400000000000000000000120641355237733400241300ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-creating-alarms: #################################### Creating Alarms in Amazon CloudWatch #################################### This Python example shows you how to: * Get basic information about your CloudWatch alarms * Create and delete a CloudWatch alarm The Scenario ============ An alarm watches a single metric over a time period you specify, and performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods. In this example, Python code is used to create alarms in CloudWatch. The code uses the AWS SDK for Python to create alarms using these methods of the AWS.CloudWatch client class: * `paginate(StateValue='INSUFFICIENT_DATA') `_. * `put_metric_alarm `_. * `delete_alarms `_. For more information about CloudWatch alarms, see `Creating Amazon CloudWatch Alarms `_ in the *Amazon CloudWatch User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Alarms =============== The example below shows how to: * List metric alarms for insufficient data using `paginate(StateValue='INSUFFICIENT_DATA') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # List alarms of insufficient data through the pagination interface paginator = cloudwatch.get_paginator('describe_alarms') for response in paginator.paginate(StateValue='INSUFFICIENT_DATA'): print(response['MetricAlarms']) Create an Alarm for a CloudWatch Metric Alarm ============================================= Create or update an alarm and associate it with the specified metric alarm. Optionally, this operation can associate one or more Amazon SNS resources with the alarm. When this operation creates an alarm, the alarm state is immediately set to :code:`INSUFFICIENT_DATA`. The alarm is evaluated and its state is set appropriately. Any actions associated with the state are then executed. When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. The example below shows how to: * Create or update a metric alarm using `put_metric_alarm `_. Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # Create alarm cloudwatch.put_metric_alarm( AlarmName='Web_Server_CPU_Utilization', ComparisonOperator='GreaterThanThreshold', EvaluationPeriods=1, MetricName='CPUUtilization', Namespace='AWS/EC2', Period=60, Statistic='Average', Threshold=70.0, ActionsEnabled=False, AlarmDescription='Alarm when server CPU exceeds 70%', Dimensions=[ { 'Name': 'InstanceId', 'Value': 'INSTANCE_ID' }, ], Unit='Seconds' ) Delete an Alarm =============== Delete the specified alarms. In the event of an error, no alarms are deleted. The example below shows how to: * Delete a metric alarm using `delete_alarms `_. Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # Delete alarm cloudwatch.delete_alarms( AlarmNames=['Web_Server_CPU_Utilization'], ) boto3-1.9.253/docs/source/guide/cw-example-events.rst000066400000000000000000000151241355237733400223630ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-events: ########################################## Sending Events to Amazon CloudWatch Events ########################################## This Python example shows you how to: * Create and update a rule used to trigger an event * Define one or more targets to respond to an event * Send events that are matched to targets for handling The Scenario ============ CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources to any of various targets. Using simple rules, you can match events and route them to one or more target functions or streams. In this example, Python code is used to send events to CloudWatch Events. The code uses the AWS SDK for Python to manage instances using these methods of the CloudWatchEvents client class: * `put_rule `_. * `put_targets `_. * `put_events `_. For more information about CloudWatch Events, see `Adding Events with PutEvents `_ in the *Amazon CloudWatch Events User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= * Configure your AWS credentials, as described in :doc:`quickstart`. * Create a Lambda function using the **hello-world** blueprint to serve as the target for events. To learn how, see `Step 1: Create an AWS Lambda function `_ in the *Amazon CloudWatch Events User Guide*. * Create an IAM role whose policy grants permission to CloudWatch Events and that includes :code:`events.amazonaws.com` as a trusted entity. For more information about creating an IAM role, see `Creating a Role to Delegate Permissions to an AWS Service `_ in the *IAM User Guide*. Use the following role policy when creating the IAM role. .. code-block:: python { "Version": "2012-10-17", "Statement": [ { "Sid": "CloudWatchEventsFullAccess", "Effect": "Allow", "Action": "events:*", "Resource": "*" }, { "Sid": "IAMPassRoleForCloudWatchEvents", "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::*:role/AWS_Events_Invoke_Targets" } ] } Use the following trust relationship when creating the IAM role. .. code-block:: python { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Create a Scheduled Rule ======================= Create or update the specified rule. Rules are enabled by default, or based on value of the state. You can disable a rule using `DisableRule `_. The example below shows how to: * Create a CloudWatch Events rule using `put_rule `_. Example ------- .. code-block:: python import boto3 # Create CloudWatchEvents client cloudwatch_events = boto3.client('events') # Put an event rule response = cloudwatch_events.put_rule( Name='DEMO_EVENT', RoleArn='IAM_ROLE_ARN', ScheduleExpression='rate(5 minutes)', State='ENABLED' ) print(response['RuleArn']) Add a Lambda Function Target ============================ Add the specified targets to the specified rule, or update the targets if they are already associated with the rule. The example below shows how to: * Add a target to a rule using `put_targets `_. Example ------- .. code-block:: python import boto3 # Create CloudWatchEvents client cloudwatch_events = boto3.client('events') # Put target for rule response = cloudwatch_events.put_targets( Rule='DEMO_EVENT', Targets=[ { 'Arn': 'LAMBDA_FUNCTION_ARN', 'Id': 'myCloudWatchEventsTarget', } ] ) print(response) Send Events =========== Send custom events to Amazon CloudWatch Events so that they can be matched to rules. The example below shows how to: * Send a custom event to CloudWatch Events using `put_events `_. Example ------- .. code-block:: python import json import boto3 # Create CloudWatchEvents client cloudwatch_events = boto3.client('events') # Put an event response = cloudwatch_events.put_events( Entries=[ { 'Detail': json.dumps({'key1': 'value1', 'key2': 'value2'}), 'DetailType': 'appRequestSubmitted', 'Resources': [ 'RESOURCE_ARN', ], 'Source': 'com.company.myapp' } ] ) print(response['Entries']) boto3-1.9.253/docs/source/guide/cw-example-metrics.rst000066400000000000000000000101741355237733400225250ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-metrics: ###################################### Getting Metrics from Amazon CloudWatch ###################################### This Python example shows you how to: * Get a list of published CloudWatch metrics * Publish data points to CloudWatch metrics The Scenario ============ Metrics are data about the performance of your systems. You can enable detailed monitoring of some resources, such as your Amazon CloudWatch instances, or your own application metrics. In this example, Python code is used to get and send CloudWatch metrics data. The code uses the AWS SDK for Python to get metrics from CloudWatch using these methods of the CloudWatch client class: * `paginate('list_metrics') `_. * `put_metric_data `_. For more information about CloudWatch metrics, see `Using Amazon CloudWatch Metrics `_ in the *Amazon CloudWatch User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. List Metrics =============== List the metric alarm events uploaded to CloudWatch Logs. The example below shows how to: * List metric alarms of incoming log events using `paginate('list_metrics') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # List metrics through the pagination interface paginator = cloudwatch.get_paginator('list_metrics') for response in paginator.paginate(Dimensions=[{'Name': 'LogGroupName'}], MetricName='IncomingLogEvents', Namespace='AWS/Logs'): print(response['Metrics']) Publish Custom Metrics ====================== Publish metric data points to Amazon CloudWatch. Amazon CloudWatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric. When Amazon CloudWatch creates a metric, it can take up to fifteen minutes for the metric to appear in calls to ListMetrics. The example below shows how to: * Publish custom metrics using `put_metric_data `_. Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # Put custom metrics cloudwatch.put_metric_data( MetricData=[ { 'MetricName': 'PAGES_VISITED', 'Dimensions': [ { 'Name': 'UNIQUE_PAGES', 'Value': 'URLS' }, ], 'Unit': 'None', 'Value': 1.0 }, ], Namespace='SITE/TRAFFIC' ) boto3-1.9.253/docs/source/guide/cw-example-subscription-filters.rst000066400000000000000000000143441355237733400252540ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-subscription-filters: #################################################### Using Subscription Filters in Amazon CloudWatch Logs #################################################### This Python example shows you how to create and delete filters for log events in CloudWatch Logs. The Scenario ============ Subscriptions provide access to a real-time feed of log events from CloudWatch Logs and deliver that feed to other services, such as an Amazon Kinesis stream or AWS Lambda, for custom processing, analysis, or loading to other systems. A subscription filter defines the pattern to use for filtering which log events are delivered to your AWS resource. In this example, Python code is used to list, create, and delete a subscription filter in CloudWatch Logs. The destination for the log events is a Lambda function. The code uses the AWS SDK for Python to manage subscription filters using these methods of the CloudWatchLogs client class: * `get_paginator('describe_subscription_filters') `_. * `put_subscription_filter `_. * `delete_subscription_filter `_. For more information about CloudWatch Logs subscriptions, see Real-time `Processing of Log Data with Subscriptions `_ in the Amazon CloudWatch Logs User Guide. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Tasks ================== * Configure your AWS credentials, as described in :doc:`quickstart`. * Create a Lambda function as the destination for log events. You will need to use the ARN of this function. For more information about setting up a Lambda function, see `Subscription Filters with AWS Lambda `_ in the *Amazon CloudWatch Logs User Guide*. * Create an IAM role whose policy grants permission to invoke the Lambda function you created and grants full access to CloudWatch Logs or apply the following policy to the execution role you create for the Lambda function. For more information about creating an IAM role, see Creating a Role to `Delegate Permissions to an AWS Service `_ in the *IAM User Guide*. Use the following role policy when creating the IAM role. .. code-block:: python { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "lambda:InvokeFunction" ], "Resource": [ "*" ] } ] } List Existing Subscription Filters ================================== List the subscription filters for the specified log group. The example below shows how to: * List subscription filters using `get_paginator('describe_subscription_filters') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create CloudWatchLogs client cloudwatch_logs = boto3.client('logs') # List subscription filters through the pagination interface paginator = cloudwatch_logs.get_paginator('describe_subscription_filters') for response in paginator.paginate(logGroupName='GROUP_NAME'): print(response['subscriptionFilters']) Create a Subscription Filter ============================ Create or update a subscription filter and associates it with the specified log group. The example below shows how to: * Create a subscription filter using `put_subscription_filter `_. Example ------- .. code-block:: python import boto3 # Create CloudWatchLogs client cloudwatch_logs = boto3.client('logs') # Create a subscription filter cloudwatch_logs.put_subscription_filter( destinationArn='LAMBDA_FUNCTION_ARN', filterName='FILTER_NAME', filterPattern='ERROR', logGroupName='LOG_GROUP', ) Delete a Subscription Filter ============================ The example below shows how to: * Delete a subscription filter. using `delete_subscription_filter `_. Example ------- .. code-block:: python import boto3 # Create CloudWatchLogs client cloudwatch_logs = boto3.client('logs') # Delete a subscription filter cloudwatch_logs.delete_subscription_filter( filterName='FILTER_NAME', logGroupName='LOG_GROUP', ) boto3-1.9.253/docs/source/guide/cw-example-using-alarms.rst000066400000000000000000000130221355237733400234540ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-using-alarms: ######################################## Using Alarm Actions in Amazon CloudWatch ######################################## This Python example shows you how to: * Create a CloudWatch alarm and enable actions * Disable a CloudWatch alarm action The Scenario ============ Using alarm actions, you can create alarms that automatically stop, terminate, reboot, or recover your Amazon EC2 instances. You can use the stop or terminate actions when you no longer need an EC2 instance to be running. You can use the reboot and recover actions to automatically reboot those instances. In this example, Python code is used to define an alarm action in CloudWatch that triggers the reboot of an Amazon EC2 instance. The code uses the AWS SDK for Python to manage Amazon EC2 instances using these methods of the CloudWatch client class: * `put_metric_alarm `_. * `disable_alarm_actions `_. For more information about CloudWatch alarm actions, see `Create Alarms to Stop, Terminate, Reboot, or Recover an Instance `_ in the *Amazon CloudWatch User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= * Configure your AWS credentials, as described in :doc:`quickstart`. * Create an IAM role whose policy grants permission to describe, reboot, stop, or terminate an Amazon EC2 instance. For more information about creating an IAM role, see `Creating a Role to Delegate Permissions to an AWS Service `_ in the *IAM User Guide*. Use the following role policy when creating the IAM role. .. code-block:: python { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:Describe*", "ec2:Describe*", "ec2:RebootInstances", "ec2:StopInstances*", "ec2:TerminateInstances" ], "Resource": [ "*" ] } ] } Create and Enable Actions on an Alarm ===================================== Create or update an alarm and associate it with the specified metric. Optionally, this operation can associate one or more Amazon SNS resources with the alarm. When this operation creates an alarm, the alarm state is immediately set to :code:`INSUFFICIENT_DATA`. The alarm is evaluated and its state is set appropriately. Any actions associated with the state are then executed. When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm. The example below shows how to: * Create an alarm and enable actions using `put_metric_alarm `_. Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # Create alarm with actions enabled cloudwatch.put_metric_alarm( AlarmName='Web_Server_CPU_Utilization', ComparisonOperator='GreaterThanThreshold', EvaluationPeriods=1, MetricName='CPUUtilization', Namespace='AWS/EC2', Period=60, Statistic='Average', Threshold=70.0, ActionsEnabled=True, AlarmActions=[ 'arn:aws:swf:us-west-2:{CUSTOMER_ACCOUNT}:action/actions/AWS_EC2.InstanceId.Reboot/1.0' ], AlarmDescription='Alarm when server CPU exceeds 70%', Dimensions=[ { 'Name': 'InstanceId', 'Value': 'INSTANCE_ID' }, ], Unit='Seconds' ) Disable Actions on an Alarm =========================== Disable the actions for the specified alarms. When an alarm's actions are disabled, the alarm actions do not execute when the alarm state changes. The example below shows how to: * Disable metric alarm actions using `disable_alarm_actions `_. Example ------- .. code-block:: python import boto3 # Create CloudWatch client cloudwatch = boto3.client('cloudwatch') # Disable alarm cloudwatch.disable_alarm_actions( AlarmNames=['Web_Server_CPU_Utilization'], ) boto3-1.9.253/docs/source/guide/cw-examples.rst000066400000000000000000000021571355237733400212460ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-cw-examples: ########################## Amazon CloudWatch Examples ########################## You can use the following examples to access Amazon Cloudwatch (CloudWatch) by using Amazon Boto. For more information about CloudWatch, see the `CloudWatch Developer Guide `_. **Examples** .. toctree:: :maxdepth: 1 cw-example-creating-alarms cw-example-using-alarms cw-example-metrics cw-example-events cw-example-subscription-filters boto3-1.9.253/docs/source/guide/dynamodb.rst000066400000000000000000000321521355237733400206140ustar00rootroot00000000000000.. _dynamodb_guide: DynamoDB ======== By following this guide, you will learn how to use the :py:class:`DynamoDB.ServiceResource` and :py:class:`DynamoDB.Table` resources in order to create tables, write items to tables, modify existing items, retrieve items, and query/filter the items in the table. Creating a New Table -------------------- In order to create a new table, use the :py:meth:`DynamoDB.ServiceResource.create_table` method:: import boto3 # Get the service resource. dynamodb = boto3.resource('dynamodb') # Create the DynamoDB table. table = dynamodb.create_table( TableName='users', KeySchema=[ { 'AttributeName': 'username', 'KeyType': 'HASH' }, { 'AttributeName': 'last_name', 'KeyType': 'RANGE' } ], AttributeDefinitions=[ { 'AttributeName': 'username', 'AttributeType': 'S' }, { 'AttributeName': 'last_name', 'AttributeType': 'S' }, ], ProvisionedThroughput={ 'ReadCapacityUnits': 5, 'WriteCapacityUnits': 5 } ) # Wait until the table exists. table.meta.client.get_waiter('table_exists').wait(TableName='users') # Print out some data about the table. print(table.item_count) Expected Output:: 0 This creates a table named ``users`` that respectively has the hash and range primary keys ``username`` and ``last_name``. This method will return a :py:class:`DynamoDB.Table` resource to call additional methods on the created table. Using an Existing Table ----------------------- It is also possible to create a :py:class:`DynamoDB.Table` resource from an existing table:: import boto3 # Get the service resource. dynamodb = boto3.resource('dynamodb') # Instantiate a table resource object without actually # creating a DynamoDB table. Note that the attributes of this table # are lazy-loaded: a request is not made nor are the attribute # values populated until the attributes # on the table resource are accessed or its load() method is called. table = dynamodb.Table('users') # Print out some data about the table. # This will cause a request to be made to DynamoDB and its attribute # values will be set based on the response. print(table.creation_date_time) Expected Output (Please note that the actual times will probably not match up):: 2015-06-26 12:42:45.149000-07:00 Creating a New Item ------------------- Once you have a :py:class:`DynamoDB.Table` resource you can add new items to the table using :py:meth:`DynamoDB.Table.put_item`:: table.put_item( Item={ 'username': 'janedoe', 'first_name': 'Jane', 'last_name': 'Doe', 'age': 25, 'account_type': 'standard_user', } ) For all of the valid types that can be used for an item, refer to :ref:`ref_valid_dynamodb_types`. Getting an Item --------------- You can then retrieve the object using :py:meth:`DynamoDB.Table.get_item`:: response = table.get_item( Key={ 'username': 'janedoe', 'last_name': 'Doe' } ) item = response['Item'] print(item) Expected Output:: {u'username': u'janedoe', u'first_name': u'Jane', u'last_name': u'Doe', u'account_type': u'standard_user', u'age': Decimal('25')} Updating Item ------------- You can then update attributes of the item in the table:: table.update_item( Key={ 'username': 'janedoe', 'last_name': 'Doe' }, UpdateExpression='SET age = :val1', ExpressionAttributeValues={ ':val1': 26 } ) Then if you retrieve the item again, it will be updated appropriately:: response = table.get_item( Key={ 'username': 'janedoe', 'last_name': 'Doe' } ) item = response['Item'] print(item) Expected Output:: {u'username': u'janedoe', u'first_name': u'Jane', u'last_name': u'Doe', u'account_type': u'standard_user', u'age': Decimal('26')} Deleting Item ------------- You can also delete the item using :py:meth:`DynamoDB.Table.delete_item`:: table.delete_item( Key={ 'username': 'janedoe', 'last_name': 'Doe' } ) Batch Writing ------------- If you are loading a lot of data at a time, you can make use of :py:meth:`DynamoDB.Table.batch_writer` so you can both speed up the process and reduce the number of write requests made to the service. This method returns a handle to a batch writer object that will automatically handle buffering and sending items in batches. In addition, the batch writer will also automatically handle any unprocessed items and resend them as needed. All you need to do is call ``put_item`` for any items you want to add, and ``delete_item`` for any items you want to delete:: with table.batch_writer() as batch: batch.put_item( Item={ 'account_type': 'standard_user', 'username': 'johndoe', 'first_name': 'John', 'last_name': 'Doe', 'age': 25, 'address': { 'road': '1 Jefferson Street', 'city': 'Los Angeles', 'state': 'CA', 'zipcode': 90001 } } ) batch.put_item( Item={ 'account_type': 'super_user', 'username': 'janedoering', 'first_name': 'Jane', 'last_name': 'Doering', 'age': 40, 'address': { 'road': '2 Washington Avenue', 'city': 'Seattle', 'state': 'WA', 'zipcode': 98109 } } ) batch.put_item( Item={ 'account_type': 'standard_user', 'username': 'bobsmith', 'first_name': 'Bob', 'last_name': 'Smith', 'age': 18, 'address': { 'road': '3 Madison Lane', 'city': 'Louisville', 'state': 'KY', 'zipcode': 40213 } } ) batch.put_item( Item={ 'account_type': 'super_user', 'username': 'alicedoe', 'first_name': 'Alice', 'last_name': 'Doe', 'age': 27, 'address': { 'road': '1 Jefferson Street', 'city': 'Los Angeles', 'state': 'CA', 'zipcode': 90001 } } ) The batch writer is even able to handle a very large amount of writes to the table. :: with table.batch_writer() as batch: for i in range(50): batch.put_item( Item={ 'account_type': 'anonymous', 'username': 'user' + str(i), 'first_name': 'unknown', 'last_name': 'unknown' } ) The batch writer can help to de-duplicate request by specifying ``overwrite_by_pkeys=['partition_key', 'sort_key']`` if you want to bypass no duplication limitation of single batch write request as ``botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the BatchWriteItem operation: Provided list of item keys contains duplicates``. It will drop request items in the buffer if their primary keys(composite) values are the same as newly added one, as eventually consistent with streams of individual put/delete operations on the same item. :: with table.batch_writer(overwrite_by_pkeys=['partition_key', 'sort_key']) as batch: batch.put_item( Item={ 'partition_key': 'p1', 'sort_key': 's1', 'other': '111', } ) batch.put_item( Item={ 'partition_key': 'p1', 'sort_key': 's1', 'other': '222', } ) batch.delete_item( Key={ 'partition_key': 'p1', 'sort_key': 's2' } ) batch.put_item( Item={ 'partition_key': 'p1', 'sort_key': 's2', 'other': '444', } ) after de-duplicate: :: batch.put_item( Item={ 'partition_key': 'p1', 'sort_key': 's1', 'other': '222', } ) batch.put_item( Item={ 'partition_key': 'p1', 'sort_key': 's2', 'other': '444', } ) Querying and Scanning --------------------- With the table full of items, you can then query or scan the items in the table using the :py:meth:`DynamoDB.Table.query` or :py:meth:`DynamoDB.Table.scan` methods respectively. To add conditions to scanning and querying the table, you will need to import the :py:class:`boto3.dynamodb.conditions.Key` and :py:class:`boto3.dynamodb.conditions.Attr` classes. The :py:class:`boto3.dynamodb.conditions.Key` should be used when the condition is related to the key of the item. The :py:class:`boto3.dynamodb.conditions.Attr` should be used when the condition is related to an attribute of the item:: from boto3.dynamodb.conditions import Key, Attr This queries for all of the users whose ``username`` key equals ``johndoe``:: response = table.query( KeyConditionExpression=Key('username').eq('johndoe') ) items = response['Items'] print(items) Expected Output:: [{u'username': u'johndoe', u'first_name': u'John', u'last_name': u'Doe', u'account_type': u'standard_user', u'age': Decimal('25'), u'address': {u'city': u'Los Angeles', u'state': u'CA', u'zipcode': Decimal('90001'), u'road': u'1 Jefferson Street'}}] Similarly you can scan the table based on attributes of the items. For example, this scans for all the users whose ``age`` is less than ``27``:: response = table.scan( FilterExpression=Attr('age').lt(27) ) items = response['Items'] print(items) Expected Output:: [{u'username': u'johndoe', u'first_name': u'John', u'last_name': u'Doe', u'account_type': u'standard_user', u'age': Decimal('25'), u'address': {u'city': u'Los Angeles', u'state': u'CA', u'zipcode': Decimal('90001'), u'road': u'1 Jefferson Street'}}, {u'username': u'bobsmith', u'first_name': u'Bob', u'last_name': u'Smith', u'account_type': u'standard_user', u'age': Decimal('18'), u'address': {u'city': u'Louisville', u'state': u'KY', u'zipcode': Decimal('40213'), u'road': u'3 Madison Lane'}}] You are also able to chain conditions together using the logical operators: ``&`` (and), ``|`` (or), and ``~`` (not). For example, this scans for all users whose ``first_name`` starts with ``J`` and whose ``account_type`` is ``super_user``:: response = table.scan( FilterExpression=Attr('first_name').begins_with('J') & Attr('account_type').eq('super_user') ) items = response['Items'] print(items) Expected Output:: [{u'username': u'janedoering', u'first_name': u'Jane', u'last_name': u'Doering', u'account_type': u'super_user', u'age': Decimal('40'), u'address': {u'city': u'Seattle', u'state': u'WA', u'zipcode': Decimal('98109'), u'road': u'2 Washington Avenue'}}] You can even scan based on conditions of a nested attribute. For example this scans for all users whose ``state`` in their ``address`` is ``CA``:: response = table.scan( FilterExpression=Attr('address.state').eq('CA') ) items = response['Items'] print(items) Expected Output:: [{u'username': u'johndoe', u'first_name': u'John', u'last_name': u'Doe', u'account_type': u'standard_user', u'age': Decimal('25'), u'address': {u'city': u'Los Angeles', u'state': u'CA', u'zipcode': Decimal('90001'), u'road': u'1 Jefferson Street'}}, {u'username': u'alicedoe', u'first_name': u'Alice', u'last_name': u'Doe', u'account_type': u'super_user', u'age': Decimal('27'), u'address': {u'city': u'Los Angeles', u'state': u'CA', u'zipcode': Decimal('90001'), u'road': u'1 Jefferson Street'}}] For more information on the various conditions you can use for queries and scans, refer to :ref:`ref_dynamodb_conditions`. Deleting a Table ---------------- Finally, if you want to delete your table call :py:meth:`DynamoDB.Table.delete`:: table.delete() boto3-1.9.253/docs/source/guide/ec2-example-elastic-ip-addresses.rst000066400000000000000000000126661355237733400251340ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-ec2-example-elastic-ip-addresses: ######################################## Using Elastic IP Addresses in Amazon EC2 ######################################## This Python example shows you how to: * Get descriptions of your Elastic IP addresses * Allocate an Elastic IP address * Release an Elastic IP address The Scenario ============ An Elastic IP address is a static IP address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. It is a public IP address, which is reachable from the Internet. If your instance does not have a public IP address, you can associate an Elastic IP address with your instance to enable communication with the Internet. In this example, Python code performs several Amazon EC2 operations involving Elastic IP addresses. The code uses the AWS SDK for Python to manage IAM access keys using these methods of the EC2 client class: * `describe_addresses `_. * `allocate_address `_. * `release_address `_. For more information about Elastic IP addresses in Amazon EC2, see `Elastic IP Addresses `_ in the *Amazon EC2 User Guide for Linux Instances* or `Elastic IP Addresses `_ in the *Amazon EC2 User Guide for Windows Instances*. Prerequisite Tasks All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Elastic IP Addresses ============================= An Elastic IP address is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. The example below shows how to: * Describe Elastic IP addresses using `describe_addresses `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') filters = [ {'Name': 'domain', 'Values': ['vpc']} ] response = ec2.describe_addresses(Filters=filters) print(response) Allocate and Associate an Elastic IP Address with an Amazon EC2 Instance ======================================================================== An *Elastic IP address* is a static IPv4 address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. With an Elastic IP address, you can mask the failure of an instance or software by rapidly remapping the address to another instance in your account. The example below shows how to: * Acquire an Elastic IP address using `allocate_address `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError ec2 = boto3.client('ec2') try: allocation = ec2.allocate_address(Domain='vpc') response = ec2.associate_address(AllocationId=allocation['AllocationId'], InstanceId='INSTANCE_ID') print(response) except ClientError as e: print(e) Release an Elastic IP Address ============================= After releasing an Elastic IP address, it is released to the IP address pool and might be unavailable to you. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an :code:`AuthFailure` error if the address is already allocated to another AWS account. The example below shows how to: * Release the specified Elastic IP address using `release_address `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError ec2 = boto3.client('ec2') try: response = ec2.release_address(AllocationId='ALLOCATION_ID') print('Address released') except ClientError as e: print(e) boto3-1.9.253/docs/source/guide/ec2-example-key-pairs.rst000066400000000000000000000102441355237733400230210ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-ec2-example-key-pairs: ################################# Working with Amazon EC2 Key Pairs ################################# This Python example shows you how to: * Get information about your key pairs * Create a key pair to access an Amazon EC2 instance * Delete an existing key pair The Scenario ============ Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt data, then the recipient uses the private key to decrypt the data. The public and private keys are known as a key pair. In this example, Python code is used to perform several Amazon EC2 key pair management operations. The code uses the AWS SDK for Python to manage IAM access keys using these methods of the EC2 client class: * `describe_key_pairs `_. * `create_key_pair `_. * `delete_key_pair `_. For more information about the Amazon EC2 key pairs, see `Amazon EC2 Key Pairs `_ in the *Amazon EC2 User Guide for Linux Instances* or `Amazon EC2 Key Pairs and Windows Instances `_ in the *Amazon EC2 User Guide for Windows Instances*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Key Pairs ================== Describe one or more of your key pairs. The example below shows how to: * Describe keypairs using `describe_key_pairs `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') response = ec2.describe_key_pairs() print(response) Create a Key Pair ================= Create a 2048-bit RSA key pair with the specified name. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#8 private key. If a key with the specified name already exists, Amazon EC2 returns an error. The example below shows how to: * Create a 2048-bit RSA key pair with a specified name using `create_key_pair `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') response = ec2.create_key_pair(KeyName='KEY_PAIR_NAME') print(response) Delete a Key Pair ================= Delete the specified key pair, by removing the public key from Amazon EC2. The example below shows how to: * Delete a key pair by removing the public key from Amazon EC2 using `delete_key_pair `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') response = ec2.delete_key_pair(KeyName='KEY_PAIR_NAME') print(response) boto3-1.9.253/docs/source/guide/ec2-example-managing-instances.rst000066400000000000000000000174561355237733400246770ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ec2-managing-instances: ############################# Managing Amazon EC2 Instances ############################# This Python example shows you how to: * Get basic information about your Amazon EC2 instances * Start and stop detailed monitoring of an Amazon EC2 instance * Start and stop an Amazon EC2 instance * Reboot an Amazon EC2 instance The Scenario ============ In this example, Python code is used perform several basic instance management operations. The code uses the AWS SDK for Python to manage the instances by using these methods of the EC2 client class: * `describe_instances `_. * `monitor_instances `_. * `unmonitor_instances `_. * `start_instances `_. * `stop_instances `_. * `reboot_instances `_. For more information about the lifecycle of Amazon EC2 instances, see `Instance Lifecycle `_ in the *Amazon EC2 User Guide for Linux Instances* or `Instance Lifecycle `_ in the *Amazon EC2 User Guide for Windows Instances*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Instances ================== An EC2 instance is a virtual server in Amazon's Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services (AWS) infrastructure. The example below shows how to: * Describe one or more EC2 instances using `describe_instances `_. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') response = ec2.describe_instances() print(response) Monitor and Unmonitor Instances =============================== Enable or disable detailed monitoring for a running instance. If detailed monitoring is not enabled, basic monitoring is enabled. For more information, see `Monitoring Your Instances and Volumes `_ in the *Amazon Elastic Compute Cloud User Guide*. The example below shows how to: * Enable detailed monitoring for a running instance using `monitor_instances `_. * Disable detailed monitoring for a running instance using `unmonitor_instances `_. Example ------- .. code-block:: python import sys import boto3 ec2 = boto3.client('ec2') if sys.argv[1] == 'ON': response = ec2.monitor_instances(InstanceIds=['INSTANCE_ID']) else: response = ec2.unmonitor_instances(InstanceIds=['INSTANCE_ID']) print(response) Start and Stop Instances ======================== Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for hourly instance usage. However, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour. The example below shows how to: * Start an Amazon EBS-backed AMI that you've previously stopped using `start_instances `_. * Stop an Amazon EBS-backed instance using `stop_instances `_. Example ------- .. code-block:: python import sys import boto3 from botocore.exceptions import ClientError instance_id = sys.argv[2] action = sys.argv[1].upper() ec2 = boto3.client('ec2') if action == 'ON': # Do a dryrun first to verify permissions try: ec2.start_instances(InstanceIds=[instance_id], DryRun=True) except ClientError as e: if 'DryRunOperation' not in str(e): raise # Dry run succeeded, run start_instances without dryrun try: response = ec2.start_instances(InstanceIds=[instance_id], DryRun=False) print(response) except ClientError as e: print(e) else: # Do a dryrun first to verify permissions try: ec2.stop_instances(InstanceIds=[instance_id], DryRun=True) except ClientError as e: if 'DryRunOperation' not in str(e): raise # Dry run succeeded, call stop_instances without dryrun try: response = ec2.stop_instances(InstanceIds=[instance_id], DryRun=False) print(response) except ClientError as e: print(e) Reboot Instances ================ Request a reboot of one or more instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored. The example below shows how to: * Request a reboot of one or more instances using `reboot_instances `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError ec2 = boto3.client('ec2') try: ec2.reboot_instances(InstanceIds=['INSTANCE_ID'], DryRun=True) except ClientError as e: if 'DryRunOperation' not in str(e): print("You don't have permission to reboot instances.") raise try: response = ec2.reboot_instances(InstanceIds=['INSTANCE_ID'], DryRun=False) print('Success', response) except ClientError as e: print('Error', e) boto3-1.9.253/docs/source/guide/ec2-example-regions-avail-zones.rst000066400000000000000000000071321355237733400250130ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-ec2-example-regions-zones: ################################################## Describe Amazon EC2 Regions and Availability Zones ################################################## Amazon EC2 is hosted in multiple locations worldwide. These locations are composed of regions and Availability Zones. Each region is a separate geographic area. Each region has multiple, isolated locations known as Availability Zones. Amazon EC2 provides the ability to place instances and data in multiple locations. The Scenario ============ In this example, Python code is used to get details about regions and Availability Zones. The code uses the AWS SDK for Python to get the data by using these methods of the EC2 client class: * `describe_regions `_. * `describe_availability_zones `_. For more information about regions and Availability Zones, see `Regions and Availability Zones `_ in the *Amazon EC2 User Guide for Linux Instances* or `Regions and Availability Zones `_ in the *Amazon EC2 User Guide for Windows Instances*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Regions and Availability Zones ======================================= * Describe one or more regions that are currently available to you. * Describe one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone. The example below shows how to: * Describe regions using `describe_regions `_. * Describe AvailabilityZones using `describe_availability_zones `_. Example ------- .. code-block:: python import boto3 ec2 = boto3.client('ec2') # Retrieves all regions/endpoints that work with EC2 response = ec2.describe_regions() print('Regions:', response['Regions']) # Retrieves availability zones only for region of the ec2 object response = ec2.describe_availability_zones() print('Availability Zones:', response['AvailabilityZones']) boto3-1.9.253/docs/source/guide/ec2-example-security-group.rst000066400000000000000000000151451355237733400241230ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-ec2-example-security-group: ########################################## Working with Security Groups in Amazon EC2 ########################################## This Python example shows you how to: * Get information about your security groups * Create a security group to access an Amazon EC2 instance * Delete an existing security group The Scenario ============ An Amazon EC2 security group acts as a virtual firewall that controls the traffic for one or more instances. You add rules to each security group to allow traffic to or from its associated instances. You can modify the rules for a security group at any time; the new rules are automatically applied to all instances that are associated with the security group. In this example, Python code is used to perform several Amazon EC2 operations involving security groups. The code uses the AWS SDK for Python to manage IAM access keys using these methods of the EC2 client class: * `describe_security_groups `_. * `authorize_security_group_ingress `_. * `create_security_group `_. * `delete_security_group `_. For more information about the Amazon EC2 security groups, see `Amazon EC2 Amazon Security Groups for Linux Instances `_ in the *Amazon EC2 User Guide for Linux Instances* or `Amazon EC2 Security Groups for Windows Instances `_ in the *Amazon EC2 User Guide for Windows Instances*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Tasks ================== To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Describe Security Groups ======================= Describe one or more of your security groups. A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see `Amazon EC2 Security Groups `_ in the *Amazon Elastic Compute Cloud User Guide* and `Security Groups for Your VPC `_ in the *Amazon Virtual Private Cloud User Guide*. The example below shows how to: * Describe a Security Group using `describe_security_groups `_. Example ------- .. code:: python import boto3 from botocore.exceptions import ClientError ec2 = boto3.client('ec2') try: response = ec2.describe_security_groups(GroupIds=['SECURITY_GROUP_ID']) print(response) except ClientError as e: print(e) Create a Security Group and Rules ================================= * Create a security group. * Add one or more ingress rules to a security group. Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur. The example below shows how to: * Create a Security Group using `create_security_group `_. * Add an ingress rule to a security group using `authorize_security_group_ingress `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError ec2 = boto3.client('ec2') response = ec2.describe_vpcs() vpc_id = response.get('Vpcs', [{}])[0].get('VpcId', '') try: response = ec2.create_security_group(GroupName='SECURITY_GROUP_NAME', Description='DESCRIPTION', VpcId=vpc_id) security_group_id = response['GroupId'] print('Security Group Created %s in vpc %s.' % (security_group_id, vpc_id)) data = ec2.authorize_security_group_ingress( GroupId=security_group_id, IpPermissions=[ {'IpProtocol': 'tcp', 'FromPort': 80, 'ToPort': 80, 'IpRanges': [{'CidrIp': '0.0.0.0/0'}]}, {'IpProtocol': 'tcp', 'FromPort': 22, 'ToPort': 22, 'IpRanges': [{'CidrIp': '0.0.0.0/0'}]} ]) print('Ingress Successfully Set %s' % data) except ClientError as e: print(e) Delete a Security Group ======================= If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with :code:`InvalidGroup.InUse` in EC2-Classic or :code:`DependencyViolation` in EC2-VPC. The example below shows how to: * Delete a security group using `delete_security_group `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError # Create EC2 client ec2 = boto3.client('ec2') # Delete security group try: response = ec2.delete_security_group(GroupId='SECURITY_GROUP_ID') print('Security Group Deleted') except ClientError as e: print(e) boto3-1.9.253/docs/source/guide/ec2-examples.rst000066400000000000000000000026121355237733400213020ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-ec2-examples: ################### Amazon EC2 Examples ################### .. meta:: :description: :keywords: AWS EC2 code examples for the AWS SDK for Python Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizeable computing capacity in servers in Amazon's data centers—that you use to build and host your software systems. You can use the following examples to access Amazon EC2 using the Amazon Web Services (AWS) SDK for Python. For more information about Amazon EC2, see the `Amazon EC2 Documentation `_. **Examples** .. toctree:: :maxdepth: 1 ec2-example-managing-instances ec2-example-key-pairs ec2-example-regions-avail-zones ec2-example-security-group ec2-example-elastic-ip-addresses boto3-1.9.253/docs/source/guide/events.rst000066400000000000000000000347411355237733400203310ustar00rootroot00000000000000Extensibility Guide =================== All of Boto3's resource and client classes are generated at runtime. This means that you cannot directly inherit and then extend the functionality of these classes because they do not exist until the program actually starts running. However it is still possible to extend the functionality of classes through Boto3's event system. An Introduction to the Event System ----------------------------------- Boto3's event system allows users to register a function to a specific event. Then once the running program reaches a line that emits that specific event, Boto3 will call every function registered to the event in the order in which they were registered. When Boto3 calls each of these registered functions, it will call each of them with a specific set of keyword arguments that are associated with that event. Then once the registered function is called, the function may modify the keyword arguments passed to that function or return a value. Here is an example of how the event system works:: import boto3 s3 = boto3.client('s3') # Access the event system on the S3 client event_system = s3.meta.events # Create a function def add_my_bucket(params, **kwargs): # Add the name of the bucket you want to default to. if 'Bucket' not in params: params['Bucket'] = 'mybucket' # Register the function to an event event_system.register('provide-client-params.s3.ListObjects', add_my_bucket) response = s3.list_objects() In this example, the handler ``add_my_bucket`` is registered such that the handler will inject the value ``'mybucket`` for the ``Bucket`` parameter whenever the the ``list_objects`` client call is made without the ``Bucket`` parameter. Note that if the same ``list_objects`` call is made without the ``Bucket`` parameter and the registered handler, it will result in a validation error. Here are the takeaways from this example: * All clients have their own event system that you can use to fire events and register functions. You can access the event system through the ``meta.events`` attribute on the client. * All functions registered to the event system must have ``**kwargs`` in the function signature. This is because emitting an event can have any number of keyword arguments emitted along side it, and so if your function is called without ``**kwargs``, its signature will have to match every keyword argument emitted by the event. This also allows for more keyword arguments to be added to the emitted event in the future without breaking existing handlers. * To register a function to an event, call the ``register`` method on the event system with the name of the event you want to register the function to and the function handle. Note that if you register the event after the event is emitted, the function will not be called unless the event is emitted again. In the example, the ``add_my_bucket`` handler was registered to the ``'provide-client-params.s3.ListObjects'`` event, which is an event that can be used to inject and modify parameters passed in by the client method. To read more about the event refer to `provide-client-params`_ A Hierarchical Structure ------------------------ The event system also provides a hierarchy for registering events such that you can register a function to a set of events depending on the event name hierarchy. An event name can have its own hierarchy by specifying ``.`` in its name. For example, take the event name ``'general.specific.more_specific'``. When this event is emitted, the registered functions will be called in the order from most specific to least specific registration. So in this example, the functions will be called in the following order: 1) Functions registered to ``'general.specific.more_specific'`` 2) Functions registered to ``'general.specific'`` 3) Functions registered to ``'general'`` Here is a deeper example of how the event system works with respect to its hierarchical structure:: import boto3 s3 = boto3.client('s3') # Access the event system on the S3 client event_system = s3.meta.events def add_my_general_bucket(params, **kwargs): if 'Bucket' not in params: params['Bucket'] = 'mybucket' def add_my_specific_bucket(params, **kwargs): if 'Bucket' not in params: params['Bucket'] = 'myspecificbucket' event_system.register('provide-client-params.s3', add_my_general_bucket) event_system.register('provide-client-params.s3.ListObjects', add_my_specific_bucket) list_obj_response = s3.list_objects() put_obj_response = s3.put_object(Key='mykey', Body=b'my body') In this example, the ``list_objects`` method call will use the ``'myspecificbucket'`` for the bucket instead of ``'mybucket'`` because the ``add_my_specific_bucket`` method was registered to the ``'provide-client-params.s3.ListObjects'`` event which is more specific than the ``'provide-client-params.s3'`` event. Thus, the ``add_my_specific_bucket`` function is called before the ``add_my_general_bucket`` function is called when the event is emitted. However for the ``put_object`` call, the bucket used is ``'mybucket'``. This is because the event emitted for the ``put_object`` client call is ``'provide-client-params.s3.PutObject'`` and the ``add_my_general_bucket`` method is called via its registration to ``'provide-client-params.s3'``. The ``'provide-client-params.s3.ListObjects'`` event is never emitted so the registered ``add_my_specific_bucket`` function is never called. Wildcard Matching ----------------- Another aspect of Boto3's event system is that it has the capability to do wildcard matching using the ``'*'`` notation. Here is an example of using wildcards in the event system:: import boto3 s3 = boto3.client('s3') # Access the event system on the S3 client event_system = s3.meta.events def add_my_wildcard_bucket(params, **kwargs): if 'Bucket' not in params: params['Bucket'] = 'mybucket' event_system.register('provide-client-params.s3.*', add_my_wildcard_bucket) response = s3.list_objects() The ``'*'`` allows you to register to a group of events without having to know the actual name of the event. This is useful when you have to apply the same handler in multiple places. Also note that if the wildcard is used, it must be isolated. It does not handle globbing with additional characters. So in the previous example, if the ``my_wildcard_function`` was registered to ``'provide-client-params.s3.*objects'``, the handler would not be called because it will consider ``'provide-client-params.s3.*objects'`` to be a specific event. The wildcard also respects the hierarchical structure of the event system. If another handler was registered to the ``'provide-client-params.s3'`` event, the ``add_my_wildcard_bucket`` would be called first because it is registered to ``'provide-client-params.s3.*'`` which is more specific than the event ``'provide-client.s3'``. Isolation of Event Systems -------------------------- The event system in Boto3 has the notion of isolation: all clients maintain their own set of registered handlers. For example if a handler is registered to one client's event system, it will not be registered to another client's event system:: import boto3 client1 = boto3.client('s3') client2 = boto3.client('s3') def add_my_bucket(params, **kwargs): if 'Bucket' not in params: params['Bucket'] = 'mybucket' def add_my_other_bucket(params, **kwargs): if 'Bucket' not in params: params['Bucket'] = 'myotherbucket' client1.meta.events.register( 'provide-client-params.s3.ListObjects', add_my_bucket) client2.meta.events.register( 'provide-client-params.s3.ListObjects', add_my_other_bucket) client1_response = client1.list_objects() client2_response = client2.list_objects() Thanks to the isolation of clients' event systems, ``client1`` will inject ``'mybucket'`` for its ``list_objects`` method call while ``client2`` will inject ``'myotherbucket'`` for its ``list_objects`` method call because ``add_my_bucket`` was registered to ``client1`` while ``add_my_other_bucket`` was registered to ``client2``. Boto3 Specific Events --------------------- Boto3 emits a set of events that users can register to customize clients or resources and modify the behavior of method calls. Here is the list of events that users of boto3 can register handlers to: * ``'creating-client-class`` * ``'creating-resource-class`` * ``'provide-client-params'`` creating-client-class ~~~~~~~~~~~~~~~~~~~~~ :Full Event Name: ``'creating-client-class.service-name'`` Note: ``service-name`` refers to the value used to instantiate a client i.e. ``boto3.client('service-name')`` :Description: This event is emitted upon creation of the client class for a service. The client class for a service is not created until the first instantiation of the client class. Use this event for adding methods to the client class or adding classes for the client class to inherit from. :Keyword Arguments Emitted: :type class_attributes: dict :param class_attributes: A dictionary where the keys are the names of the attributes of the class and the values are the actual attributes of the class. :type base_classes: list :param base_classes: A list of classes that the client class will inherit from where the order of inheritance is the same as the order of the list. :Expected Return Value: Do not return anything. :Example: Here is an example of how to add a method to the client class:: from boto3.session import Session def custom_method(self): print('This is my custom method') def add_custom_method(class_attributes, **kwargs): class_attributes['my_method'] = custom_method session = Session() session.events.register('creating-client-class.s3', add_custom_method) client = session.client('s3') client.my_method() This should output:: This is my custom method Here is an example of how to add a new class for the client class to inherit from:: from boto3.session import Session class MyClass(object): def __init__(self, *args, **kwargs): super(MyClass, self).__init__(*args, **kwargs) print('Client instantiated!') def add_custom_class(base_classes, **kwargs): base_classes.insert(0, MyClass) session = Session() session.events.register('creating-client-class.s3', add_custom_class) client = session.client('s3') This should output:: Client instantiated! creating-resource-class ~~~~~~~~~~~~~~~~~~~~~~~ :Full Event Name: ``'creating-resource-class.service-name.resource-name'`` Note: ``service-name`` refers to the value used to instantiate a service resource i.e. ``boto3.resource('service-name')`` and ``resource-name`` refers to the name of the resource class. :Description: This event is emitted upon creation of the resource class. The resource class is not created until the first instantiation of the resource class. Use this event for adding methods to the resource class or adding classes for the resource class to inherit from. :Keyword Arguments Emitted: :type class_attributes: dict :param class_attributes: A dictionary where the keys are the names of the attributes of the class and the values are the actual attributes of the class. :type base_classes: list :param base_classes: A list of classes that the resource class will inherit from where the order of inheritance is the same as the order of the list. :Expected Return Value: Do not return anything. :Example: Here is an example of how to add a method to a resource class:: from boto3.session import Session def custom_method(self): print('This is my custom method') def add_custom_method(class_attributes, **kwargs): class_attributes['my_method'] = custom_method session = Session() session.events.register('creating-resource-class.s3.ServiceResource', add_custom_method) resource = session.resource('s3') resource.my_method() This should output:: This is my custom method Here is an example of how to add a new class for a resource class to inherit from:: from boto3.session import Session class MyClass(object): def __init__(self, *args, **kwargs): super(MyClass, self).__init__(*args, **kwargs) print('Resource instantiated!') def add_custom_class(base_classes, **kwargs): base_classes.insert(0, MyClass) session = Session() session.events.register('creating-resource-class.s3.ServiceResource', add_custom_class) resource = session.resource('s3') This should output:: Resource instantiated! provide-client-params ~~~~~~~~~~~~~~~~~~~~~ :Full Event Name: ``'provide-client.service-name.operation-name'`` Note: ``service-name`` refers to the value used to instantiate a client i.e. ``boto3.client('service-name')``. ``operation-name`` refers to the underlying API operation of the corresponding client method. To access the operation API name, retrieve the value from the ``client.meta.method_to_api_mapping`` dictionary using the name of the desired client method as the key. :Description: This event is emitted before validation of the parameters passed to client method. Use this event to inject or modify parameters prior to the parameters being validated and built into a request that is sent over the wire. :Keyword Arguments Emitted: :type params: dict :param params: A dictionary where the keys are the names of the parameters passed through the client method and the values are the values of those parameters. :type model: ``botocore.model.OperationModel`` :param model: A model representing the underlying API operation of the client method. :Expected Return Value: Do not return anything or return a new dictionary of parameters to use when making the request. :Example: Here is an example of how to inject a parameter using the event:: import boto3 s3 = boto3.client('s3') # Access the event system on the S3 client event_system = s3.meta.events # Create a function def add_my_bucket(params, **kwargs): # Add the name of the bucket you want to default to. if 'Bucket' not in params: params['Bucket'] = 'mybucket' # Register the function to an event event_system.register('provide-client-params.s3.ListObjects', add_my_bucket) response = s3.list_objects() boto3-1.9.253/docs/source/guide/examples.rst000066400000000000000000000032271355237733400206360ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-examples: ############# Code Examples ############# This section describes code examples that demonstrate how to use the AWS SDK for Python to call various AWS services. The source files for the examples, plus additional example programs, are available in the `AWS Code Catalog `_. To propose a new code example for the AWS documentation team to consider producing, create a new request. The team is looking to produce code examples that cover broader scenarios and use cases, versus simple code snippets that cover only individual API calls. For instructions, see the "Proposing new code examples" section in the `Readme on GitHub `_. Before running an example, your AWS credentials must be configured as described in :doc:`quickstart`. .. toctree:: :maxdepth: 1 cw-examples dynamodb ec2-examples iam-examples kms-examples s3-examples secrets-manager ses-examples sqs-examples boto3-1.9.253/docs/source/guide/iam-example-managing-access-keys.rst000066400000000000000000000151631355237733400252100ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-iam-managing-access-keys: ######################## Managing IAM Access Keys ######################## This Python example shows you how to manage the access keys of your users. The Scenario ============ Users need their own access keys to make programmatic calls to AWS from the Amazon Web Services (AWS) SDK for Python. To fill this need, you can create, modify, view, or rotate access keys (access key IDs and secret access keys) for IAM users. By default, when you create an access key, its status is Active, which means the user can use the access key for API calls. In this example, Python code is used to manage access keys in IAM. The code uses the AWS SDK for Python to manage IAM access keys using these methods of the IAM client class: * `create_access_key `_. * `paginate(UserName='IAM_USER_NAME') `_. * `get_access_key_last_used `_. * `update_access_key `_. * `delete_access_key `_. For more information about IAM access keys, see `Managing Access Keys `_ in the *IAM User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Create Access Keys for a User ============================= Create a new AWS secret access key and corresponding AWS access key ID for the specified user. The default status for new keys is :code:`Active`. The example below shows how to: * Create a new AWS access key using `create_access_key `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Create an access key response = iam.create_access_key( UserName='IAM_USER_NAME' ) print(response['AccessKey']) List a User's Access Keys ========================= List information about the access key IDs associated with the specified IAM user. If there are none, the action returns an empty list. If the UserName field is not specified, the UserName is determined implicitly based on the AWS access key ID used to sign the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users. The example below shows how to: * List a user's access keys using `paginate(UserName='IAM_USER_NAME') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # List access keys through the pagination interface. paginator = iam.get_paginator('list_access_keys') for response in paginator.paginate(UserName='IAM_USER_NAME'): print(response) Get the Access Key Last Used ============================ Get information about when the specified access key was last used. The information includes the date and time of last use, along with the AWS service and region that were specified in the last request made with that key. The example below shows how to: * Get the access key last used using `get_access_key_last_used `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Get last use of access key response = iam.get_access_key_last_used( AccessKeyId='ACCESS_KEY_ID' ) print(response['AccessKeyLastUsed']) Update Access Key Status ======================== Change the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user's key as part of a key rotation work flow. The example below shows how to: * Change the status of an access key to :code:`Active` using `update_access_key `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Update access key to be active iam.update_access_key( AccessKeyId='ACCESS_KEY_ID', Status='Active', UserName='IAM_USER_NAME' ) Delete an Access Key ==================== Delete the access key pair associated with the specified IAM user. If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request. Because this action works for access keys under the AWS account, you can use this action to manage root credentials even if the AWS account has no associated users. The example below shows how to: * Delete an access key using `delete_access_key `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Delete access key iam.delete_access_key( AccessKeyId='ACCESS_KEY_ID', UserName='IAM_USER_NAME' ) boto3-1.9.253/docs/source/guide/iam-example-managing-account-aliases.rst000066400000000000000000000110461355237733400260450ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-iam-managing-account-aliases: ############################ Managing IAM Account Aliases ############################ This Python example shows you how to manage aliases for your AWS account ID. The Scenario ============ If you want the URL for your sign-in page to contain your company name or other friendly identifier instead of your AWS account ID, you can create an alias for your AWS account ID. If you create an AWS account alias, your sign-in page URL changes to incorporate the alias. In this example, Python code is used to create and manage IAM account aliases. The code uses the AWS SDK for Python to manage IAM access keys using these methods of the IAM client class: * `create_account_alias `_. * `get_paginator('list_account_aliases') `_. * `delete_account_alias `_. For more information about IAM account aliases, see `Your AWS Account ID and Its Alias `_ in the *IAM User Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Create an Account Alias ======================= Create an alias for your AWS account. For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID `_ in the *IAM User Guide*. The example below shows how to: * Create an account alias using `create_account_alias `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Create an account alias iam.create_account_alias( AccountAlias='ALIAS' ) List an Account Alias ===================== List the account alias associated with the AWS account (Note: you can have only one). For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID `_ in the *IAM User Guide*. The example below shows how to: * List account aliases using `get_paginator('list_account_aliases') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # List account aliases through the pagination interface paginator = iam.get_paginator('list_account_aliases') for response in paginator.paginate(): print(response['AccountAliases']) Delete an Account Alias ========================= Delete the specified AWS account alias. For information about using an AWS account alias, see `Using an Alias for Your AWS Account ID `_ in the *IAM User Guide*. The example below shows how to: * Delete an account alias using `delete_account_alias `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Delete an account alias iam.delete_account_alias( AccountAlias='ALIAS' ) boto3-1.9.253/docs/source/guide/iam-example-managing-users.rst000066400000000000000000000114721355237733400241360ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-iam-examples-managing-users: ****************** Managing IAM Users ****************** This Python example shows you how to create a user, list users, update a user name and delete a user. The Scenario ============ In this example Python code is used to create and manage users in IAM. The code uses the Amazon Web Services (AWS) SDK for Python to manage users using these methods of the IAM client class: * `create_user `_ * `get_paginator('list_users') `_. * `update_user `_. * `delete_user `_. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. For more information about IAM users, see `IAM Users `_ in the *IAM User Guide*. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Create a User ============= Create a new IAM user for your AWS account. For information about limitations on the number of IAM users you can create, see `Limitations on IAM Entities `_ in the *IAM User Guide*. The example below shows how to: * Create a new IAM user using `create_user `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Create user response = iam.create_user( UserName='IAM_USER_NAME' ) print(response) List Users in Your Account ========================== List the IAM users. The example below shows how to: * List the IAM users using `get_paginator('list_users') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # List users with the pagination interface paginator = iam.get_paginator('list_users') for response in paginator.paginate(): print(response) Update a User's Name ==================== Update the name and/or the path of the specified IAM user. To change a user's name or path, you must use the AWS CLI, Tools for Windows PowerShell, or AWS API. There is no option in the console to rename a user. For information about the permissions that you need in order to rename a user, see `Delegating Permissions to Administer IAM Users, Groups, and Credentials `_ in the *IAM User Guide*. The example below shows how to: * Update an IAM user name using `update_user `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Update a user name iam.update_user( UserName='IAM_USER_NAME', NewUserName='NEW_IAM_USER_NAME' ) Delete a User ============= Delete the specified IAM user. The user must not belong to any groups or have any access keys, signing certificates, or attached policies. The example below shows how to: * Delete an IAM user name using `delete_user `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Delete a user iam.delete_user( UserName='IAM_USER_NAME' ) boto3-1.9.253/docs/source/guide/iam-example-policies.rst000066400000000000000000000165051355237733400230270ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-iam-examples-policies: ######################### Working with IAM Policies ######################### This Python example shows you how to create and get IAM policies and attach and detach IAM policies from roles. The Scenario ============ You grant permissions to a user by creating a policy, which is a document that lists the actions that a user can perform and the resources those actions can affect. Any actions or resources that are not explicitly allowed are denied by default. Policies can be created and attached to users, groups of users, roles assumed by users, and resources. In this example, Python code used to manage policies in IAM. The code uses the Amazon Web Services (AWS) SDK for Python to create and delete policies as well as attaching and detaching role policies using these methods of the IAM client class: * `create_policy `_. * `get_policy `_. * `attach_role_policy `_. * `detach_role_policy `_. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. For more information about IAM policies, see `Overview of Access Management: Permissions and Policies `_ in the IAM User Guide. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. Create an IAM Policy ==================== Create a new managed policy for your AWS account. This operation creates a policy version with a version identifier of :code:`v1` and sets :code:`v1` as the policy's default version. For more information about policy versions, see `Versioning for Managed Policies `_ in the *IAM User Guide*. The example below shows how to: * Create a new managed policy using `create_policy `_. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Example ------- .. code-block:: python import json import boto3 # Create IAM client iam = boto3.client('iam') # Create a policy my_managed_policy = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "logs:CreateLogGroup", "Resource": "RESOURCE_ARN" }, { "Effect": "Allow", "Action": [ "dynamodb:DeleteItem", "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:Scan", "dynamodb:UpdateItem" ], "Resource": "RESOURCE_ARN" } ] } response = iam.create_policy( PolicyName='myDynamoDBPolicy', PolicyDocument=json.dumps(my_managed_policy) ) print(response) Get an IAM Policy ================= Get information about the specified managed policy, including the policy's default version and the total number of IAM users, groups, and roles to which the policy is attached. To get the list of the specific users, groups, and roles that the policy is attached to, use the :code:`list_entities_for_policy` API. This API returns metadata about the policy. To get the actual policy document for a specific version of the policy, use :code:`get_policy_version` API. This API gets information about managed policies. To get information about an inline policy that is embedded with an IAM user, group, or role, use the :code:`get_user_policy`, :code:`get_group_policy`, or :code:`get_role_policy` API. The example below shows how to: * Get information about a managed policy using `get_policy `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Get a policy response = iam.get_policy( PolicyArn='arn:aws:iam::aws:policy/AWSLambdaExecute' ) print(response['Policy']) Attach a Managed Role Policy ============================ When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy. You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using :code:`create_role`. You can update a role's trust policy using :code:`update_assume_role_policy`. Use this API to attach a managed policy to a role. To embed an inline policy in a role, use :code:`put_role_policy`. The example below shows how to: * Attach a managed policy to an IAM role. using `attach_role_policy `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Attach a role policy iam.attach_role_policy( PolicyArn='arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess', RoleName='AmazonDynamoDBFullAccess' ) Detach a Managed Role Policy ============================ Detach the specified managed policy from the specified role. A role can also have inline policies embedded with it. To delete an inline policy, use the :code:`delete_role_policy` API. For information about policies, see `Managed Policies and Inline Policies `_ in the *IAM User Guide*. The example below shows how to: * Detach a managed role policy using `detach_role_policy `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Detach a role policy iam.detach_role_policy( PolicyArn='arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess', RoleName='AmazonDynamoDBFullAccess' ) boto3-1.9.253/docs/source/guide/iam-example-server-certificates.rst000066400000000000000000000121521355237733400251630ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-iam-examples-server-certs: #################################### Working with IAM Server Certificates #################################### This Python example shows you how to carry out basic tasks in managing server certificates for HTTPS connections. The Scenario ============ To enable HTTPS connections to your website or application on AWS, you need an SSL/TLS server certificate. To use a certificate that you obtained from an external provider with your website or application on AWS, you must upload the certificate to IAM or import it into AWS Certificate Manager. In this example, python code is used to handle server certificates in IAM. The code uses the Amazon Web Services (AWS) SDK for Python to manage server certificates using these methods of the IAM client class: * `get_paginator('list_server_certificates') `_. * `get_server_certificate `_. * `update_server_certificate `_. * `delete_server_certificate `_. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. For more information about server certificates, see `Working with Server Certificates `_ in the *IAM User Guide*. Prerequisite Task ================= To set up and run this example, you must first configure your AWS credentials, as described in :doc:`quickstart`. List Your Server Certificates ============================= List the server certificates stored in IAM. If none exist, the action returns an empty list. The example below shows how to: * List server certificates using `get_paginator('list_server_certificates') `_. For more information about paginators see, :doc:`paginators` Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # List server certificates through the pagination interface paginator = iam.get_paginator('list_server_certificates') for response in paginator.paginate(): print(response['ServerCertificateMetadataList']) Get a Server Certificate ======================== Get information about the specified server certificate stored in IAM. The example below shows how to: * Get a server certificate using `get_server_certificate `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Get the server certificate response = iam.get_server_certificate(ServerCertificateName='CERTIFICATE_NAME') print(response['ServerCertificate']) Update a Server Certificate =========================== Update the name and/or the path of the specified server certificate stored in IAM. The example below shows how to: * Update a server certificate using `update_server_certificate `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Update the name of the server certificate iam.update_server_certificate( ServerCertificateName='CERTIFICATE_NAME', NewServerCertificateName='NEW_CERTIFICATE_NAME' ) Delete a Server Certificate =========================== Delete the specified server certificate. The example below shows how to: * Delete a server certificate using `delete_server_certificate `_. Example ------- .. code-block:: python import boto3 # Create IAM client iam = boto3.client('iam') # Delete the server certificate iam.delete_server_certificate( ServerCertificateName='CERTIFICATE_NAME' ) boto3-1.9.253/docs/source/guide/iam-examples.rst000066400000000000000000000034331355237733400214010ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto-iam-examples: ########################################### AWS Identity and Access Management Examples ########################################### .. meta:: :description: :keywords: AWS IAM code examples for the Amazon Web Services (AWS) SDK for Python AWS Identity and Access Management (IAM) is a web service that enables Amazon Web Services (AWS) customers to manage users and user permissions in AWS. The service is targeted at organizations with multiple users or systems in the cloud that use AWS products such as Amazon EC2, Amazon SimpleDB, and the AWS Management Console. With IAM, you can centrally manage users, security credentials such as access keys, and permissions that control which AWS resources users can access. You can use the following examples to access AWS Identity and Access Management (IAM) using the Amazon Web Services (AWS) SDK for Python. For more information about IAM, see the `IAM documentation `_. **Examples** .. toctree:: :maxdepth: 1 iam-example-managing-users iam-example-policies iam-example-managing-access-keys iam-example-server-certificates iam-example-managing-account-aliases boto3-1.9.253/docs/source/guide/index.rst000066400000000000000000000017461355237733400201330ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _user_guides: +++++++++++ User Guides +++++++++++ General Feature Guide ===================== .. toctree:: :maxdepth: 1 resources collections clients paginators session configuration events Tool Guide ========== .. toctree:: :maxdepth: 1 cloud9 sdk-metrics Migration Guide =============== .. toctree:: :maxdepth: 1 new migration upgrading boto3-1.9.253/docs/source/guide/kms-example-encrypt-decrypt-file.rst000066400000000000000000000313051355237733400253100ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-kms-examples-encrypt-decrypt-file: ************************** Encrypt and Decrypt a File ************************** The example program uses AWS KMS keys to encrypt and decrypt a file. A master key, also called a Customer Master Key or CMK, is created and used to generate a data key. The data key is then used to encrypt a disk file. The encrypted data key is stored within the encrypted file. To decrypt the file, the data key is decrypted and then used to decrypt the rest of the file. This manner of using master and data keys is called envelope encryption. To encrypt and decrypt data, the example uses the well-known Python ``cryptography`` package. This package is not part of the Python standard library and must be installed separately, for example, with the ``pip`` command. :: pip install cryptography Each section describes a single function from the example's `entire source file `_. Retrieve an Existing Master Key =============================== Master keys are created, managed, and stored within AWS KMS. A KMS master key is also referred to as a customer master key or CMK. An AWS storage cost is incurred for each CMK, therefore, one CMK is often used to manage multiple data keys. The example ``retrieve_cmk`` function searches for an existing CMK. A key description is specified when a CMK is created, and this description is used to identify and retrieve the desired key. If many CMKs exist, they are processed in batches until either the desired key is found or all keys are examined. If the example function finds the desired CMK, it returns both the CMK's ID and its ARN (Amazon Resource Name). Either of these identifiers can be used to reference the CMK in subsequent calls to AWS KMS methods. .. code-block:: python def retrieve_cmk(desc): """Retrieve an existing KMS CMK based on its description :param desc: Description of CMK specified when the CMK was created :return Tuple(KeyId, KeyArn) where: KeyId: CMK ID KeyArn: Amazon Resource Name of CMK :return Tuple(None, None) if a CMK with the specified description was not found """ # Retrieve a list of existing CMKs # If more than 100 keys exist, retrieve and process them in batches kms_client = boto3.client('kms') try: response = kms_client.list_keys() except ClientError as e: logging.error(e) return None, None done = False while not done: for cmk in response['Keys']: # Get info about the key, including its description try: key_info = kms_client.describe_key(KeyId=cmk['KeyArn']) except ClientError as e: logging.error(e) return None, None # Is this the key we're looking for? if key_info['KeyMetadata']['Description'] == desc: return cmk['KeyId'], cmk['KeyArn'] # Are there more keys to retrieve? if not response['Truncated']: # No, the CMK was not found logging.debug('A CMK with the specified description was not found') done = True else: # Yes, retrieve another batch try: response = kms_client.list_keys(Marker=response['NextMarker']) except ClientError as e: logging.error(e) return None, None # All existing CMKs were checked and the desired key was not found return None, None Create a Customer Master Key ============================ If the example does not find an existing CMK, it creates a new one and returns its ID and ARN. .. code-block:: python def create_cmk(desc='Customer Master Key'): """Create a KMS Customer Master Key The created CMK is a Customer-managed key stored in AWS KMS. :param desc: key description :return Tuple(KeyId, KeyArn) where: KeyId: AWS globally-unique string ID KeyArn: Amazon Resource Name of the CMK :return Tuple(None, None) if error """ # Create CMK kms_client = boto3.client('kms') try: response = kms_client.create_key(Description=desc) except ClientError as e: logging.error(e) return None, None # Return the key ID and ARN return response['KeyMetadata']['KeyId'], response['KeyMetadata']['Arn'] Create a Data Key ================= To encrypt a file, the example ``create_data_key`` function creates a data key. The data key is customer managed and does not incur an AWS storage cost. The example creates a data key for each file it encrypts, but it's possible to use a single data key to encrypt multiple files. The example function returns the data key in both its plaintext and encrypted forms. The plaintext form is used to encrypt the data. The encrypted form will be stored with the encrypted file. The data key is associated with a CMK which is capable of decrypting the encrypted data key when necessary. .. code-block:: python def create_data_key(cmk_id, key_spec='AES_256'): """Generate a data key to use when encrypting and decrypting data :param cmk_id: KMS CMK ID or ARN under which to generate and encrypt the data key. :param key_spec: Length of the data encryption key. Supported values: 'AES_128': Generate a 128-bit symmetric key 'AES_256': Generate a 256-bit symmetric key :return Tuple(EncryptedDataKey, PlaintextDataKey) where: EncryptedDataKey: Encrypted CiphertextBlob data key as binary string PlaintextDataKey: Plaintext base64-encoded data key as binary string :return Tuple(None, None) if error """ # Create data key kms_client = boto3.client('kms') try: response = kms_client.generate_data_key(KeyId=cmk_id, KeySpec=key_spec) except ClientError as e: logging.error(e) return None, None # Return the encrypted and plaintext data key return response['CiphertextBlob'], base64.b64encode(response['Plaintext']) Encrypt a File ============== The ``encrypt_file`` function creates a data key and uses it to encrypt the contents of a disk file. The encryption operation is performed by a ``Fernet`` object created by the Python ``cryptography`` package. The encrypted form of the data key is saved within the encrypted file and will be used in the future to decrypt the file. The encrypted file can be decrypted by any program with the credentials to decrypt the encrypted data key. .. code-block:: python def encrypt_file(filename, cmk_id): """Encrypt a file using an AWS KMS CMK A data key is generated and associated with the CMK. The encrypted data key is saved with the encrypted file. This enables the file to be decrypted at any time in the future and by any program that has the credentials to decrypt the data key. The encrypted file is saved to .encrypted Limitation: The contents of filename must fit in memory. :param filename: File to encrypt :param cmk_id: AWS KMS CMK ID or ARN :return: True if file was encrypted. Otherwise, False. """ # Read the entire file into memory try: with open(filename, 'rb') as file: file_contents = file.read() except IOError as e: logging.error(e) return False # Generate a data key associated with the CMK # The data key is used to encrypt the file. Each file can use its own # data key or data keys can be shared among files. # Specify either the CMK ID or ARN data_key_encrypted, data_key_plaintext = create_data_key(cmk_id) if data_key_encrypted is None: return False logging.info('Created new AWS KMS data key') # Encrypt the file f = Fernet(data_key_plaintext) file_contents_encrypted = f.encrypt(file_contents) # Write the encrypted data key and encrypted file contents together try: with open(filename + '.encrypted', 'wb') as file_encrypted: file_encrypted.write(len(data_key_encrypted).to_bytes(NUM_BYTES_FOR_LEN, byteorder='big')) file_encrypted.write(data_key_encrypted) file_encrypted.write(file_contents_encrypted) except IOError as e: logging.error(e) return False # For the highest security, the data_key_plaintext value should be wiped # from memory. Unfortunately, this is not possible in Python. However, # storing the value in a local variable makes it available for garbage # collection. return True Decrypt a Data Key ================== To decrypt an encrypted file, the encrypted data key used to perform the encryption must first be decrypted. This operation is performed by the example ``decrypt_data_key`` function which returns the plaintext form of the key. .. code-block:: python def decrypt_data_key(data_key_encrypted): """Decrypt an encrypted data key :param data_key_encrypted: Encrypted ciphertext data key. :return Plaintext base64-encoded binary data key as binary string :return None if error """ # Decrypt the data key kms_client = boto3.client('kms') try: response = kms_client.decrypt(CiphertextBlob=data_key_encrypted) except ClientError as e: logging.error(e) return None # Return plaintext base64-encoded binary data key return base64.b64encode((response['Plaintext'])) Decrypt a File ============== The example ``decrypt_file`` function first extracts the encrypted data key from the encrypted file. It then decrypts the key to get its plaintext form and uses that to decrypt the file contents. The decryption operation is performed by a ``Fernet`` object created by the Python ``cryptography`` package. .. code-block:: python def decrypt_file(filename): """Decrypt a file encrypted by encrypt_file() The encrypted file is read from .encrypted The decrypted file is written to .decrypted :param filename: File to decrypt :return: True if file was decrypted. Otherwise, False. """ # Read the encrypted file into memory try: with open(filename + '.encrypted', 'rb') as file: file_contents = file.read() except IOError as e: logging.error(e) return False # The first NUM_BYTES_FOR_LEN bytes contain the integer length of the # encrypted data key. # Add NUM_BYTES_FOR_LEN to get index of end of encrypted data key/start # of encrypted data. data_key_encrypted_len = int.from_bytes(file_contents[:NUM_BYTES_FOR_LEN], byteorder='big') \ + NUM_BYTES_FOR_LEN data_key_encrypted = file_contents[NUM_BYTES_FOR_LEN:data_key_encrypted_len] # Decrypt the data key before using it data_key_plaintext = decrypt_data_key(data_key_encrypted) if data_key_plaintext is None: return False # Decrypt the rest of the file f = Fernet(data_key_plaintext) file_contents_decrypted = f.decrypt(file_contents[data_key_encrypted_len:]) # Write the decrypted file contents try: with open(filename + '.decrypted', 'wb') as file_decrypted: file_decrypted.write(file_contents_decrypted) except IOError as e: logging.error(e) return False # The same security issue described at the end of encrypt_file() exists # here, too, i.e., the wish to wipe the data_key_plaintext value from # memory. return True boto3-1.9.253/docs/source/guide/kms-examples.rst000066400000000000000000000026121355237733400214230ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-kms-examples: ############################################# AWS Key Management Service (AWS KMS) Examples ############################################# .. meta:: :description: Python examples that use the AWS Key Management Service (AWS KMS) :keywords: KMS Encrypting valuable data is a common security practice. The encryption process typically uses one or more keys, sometimes referred to as data keys and master keys. A data key is used to encrypt the data. A master key manages one or more data keys. To prevent the data from being decrypted by unauthorized users, both keys must be protected, often by being encrypted themselves. The AWS Key Management Service (AWS KMS) can assist in this key management. **Examples** .. toctree:: :maxdepth: 1 kms-example-encrypt-decrypt-file boto3-1.9.253/docs/source/guide/migration.rst000066400000000000000000000075401355237733400210130ustar00rootroot00000000000000.. _guide_migration: Migrating from Boto 2.x ======================= Current Boto users can begin using Boto 3 right away. The two modules can live side-by-side in the same project, which means that a piecemeal approach can be used. New features can be written in Boto 3, or existing code can be migrated over as needed, piece by piece. High Level Concepts ------------------- Boto 2.x modules are typically split into two categories, those which include a high-level object-oriented interface and those which include only a low-level interface which matches the underlying Amazon Web Services API. Some modules are completely high-level (like Amazon S3 or EC2), some include high-level code on top of a low-level connection (like Amazon DynamoDB), and others are 100% low-level (like Amazon Elastic Transcoder). In Boto 3 this general low-level and high-level concept hasn't changed much, but there are two important points to understand. Data Driven ~~~~~~~~~~~ First, in Boto 3 classes are created at runtime from JSON data files that describe AWS APIs and organizational structures built atop of them. These data files are loaded at runtime and can be modified and updated without the need of installing an entirely new SDK release. A side effect of having all the services generated from JSON files is that there is now consistency between all AWS service modules. One important change is that *all* API call parameters must now be passed as **keyword arguments**, and these keyword arguments take the form defined by the upstream service. Though there are exceptions, this typically means ``UpperCamelCasing`` parameter names. You will see this in the service-specific migration guides linked to below. Resource Objects ~~~~~~~~~~~~~~~~ Second, while every service now uses the runtime-generated low-level client, some services additionally have high-level generated objects that we refer to as ``Resources``. The lower-level is comparable to Boto 2.x layer 1 connection objects in that they provide a one to one mapping of API operations and return low-level responses. The higher level is comparable to the high-level customizations from Boto 2.x: an S3 ``Key``, an EC2 ``Instance``, and a DynamoDB ``Table`` are all considered resources in Boto 3. Just like a Boto 2.x ``S3Connection``'s ``list_buckets`` will return ``Bucket`` objects, the Boto 3 resource interface provides actions and collections that return resources. Some services may also have hand-written customizations built on top of the runtime-generated high-level resources (such as utilities for working with S3 multipart uploads). :: import boto, boto3 # Low-level connections conn = boto.connect_elastictranscoder() client = boto3.client('elastictranscoder') # High-level connections & resource objects from boto.s3.bucket import Bucket s3_conn = boto.connect_s3() boto2_bucket = Bucket('mybucket') s3 = boto3.resource('s3') boto3_bucket = s3.Bucket('mybucket') Installation & Configuration ---------------------------- The :ref:`guide_quickstart` guide provides instructions for installing Boto 3. You can also follow the instructions there to set up new credential files, or you can continue to use your existing Boto 2.x credentials. Please note that Boto 3, the AWS CLI, and several other SDKs all use the shared credentials file (usually at ``~/.aws/credentials``). Once configured, you may begin using Boto 3:: import boto3 for bucket in boto3.resource('s3').buckets.all(): print(bucket.name) See the :ref:`Code Examples ` and `Boto 3 Documentation `__ for more information. The rest of this document will describe specific common usage scenarios of Boto 2 code and how to accomplish the same tasks with Boto 3. Services -------- .. toctree:: :maxdepth: 2 migrations3 migrationec2 boto3-1.9.253/docs/source/guide/migrationec2.rst000066400000000000000000000115741355237733400214070ustar00rootroot00000000000000.. _guide_migration_ec2: Amazon EC2 ========== Boto 2.x contains a number of customizations to make working with Amazon EC2 instances, storage and networks easy. Boto 3 exposes these same objects through its resources interface in a unified and consistent way. Creating the Connection ----------------------- Boto 3 has both low-level clients and higher-level resources. For Amazon EC2, the higher-level resources are the most similar to Boto 2.x's ``ec2`` and ``vpc`` modules:: # Boto 2.x import boto ec2_connection = boto.connect_ec2() vpc_connection = boto.connect_vpc() # Boto 3 import boto3 ec2 = boto3.resource('ec2') Launching New Instances ----------------------- Launching new instances requires an image ID and the number of instances to launch. It can also take several optional parameters, such as the instance type and security group:: # Boto 2.x ec2_connection.run_instances('') # Boto 3 ec2.create_instances(ImageId='', MinCount=1, MaxCount=5) Stopping & Terminating Instances -------------------------------- Stopping and terminating multiple instances given a list of instance IDs uses Boto 3 collection filtering:: ids = ['instance-id-1', 'instance-id-2', ...] # Boto 2.x ec2_connection.stop_instances(instance_ids=ids) ec2_connection.terminate_instances(instance_ids=ids) # Boto 3 ec2.instances.filter(InstanceIds=ids).stop() ec2.instances.filter(InstanceIds=ids).terminate() Checking What Instances Are Running ----------------------------------- Boto 3 collections come in handy when listing all your running instances as well. Every collection exposes a ``filter`` method that allows you to pass additional parameters to the underlying service API operation. The EC2 instances collection takes a parameter called ``Filters`` which is a list of names and values, for example:: # Boto 2.x reservations = ec2_connection.get_all_reservations( filters={'instance-state-name': 'running'}) for reservation in reservations: for instance in reservation.instances: print(instance.instance_id, instance.instance_type) # Boto 3 # Use the filter() method of the instances collection to retrieve # all running EC2 instances. instances = ec2.instances.filter( Filters=[{'Name': 'instance-state-name', 'Values': ['running']}]) for instance in instances: print(instance.id, instance.instance_type) Checking Health Status Of Instances ----------------------------------- It is possible to get scheduled maintenance information for your running instances. At the time of this writing Boto 3 does not have a status resource, so you must drop down to the low-level client via ``ec2.meta.client``:: # Boto 2.x for status in ec2_connection.get_all_instance_statuses(): print(status) # Boto 3 for status in ec2.meta.client.describe_instance_status()['InstanceStatuses']: print(status) Working with EBS Snapshots -------------------------- Snapshots provide a way to create a copy of an EBS volume, as well as make new volumes from the snapshot which can be attached to an instance:: # Boto 2.x snapshot = ec2_connection.create_snapshot('volume-id', 'Description') volume = snapshot.create_volume('us-west-2') ec2_connection.attach_volume(volume.id, 'instance-id', '/dev/sdy') ec2_connection.delete_snapshot(snapshot.id) # Boto 3 snapshot = ec2.create_snapshot(VolumeId='volume-id', Description='description') volume = ec2.create_volume(SnapshotId=snapshot.id, AvailabilityZone='us-west-2a') ec2.Instance('instance-id').attach_volume(VolumeId=volume.id, Device='/dev/sdy') snapshot.delete() Creating a VPC, Subnet, and Gateway ----------------------------------- Creating VPC resources in Boto 3 is very similar to Boto 2.x:: # Boto 2.x vpc = vpc_connection.create_vpc('10.0.0.0/24') subnet = vpc_connection.create_subnet(vpc.id, '10.0.0.0/25') gateway = vpc_connection.create_internet_gateway() # Boto 3 vpc = ec2.create_vpc(CidrBlock='10.0.0.0/24') subnet = vpc.create_subnet(CidrBlock='10.0.0.0/25') gateway = ec2.create_internet_gateway() Attaching and Detaching an Elastic IP and Gateway ------------------------------------------------- Elastic IPs and gateways provide a way for instances inside of a VPC to communicate with the outside world:: # Boto 2.x ec2_connection.attach_internet_gateway(gateway.id, vpc.id) ec2_connection.detach_internet_gateway(gateway.id, vpc.id) from boto.ec2.address import Address address = Address() address.allocation_id = 'eipalloc-35cf685d' address.associate('i-71b2f60b') address.disassociate() # Boto 3 gateway.attach_to_vpc(VpcId=vpc.id) gateway.detach_from_vpc(VpcId=vpc.id) address = ec2.VpcAddress('eipalloc-35cf685d') address.associate('i-71b2f60b') address.association.delete() boto3-1.9.253/docs/source/guide/migrations3.rst000066400000000000000000000107401355237733400212550ustar00rootroot00000000000000.. _guide_migration_s3: Amazon S3 ========= Boto 2.x contains a number of customizations to make working with Amazon S3 buckets and keys easy. Boto 3 exposes these same objects through its resources interface in a unified and consistent way. Creating the Connection ----------------------- Boto 3 has both low-level clients and higher-level resources. For Amazon S3, the higher-level resources are the most similar to Boto 2.x's ``s3`` module:: # Boto 2.x import boto s3_connection = boto.connect_s3() # Boto 3 import boto3 s3 = boto3.resource('s3') Creating a Bucket ----------------- Creating a bucket in Boto 2 and Boto 3 is very similar, except that in Boto 3 all action parameters must be passed via keyword arguments and a bucket configuration must be specified manually:: # Boto 2.x s3_connection.create_bucket('mybucket') s3_connection.create_bucket('mybucket', location=Location.USWest) # Boto 3 s3.create_bucket(Bucket='mybucket') s3.create_bucket(Bucket='mybucket', CreateBucketConfiguration={ 'LocationConstraint': 'us-west-1'}) Storing Data ------------ Storing data from a file, stream, or string is easy:: # Boto 2.x from boto.s3.key import Key key = Key('hello.txt') key.set_contents_from_file('/tmp/hello.txt') # Boto 3 s3.Object('mybucket', 'hello.txt').put(Body=open('/tmp/hello.txt', 'rb')) Accessing a Bucket ------------------ Getting a bucket is easy with Boto 3's resources, however these do not automatically validate whether a bucket exists:: # Boto 2.x bucket = s3_connection.get_bucket('mybucket', validate=False) exists = s3_connection.lookup('mybucket') # Boto 3 import botocore bucket = s3.Bucket('mybucket') exists = True try: s3.meta.client.head_bucket(Bucket='mybucket') except botocore.exceptions.ClientError as e: # If a client error is thrown, then check that it was a 404 error. # If it was a 404 error, then the bucket does not exist. error_code = e.response['Error']['Code'] if error_code == '404': exists = False Deleting a Bucket ----------------- All of the keys in a bucket must be deleted before the bucket itself can be deleted:: # Boto 2.x for key in bucket: key.delete() bucket.delete() # Boto 3 for key in bucket.objects.all(): key.delete() bucket.delete() Iteration of Buckets and Keys ----------------------------- Bucket and key objects are no longer iterable, but now provide collection attributes which can be iterated:: # Boto 2.x for bucket in s3_connection: for key in bucket: print(key.name) # Boto 3 for bucket in s3.buckets.all(): for key in bucket.objects.all(): print(key.key) Access Controls --------------- Getting and setting canned access control values in Boto 3 operates on an ``ACL`` resource object:: # Boto 2.x bucket.set_acl('public-read') key.set_acl('public-read') # Boto 3 bucket.Acl().put(ACL='public-read') obj.Acl().put(ACL='public-read') It's also possible to retrieve the policy grant information:: # Boto 2.x acp = bucket.get_acl() for grant in acp.acl.grants: print(grant.display_name, grant.permission) # Boto 3 acl = bucket.Acl() for grant in acl.grants: print(grant['Grantee']['DisplayName'], grant['Permission']) Boto 3 lacks the grant shortcut methods present in Boto 2.x, but it is still fairly simple to add grantees:: # Boto 2.x bucket.add_email_grant('READ', 'user@domain.tld') # Boto 3 bucket.Acl.put(GrantRead='emailAddress=user@domain.tld') Key Metadata ------------ It's possible to set arbitrary metadata on keys:: # Boto 2.x key.set_metadata('meta1', 'This is my metadata value') print(key.get_metadata('meta1')) # Boto 3 key.put(Metadata={'meta1': 'This is my metadata value'}) print(key.metadata['meta1']) Managing CORS Configuration --------------------------- Allows you to manage the cross-origin resource sharing configuration for S3 buckets:: # Boto 2.x cors = bucket.get_cors() config = CORSConfiguration() config.add_rule('GET', '*') bucket.set_cors(config) bucket.delete_cors() # Boto 3 cors = bucket.Cors() config = { 'CORSRules': [ { 'AllowedMethods': ['GET'], 'AllowedOrigins': ['*'] } ] } cors.put(CORSConfiguration=config) cors.delete() boto3-1.9.253/docs/source/guide/new.rst000066400000000000000000000031521355237733400176060ustar00rootroot00000000000000.. _guide_new: What's New ========== Boto 3 is a ground-up rewrite of Boto. It uses a data-driven approach to generate classes at runtime from JSON description files that are shared between SDKs in various languages. This includes descriptions for a high level, object oriented interface similar to those available in previous versions of Boto. Because Boto 3 is generated from these shared JSON files, we get fast updates to the latest services and features and a consistent API across services. Community contributions to JSON description files in other SDKs also benefit Boto 3, just as contributions to Boto 3 benefit the other SDKs. Major Features -------------- Boto 3 consists of the following major features: * **Resources**: a high level, object oriented interface * **Collections**: a tool to iterate and manipulate groups of resources * **Clients**: low level service connections * **Paginators**: automatic paging of responses * **Waiters**: a way to block until a certain state has been reached Along with these major features, Boto 3 also provides *sessions* and per-session *credentials* & *configuration*, as well as basic components like *authentication*, *parameter* & *response* handling, an *event system* for customizations and logic to *retry* failed requests. Botocore ~~~~~~~~ Boto 3 is built atop of a library called `Botocore `_, which is shared by the `AWS CLI `_. Botocore provides the low level clients, session, and credential & configuration data. Boto 3 builds on top of Botocore by providing its own session, resources and collections. boto3-1.9.253/docs/source/guide/paginators.rst000066400000000000000000000103641355237733400211670ustar00rootroot00000000000000Paginators ========== Some AWS operations return results that are incomplete and require subsequent requests in order to attain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called *pagination*. For example, the ``list_objects`` operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate ``Marker`` in order to retrieve the next *page* of results. *Paginators* are a feature of boto3 that act as an abstraction over the process of iterating over an entire result set of a truncated API operation. Creating Paginators ------------------- Paginators are created via the ``get_paginator()`` method of a boto3 client. The ``get_paginator()`` method accepts an operation name and returns a reusable ``Paginator`` object. You then call the ``paginate`` method of the Paginator, passing in any relevant operation parameters to apply to the underlying API operation. The ``paginate`` method then returns an iterable ``PageIterator``:: import boto3 # Create a client client = boto3.client('s3', region_name='us-west-2') # Create a reusable Paginator paginator = client.get_paginator('list_objects') # Create a PageIterator from the Paginator page_iterator = paginator.paginate(Bucket='my-bucket') for page in page_iterator: print(page['Contents']) Customizing Page Iterators ~~~~~~~~~~~~~~~~~~~~~~~~~~ You must call the ``paginate`` method of a Paginator in order to iterate over the pages of API operation results. The ``paginate`` method accepts a ``PaginationConfig`` named argument that can be used to customize the pagination:: paginator = client.get_paginator('list_objects') page_iterator = paginator.paginate(Bucket='my-bucket', PaginationConfig={'MaxItems': 10}) ``MaxItems`` Limits the maximum number of total returned items returned while paginating. ``StartingToken`` Can be used to modify the starting marker or token of a paginator. This argument if useful for resuming pagination from a previous token or starting pagination at a known position. ``PageSize`` Controls the number of items returned per page of each result. .. note:: Services may choose to return more or fewer items than specified in the ``PageSize`` argument depending on the service, the operation, or the resource you are paginating. Filtering results ----------------- Many Paginators can be filtered server-side with options that are passed through to each underlying API call. For example, :py:meth:`S3.Paginator.list_objects.paginate` accepts a ``Prefix`` parameter used to filter the paginated results by prefix server-side before sending them to the client:: import boto3 client = boto3.client('s3', region_name='us-west-2') paginator = client.get_paginator('list_objects') operation_parameters = {'Bucket': 'my-bucket', 'Prefix': 'foo/baz'} page_iterator = paginator.paginate(**operation_parameters) for page in page_iterator: print(page['Contents']) Filtering Results with JMESPath ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `JMESPath `_ is a query language for JSON that can be used directly on paginated results. You can filter results client-side using JMESPath expressions that are applied to each page of results through the ``search`` method of a ``PageIterator``. .. code-block:: python paginator = client.get_paginator('list_objects') page_iterator = paginator.paginate(Bucket='my-bucket') filtered_iterator = page_iterator.search("Contents[?Size > `100`][]") for key_data in filtered_iterator: print(key_data) When filtering with JMESPath expressions, each page of results that is yielded by the paginator is mapped through the JMESPath expression. If a JMESPath expression returns a single value that is not an array, that value is yielded directly. If the result of applying the JMESPath expression to a page of results is a list, then each value of the list is yielded individually (essentially implementing a flat map). For example, in the above expression, each key that has a ``Size`` greater than `100` is yielded by the ``filtered_iterator``. boto3-1.9.253/docs/source/guide/quickstart.rst000066400000000000000000000046261355237733400212160ustar00rootroot00000000000000.. _guide_quickstart: Quickstart ========== Getting started with Boto 3 is easy, but requires a few steps. Installation ------------ Install the latest Boto 3 release via :command:`pip`:: pip install boto3 You may also install a specific version:: pip install boto3==1.0.0 .. note:: The latest development version can always be found on `GitHub `_. Configuration ------------- Before you can begin using Boto 3, you should set up authentication credentials. Credentials for your AWS account can be found in the `IAM Console `_. You can create or use an existing user. Go to manage access keys and generate a new set of keys. If you have the `AWS CLI `_ installed, then you can use it to configure your credentials file:: aws configure Alternatively, you can create the credential file yourself. By default, its location is at ``~/.aws/credentials``:: [default] aws_access_key_id = YOUR_ACCESS_KEY aws_secret_access_key = YOUR_SECRET_KEY You may also want to set a default region. This can be done in the configuration file. By default, its location is at ``~/.aws/config``:: [default] region=us-east-1 Alternatively, you can pass a ``region_name`` when creating clients and resources. This sets up credentials for the default profile as well as a default region to use when creating connections. See :ref:`guide_configuration` for in-depth configuration sources and options. Using Boto 3 ------------ To use Boto 3, you must first import it and tell it what service you are going to use:: import boto3 # Let's use Amazon S3 s3 = boto3.resource('s3') Now that you have an ``s3`` resource, you can make requests and process responses from the service. The following uses the ``buckets`` collection to print out all bucket names:: # Print out bucket names for bucket in s3.buckets.all(): print(bucket.name) It's also easy to upload and download binary data. For example, the following uploads a new file to S3. It assumes that the bucket ``my-bucket`` already exists:: # Upload a new file data = open('test.jpg', 'rb') s3.Bucket('my-bucket').put_object(Key='test.jpg', Body=data) :ref:`guide_resources` and :ref:`guide_collections` will be covered in more detail in the following sections, so don't worry if you do not completely understand the examples. boto3-1.9.253/docs/source/guide/resources.rst000066400000000000000000000162421355237733400210330ustar00rootroot00000000000000.. _guide_resources: Resources ========= Overview -------- Resources represent an object-oriented interface to Amazon Web Services (AWS). They provide a higher-level abstraction than the raw, low-level calls made by service clients. To use resources, you invoke the :py:meth:`~boto3.session.Session.resource` method of a :py:class:`~boto3.session.Session` and pass in a service name:: # Get resources from the default session sqs = boto3.resource('sqs') s3 = boto3.resource('s3') Every resource instance has a number of attributes and methods. These can conceptually be split up into identifiers, attributes, actions, references, sub-resources, and collections. Each of these is described in further detail below and in the following section. Resources themselves can also be conceptually split into service resources (like ``sqs``, ``s3``, ``ec2``, etc) and individual resources (like ``sqs.Queue`` or ``s3.Bucket``). Service resources *do not* have identifiers or attributes. The two share the same components otherwise. .. _identifiers_attributes_intro: Identifiers & Attributes ------------------------ An identifier is a unique value that is used to call actions on the resource. Resources **must** have at least one identifier, except for the top-level service resources (e.g. ``sqs`` or ``s3``). An identifier is set at instance creation-time, and failing to provide all necessary identifiers during instantiation will result in an exception. Examples of identifiers:: # SQS Queue (url is an identifier) queue = sqs.Queue(url='http://...') print(queue.url) # S3 Object (bucket_name and key are identifiers) obj = s3.Object(bucket_name='boto3', key='test.py') print(obj.bucket_name) print(obj.key) # Raises exception, missing identifier: key! obj = s3.Object(bucket_name='boto3') Identifiers may also be passed as positional arguments:: # SQS Queue queue = sqs.Queue('http://...') # S3 Object obj = s3.Object('boto3', 'test.py') # Raises exception, missing key! obj = s3.Object('boto3') Identifiers also play a role in resource instance equality. For two instances of a resource to be considered equal, their identifiers must be equal:: >>> bucket1 = s3.Bucket('boto3') >>> bucket2 = s3.Bucket('boto3') >>> bucket3 = s3.Bucket('some-other-bucket') >>> bucket1 == bucket2 True >>> bucket1 == bucket3 False .. note:: Only identifiers are taken into account for instance equality. Region, account ID and other data members are not considered. When using temporary credentials or multiple regions in your code please keep this in mind. Resources may also have attributes, which are *lazy-loaded* properties on the instance. They may be set at creation time from the response of an action on another resource, or they may be set when accessed or via an explicit call to the ``load`` or ``reload`` action. Examples of attributes:: # SQS Message message.body # S3 Object obj.last_modified obj.e_tag .. warning:: Attributes may incur a load action when first accessed. If latency is a concern, then manually calling ``load`` will allow you to control exactly when the load action (and thus latency) is invoked. The documentation for each resource explicitly lists its attributes. Additionally, attributes may be reloaded after an action has been performed on the resource. For example, if the ``last_modified`` attribute of an S3 object is loaded and then a ``put`` action is called, then the next time you access ``last_modified`` it will reload the object's metadata. .. _actions_intro: Actions ------- An action is a method which makes a call to the service. Actions may return a low-level response, a new resource instance or a list of new resource instances. Actions automatically set the resource identifiers as parameters, but allow you to pass additional parameters via keyword arguments. Examples of actions:: # SQS Queue messages = queue.receive_messages() # SQS Message for message in messages: message.delete() # S3 Object obj = s3.Object(bucket_name='boto3', key='test.py') response = obj.get() data = response['Body'].read() Examples of sending additional parameters:: # SQS Service queue = sqs.get_queue_by_name(QueueName='test') # SQS Queue queue.send_message(MessageBody='hello') .. note:: Parameters **must** be passed as keyword arguments. They will not work as positional arguments. .. _references_intro: References ---------- A reference is an attribute which may be ``None`` or a related resource instance. The resource instance does not share identifiers with its reference resource, that is, it is not a strict parent to child relationship. In relational terms, these can be considered many-to-one or one-to-one. Examples of references:: # EC2 Instance instance.subnet instance.vpc In the above example, an EC2 instance may have exactly one associated subnet, and may have exactly one associated VPC. The subnet does not require the instance ID to exist, hence it is not a parent to child relationship. .. _subresources_intro: Sub-resources ------------- A sub-resource is similar to a reference, but is a related class rather than an instance. Sub-resources, when instantiated, share identifiers with their parent. It is a strict parent-child relationship. In relational terms, these can be considered one-to-many. Examples of sub-resources:: # SQS queue = sqs.Queue(url='...') message = queue.Message(receipt_handle='...') print(queue.url == message.queue_url) print(message.receipt_handle) # S3 obj = bucket.Object(key='new_file.txt') print(obj.bucket_name) print(obj.key) Because an SQS message cannot exist without a queue, and an S3 object cannot exist without a bucket, these are parent to child relationships. .. _waiters_intro: Waiters ------- A waiter is similiar to an action. A waiter will poll the status of a resource and suspend execution until the resource reaches the state that is being polled for or a failure occurs while polling. Waiters automatically set the resource identifiers as parameters, but allow you to pass additional parameters via keyword arguments. Examples of waiters include:: # S3: Wait for a bucket to exist. bucket.wait_until_exists() # EC2: Wait for an instance to reach the running state. instance.wait_until_running() Multithreading / Multiprocessing -------------------------------- It is recommended to create a resource instance for each thread / process in a multithreaded or multiprocess application rather than sharing a single instance among the threads / processes. For example:: import boto3 import boto3.session import threading class MyTask(threading.Thread): def run(self): session = boto3.session.Session() s3 = session.resource('s3') # ... do some work with S3 ... In the example above, each thread would have its own Boto 3 session and its own instance of the S3 resource. This is a good idea because resources contain shared data when loaded and calling actions, accessing properties, or manually loading or reloading the resource can modify this data. boto3-1.9.253/docs/source/guide/s3-example-access-permissions.rst000066400000000000000000000021141355237733400246000ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ################## Access Permissions ################## This section demonstrates how to manage the access permissions for an S3 bucket or object by using an access control list (ACL). Get a Bucket Access Control List ================================ The example retrieves the current access control list of an S3 bucket. .. code-block:: python import boto3 # Retrieve a bucket's ACL s3 = boto3.client('s3') result = s3.get_bucket_acl(Bucket='my-bucket') print(result) boto3-1.9.253/docs/source/guide/s3-example-bucket-policies.rst000066400000000000000000000046761355237733400240670ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############### Bucket Policies ############### An S3 bucket can have an optional policy that grants access permissions to other AWS accounts or AWS Identity and Access Management (IAM) users. Bucket policies are defined using the same JSON format as a resource-based IAM policy. Retrieve a Bucket Policy ======================== Retrieve a bucket's policy by calling the AWS SDK for Python ``get_bucket_policy`` method. The method accepts a parameter that specifies the bucket name. .. code-block:: python import boto3 # Retrieve the policy of the specified bucket s3 = boto3.client('s3') result = s3.get_bucket_policy(Bucket='BUCKET_NAME') print(result['Policy']) Set a Bucket Policy =================== A bucket's policy can be set by calling the ``put_bucket_policy`` method. The policy is defined in the same JSON format as an IAM policy. The policy defined in the example below enables any user to retrieve any object stored in the bucket identified by the ``bucket_name`` variable. .. code-block:: python import json # Create a bucket policy bucket_name = 'BUCKET_NAME' bucket_policy = { 'Version': '2012-10-17', 'Statement': [{ 'Sid': 'AddPerm', 'Effect': 'Allow', 'Principal': '*', 'Action': ['s3:GetObject'], 'Resource': f'arn:aws:s3:::{bucket_name}/*' }] } # Convert the policy from JSON dict to string bucket_policy = json.dumps(bucket_policy) # Set the new policy s3 = boto3.client('s3') s3.put_bucket_policy(Bucket=bucket_name, Policy=bucket_policy) Delete a Bucket Policy ====================== A bucket's policy can be deleted by calling the ``delete_bucket_policy`` method. .. code-block:: python # Delete a bucket's policy s3 = boto3.client('s3') s3.delete_bucket_policy(Bucket='BUCKET_NAME') boto3-1.9.253/docs/source/guide/s3-example-configuring-buckets.rst000066400000000000000000000052141355237733400247420ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ######################### Bucket CORS Configuration ######################### Cross Origin Resource Sharing (CORS) enables client web applications in one domain to access resources in another domain. An S3 bucket can be configured to enable cross-origin requests. The configuration defines rules that specify the allowed origins, HTTP methods (GET, PUT, etc.), and other elements. Retrieve a Bucket CORS Configuration ==================================== Retrieve a bucket's CORS configuration by calling the AWS SDK for Python ``get_bucket_cors`` method. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def get_bucket_cors(bucket_name): """Retrieve the CORS configuration rules of an Amazon S3 bucket :param bucket_name: string :return: List of the bucket's CORS configuration rules. If no CORS configuration exists, return empty list. If error, return None. """ # Retrieve the CORS configuration s3 = boto3.client('s3') try: response = s3.get_bucket_cors(Bucket=bucket_name) except ClientError as e: if e.response['Error']['Code'] == 'NoSuchCORSConfiguration': return [] else: # AllAccessDisabled error == bucket not found logging.error(e) return None return response['CORSRules'] Set a Bucket CORS Configuration =============================== A bucket's CORS configuration can be set by calling the ``put_bucket_cors`` method. .. code-block:: python # Define the configuration rules cors_configuration = { 'CORSRules': [{ 'AllowedHeaders': ['Authorization'], 'AllowedMethods': ['GET', 'PUT'], 'AllowedOrigins': ['*'], 'ExposeHeaders': ['GET', 'PUT'], 'MaxAgeSeconds': 3000 }] } # Set the CORS configuration s3 = boto3.client('s3') s3.put_bucket_cors(Bucket='BUCKET_NAME', CORSConfiguration=cors_configuration) boto3-1.9.253/docs/source/guide/s3-example-creating-buckets.rst000066400000000000000000000047521355237733400242320ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ################# Amazon S3 Buckets ################# An Amazon S3 bucket is a storage location to hold files. S3 files are referred to as objects. This section describes how to use the AWS SDK for Python to perform common operations on S3 buckets. Create an Amazon S3 Bucket ========================== The name of an Amazon S3 bucket must be unique across all regions of the AWS platform. The bucket can be located in a specific region to minimize latency or to address regulatory requirements. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def create_bucket(bucket_name, region=None): """Create an S3 bucket in a specified region If a region is not specified, the bucket is created in the S3 default region (us-east-1). :param bucket_name: Bucket to create :param region: String region to create bucket in, e.g., 'us-west-2' :return: True if bucket created, else False """ # Create bucket try: if region is None: s3_client = boto3.client('s3') s3_client.create_bucket(Bucket=bucket_name) else: s3_client = boto3.client('s3', region_name=region) location = {'LocationConstraint': region} s3_client.create_bucket(Bucket=bucket_name, CreateBucketConfiguration=location) except ClientError as e: logging.error(e) return False return True List Existing Buckets ===================== List all the existing buckets for the AWS account. .. code-block:: python # Retrieve the list of existing buckets s3 = boto3.client('s3') response = s3.list_buckets() # Output the bucket names print('Existing buckets:') for bucket in response['Buckets']: print(f' {bucket["Name"]}') boto3-1.9.253/docs/source/guide/s3-example-download-file.rst000066400000000000000000000037661355237733400235300ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ################# Downloading Files ################# The methods provided by the AWS SDK for Python to download files are similar to those provided to upload files. The ``download_file`` method accepts the names of the bucket and object to download and the filename to save the file to. .. code-block:: python import boto3 s3 = boto3.client('s3') s3.download_file('BUCKET_NAME', 'OBJECT_NAME', 'FILE_NAME') The ``download_fileobj`` method accepts a writeable file-like object. The file object must be opened in binary mode, not text mode. .. code-block:: python s3 = boto3.client('s3') with open('FILE_NAME', 'wb') as f: s3.download_fileobj('BUCKET_NAME', 'OBJECT_NAME', f) Like their upload cousins, the download methods are provided by the S3 ``Client``, ``Bucket``, and ``Object`` classes, and each class provides identical functionality. Use whichever class is convenient. Also like the upload methods, the download methods support the optional ``ExtraArgs`` and ``Callback`` parameters. The list of valid ``ExtraArgs`` settings for the download methods is specified in the ``ALLOWED_DOWNLOAD_ARGS`` attribute of the ``S3Transfer`` object at :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. The download method's ``Callback`` parameter is used for the same purpose as the upload method's. The upload and download methods can both invoke the same ``Callback`` class. boto3-1.9.253/docs/source/guide/s3-example-static-web-host.rst000066400000000000000000000037001355237733400240050ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############################################## Using an Amazon S3 Bucket as a Static Web Host ############################################## An S3 bucket can be configured to host a static website. Retrieve a Website Configuration ================================ Retrieve a bucket's website configuration by calling the AWS SDK for Python ``get_bucket_website`` method. .. code-block:: python import boto3 # Retrieve the website configuration s3 = boto3.client('s3') result = s3.get_bucket_website(Bucket='BUCKET_NAME') Set a Website Configuration =========================== A bucket's website configuration can be set by calling the ``put_bucket_website`` method. .. code-block:: python # Define the website configuration website_configuration = { 'ErrorDocument': {'Key': 'error.html'}, 'IndexDocument': {'Suffix': 'index.html'}, } # Set the website configuration s3 = boto3.client('s3') s3.put_bucket_website(Bucket='BUCKET_NAME', WebsiteConfiguration=website_configuration) Delete a Website Configuration ============================== A bucket's website configuration can be deleted by calling the ``delete_bucket_website`` method. .. code-block:: python # Delete the website configuration s3 = boto3.client('s3') s3.delete_bucket_website(Bucket='BUCKET_NAME') boto3-1.9.253/docs/source/guide/s3-examples.rst000066400000000000000000000023431355237733400211570ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-s3-examples: ################## Amazon S3 Examples ################## .. meta:: :description: :keywords: s3 python Amazon Simple Storage Service (Amazon S3) is an object storage service that offers scalability, data availability, security, and performance. This section demonstrates how to use the AWS SDK for Python to access Amazon S3 services. **Examples** .. toctree:: :maxdepth: 1 s3-example-creating-buckets s3-uploading-files s3-example-download-file s3 s3-presigned-urls s3-example-bucket-policies s3-example-access-permissions s3-example-static-web-host s3-example-configuring-buckets boto3-1.9.253/docs/source/guide/s3-presigned-urls.rst000066400000000000000000000206641355237733400223120ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############## Presigned URLs ############## A user who does not have AWS credentials or permission to access an S3 object can be granted temporary access by using a presigned URL. A presigned URL is generated by an AWS user who has access to the object. The generated URL is then given to the unauthorized user. The presigned URL can be entered in a browser or used by a program or HTML webpage. The credentials used by the presigned URL are those of the AWS user who generated the URL. A presigned URL remains valid for a limited period of time which is specified when the URL is generated. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def create_presigned_url(bucket_name, object_name, expiration=3600): """Generate a presigned URL to share an S3 object :param bucket_name: string :param object_name: string :param expiration: Time in seconds for the presigned URL to remain valid :return: Presigned URL as string. If error, returns None. """ # Generate a presigned URL for the S3 object s3_client = boto3.client('s3') try: response = s3_client.generate_presigned_url('get_object', Params={'Bucket': bucket_name, 'Key': object_name}, ExpiresIn=expiration) except ClientError as e: logging.error(e) return None # The response contains the presigned URL return response The user can download the S3 object by entering the presigned URL in a browser. A program or HTML page can download the S3 object by using the presigned URL as part of an HTTP GET request. The following code demonstrates using the Python ``requests`` package to perform a GET request. .. code-block:: python import requests # To install: pip install requests url = create_presigned_url('BUCKET_NAME', 'OBJECT_NAME') if url is not None: response = requests.get(url) Using Presigned URLs to Perform Other S3 Operations =================================================== The main purpose of presigned URLs is to grant a user temporary access to an S3 object. However, presigned URLs can be used to grant permission to perform additional operations on S3 buckets and objects. The ``create_presigned_url_expanded`` method shown below generates a presigned URL to perform a specified S3 operation. The method accepts the name of the S3 ``Client`` method to perform, such as 'list_buckets' or 'get_bucket_location.' The parameters to pass to the method are specified in the ``method_parameters`` dictionary argument. The HTTP method to use (GET, PUT, etc.) can be specified, but the AWS SDK for Python will automatically select the appropriate method so this argument is not normally required. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def create_presigned_url_expanded(client_method_name, method_parameters=None, expiration=3600, http_method=None): """Generate a presigned URL to invoke an S3.Client method Not all the client methods provided in the AWS Python SDK are supported. :param client_method_name: Name of the S3.Client method, e.g., 'list_buckets' :param method_parameters: Dictionary of parameters to send to the method :param expiration: Time in seconds for the presigned URL to remain valid :param http_method: HTTP method to use (GET, etc.) :return: Presigned URL as string. If error, returns None. """ # Generate a presigned URL for the S3 client method s3_client = boto3.client('s3') try: response = s3_client.generate_presigned_url(ClientMethod=client_method_name, Params=method_parameters, ExpiresIn=expiration, HttpMethod=http_method) except ClientError as e: logging.error(e) return None # The response contains the presigned URL return response Generating a Presigned URL to Upload a File =========================================== A user who does not have AWS credentials to upload a file can use a presigned URL to perform the upload. The upload operation makes an HTTP POST request and requires additional parameters to be sent as part of the request. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def create_presigned_post(bucket_name, object_name, fields=None, conditions=None, expiration=3600): """Generate a presigned URL S3 POST request to upload a file :param bucket_name: string :param object_name: string :param fields: Dictionary of prefilled form fields :param conditions: List of conditions to include in the policy :param expiration: Time in seconds for the presigned URL to remain valid :return: Dictionary with the following keys: url: URL to post to fields: Dictionary of form fields and values to submit with the POST :return: None if error. """ # Generate a presigned S3 POST URL s3_client = boto3.client('s3') try: response = s3_client.generate_presigned_post(bucket_name, object_name, Fields=fields, Conditions=conditions, ExpiresIn=expiration) except ClientError as e: logging.error(e) return None # The response contains the presigned URL and required fields return response The generated presigned URL includes both a URL and additional fields that must be passed as part of the subsequent HTTP POST request. The following code demonstrates how to use the ``requests`` package with a presigned POST URL to perform a POST request to upload a file to S3. .. code-block:: python import requests # To install: pip install requests # Generate a presigned S3 POST URL object_name = 'OBJECT_NAME' response = create_presigned_post('BUCKET_NAME', object_name) if response is None: exit(1) # Demonstrate how another Python program can use the presigned URL to upload a file with open(object_name, 'rb') as f: files = {'file': (object_name, f)} http_response = requests.post(response['url'], data=response['fields'], files=files) # If successful, returns HTTP status code 204 logging.info(f'File upload HTTP status code: {http_response.status_code}') The presigned POST URL and fields values can also be used in an HTML page. .. code-block:: html
File:
boto3-1.9.253/docs/source/guide/s3-uploading-files.rst000066400000000000000000000122631355237733400224250ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ############### Uploading Files ############### The AWS SDK for Python provides a pair of methods to upload a file to an S3 bucket. The ``upload_file`` method accepts a file name, a bucket name, and an object name. The method handles large files by splitting them into smaller chunks and uploading each chunk in parallel. .. code-block:: python import logging import boto3 from botocore.exceptions import ClientError def upload_file(file_name, bucket, object_name=None): """Upload a file to an S3 bucket :param file_name: File to upload :param bucket: Bucket to upload to :param object_name: S3 object name. If not specified then file_name is used :return: True if file was uploaded, else False """ # If S3 object_name was not specified, use file_name if object_name is None: object_name = file_name # Upload the file s3_client = boto3.client('s3') try: response = s3_client.upload_file(file_name, bucket, object_name) except ClientError as e: logging.error(e) return False return True The ``upload_fileobj`` method accepts a readable file-like object. The file object must be opened in binary mode, not text mode. .. code-block:: python s3 = boto3.client('s3') with open("FILE_NAME", "rb") as f: s3.upload_fileobj(f, "BUCKET_NAME", "OBJECT_NAME") The ``upload_file`` and ``upload_fileobj`` methods are provided by the S3 ``Client``, ``Bucket``, and ``Object`` classes. The method functionality provided by each class is identical. No benefits are gained by calling one class's method over another's. Use whichever class is most convenient. The ExtraArgs Parameter =========================== Both ``upload_file`` and ``upload_fileobj`` accept an optional ``ExtraArgs`` parameter that can be used for various purposes. The list of valid ``ExtraArgs`` settings is specified in the ``ALLOWED_UPLOAD_ARGS`` attribute of the ``S3Transfer`` object at :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. The following ``ExtraArgs`` setting specifies metadata to attach to the S3 object. .. code-block:: python s3.upload_file( 'FILE_NAME', 'BUCKET_NAME', 'OBJECT_NAME', ExtraArgs={'Metadata': {'mykey': 'myvalue'}} ) The following ``ExtraArgs`` setting assigns the canned ACL (access control list) value 'public-read' to the S3 object. .. code-block:: python s3.upload_file( 'FILE_NAME', 'BUCKET_NAME', 'OBJECT_NAME', ExtraArgs={'ACL': 'public-read'} ) The ``ExtraArgs`` parameter can also be used to set custom or multiple ACLs. .. code-block:: python s3.upload_file( 'FILE_NAME', 'BUCKET_NAME', 'OBJECT_NAME', ExtraArgs={ 'GrantRead': 'uri="http://acs.amazonaws.com/groups/global/AllUsers"', 'GrantFullControl': 'id="01234567890abcdefg"', } ) The Callback Parameter ========================== Both ``upload_file`` and ``upload_fileobj`` accept an optional ``Callback`` parameter. The parameter references a class that the Python SDK invokes intermittently during the transfer operation. Invoking a Python class executes the class's ``__call__`` method. For each invocation, the class is passed the number of bytes transferred up to that point. This information can be used to implement a progress monitor. The following ``Callback`` setting instructs the Python SDK to create an instance of the ``ProgressPercentage`` class. During the upload, the instance's ``__call__`` method will be invoked intermittently. .. code-block:: python s3.upload_file( 'FILE_NAME', 'BUCKET_NAME', 'OBJECT_NAME', Callback=ProgressPercentage('FILE_NAME') ) An example implementation of the ``ProcessPercentage`` class is shown below. .. code-block:: python import os import sys import threading class ProgressPercentage(object): def __init__(self, filename): self._filename = filename self._size = float(os.path.getsize(filename)) self._seen_so_far = 0 self._lock = threading.Lock() def __call__(self, bytes_amount): # To simplify, assume this is hooked up to a single filename with self._lock: self._seen_so_far += bytes_amount percentage = (self._seen_so_far / self._size) * 100 sys.stdout.write( "\r%s %s / %s (%.2f%%)" % ( self._filename, self._seen_so_far, self._size, percentage)) sys.stdout.flush() boto3-1.9.253/docs/source/guide/s3.rst000066400000000000000000000062411355237733400173440ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ########################### File Transfer Configuration ########################### When uploading, downloading, or copying a file or S3 object, the AWS SDK for Python automatically manages retries and multipart and non-multipart transfers. The management operations are performed by using reasonable default settings that are well-suited for most scenarios. To handle a special case, the default settings can be configured to meet requirements. Configuration settings are stored in a :py:class:`boto3.s3.transfer.TransferConfig` object. The object is passed to a transfer method (``upload_file``, ``download_file``, etc.) in the ``Config=`` parameter. The remaining sections demonstrate how to configure various transfer operations with the ``TransferConfig`` object. Multipart Transfers =================== Multipart transfers occur when the file size exceeds the value of the ``multipart_threshold`` attribute. The following example configures an ``upload_file`` transfer to be multipart if the file size is larger than the threshold specified in the ``TransferConfig`` object. .. code-block:: python import boto3 from boto3.s3.transfer import TransferConfig # Set the desired multipart threshold value (5GB) GB = 1024 ** 3 config = TransferConfig(multipart_threshold=5*GB) # Perform the transfer s3 = boto3.client('s3') s3.upload_file('FILE_NAME', 'BUCKET_NAME', 'OBJECT_NAME', Config=config) Concurrent Transfer Operations ============================== The maximum number of concurrent S3 API transfer operations can be tuned to adjust for the connection speed. Set the ``max_concurrency`` attribute to increase or decrease bandwidth usage. The attribute's default setting is 10. To reduce bandwidth usage, reduce the value; to increase usage, increase it. .. code-block:: python # To consume less downstream bandwidth, decrease the maximum concurrency config = TransferConfig(max_concurrency=5) # Download an S3 object s3 = boto3.client('s3') s3.download_file('BUCKET_NAME', 'OBJECT_NAME', 'FILE_NAME', Config=config) Threads ======= Transfer operations use threads to implement concurrency. Thread use can be disabled by setting the ``use_threads`` attribute to ``False.`` If thread use is disabled, transfer concurrency does not occur. Accordingly, the value of the ``max_concurrency`` attribute is ignored. .. code-block:: python # Disable thread use/transfer concurrency config = TransferConfig(use_threads=False) s3 = boto3.client('s3') s3.download_file('BUCKET_NAME', 'OBJECT_NAME', 'FILE_NAME', Config=config) boto3-1.9.253/docs/source/guide/sdk-metrics.rst000066400000000000000000000231271355237733400212460ustar00rootroot00000000000000.. _guide_sdk-metrics: SDK Metrics =========== AWS SDK Metrics for Enterprise Support (SDK Metrics) enables Enterprise customers to collect metrics from AWS SDKs on their hosts and clients shared with AWS Enterprise Support. SDK Metrics provides information that helps speed up detection and diagnosis of issues occurring in connections to AWS services for AWS Enterprise Support customers. As telemetry is collected on each host, it is relayed via UDP to 127.0.0.1 (aka localhost), where the CloudWatch agent aggregates the data and sends it to the SDK Metrics service. Therefore, to receive metrics, you must add the CloudWatch agent to your instance. The following steps to set up SDK Metrics pertain to an Amazon EC2 instance running Amazon Linux for a client application that is using the AWS SDK for Python. SDK Metrics is also available for your production environments if you enable it while configuring the AWS SDK for Python. To utilize SDK Metrics, run the latest version of the CloudWatch agent. Learn how to `Configure the CloudWatch Agent for SDK Metrics `__ in the Amazon CloudWatch User Guide. To set up SDK Metrics with the AWS SDK for Python, follow these instructions: #. Create an application with an AWS SDK for Python client to use an AWS service. #. Host your project on an Amazon EC2 instance or in your local environment. #. Install and use the latest version of Boto3 (AWS SDK for Python). #. Install and configure a CloudWatch agent on an EC2 instance or in your local environment as described in the `Amazon CloudWatch User Guide `__ . #. Authorize SDK Metrics to collect and send metrics as described in the `Amazon CloudWatch User Guide `__ .. #. :ref:`csm-enable-agent`. For more information, see the following: * :ref:`csm-update-agent` * :ref:`csm-disable-agent` .. _csm-enable-agent: Enable SDK Metrics ------------------ By default, SDK Metrics is turned off, and the port is set to 31000. The following are the default parameters. Enabling SDK Metrics is independent of configuring your credentials to use an AWS service. You can enable SDK Metrics by setting environment variables or by using the AWS Shared config file. Option 1: Set Environment Variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If :code:`AWS_CSM_ENABLED` is not set, the SDK checks the :code:`AWS_DEFAULT_PROFILE` profile to determine if SDK Metrics is enabled. By default this is set to ``false``. To turn on SDK Metrics, add the following to your environmental variables. .. code-block:: shell export AWS_CSM_ENABLED=true :ref:`Other configuration settings` are available. Note: Enabling SDK Metrics does not configure your credentials to use an AWS service. Option 2: AWS Shared Config File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If no CSM configuration is found in the environment variables, the SDK looks for your default AWS profile field. If :code:`AWS_DEFAULT_PROFILE` is set to something other than default, update that profile. To enable SDK Metrics, add :code:`csm_enabled` to the shared config file located at :file:`~/.aws/config`. .. code-block:: ini [default] csm_enabled = true [profile aws_csm] csm_enabled = true :ref:`Other configuration settings` are available. Note: Enabling SDK Metrics is independent from configuring your credentials to use an AWS service. You can use a different profile to authenticate. .. _csm-update-agent: Update a CloudWatch Agent ------------------------- To make changes to the port, you need to set the values and then restart any AWS jobs that are currently active. Option 1: Set Environment Variables ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most services use the default port. But if your service requires a unique port ID, add ``AWS_CSM_PORT=[port_number]``, to the host's environment variables. .. code-block:: shell export AWS_CSM_ENABLED=true export AWS_CSM_PORT=1234 Option 2: AWS Shared Config File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most services use the default port. But if your service requires a unique port ID, add ``csm_port = [port_number]`` to ``~/.aws/config``. .. code-block:: ini [default] csm_enabled = false csm_port = 1234 [profile aws_csm] csm_enabled = false csm_port = 1234 Restart SDK Metrics ~~~~~~~~~~~~~~~~~~~ To restart a job, run the following commands. .. code-block:: shell amazon-cloudwatch-agent-ctl –a stop; amazon-cloudwatch-agent-ctl –a start; .. _csm-disable-agent: Disable SDK Metrics -------------------- To turn off SDK Metrics, remove ``csm_enabled`` from your environment variables, or in your AWS Shared config file located at :file:`~/.aws/config`. Then restart your CloudWatch agent so that the changes can take effect. **Environment Variables** Remove ``AWS_CSM_ENABLED`` from your environment variables or set it to false. .. code-block:: shell unset AWS_CSM_ENABLED **AWS Shared Config File** Remove ``csm_enabled`` from the profiles in your AWS Shared config file located at :file:`~/.aws/config`. .. note:: Environment variables override the AWS Shared config file. If SDK Metrics is enabled in the environment variables, the SDK Metrics remain enabled. To explicitly opt-out of SDK Metrics set ``csm_enabled`` to false. .. code-block:: ini [default] csm_enabled = false [profile aws_csm] csm_enabled = false To disable SDK Metrics, use the following command to stop CloudWatch agent. .. code-block:: shell sudo amazon-cloudwatch-agent-ctl -a stop && echo "Done" If you are using other CloudWatch features, restart CloudWatch Agent with the following command. .. code-block:: shell amazon-cloudwatch-agent-ctl –a start; Restart SDK Metrics ~~~~~~~~~~~~~~~~~~~ To restart a SDK Metrics job, run the following commands. .. code-block:: shell amazon-cloudwatch-agent-ctl –a stop; amazon-cloudwatch-agent-ctl –a start; Definitions for SDK Metrics --------------------------- You can use the following descriptions of SDK Metrics to interpret your results. In general, these metrics are available for review with your Technical Account Manager during regular business reviews. AWS Support resources and your Technical Account Manager should have access to SDK Metrics data to help you resolve cases, but if you discover data that is confusing or unexpected, but doesn’t seem to be negatively impacting your applications’ performance, it is best to review that data during scheduled business reviews. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - CallCount * - Definition - Total number of successful or failed API calls from your code to AWS services * - How to use it - Use it as a baseline to correlate with other metrics like errors or throttling. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - ClientErrorCount * - Definition - Number of API calls that fail with client errors (4xx HTTP response codes). *Examples: Throttling, Access denied, S3 bucket does not exist, and Invalid parameter value.* * - How to use it - Except in certain cases related to throttling (ex. when throttling occurs due to a limit that needs to be increased) this metric can indicate something in your application that needs to be fixed. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - ConnectionErrorCount * - Definition - Number of API calls that fail because of errors connecting to the service. These can be caused by network issues between the customer application and AWS services including load balancers, DNS failures, transit providers. In some cases, AWS issues may result in this error. * - How to use it - Use this metric to determine whether issues are specific to your application or are caused by your infrastructure and/or network. High ConnectionErrorCount could also indicate short timeout values for API calls. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - ThrottleCount * - Definition - Number of API calls that fail due to throttling by AWS services. * - How to use it - Use this metric to assess if your application has reached throttle limits, as well as to determine the cause of retries and application latency. Consider distributing calls over a window instead of batching your calls. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - ServerErrorCount * - Definition - Number of API calls that fail due to server errors (5xx HTTP response codes) from AWS Services. These are typically caused by AWS services. * - How to use it - Determine cause of SDK retries or latency. This metric will not always indicate that AWS services are at fault, as some AWS teams classify latency as an HTTP 503 response. .. list-table:: :widths: 1 2 :header-rows: 1 * - Metric: - EndToEndLatency * - Definition - Total time for your application to make a call using the AWS SDK, inclusive of retries. In other words, regardless of whether it is successful after several attempts, or as soon as a call fails due to an unretriable error. * - How to use it - Determine how AWS API calls contribute to your application’s overall latency. Higher than expected latency may be caused by issues with network, firewall, or other configuration settings, or by latency that occurs as a result of SDK retries. boto3-1.9.253/docs/source/guide/secrets-manager.rst000066400000000000000000000070521355237733400221000ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-secrets-manager: ################### AWS Secrets Manager ################### This Python example shows you how to retrieve the decrypted secret value from an AWS Secrets Manager secret. The secret could be created using either the Secrets Manager console or the CLI/SDK. The code uses the AWS SDK for Python to retrieve a decrypted secret value. For more information about using an Amazon Secrets Manager, see `Tutorial: Storing and Retrieving a Secret `_ in the *AWS Secrets Manager Developer Guide*. All the example code for the Amazon Web Services (AWS) SDK for Python is available `here on GitHub `_. Prerequisite Tasks ================== To set up and run this example, you must first set up the following: * Configure your AWS credentials, as described in :doc:`quickstart`. * Create a secret with the AWS Secrets Manager, as described in the `AWS Secrets Manager Developer Guide `_ Retrieve the Secret Value ============================================= The following example shows how to: * Retrieve a secret value using `get_secret_value `_. Example ------- .. code-block:: python import boto3 from botocore.exceptions import ClientError def get_secret(): secret_name = "MySecretName" region_name = "us-west-2" session = boto3.session.Session() client = session.client( service_name='secretsmanager', region_name=region_name, ) try: get_secret_value_response = client.get_secret_value( SecretId=secret_name ) except ClientError as e: if e.response['Error']['Code'] == 'ResourceNotFoundException': print("The requested secret " + secret_name + " was not found") elif e.response['Error']['Code'] == 'InvalidRequestException': print("The request was invalid due to:", e) elif e.response['Error']['Code'] == 'InvalidParameterException': print("The request had invalid params:", e) else: # Secrets Manager decrypts the secret value using the associated KMS CMK # Depending on whether the secret was a string or binary, only one of these fields will be populated if 'SecretString' in get_secret_value_response: text_secret_data = get_secret_value_response['SecretString'] else: binary_secret_data = get_secret_value_response['SecretBinary'] # Your code goes here. boto3-1.9.253/docs/source/guide/ses-examples.rst000066400000000000000000000024261355237733400214260ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ses-examples: ################### Amazon SES Examples ################### .. meta:: :description: Amazon SES code examples for the AWS SDK for Python. :keywords: SES Python Amazon Simple Email Service (SES) is an email platform that provides an easy, cost-effective way for you to send and receive email using your own email addresses and domains. For more information about Amazon SES, see the `Amazon SES documentation `_. **Examples** .. toctree:: :maxdepth: 1 Verifying Email Addresses Working with Email Templates Managing Email Filters Using Email Rules boto3-1.9.253/docs/source/guide/ses-filters.rst000066400000000000000000000073511355237733400212620ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ses-filters: ################################### Managing Email Filters with SES API ################################### .. meta:: :description: Use the Amazon SES API to manage email filters. :keywords: SES Python In addition to sending emails, you can also receive email with Amazon Simple Email Service (SES). An IP address filter enables you to optionally specify whether to accept or reject mail that originates from an IP address or range of IP addresses. For more information, see `Managing IP Address Filters for Amazon SES Email Receiving `__. The following examples show how to: * Create an email filter using `create_receipt_filter() `__. * List all email filters using `list_receipt_filters() `__. * Remove an email filter using `delete_receipt_filter() `__. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Configure your AWS credentials, as described in :doc:`quickstart`. Create an Email Filter ====================== To allow or block emails from a specific IP address, use the `CreateReceiptFilter `__ operation. Provide the IP address or range of addresses and a unique name to identify this filter. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') # Create receipt filter response = ses.create_receipt_filter( Filter = { 'NAME' : 'NAME', 'IpFilter' : { 'Cidr' : 'IP_ADDRESS_OR_RANGE', 'Policy' : 'Allow' } } ) print(response) List All Email Filters ====================== To list the IP address filters associated with your AWS account in the current AWS Region, use the `ListReceiptFilters `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.list_receipt_filters() print(response) Delete an Email Filter ====================== To remove an existing filter for a specific IP address use the `DeleteReceiptFilter `__ operation. Provide the unique filter name to identify the receipt filter to delete. If you need to change the range of addresses that are filtered, you can delete a receipt filter and create a new one. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.delete_receipt_filter( FilterName = 'NAME' ) print(response) boto3-1.9.253/docs/source/guide/ses-rules.rst000066400000000000000000000123141355237733400207370ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ses-rules: #################################################### Creating and Managing Email Rules with the SES API #################################################### .. meta:: :description: Use the Amazon SES API to manage email rules. :keywords: SES Python In addition to sending emails, you can also receive email with Amazon Simple Email Service (SES). Receipt rules enable you to specify what SES does with email it receives for the email addresses or domains you own. A rule can send email to other AWS services including but not limited to Amazon S3, Amazon SNS, or AWS Lambda. For more information, see `Managing Receipt Rule Sets for Amazon SES Email Receiving `_ and `Managing Receipt Rules for Amazon SES Email Receiving `_. The following examples show how to: * Create a receipt rule set using `create_receipt_rule_set() `_. * Create a receipt rule using `create_receipt_rule() `_. * Remove a receipt rule using `delete_receipt_rule() `_. * Remove a receipt rule set using `delete_receipt_rule_set() `_. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Configure your AWS credentials, as described in :doc:`quickstart`. Create a Receipt Rule Set ========================== A receipt rule set contains a collection of receipt rules. You must have at least one receipt rule set associated with your account before you can create a receipt rule. To create a receipt rule set, provide a unique RuleSetName and use the `CreateReceiptRuleSet `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.create_receipt_rule_set( RuleSetName = 'RULE_SET_NAME', ) print(response) Create a Receipt Rule ===================== Control your incoming email by adding a receipt rule to an existing receipt rule set. This example shows you how to create a receipt rule that sends incoming messages to an Amazon S3 bucket, but you can also send messages to Amazon SNS and AWS Lambda. To create a receipt rule, provide a rule and the RuleSetName to the `CreateReceiptRule `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.create_receipt_rule( RuleSetName = 'RULE_SET_NAME', Rule = { 'Name' : 'RULE_NAME', 'Enabled' : True, 'TlsPolicy' : 'Optional', 'Recipients': [ 'EMAIL_ADDRESS', ], 'Actions' : [ { 'S3Action' : { 'BucketName' : 'S3_BUCKET_NAME', 'ObjectKeyPrefix': 'SES_email' } } ], } ) print(response) Delete a Receipt Rule Set ========================== Remove a specified receipt rule set that isn't currently disabled. This also deletes all of the receipt rules it contains. To delete a receipt rule set, provide the RuleSetName to the `DeleteReceiptRuleSet `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.delete_receipt_rule( RuleName='RULE_NAME', RuleSetName='RULE_SET_NAME' ) print(response) Delete a Receipt Rule ===================== To delete a specified receipt rule, provide the RuleName and RuleSetName to the `DeleteReceiptRule `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.delete_receipt_rule_set( RuleSetName = 'RULE_SET_NAME' ) print(response) boto3-1.9.253/docs/source/guide/ses-template.rst000066400000000000000000000133001355237733400214140ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ses-template: ############################################### Creating Custom Email Templates with Amazon SES ############################################### .. meta:: :description: Use the Amazon SES API to create and use email templates. :keywords: SES Python Amazon Simple Email Service (SES) enables you to send emails that are personalized for each recipient by using templates. Templates include a subject line and the text and HTML parts of the email body. The subject and body sections can also contain unique values that are personalized for each recipient. For more information, see `Sending Personalized Email Using the Amazon SES API `__. The following examples show how to: * Create an email template using `create_template() `_. * List all email templates using `list_templates() `_. * Retrieve an email template using `get_template() `_. * Update an email template using `update_template() `_. * Remove an email template using `delete_template() `_. * Send a templated email using `send_templated_email() `_. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Configure your AWS credentials, as described in :doc:`quickstart`. Create an Email Template ======================== To create a template to send personalized email messages, use the `CreateTemplate `_ operation. The template can be used by any account authorized to send messages in the AWS Region to which the template is added. .. note:: SES doesn't validate your HTML, so be sure that ``HtmlPart`` is valid before sending an email. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.create_template( Template = { 'TemplateName' : 'TEMPLATE_NAME', 'SubjectPart' : 'SUBJECT_LINE', 'TextPart' : 'TEXT_CONTENT', 'HtmlPart' : 'HTML_CONTENT' } ) print(response) Get an Email Template ===================== To view the content for an existing email template including the subject line, HTML body, and plain text, use the `GetTemplate `_ operation. Only TemplateName is required. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.get_template( TemplateName = 'TEMPLATE_NAME' ) print(response) List All Email Templates ======================== To retrieve a list of all email templates that are associated with your AWS account in the current AWS Region, use the `ListTemplates `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.list_templates( MaxItems=10 ) print(response) Update an Email Template ======================== To change the content for a specific email template including the subject line, HTML body, and plain text, use the `UpdateTemplate `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.update_template( Template={ 'TemplateName': 'TEMPLATE_NAME', 'SubjectPart' : 'SUBJECT_LINE', 'TextPart' : 'TEXT_CONTENT', 'HtmlPart' : 'HTML_CONTENT' } ) print(response) Send an Email with a Template ============================= To use a template to send an email to recipients, use the `SendTemplatedEmail `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.send_templated_email( Source='EMAIL_ADDRESS', Destination={ 'ToAddresses': [ 'EMAIL_ADDRESS', ], 'CcAddresses': [ 'EMAIL_ADDRESS', ] }, ReplyToAddresses=[ 'EMAIL_ADDRESS', ], Template='TEMPLATE_NAME', TemplateData='{ \"REPLACEMENT_TAG_NAME\":\"REPLACEMENT_VALUE\" }' ) print(response)boto3-1.9.253/docs/source/guide/ses-verify.rst000066400000000000000000000133271355237733400211160ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-ses-verify: ############################################ Verifying Email Identities in Amazon SES ############################################ .. meta:: :description: Use Amazon SES API to verify email addresses and domains. :keywords: SES Python When you first start using your Amazon Simple Email Service (SES) account, all senders and recipients must be verified in the same AWS Region that you will be sending emails to. For more information about sending emails, see `Sending Email with Amazon SES `__. The following examples show how to: * Verify an email address using `verify_email_identity() `__. * Verify an email domain using `verify_domain_identity() `__. * List all email addresses or domains using `list_identities() `__. * Remove an email address or domain using `delete_identity() `__. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Configure your AWS credentials, as described in :doc:`quickstart`. Verify an Email Address ======================= SES can send email only from verified email addresses or domains. By verifying an email address, you demonstrate that you're the owner of that address and want to allow SES to send email from that address. When you run the following code example, SES sends an email to the address you specified. When you (or the recipient of the email) click the link in the email, the address is verified. To add an email address to your SES account, use the `VerifyEmailIdentity `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.verify_email_identity( EmailAddress = 'EMAIL_ADDRESS' ) print(response) Verify an Email Domain ====================== SES can send email only from verified email addresses or domains. By verifying a domain, you demonstrate that you're the owner of that domain. When you verify a domain, you allow SES to send email from any address on that domain. When you run the following code example, SES provides you with a verification token. You have to add the token to your domain's DNS configuration. For more information, see `Verifying a Domain with Amazon SES `_. To add a sending domain to your SES account, use the `VerifyDomainIdentity `_ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.verify_domain_identity( Domain='DOMAIN_NAME' ) print(response) List Email Addresses ==================== To retrieve a list of email addresses submitted in the current AWS Region, regardless of verification status, use the `ListIdentities `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.list_identities( IdentityType = 'EmailAddress', MaxItems=10 ) print(response) List Email Domains ================== To retrieve a list of email domains submitted in the current AWS Region, regardless of verification status use the `ListIdentities `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.list_identities( IdentityType = 'Domain', MaxItems=10 ) print(response) Delete an Email Address ======================= To delete a verified email address from the list of verified identities, use the `DeleteIdentity `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.delete_identity( Identity = 'EMAIL_ADDRESS' ) print(response) Delete an Email Domain ====================== To delete a verified email domain from the list of verified identities, use the `DeleteIdentity `__ operation. Example ------- .. code-block:: python import boto3 # Create SES client ses = boto3.client('ses') response = ses.delete_identity( Identity = 'DOMAIN_NAME' ) print(response) boto3-1.9.253/docs/source/guide/session.rst000066400000000000000000000014731355237733400205040ustar00rootroot00000000000000.. _guide_session: Session ======= A session manages state about a particular configuration. By default a session is created for you when needed. However it is possible and recommended to maintain your own session(s) in some scenarios. Sessions typically store: * Credentials * Region * Other configurations Default Session --------------- The ``boto3`` module acts as a proxy to the default session, which is created automatically when needed. Example default session use:: # Using the default session sqs = boto3.client('sqs') s3 = boto3.resource('s3') Custom Session -------------- It is also possible to manage your own session and create clients or resources from it:: # Creating your own session session = boto3.session.Session() sqs = session.client('sqs') s3 = session.resource('s3') boto3-1.9.253/docs/source/guide/sqs-example-dead-letter-queue.rst000066400000000000000000000064071355237733400245740ustar00rootroot00000000000000.. Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-dead-letter-queue: ###################################### Using Dead Letter Queues in Amazon SQS ###################################### This Python example shows you how to use a queue to receive and hold messages from other queues that the queues can't process. The Scenario ============ A dead letter queue is one that other (source) queues can target for messages that can't be processed successfully. You can set aside and isolate these messages in the dead letter queue to determine why their processing did not succeed. You must individually configure each source queue that sends messages to a dead letter queue. Multiple queues can target a single dead letter queue. In this example, Python code is used to route messages to a dead letter queue. The code uses the SDK for Python to use dead letter queues using this method of the AWS.SQS client class: * `set_queue_attributes `_. For more information about Amazon SQS dead letter queues, see `Using Amazon SQS Dead Letter Queues `_ in the *Amazon Simple Queue Service Developer Guide*. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Create an Amazon SQS queue to serve as a dead letter queue. For an example of creating an Amazon SQS queue, see :ref:`aws-boto3-sqs-create-queue`. Configure Source Queues ======================= After you create a queue to act as a dead letter queue, you must configure the other queues that route unprocessed messages to the dead letter queue. To do this, specify a redrive policy that identifies the queue to use as a dead letter queue and the maximum number of receives by individual messages before they are routed to the dead letter queue. The example below shows how to: * Configure a source queue using `set_queue_attributes `_. Example ------- .. code-block:: python import json import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SOURCE_QUEUE_URL' dead_letter_queue_arn = 'DEAD_LETTER_QUEUE_ARN' redrive_policy = { 'deadLetterTargetArn': dead_letter_queue_arn, 'maxReceiveCount': '10' } # Configure queue to send messages to dead letter queue sqs.set_queue_attributes( QueueUrl=queue_url, Attributes={ 'RedrivePolicy': json.dumps(redrive_policy) } ) boto3-1.9.253/docs/source/guide/sqs-example-long-polling.rst000066400000000000000000000102761355237733400236600ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-long-polling: ################################### Enabling Long Polling in Amazon SQS ################################### This Python example shows you how to enable long polling in Amazon SQS in one of these ways: * For a newly created queue * For an existing queue * Upon receipt of a message The Scenario ============ Long polling reduces the number of empty responses by allowing Amazon SQS to wait a specified time for a message to become available in the queue before sending a response. Also, long polling eliminates false empty responses by querying all of the servers instead of a sampling of servers. To enable long polling, you must specify a non-zero wait time for received messages. You can do this by setting the :code:`ReceiveMessageWaitTimeSeconds` parameter of a queue or by setting the :code:`WaitTimeSeconds` parameter on a message when it is received. In these examples, the AWS SDK for Python is used to enable long polling using the following Amazon SQS methods. * `create_queue `_ * `set_queue_attributes `_. * `receive_message `_. For more information, see `Amazon SQS Long Polling `_ in the *Amazon Simple Queue Service Developer Guide*. Enable Long Polling When Creating a Queue ========================================= The example below shows how to: * Create a queue and enable long polling using `create_queue `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') # Create a SQS queue with long polling enabled response = sqs.create_queue( QueueName='SQS_QUEUE_NAME', Attributes={'ReceiveMessageWaitTimeSeconds': '20'} ) print(response['QueueUrl']) Enable Long Polling on an Existing Queue ======================================== The example below shows how to: * Enable long polling on an existing queue using `set_queue_attributes `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SQS_QUEUE_URL' # Enable long polling on an existing SQS queue sqs.set_queue_attributes( QueueUrl=queue_url, Attributes={'ReceiveMessageWaitTimeSeconds': '20'} ) Enable Long Polling on Message Receipt ====================================== The example below shows how to: * Enable long polling for a message on an SQS queue using `receive_message `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SQS_QUEUE_URL' # Long poll for message on provided SQS queue response = sqs.receive_message( QueueUrl=queue_url, AttributeNames=[ 'SentTimestamp' ], MaxNumberOfMessages=1, MessageAttributeNames=[ 'All' ], WaitTimeSeconds=20 ) print(response) boto3-1.9.253/docs/source/guide/sqs-example-sending-receiving-msgs.rst000066400000000000000000000105571355237733400256300ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-messages: ############################################ Sending and Receiving Messages in Amazon SQS ############################################ This Python example shows you how to send, receive, and delete messages in a queue. The Scenario ============ In this example, Python code is used to send and receive messages. The code uses the AWS SDK for Python to send and receive messages by using these methods of the AWS.SQS client class: * `send_message `_. * `receive_message `_. * `delete_message `_. For more information about Amazon SQS messages, see `Sending a Message to an Amazon SQS Queue `_ and `Receiving and Deleting a Message from an Amazon SQS Queue `_ in the *Amazon Simple Queue Service Developer Guide*. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Create an Amazon SQS queue. For an example of creating an Amazon SQS queue, see :ref:`aws-boto3-sqs-create-queue`. .. _aws-boto3-sqs-send-message: Send a Message to a Queue ========================= The example below shows how to: * Send a message to a queue using `send_message `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SQS_QUEUE_URL' # Send message to SQS queue response = sqs.send_message( QueueUrl=queue_url, DelaySeconds=10, MessageAttributes={ 'Title': { 'DataType': 'String', 'StringValue': 'The Whistler' }, 'Author': { 'DataType': 'String', 'StringValue': 'John Grisham' }, 'WeeksOn': { 'DataType': 'Number', 'StringValue': '6' } }, MessageBody=( 'Information about current NY Times fiction bestseller for ' 'week of 12/11/2016.' ) ) print(response['MessageId']) Receive and Delete Messages from a Queue ======================================== The example below shows how to: * Receive a message from a queue using `receive_message `_. * Delete a message from a queue using `delete_message `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SQS_QUEUE_URL' # Receive message from SQS queue response = sqs.receive_message( QueueUrl=queue_url, AttributeNames=[ 'SentTimestamp' ], MaxNumberOfMessages=1, MessageAttributeNames=[ 'All' ], VisibilityTimeout=0, WaitTimeSeconds=0 ) message = response['Messages'][0] receipt_handle = message['ReceiptHandle'] # Delete received message from queue sqs.delete_message( QueueUrl=queue_url, ReceiptHandle=receipt_handle ) print('Received and deleted message: %s' % message) boto3-1.9.253/docs/source/guide/sqs-example-using-queues.rst000066400000000000000000000072311355237733400237060ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-using-queues: ########################## Using Queues in Amazon SQS ########################## This Python example shows you how to: * Get a list of all of your message queues * Obtain the URL for a particular queue * Create and delete queues The Scenario ============ In this example, Python code is used to work with queues. The code uses the AWS SDK for Python to use queues using these methods of the AWS.SQS client class: * `list_queues `_. * `create_queue `_. * `get_queue_url `_. * `delete_queue `_. For more information about Amazon SQS messages, see `How Queues Work `_ in the *Amazon Simple Queue Service Developer Guide*. List Your Queues ================ The example below shows how to: * List queues using `list_queues `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') # List SQS queues response = sqs.list_queues() print(response['QueueUrls']) .. _aws-boto3-sqs-create-queue: Create a Queue ============== The example below shows how to: * Create a queue using `create_queue `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') # Create a SQS queue response = sqs.create_queue( QueueName='SQS_QUEUE_NAME', Attributes={ 'DelaySeconds': '60', 'MessageRetentionPeriod': '86400' } ) print(response['QueueUrl']) Get the URL for a Queue ======================= The example below shows how to: * Get the URL for a queue using `get_queue_url `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') # Get URL for SQS queue response = sqs.get_queue_url(QueueName='SQS_QUEUE_NAME') print(response['QueueUrl']) Delete a Queue ============== The example below shows how to: * Delete a queue using `delete_queue `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') # Delete SQS queue sqs.delete_queue(QueueUrl='SQS_QUEUE_URL') boto3-1.9.253/docs/source/guide/sqs-example-visibility-timeout.rst000066400000000000000000000055151355237733400251320ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-visibility-timeout: ######################################### Managing Visibility Timeout in Amazon SQS ######################################### This Python example shows you how to specify the time interval during which messages received by a queue are not visible. The Scenario ============ In this example, Python code is used to manage visibility timeout. The code uses the SDK for Python to manage visibility timeout by using this method of the AWS.SQS client class: * `set_queue_attributes `_. For more information about Amazon SQS visibility timeout, see `Visibility Timeout `_ in the *Amazon Simple Queue Service Developer Guide*. Prerequisite Tasks ================== To set up and run this example, you must first complete these tasks: * Create an Amazon SQS queue. For an example of creating an Amazon SQS queue, see :ref:`aws-boto3-sqs-create-queue`. * Send a message to the queue. For an example of sending a message to a queue, see :ref:`aws-boto3-sqs-send-message`. Change the Visibility Timeout ============================= The example below shows how to: * Change the visibility timeout using `set_queue_attributes `_. Example ------- .. code-block:: python import boto3 # Create SQS client sqs = boto3.client('sqs') queue_url = 'SQS_QUEUE_URL' # Receive message from SQS queue response = sqs.receive_message( QueueUrl=queue_url, AttributeNames=[ 'SentTimestamp' ], MaxNumberOfMessages=1, MessageAttributeNames=[ 'All' ], ) message = response['Messages'][0] receipt_handle = message['ReceiptHandle'] # Change visibility timeout of message from queue sqs.change_message_visibility( QueueUrl=queue_url, ReceiptHandle=receipt_handle, VisibilityTimeout=20 ) print('Received and changed visibility timeout of message: %s' % message) boto3-1.9.253/docs/source/guide/sqs-examples.rst000066400000000000000000000031261355237733400214400ustar00rootroot00000000000000.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. .. _aws-boto3-sqs-examples: ################### Amazon SQS Examples ################### .. meta:: :description: :keywords: AWS SQS The code examples in this section demonstrate using the Amazon Web Services (AWS) SDK for Python to call the Amazon Simple Queue Service (Amazon SQS). For more information about Amazon SQS, see the `Amazon SQS documentation `_. Each code example requires that your AWS credentials have been configured as described in :ref:`guide_quickstart`. Some examples require additional prerequisites which are described in the example's section. The source files for these and other code examples are available in the `AWS Code Catalog `_ on GitHub. **Examples** .. toctree:: :maxdepth: 1 sqs-example-using-queues sqs-example-sending-receiving-msgs sqs-example-visibility-timeout sqs-example-long-polling sqs-example-dead-letter-queue boto3-1.9.253/docs/source/guide/sqs.rst000066400000000000000000000114711355237733400176260ustar00rootroot00000000000000.. _sample_tutorial: A Sample Tutorial ================= This tutorial will show you how to use Boto3 with an AWS service. In this sample tutorial, you will learn how to use Boto3 with `Amazon Simple Queue Service (SQS) `_ SQS --- SQS allows you to queue and then process messages. This tutorial covers how to create a new queue, get and use an existing queue, push new messages onto the queue, and process messages from the queue by using :ref:`guide_resources` and :ref:`guide_collections`. Creating a Queue ---------------- Queues are created with a name. You may also optionally set queue attributes, such as the number of seconds to wait before an item may be processed. The examples below will use the queue name ``test``. Before creating a queue, you must first get the SQS service resource:: # Get the service resource sqs = boto3.resource('sqs') # Create the queue. This returns an SQS.Queue instance queue = sqs.create_queue(QueueName='test', Attributes={'DelaySeconds': '5'}) # You can now access identifiers and attributes print(queue.url) print(queue.attributes.get('DelaySeconds')) Reference: :py:meth:`SQS.ServiceResource.create_queue` .. warning:: The code above may throw an exception if you already have a queue named ``test``. Using an Existing Queue ----------------------- It is possible to look up a queue by its name. If the queue does not exist, then an exception will be thrown:: # Get the service resource sqs = boto3.resource('sqs') # Get the queue. This returns an SQS.Queue instance queue = sqs.get_queue_by_name(QueueName='test') # You can now access identifiers and attributes print(queue.url) print(queue.attributes.get('DelaySeconds')) It is also possible to list all of your existing queues:: # Print out each queue name, which is part of its ARN for queue in sqs.queues.all(): print(queue.url) .. note:: To get the name from a queue, you must use its ARN, which is available in the queue's ``attributes`` attribute. Using ``queue.attributes['QueueArn'].split(':')[-1]`` will return its name. Reference: :py:meth:`SQS.ServiceResource.get_queue_by_name`, :py:attr:`SQS.ServiceResource.queues` Sending Messages ---------------- Sending a message adds it to the end of the queue:: # Get the service resource sqs = boto3.resource('sqs') # Get the queue queue = sqs.get_queue_by_name(QueueName='test') # Create a new message response = queue.send_message(MessageBody='world') # The response is NOT a resource, but gives you a message ID and MD5 print(response.get('MessageId')) print(response.get('MD5OfMessageBody')) You can also create messages with custom attributes:: queue.send_message(MessageBody='boto3', MessageAttributes={ 'Author': { 'StringValue': 'Daniel', 'DataType': 'String' } }) Messages can also be sent in batches. For example, sending the two messages described above in a single request would look like the following:: response = queue.send_messages(Entries=[ { 'Id': '1', 'MessageBody': 'world' }, { 'Id': '2', 'MessageBody': 'boto3', 'MessageAttributes': { 'Author': { 'StringValue': 'Daniel', 'DataType': 'String' } } } ]) # Print out any failures print(response.get('Failed')) In this case, the response contains lists of ``Successful`` and ``Failed`` messages, so you can retry failures if needed. Reference: :py:meth:`SQS.Queue.send_message`, :py:meth:`SQS.Queue.send_messages` Processing Messages ------------------- Messages are processed in batches:: # Get the service resource sqs = boto3.resource('sqs') # Get the queue queue = sqs.get_queue_by_name(QueueName='test') # Process messages by printing out body and optional author name for message in queue.receive_messages(MessageAttributeNames=['Author']): # Get the custom author message attribute if it was set author_text = '' if message.message_attributes is not None: author_name = message.message_attributes.get('Author').get('StringValue') if author_name: author_text = ' ({0})'.format(author_name) # Print out the body and author (if set) print('Hello, {0}!{1}'.format(message.body, author_text)) # Let the queue know that the message is processed message.delete() Given *only* the messages that were sent in a batch with :py:meth:`SQS.Queue.send_messages` in the previous section, the above code will print out:: Hello, world! Hello, boto3! (Daniel) Reference: :py:meth:`SQS.Queue.receive_messages`, :py:meth:`SQS.Message.delete` boto3-1.9.253/docs/source/guide/upgrading.rst000066400000000000000000000174611355237733400210050ustar00rootroot00000000000000=============== Upgrading Notes =============== Notes to refer to when upgrading ``boto3`` versions. 1.9.0 ----- What Changed ~~~~~~~~~~~~ The boto3 event system was changed to emit events based on the service id rather than the endpoint prefix or service name. Why Was The Change Was Made ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This was done to handle several issues that were becoming increasingly problematic: * Services changing their endpoint prefix would cause some registered events to no longer fire (but not all). * New services that launch using an endpoint that another service is using won't be able to be uniquely selected. There are a number of cases of this already. * Services whose client name and endpoint prefix differed would require two different strings if you want to register against all events. How Do I Know If I'm Impacted ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Any users relying on registering an event against one service impacting other services are impacted. You can consult the following table to see if you are impacted. If you are registering an event using one of the event parts in the leftmost column with the intention of impacting an unintended target service in the rightmost column, then you are impacted and will need to update. +----------------------+-------------------------+---------------------------------------------------+ | Event Part | Intended Target Service | Unintended Target Services | +----------------------+-------------------------+---------------------------------------------------+ | rds | rds | neptune | +----------------------+-------------------------+---------------------------------------------------+ | autoscaling | autoscaling | application-autoscaling, autoscaling-plans | +----------------------+-------------------------+---------------------------------------------------+ | kinesisvideo | kinesisvideo | kinesis-video-media, kinesis-video-archived-media | +----------------------+-------------------------+---------------------------------------------------+ | elasticloadbalancing | elb | elbv2 | +----------------------+-------------------------+---------------------------------------------------+ For example, if you are registering an event against ``before-call.elasticloadbalancing`` expecting it to run when making calls with an ``elbv2`` client, you will be impacted. If you are registering an event against one of the services in the Unintended Targets column, you may be impacted if you were relying on those events not firing. If you are registering events using ``*`` in the service place, or are registering against any service not in this table, you will not need a code change. In many cases the actual event name will have changed, but for services without shared endpoints we do the work of translating the event name at registration and emission time. In future versions of boto3 we will remove this translation, so you may wish to update your code anyway. How Do I Update My Code ~~~~~~~~~~~~~~~~~~~~~~~ You will need to look at the events you are registering against and determine which services you wish to impact with your handler. If you only wish to impact the intended target service (as defined in the above table), then you don't need to change the event. If you wish to impact another service in addition to the intended target service, you will need to register a new event using that service's event name. Similarly, if you wish to impact another service instead you will simply need to change the event you are registered against. To get the new event name, consult this table: +------------------------------+----------------------+------------------------------+ | Service | Old Event Name | New Event Name | +------------------------------+----------------------+------------------------------+ | application-autoscaling | autoscaling | application-auto-scaling | +------------------------------+----------------------+------------------------------+ | autoscaling-plans | autoscaling | auto-scaling-plans | +------------------------------+----------------------+------------------------------+ | elbv2 | elasticloadbalancing | elastic-load-balancing | +------------------------------+----------------------+------------------------------+ | kinesis-video-archived-media | kinesisvideo | kinesis-video-archived-media | +------------------------------+----------------------+------------------------------+ | kinesis-video-media | kinesisvideo | kinesis-video-media | +------------------------------+----------------------+------------------------------+ | neptune | rds | neptune | +------------------------------+----------------------+------------------------------+ Additionally, you can get the new event name in code like so:: import boto3 client = boto3.client('elbv2') service_event_name = client.meta.service_model.service_id.hyphenize() Armed with the service event name, simply replace the old service name in the handler with the new service event name. If you were registering an event against ``before-call.autoscaling`` intending to impact ``autoscaling-plans`` for example, you would instead register against ``before-call.auto-scaling-plans``. If you are registering an event against one of the services in the Unintended Targets column, you will now see those events getting fired where previously they were not. While this is enabling that expected behavior, this still represents a change in actual behavior. You should not need to update your code, but you should test to ensure that you are seeing the behavior you want. 1.4.2 ----- * The ``use_threads`` option was added to :py:class:`boto3.s3.transfer.TransferConfig`. Starting in version ``1.4.0``, all managed S3 transfer methods became threaded instead of possibly being threaded. If it is not desired to use threads for managed S3 transfers, set ``use_threads`` to ``False``. 1.4.0 ----- * Logic from the `s3transfer `_ package was ported into the ``boto3.s3.transfer`` module. In upgrading to this new version of ``boto3``, code that relies on the public classes and interfaces of ``boto3.s3.transfer``, such as :py:class:`boto3.s3.transfer.S3Transfer` and :py:class:`boto3.s3.transfer.TransferConfig`, should not be affected. However, code that relies on the internal classes and functionality of the ``boto3.s3.transfer`` module may be affected in upgrading: * Removed internal classes such as ``MultipartUploader``, ``MultipartDownloader``, ``ReadFileChunk``, etc. All of the managed transfer logic now lives inside of ``s3transfer`` and as a result these internal classes are no longer used and is essentially dead code. * Custom implementations of ``OSUtils`` may see the ``open_file_chunk_reader`` method no longer being called when uploads occur. If this was for the purpose of being able to provide file-like objects for transfers, use the newly added ``upload_fileobj`` and ``download_fileobj`` methods that support both nonmultipart and multipart transfers. * By default, all managed transfer methods are now threaded. In prior versions, threads were only created if a non multipart upload or download was initiated. To run the managed transfer methods with no threads (i.e. all of the transfer logic happens in the main thread), set ``use_threads`` to ``False`` when providing a ``TransferConfig`` object. The ``use_threads`` option is only available in ``boto3`` versions higher than ``1.4.1``. boto3-1.9.253/docs/source/index.rst000066400000000000000000000020231355237733400170230ustar00rootroot00000000000000.. Boto3 documentation master file, created by sphinx-quickstart on Wed Sep 3 11:11:30 2014. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Boto 3 Documentation ==================== Boto is the Amazon Web Services (AWS) SDK for Python. It enables Python developers to create, configure, and manage AWS services, such as EC2 and S3. Boto provides an easy to use, object-oriented API, as well as low-level access to AWS services. Quickstart ---------- .. toctree:: :maxdepth: 2 guide/quickstart guide/sqs guide/examples User Guides ----------- .. toctree:: :maxdepth: 3 guide/index API Reference ------------- Services ~~~~~~~~ .. toctree:: :maxdepth: 3 reference/services/index Core ~~~~ .. toctree:: :maxdepth: 3 reference/core/index Customizations ~~~~~~~~~~~~~~ .. toctree:: :maxdepth: 3 reference/customizations/index Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` boto3-1.9.253/docs/source/reference/000077500000000000000000000000001355237733400171235ustar00rootroot00000000000000boto3-1.9.253/docs/source/reference/core/000077500000000000000000000000001355237733400200535ustar00rootroot00000000000000boto3-1.9.253/docs/source/reference/core/boto3.rst000066400000000000000000000001731355237733400216340ustar00rootroot00000000000000.. _ref_core_init: =============== Boto3 Reference =============== .. automodule:: boto3 :members: :undoc-members: boto3-1.9.253/docs/source/reference/core/collections.rst000066400000000000000000000002511355237733400231210ustar00rootroot00000000000000.. _ref_core_collections: ===================== Collections Reference ===================== .. automodule:: boto3.resources.collection :members: :undoc-members: boto3-1.9.253/docs/source/reference/core/index.rst000066400000000000000000000001321355237733400217100ustar00rootroot00000000000000Core References =============== .. toctree:: :maxdepth: 2 :titlesonly: :glob: * boto3-1.9.253/docs/source/reference/core/resources.rst000066400000000000000000000013521355237733400226200ustar00rootroot00000000000000.. _ref_core_resources: =================== Resources Reference =================== Resource Model -------------- .. automodule:: boto3.resources.model :members: :undoc-members: :inherited-members: Request Parameters ------------------ .. automodule:: boto3.resources.params :members: :undoc-members: Response Handlers ----------------- .. automodule:: boto3.resources.response :members: :undoc-members: Resource Actions ---------------- .. automodule:: boto3.resources.action :members: :undoc-members: Resource Base ------------- .. automodule:: boto3.resources.base :members: :undoc-members: Resource Factory ---------------- .. automodule:: boto3.resources.factory :members: :undoc-members: boto3-1.9.253/docs/source/reference/core/session.rst000066400000000000000000000002141355237733400222650ustar00rootroot00000000000000.. _ref_core_session: ================= Session Reference ================= .. automodule:: boto3.session :members: :undoc-members: boto3-1.9.253/docs/source/reference/customizations/000077500000000000000000000000001355237733400222165ustar00rootroot00000000000000boto3-1.9.253/docs/source/reference/customizations/dynamodb.rst000066400000000000000000000054201355237733400245460ustar00rootroot00000000000000.. _ref_custom_dynamodb: ================================ DynamoDB Customization Reference ================================ .. _ref_valid_dynamodb_types: Valid DynamoDB Types -------------------- These are the valid item types to use with Boto3 Table Resource (:py:class:`dynamodb.Table`) and DynamoDB: +----------------------------------------------+-----------------------------+ | Python Type | DynamoDB Type | +==============================================+=============================+ | string | String (S) | +----------------------------------------------+-----------------------------+ | integer | Number (N) | +----------------------------------------------+-----------------------------+ | :py:class:`decimal.Decimal` | Number (N) | +----------------------------------------------+-----------------------------+ | :py:class:`boto3.dynamodb.types.Binary` | Binary (B) | +----------------------------------------------+-----------------------------+ | boolean | Boolean (BOOL) | +----------------------------------------------+-----------------------------+ | ``None`` | Null (NULL) | +----------------------------------------------+-----------------------------+ | string set | String Set (SS) | +----------------------------------------------+-----------------------------+ | integer set | Number Set (NS) | +----------------------------------------------+-----------------------------+ | :py:class:`decimal.Decimal` set | Number Set (NS) | +----------------------------------------------+-----------------------------+ | :py:class:`boto3.dynamodb.types.Binary` set | Binary Set (BS) | +----------------------------------------------+-----------------------------+ | list | List (L) | +----------------------------------------------+-----------------------------+ | dict | Map (M) | +----------------------------------------------+-----------------------------+ Custom Boto3 Types ------------------ .. autoclass:: boto3.dynamodb.types.Binary :members: :undoc-members: .. _ref_dynamodb_conditions: DynamoDB Conditions ------------------- .. autoclass:: boto3.dynamodb.conditions.Key :members: :undoc-members: :inherited-members: .. autoclass:: boto3.dynamodb.conditions.Attr :members: :undoc-members: :inherited-members: boto3-1.9.253/docs/source/reference/customizations/index.rst000066400000000000000000000001541355237733400240570ustar00rootroot00000000000000Customization References ======================== .. toctree:: :maxdepth: 2 :titlesonly: :glob: * boto3-1.9.253/docs/source/reference/customizations/s3.rst000066400000000000000000000016621355237733400233020ustar00rootroot00000000000000.. _ref_custom_s3: ========================== S3 Customization Reference ========================== S3 Transfers ------------ .. note:: All classes documented below are considered public and thus will not be exposed to breaking changes. If a class from the ``boto3.s3.transfer`` module is not documented below, it is considered internal and users should be very cautious in directly using them because breaking changes may be introduced from version to version of the library. It is recommended to use the variants of the transfer functions injected into the S3 client instead. .. seealso:: :py:meth:`S3.Client.upload_file` :py:meth:`S3.Client.upload_fileobj` :py:meth:`S3.Client.download_file` :py:meth:`S3.Client.download_fileobj` .. autoclass:: boto3.s3.transfer.TransferConfig :members: :undoc-members: .. autoclass:: boto3.s3.transfer.S3Transfer :members: :undoc-members: boto3-1.9.253/docs/source/reference/services/000077500000000000000000000000001355237733400207465ustar00rootroot00000000000000boto3-1.9.253/docs/source/reference/services/index.rst000066400000000000000000000001211355237733400226010ustar00rootroot00000000000000Available Services ================== .. toctree:: :maxdepth: 2 :glob: * boto3-1.9.253/readthedocs.yml000066400000000000000000000000671355237733400157500ustar00rootroot00000000000000formats: - none python: setup_py_install: true boto3-1.9.253/requirements-docs.txt000066400000000000000000000001071355237733400171450ustar00rootroot00000000000000Sphinx>=1.1.3,<1.3 guzzle_sphinx_theme>=0.7.10,<0.8 -rrequirements.txt boto3-1.9.253/requirements.txt000066400000000000000000000004051355237733400162200ustar00rootroot00000000000000-e git://github.com/boto/botocore.git@develop#egg=botocore -e git://github.com/boto/jmespath.git@develop#egg=jmespath -e git://github.com/boto/s3transfer.git@develop#egg=s3transfer nose==1.3.3 mock==1.3.0 wheel==0.24.0 unittest2==0.5.1; python_version == '2.6' boto3-1.9.253/scripts/000077500000000000000000000000001355237733400144245ustar00rootroot00000000000000boto3-1.9.253/scripts/ci/000077500000000000000000000000001355237733400150175ustar00rootroot00000000000000boto3-1.9.253/scripts/ci/install000077500000000000000000000010271355237733400164130ustar00rootroot00000000000000#!/usr/bin/env python import os import sys from subprocess import check_call import shutil _dname = os.path.dirname REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) os.chdir(REPO_ROOT) def run(command): return check_call(command, shell=True) run('pip install -r requirements.txt') run('pip install coverage') if os.path.isdir('dist') and os.listdir('dist'): shutil.rmtree('dist') run('python setup.py bdist_wheel') wheel_dist = os.listdir('dist')[0] run('pip install %s' % (os.path.join('dist', wheel_dist))) boto3-1.9.253/scripts/ci/run-integ-tests000077500000000000000000000010001355237733400200040ustar00rootroot00000000000000#!/usr/bin/env python # Don't run tests from the root repo dir. # We want to ensure we're importing from the installed # binary package not from the CWD. import os from subprocess import check_call _dname = os.path.dirname REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) os.chdir(os.path.join(REPO_ROOT, 'tests')) def run(command): return check_call(command, shell=True) run('nosetests --with-xunit --cover-erase --with-coverage ' '--cover-package boto3 --cover-xml -v integration') boto3-1.9.253/scripts/ci/run-tests000077500000000000000000000010731355237733400167120ustar00rootroot00000000000000#!/usr/bin/env python # Don't run tests from the root repo dir. # We want to ensure we're importing from the installed # binary package not from the CWD. import os import sys from subprocess import check_call _dname = os.path.dirname REPO_ROOT = _dname(_dname(_dname(os.path.abspath(__file__)))) os.chdir(os.path.join(REPO_ROOT, 'tests')) args = sys.argv[1:] if not args: args = ['unit/', 'functional/'] check_call(['nosetests', '--with-coverage', '--cover-erase', '--cover-package', 'boto3', '--with-xunit', '--cover-xml', '-v'] + args) boto3-1.9.253/scripts/new-change000077500000000000000000000155671355237733400164040ustar00rootroot00000000000000#!/usr/bin/env python """Generate a new changelog entry. Usage ===== To generate a new changelog entry:: scripts/new-change This will open up a file in your editor (via the ``EDITOR`` env var). You'll see this template:: # Type should be one of: feature, bugfix type: # Category is the high level feature area. # This can be a service identifier (e.g ``s3``), # or something like: Paginator. category: # A brief description of the change. You can # use github style references to issues such as # "fixes #489", "boto/boto3#100", etc. These # will get automatically replaced with the correct # link. description: Fill in the appropriate values, save and exit the editor. Make sure to commit these changes as part of your pull request. If, when your editor is open, you decide don't don't want to add a changelog entry, save an empty file and no entry will be generated. You can then use the ``scripts/gen-changelog`` to generate the CHANGELOG.rst file. """ import os import re import sys import json import string import random import tempfile import subprocess import argparse VALID_CHARS = set(string.ascii_letters + string.digits) CHANGES_DIR = os.path.join( os.path.dirname(os.path.dirname(os.path.abspath(__file__))), '.changes' ) TEMPLATE = """\ # Type should be one of: feature, bugfix, enhancement, api-change # feature: A larger feature or change in behavior, usually resulting in a # minor version bump. # bugfix: Fixing a bug in an existing code path. # enhancment: Small change to an underlying implementation detail. # api-change: Changes to a modeled API. type: {change_type} # Category is the high level feature area. # This can be a service identifier (e.g ``s3``), # or something like: Paginator. category: {category} # A brief description of the change. You can # use github style references to issues such as # "fixes #489", "boto/boto3#100", etc. These # will get automatically replaced with the correct # link. description: {description} """ def new_changelog_entry(args): # Changelog values come from one of two places. # Either all values are provided on the command line, # or we open a text editor and let the user provide # enter their values. if all_values_provided(args): parsed_values = { 'type': args.change_type, 'category': args.category, 'description': args.description, } else: parsed_values = get_values_from_editor(args) if has_empty_values(parsed_values): sys.stderr.write( "Empty changelog values received, skipping entry creation.\n") return 1 replace_issue_references(parsed_values, args.repo) write_new_change(parsed_values) return 0 def has_empty_values(parsed_values): return not (parsed_values.get('type') and parsed_values.get('category') and parsed_values.get('description')) def all_values_provided(args): return args.change_type and args.category and args.description def get_values_from_editor(args): with tempfile.NamedTemporaryFile('w') as f: contents = TEMPLATE.format( change_type=args.change_type, category=args.category, description=args.description, ) f.write(contents) f.flush() env = os.environ editor = env.get('VISUAL', env.get('EDITOR', 'vim')) p = subprocess.Popen('%s %s' % (editor, f.name), shell=True) p.communicate() with open(f.name) as f: filled_in_contents = f.read() parsed_values = parse_filled_in_contents(filled_in_contents) return parsed_values def replace_issue_references(parsed, repo_name): description = parsed['description'] def linkify(match): number = match.group()[1:] return ( '`%s `__' % ( match.group(), repo_name, number)) new_description = re.sub('#\d+', linkify, description) parsed['description'] = new_description def write_new_change(parsed_values): if not os.path.isdir(CHANGES_DIR): os.makedirs(CHANGES_DIR) # Assume that new changes go into the next release. dirname = os.path.join(CHANGES_DIR, 'next-release') if not os.path.isdir(dirname): os.makedirs(dirname) # Need to generate a unique filename for this change. # We'll try a couple things until we get a unique match. category = parsed_values['category'] short_summary = ''.join(filter(lambda x: x in VALID_CHARS, category)) filename = '{type_name}-{summary}'.format( type_name=parsed_values['type'], summary=short_summary) possible_filename = os.path.join( dirname, '%s-%s.json' % (filename, str(random.randint(1, 100000)))) while os.path.isfile(possible_filename): possible_filename = os.path.join( dirname, '%s-%s.json' % (filename, str(random.randint(1, 100000)))) with open(possible_filename, 'w') as f: f.write(json.dumps(parsed_values, indent=2) + "\n") def parse_filled_in_contents(contents): """Parse filled in file contents and returns parsed dict. Return value will be:: { "type": "bugfix", "category": "category", "description": "This is a description" } """ if not contents.strip(): return {} parsed = {} lines = iter(contents.splitlines()) for line in lines: line = line.strip() if line.startswith('#'): continue if 'type' not in parsed and line.startswith('type:'): parsed['type'] = line.split(':')[1].strip() elif 'category' not in parsed and line.startswith('category:'): parsed['category'] = line.split(':')[1].strip() elif 'description' not in parsed and line.startswith('description:'): # Assume that everything until the end of the file is part # of the description, so we can break once we pull in the # remaining lines. first_line = line.split(':')[1].strip() full_description = '\n'.join([first_line] + list(lines)) parsed['description'] = full_description.strip() break return parsed def main(): parser = argparse.ArgumentParser() parser.add_argument('-t', '--type', dest='change_type', default='', choices=('bugfix', 'feature', 'enhancement', 'api-change')) parser.add_argument('-c', '--category', dest='category', default='') parser.add_argument('-d', '--description', dest='description', default='') parser.add_argument('-r', '--repo', default='boto/boto3', help='Optional repo name, e.g: boto/boto3') args = parser.parse_args() sys.exit(new_changelog_entry(args)) if __name__ == '__main__': main() boto3-1.9.253/setup.cfg000066400000000000000000000002171355237733400145560ustar00rootroot00000000000000[bdist_wheel] universal = 1 [metadata] requires-dist = botocore>=1.12.253,<1.13.0 jmespath>=0.7.1,<1.0.0 s3transfer>=0.2.0,<0.3.0 boto3-1.9.253/setup.py000066400000000000000000000031461355237733400144530ustar00rootroot00000000000000#!/usr/bin/env python """ distutils/setuptools install script. """ import os import re from setuptools import setup, find_packages ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') requires = [ 'botocore>=1.12.253,<1.13.0', 'jmespath>=0.7.1,<1.0.0', 's3transfer>=0.2.0,<0.3.0' ] def get_version(): init = open(os.path.join(ROOT, 'boto3', '__init__.py')).read() return VERSION_RE.search(init).group(1) setup( name='boto3', version=get_version(), description='The AWS SDK for Python', long_description=open('README.rst').read(), author='Amazon Web Services', url='https://github.com/boto/boto3', scripts=[], packages=find_packages(exclude=['tests*']), package_data={ 'boto3': [ 'data/aws/resources/*.json', 'examples/*.rst' ] }, include_package_data=True, install_requires=requires, license="Apache License 2.0", classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Natural Language :: English', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], ) boto3-1.9.253/tests/000077500000000000000000000000001355237733400140775ustar00rootroot00000000000000boto3-1.9.253/tests/__init__.py000066400000000000000000000046611355237733400162170ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import random import sys import time from botocore.compat import six # The unittest module got a significant overhaul # in 2.7, so if we're in 2.6 we can use the backported # version unittest2. if sys.version_info[:2] == (2, 6): import unittest2 as unittest else: import unittest # Python 3 includes mocking, while 2 requires an extra module. if sys.version_info[0] == 2: import mock else: from unittest import mock # In python 3, order matters when calling assertEqual to # compare lists and dictionaries with lists. Therefore, # assertItemsEqual needs to be used but it is renamed to # assertCountEqual in python 3. if six.PY2: unittest.TestCase.assertCountEqual = unittest.TestCase.assertItemsEqual def unique_id(name): """ Generate a unique ID that includes the given name, a timestamp and a random number. This helps when running integration tests in parallel that must create remote resources. """ return '{0}-{1}-{2}'.format(name, int(time.time()), random.randint(0, 10000)) class BaseTestCase(unittest.TestCase): """ A base test case which mocks out the low-level session to prevent any actual calls to Botocore. """ def setUp(self): self.bc_session_patch = mock.patch('botocore.session.Session') self.bc_session_cls = self.bc_session_patch.start() loader = self.bc_session_cls.return_value.get_component.return_value loader.data_path = '' self.loader = loader # We also need to patch the global default session. # Otherwise it could be a cached real session came from previous # "functional" or "integration" tests. patch_global_session = mock.patch('boto3.DEFAULT_SESSION') patch_global_session.start() self.addCleanup(patch_global_session.stop) def tearDown(self): self.bc_session_patch.stop() boto3-1.9.253/tests/functional/000077500000000000000000000000001355237733400162415ustar00rootroot00000000000000boto3-1.9.253/tests/functional/__init__.py000066400000000000000000000010611355237733400203500ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/tests/functional/docs/000077500000000000000000000000001355237733400171715ustar00rootroot00000000000000boto3-1.9.253/tests/functional/docs/__init__.py000066400000000000000000000070251355237733400213060ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest class BaseDocsFunctionalTests(unittest.TestCase): def assert_contains_lines_in_order(self, lines, contents): for line in lines: self.assertIn(line, contents) beginning = contents.find(line) contents = contents[(beginning + len(line)):] def get_class_document_block(self, class_name, contents): start_class_document = '.. py:class:: %s' % class_name start_index = contents.find(start_class_document) self.assertNotEqual(start_index, -1, 'Class is not found in contents') contents = contents[start_index:] end_index = contents.find( ' .. py:class::', len(start_class_document)) return contents[:end_index] def get_method_document_block(self, method_name, contents): start_method_document = ' .. py:method:: %s(' % method_name start_index = contents.find(start_method_document) self.assertNotEqual(start_index, -1, 'Method is not found in contents') contents = contents[start_index:] end_index = contents.find( ' .. py:method::', len(start_method_document)) return contents[:end_index] def get_request_syntax_document_block(self, contents): start_marker = '**Request Syntax**' start_index = contents.find(start_marker) self.assertNotEqual( start_index, -1, 'There is no request syntax section') contents = contents[start_index:] end_index = contents.find( ':type', len(start_marker)) return contents[:end_index] def get_response_syntax_document_block(self, contents): start_marker = '**Response Syntax**' start_index = contents.find(start_marker) self.assertNotEqual( start_index, -1, 'There is no response syntax section') contents = contents[start_index:] end_index = contents.find( '**Response Structure**', len(start_marker)) return contents[:end_index] def get_request_parameter_document_block(self, param_name, contents): start_param_document = ':type %s:' % param_name start_index = contents.find(start_param_document) self.assertNotEqual(start_index, -1, 'Param is not found in contents') contents = contents[start_index:] end_index = contents.find(':type', len(start_param_document)) return contents[:end_index] def get_response_parameter_document_block(self, param_name, contents): start_param_document = '**Response Structure**' start_index = contents.find(start_param_document) self.assertNotEqual(start_index, -1, 'There is no response structure') start_param_document = '- **%s**' % param_name start_index = contents.find(start_param_document) self.assertNotEqual(start_index, -1, 'Param is not found in contents') contents = contents[start_index:] end_index = contents.find('- **', len(start_param_document)) return contents[:end_index] boto3-1.9.253/tests/functional/docs/test_dynamodb.py000066400000000000000000000131621355237733400224020ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.functional.docs import BaseDocsFunctionalTests from boto3.session import Session from boto3.docs.service import ServiceDocumenter class TestDynamoDBCustomizations(BaseDocsFunctionalTests): def setUp(self): self.documenter = ServiceDocumenter( 'dynamodb', session=Session(region_name='us-east-1')) self.generated_contents = self.documenter.document_service() self.generated_contents = self.generated_contents.decode('utf-8') def test_batch_writer_is_documented(self): self.assert_contains_lines_in_order([ '.. py:class:: DynamoDB.Table(name)', ' * :py:meth:`batch_writer()`', ' .. py:method:: batch_writer(overwrite_by_pkeys=None)'], self.generated_contents ) def test_document_interface_is_documented(self): contents = self.get_class_document_block( 'DynamoDB.Table', self.generated_contents) # Take an arbitrary method that uses the customization. method_contents = self.get_method_document_block('put_item', contents) # Make sure the request syntax is as expected. request_syntax_contents = self.get_request_syntax_document_block( method_contents) self.assert_contains_lines_in_order([ 'response = table.put_item(', 'Item={', ('\'string\': \'string\'|123|Binary(b\'bytes\')' '|True|None|set([\'string\'])|set([123])|' 'set([Binary(b\'bytes\')])|[]|{}'), '},', 'Expected={', '\'string\': {', ('\'Value\': \'string\'|123' '|Binary(b\'bytes\')|True|None|set([\'string\'])' '|set([123])|set([Binary(b\'bytes\')])|[]|{},'), '\'AttributeValueList\': [', ('\'string\'|123|Binary(b\'bytes\')' '|True|None|set([\'string\'])|set([123])|' 'set([Binary(b\'bytes\')])|[]|{},')], request_syntax_contents) # Make sure the response syntax is as expected. response_syntax_contents = self.get_response_syntax_document_block( method_contents) self.assert_contains_lines_in_order([ '{', '\'Attributes\': {', ('\'string\': \'string\'|123|' 'Binary(b\'bytes\')|True|None|set([\'string\'])|' 'set([123])|set([Binary(b\'bytes\')])|[]|{}'), '},'], response_syntax_contents) # Make sure the request parameter is documented correctly. request_param_contents = self.get_request_parameter_document_block( 'Item', method_contents) self.assert_contains_lines_in_order([ ':type Item: dict', ':param Item: **[REQUIRED]**', '- *(string) --*', ('- *(valid DynamoDB type) --* - The value of the ' 'attribute. The valid value types are listed in the ' ':ref:`DynamoDB Reference Guide`.')], request_param_contents ) # Make sure the response parameter is documented correctly. response_param_contents = self.get_response_parameter_document_block( 'Attributes', method_contents) self.assert_contains_lines_in_order([ '- **Attributes** *(dict) --*', '- *(string) --*', ('- *(valid DynamoDB type) --* - The value of ' 'the attribute. The valid value types are listed in the ' ':ref:`DynamoDB Reference Guide`.')], response_param_contents) def test_conditions_is_documented(self): contents = self.get_class_document_block( 'DynamoDB.Table', self.generated_contents) # Take an arbitrary method that uses the customization. method_contents = self.get_method_document_block('query', contents) # Make sure the request syntax is as expected. request_syntax_contents = self.get_request_syntax_document_block( method_contents) self.assert_contains_lines_in_order([ 'response = table.query(', ('FilterExpression=Attr(\'myattribute\').' 'eq(\'myvalue\'),'), ('KeyConditionExpression=Key(\'mykey\')' '.eq(\'myvalue\'),')], request_syntax_contents) # Make sure the request parameter is documented correctly. self.assert_contains_lines_in_order([ (':type FilterExpression: condition from ' ':py:class:`boto3.dynamodb.conditions.Attr` method'), (':param FilterExpression: The condition(s) an ' 'attribute(s) must meet. Valid conditions are listed in ' 'the :ref:`DynamoDB Reference Guide`.'), (':type KeyConditionExpression: condition from ' ':py:class:`boto3.dynamodb.conditions.Key` method'), (':param KeyConditionExpression: The condition(s) a ' 'key(s) must meet. Valid conditions are listed in the ' ':ref:`DynamoDB Reference Guide`.')], method_contents) boto3-1.9.253/tests/functional/docs/test_ec2.py000066400000000000000000000026741355237733400212640ustar00rootroot00000000000000# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.functional.docs import BaseDocsFunctionalTests from boto3.session import Session from boto3.docs.service import ServiceDocumenter class TestInstanceDeleteTags(BaseDocsFunctionalTests): def setUp(self): self.documenter = ServiceDocumenter( 'ec2', session=Session(region_name='us-east-1')) self.generated_contents = self.documenter.document_service() self.generated_contents = self.generated_contents.decode('utf-8') def test_delete_tags_method_is_documented(self): contents = self.get_class_document_block( 'EC2.Instance', self.generated_contents) method_contents = self.get_method_document_block( 'delete_tags', contents) self.assert_contains_lines_in_order([ 'response = instance.delete_tags(', 'DryRun=True|False,', 'Tags=[', ], method_contents) boto3-1.9.253/tests/functional/docs/test_s3.py000066400000000000000000000026151355237733400211330ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.functional.docs import BaseDocsFunctionalTests from boto3.session import Session from boto3.docs.service import ServiceDocumenter class TestS3Customizations(BaseDocsFunctionalTests): def setUp(self): self.documenter = ServiceDocumenter( 's3', session=Session(region_name='us-east-1')) self.generated_contents = self.documenter.document_service() self.generated_contents = self.generated_contents.decode('utf-8') def test_file_transfer_methods_are_documented(self): self.assert_contains_lines_in_order([ '.. py:class:: S3.Client', ' * :py:meth:`~S3.Client.download_file`', ' * :py:meth:`~S3.Client.upload_file`', ' .. py:method:: download_file(', ' .. py:method:: upload_file('], self.generated_contents ) boto3-1.9.253/tests/functional/docs/test_smoke.py000066400000000000000000000133641355237733400217270ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from nose.tools import assert_true import botocore.session from botocore import xform_name from botocore.exceptions import DataNotFoundError import boto3 from boto3.docs.service import ServiceDocumenter def test_docs_generated(): """Verify we can generate the appropriate docs for all services""" botocore_session = botocore.session.get_session() session = boto3.Session(region_name='us-east-1') for service_name in session.get_available_services(): generated_docs = ServiceDocumenter( service_name, session=session).document_service() generated_docs = generated_docs.decode('utf-8') client = boto3.client(service_name, 'us-east-1') # Check that all of the services have the appropriate title yield (_assert_has_title, generated_docs, client) # Check that all services have the client documented. yield (_assert_has_client_documentation, generated_docs, service_name, client) # If the client can paginate, make sure the paginators are documented. try: paginator_model = botocore_session.get_paginator_model( service_name) yield (_assert_has_paginator_documentation, generated_docs, service_name, client, sorted(paginator_model._paginator_config)) except DataNotFoundError: pass # If the client has waiters, make sure the waiters are documented if client.waiter_names: waiter_model = botocore_session.get_waiter_model(service_name) yield (_assert_has_waiter_documentation, generated_docs, service_name, client, waiter_model) # If the service has resources, make sure the service resource # is at least documented. if service_name in session.get_available_resources(): resource = boto3.resource(service_name, 'us-east-1') yield (_assert_has_resource_documentation, generated_docs, service_name, resource) def _assert_contains_lines_in_order(lines, contents): for line in lines: assert_true(line in contents) beginning = contents.find(line) contents = contents[(beginning + len(line)):] def _assert_has_title(generated_docs, client): title = client.__class__.__name__ ref_lines = [ '*' * len(title), title, '*' * len(title) ] _assert_contains_lines_in_order(ref_lines, generated_docs) def _assert_has_client_documentation(generated_docs, service_name, client): class_name = client.__class__.__name__ ref_lines = [ '======', 'Client', '======', '.. py:class:: %s.Client' % class_name, ' A low-level client representing', ' import boto3', ' client = boto3.client(\'%s\')' % service_name, ' These are the available methods:', ' * :py:meth:`~%s.Client.get_paginator`' % class_name, ' * :py:meth:`~%s.Client.get_waiter`' % class_name, ' .. py:method:: get_paginator(operation_name)', ' .. py:method:: get_waiter(waiter_name)', ] _assert_contains_lines_in_order(ref_lines, generated_docs) def _assert_has_paginator_documentation(generated_docs, service_name, client, paginator_names): ref_lines = [ '==========', 'Paginators', '==========', 'The available paginators are:' ] for paginator_name in paginator_names: ref_lines.append( '* :py:class:`%s.Paginator.%s`' % ( client.__class__.__name__, paginator_name)) for paginator_name in paginator_names: ref_lines.append( '.. py:class:: %s.Paginator.%s' % ( client.__class__.__name__, paginator_name)) ref_lines.append( ' .. py:method:: paginate(') _assert_contains_lines_in_order(ref_lines, generated_docs) def _assert_has_waiter_documentation(generated_docs, service_name, client, waiter_model): ref_lines = [ '=======', 'Waiters', '=======', 'The available waiters are:' ] for waiter_name in waiter_model.waiter_names: ref_lines.append( '* :py:class:`%s.Waiter.%s`' % ( client.__class__.__name__, waiter_name)) for waiter_name in waiter_model.waiter_names: ref_lines.append( '.. py:class:: %s.Waiter.%s' % ( client.__class__.__name__, waiter_name)) ref_lines.append( ' waiter = client.get_waiter(\'%s\')' % xform_name(waiter_name)) ref_lines.append( ' .. py:method:: wait(') _assert_contains_lines_in_order(ref_lines, generated_docs) def _assert_has_resource_documentation(generated_docs, service_name, resource): ref_lines = [ '================', 'Service Resource', '================', '.. py:class:: %s.ServiceResource' % ( resource.meta.client.__class__.__name__), ' A resource representing', ' import boto3', ' %s = boto3.resource(\'%s\')' % (service_name, service_name), ] _assert_contains_lines_in_order(ref_lines, generated_docs) boto3-1.9.253/tests/functional/dynamodb/000077500000000000000000000000001355237733400200365ustar00rootroot00000000000000boto3-1.9.253/tests/functional/dynamodb/__init__.py000066400000000000000000000010611355237733400221450ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/tests/functional/dynamodb/test_stubber_conditions.py000066400000000000000000000044141355237733400253510ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.stub import Stubber import boto3 from boto3.dynamodb.conditions import Attr, Key from tests import unittest class TestStubberSupportsFilterExpressions(unittest.TestCase): maxDiff = None def setUp(self): self.resource = boto3.resource('dynamodb', 'us-east-1') def test_table_query_can_be_stubbed_with_expressions(self): table = self.resource.Table('mytable') key_expr = Key('mykey').eq('testkey') filter_expr = Attr('myattr').eq('foo') & ( Attr('myattr2').lte('buzz') | Attr('myattr2').gte('fizz') ) stubber = Stubber(table.meta.client) stubber.add_response('query', dict(Items=list()), expected_params=dict( TableName='mytable', KeyConditionExpression=key_expr, FilterExpression=filter_expr )) with stubber: response = table.query(KeyConditionExpression=key_expr, FilterExpression=filter_expr) self.assertEqual(list(), response['Items']) stubber.assert_no_pending_responses() def test_table_scan_can_be_stubbed_with_expressions(self): table = self.resource.Table('mytable') filter_expr = Attr('myattr').eq('foo') & ( Attr('myattr2').lte('buzz') | Attr('myattr2').gte('fizz') ) stubber = Stubber(table.meta.client) stubber.add_response('scan', dict(Items=list()), expected_params=dict( TableName='mytable', FilterExpression=filter_expr )) with stubber: response = table.scan(FilterExpression=filter_expr) self.assertEqual(list(), response['Items']) stubber.assert_no_pending_responses() boto3-1.9.253/tests/functional/dynamodb/test_table.py000066400000000000000000000026351355237733400225440ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest, mock import boto3 from botocore.stub import Stubber class TestTableResourceCustomizations(unittest.TestCase): maxDiff = None def setUp(self): self.resource = boto3.resource('dynamodb', 'us-east-1') def test_resource_has_batch_writer_added(self): table = self.resource.Table('mytable') self.assertTrue(hasattr(table, 'batch_writer')) def test_operation_without_output(self): table = self.resource.Table('mytable') stubber = Stubber(table.meta.client) stubber.add_response('tag_resource', {}) arn = 'arn:aws:dynamodb:us-west-2:123456789:table/mytable' with stubber: table.meta.client.tag_resource( ResourceArn=arn, Tags=[{'Key': 'project', 'Value': 'val'}] ) stubber.assert_no_pending_responses() boto3-1.9.253/tests/functional/test_collection.py000066400000000000000000000023731355237733400220120ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest from boto3.session import Session from boto3.resources.collection import ResourceCollection class TestCollection(unittest.TestCase): def setUp(self): self.session = Session( aws_access_key_id='dummy', aws_secret_access_key='dummy', region_name='us-east-1') # Pick an arbitrary resource. self.ec2_resource = self.session.resource('ec2') def test_can_use_collection_methods(self): self.assertIsInstance( self.ec2_resource.instances.all(), ResourceCollection) def test_can_chain_methods(self): self.assertIsInstance( self.ec2_resource.instances.all().page_size(5), ResourceCollection) boto3-1.9.253/tests/functional/test_dynamodb.py000066400000000000000000000053701355237733400214540ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import json from tests import unittest, mock from botocore.awsrequest import AWSResponse from boto3.session import Session from boto3.dynamodb.conditions import Attr class TestDynamoDB(unittest.TestCase): def setUp(self): self.http_response = AWSResponse(None, 200, {}, None) self.parsed_response = {} self.make_request_patch = mock.patch( 'botocore.endpoint.Endpoint.make_request') self.make_request_mock = self.make_request_patch.start() self.make_request_mock.return_value = ( self.http_response, self.parsed_response) self.session = Session( aws_access_key_id='dummy', aws_secret_access_key='dummy', region_name='us-east-1') def tearDown(self): self.make_request_patch.stop() def test_resource(self): dynamodb = self.session.resource('dynamodb') table = dynamodb.Table('MyTable') # Make sure it uses the high level interface table.scan(FilterExpression=Attr('mykey').eq('myvalue')) request = self.make_request_mock.call_args_list[0][0][1] request_params = json.loads(request['body'].decode('utf-8')) self.assertEqual( request_params, {'TableName': 'MyTable', 'FilterExpression': '#n0 = :v0', 'ExpressionAttributeNames': {'#n0': 'mykey'}, 'ExpressionAttributeValues': {':v0': {'S': 'myvalue'}}} ) def test_client(self): dynamodb = self.session.client('dynamodb') # Make sure the client still uses the botocore level interface dynamodb.scan( TableName='MyTable', FilterExpression='#n0 = :v0', ExpressionAttributeNames={'#n0': 'mykey'}, ExpressionAttributeValues={':v0': {'S': 'myvalue'}} ) request = self.make_request_mock.call_args_list[0][0][1] request_params = json.loads(request['body'].decode('utf-8')) self.assertEqual( request_params, {'TableName': 'MyTable', 'FilterExpression': '#n0 = :v0', 'ExpressionAttributeNames': {'#n0': 'mykey'}, 'ExpressionAttributeValues': {':v0': {'S': 'myvalue'}}} ) boto3-1.9.253/tests/functional/test_ec2.py000066400000000000000000000045511355237733400203300ustar00rootroot00000000000000# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import unittest import boto3.session from botocore.stub import Stubber class TestInstanceDeleteTags(unittest.TestCase): def setUp(self): self.session = boto3.session.Session(region_name='us-west-2') self.service_resource = self.session.resource('ec2') self.instance_resource = self.service_resource.Instance('i-abc123') def test_delete_tags_injected(self): self.assertTrue(hasattr(self.instance_resource, 'delete_tags'), 'delete_tags was not injected onto Instance resource.') def test_delete_tags(self): stubber = Stubber(self.instance_resource.meta.client) stubber.add_response('delete_tags', {}) stubber.activate() response = self.instance_resource.delete_tags(Tags=[{'Key': 'foo'}]) stubber.assert_no_pending_responses() self.assertEqual(response, {}) stubber.deactivate() def test_mutating_filters(self): stubber = Stubber(self.service_resource.meta.client) instance_filters = [ {'Name': 'instance-state-name', 'Values': ['running']} ] running_instances = self.service_resource.instances.filter( Filters=instance_filters ) # This should not impact the already-created filter. instance_filters.append( {'Name': 'instance-type', 'Values': ['c4.large']} ) stubber.add_response( method='describe_instances', service_response={ 'Reservations': [] }, expected_params={ 'Filters': [{ 'Name': 'instance-state-name', 'Values': ['running'] }] } ) with stubber: list(running_instances) stubber.assert_no_pending_responses() boto3-1.9.253/tests/functional/test_resource.py000066400000000000000000000037551355237733400215130ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import boto3 from boto3.exceptions import ResourceNotExistsError import botocore.session from tests import unittest def identity(self, x): return x class TestResourceCustomization(unittest.TestCase): def setUp(self): self.botocore_session = botocore.session.get_session() def add_new_method(self, name): def handler(class_attributes, **kwargs): class_attributes[name] = identity return handler def test_can_inject_method_onto_resource(self): session = boto3.Session(botocore_session=self.botocore_session) self.botocore_session.register('creating-resource-class.s3', self.add_new_method(name='my_method')) resource = session.resource('s3') self.assertTrue(hasattr(resource, 'my_method')) self.assertEqual(resource.my_method('anything'), 'anything') class TestSessionErrorMessages(unittest.TestCase): def test_has_good_error_message_when_no_resource(self): bad_resource_name = 'doesnotexist' err_regex = ( '%s.*resource does not exist.' % bad_resource_name ) with self.assertRaisesRegexp(ResourceNotExistsError, err_regex): boto3.resource(bad_resource_name) class TestGetAvailableSubresources(unittest.TestCase): def test_s3_available_subresources_exists(self): s3 = boto3.resource('s3') self.assertTrue(hasattr(s3, 'get_available_subresources')) boto3-1.9.253/tests/functional/test_s3.py000066400000000000000000000471741355237733400202140ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest import botocore import botocore.stub from botocore.config import Config from botocore.stub import Stubber from botocore.compat import six import boto3.session from boto3.s3.transfer import TransferConfig class TestS3MethodInjection(unittest.TestCase): def test_transfer_methods_injected_to_client(self): session = boto3.session.Session(region_name='us-west-2') client = session.client('s3') self.assertTrue(hasattr(client, 'upload_file'), 'upload_file was not injected onto S3 client') self.assertTrue(hasattr(client, 'download_file'), 'download_file was not injected onto S3 client') self.assertTrue(hasattr(client, 'copy'), 'copy was not injected onto S3 client') def test_bucket_resource_has_load_method(self): session = boto3.session.Session(region_name='us-west-2') bucket = session.resource('s3').Bucket('fakebucket') self.assertTrue(hasattr(bucket, 'load'), 'load() was not injected onto S3 Bucket resource.') def test_transfer_methods_injected_to_bucket(self): bucket = boto3.resource('s3').Bucket('my_bucket') self.assertTrue(hasattr(bucket, 'upload_file'), 'upload_file was not injected onto S3 bucket') self.assertTrue(hasattr(bucket, 'download_file'), 'download_file was not injected onto S3 bucket') self.assertTrue(hasattr(bucket, 'copy'), 'copy was not injected onto S3 bucket') def test_transfer_methods_injected_to_object(self): obj = boto3.resource('s3').Object('my_bucket', 'my_key') self.assertTrue(hasattr(obj, 'upload_file'), 'upload_file was not injected onto S3 object') self.assertTrue(hasattr(obj, 'download_file'), 'download_file was not injected onto S3 object') self.assertTrue(hasattr(obj, 'copy'), 'copy was not injected onto S3 object') class BaseTransferTest(unittest.TestCase): def setUp(self): self.session = boto3.session.Session( aws_access_key_id='foo', aws_secret_access_key='bar', region_name='us-west-2') self.s3 = self.session.resource('s3') self.stubber = Stubber(self.s3.meta.client) self.bucket = 'mybucket' self.key = 'mykey' self.upload_id = 'uploadid' self.etag = '"example0etag"' self.progress = 0 self.progress_times_called = 0 def stub_head(self, content_length=4, expected_params=None): head_response = { 'AcceptRanges': 'bytes', 'ContentLength': content_length, 'ContentType': 'binary/octet-stream', 'ETag': self.etag, 'Metadata': {}, 'ResponseMetadata': { 'HTTPStatusCode': 200, } } if expected_params is None: expected_params = { 'Bucket': self.bucket, 'Key': self.key } self.stubber.add_response( method='head_object', service_response=head_response, expected_params=expected_params) def stub_create_multipart_upload(self): # Add the response and assert params for CreateMultipartUpload create_upload_response = { "Bucket": self.bucket, "Key": self.key, "UploadId": self.upload_id } expected_params = { "Bucket": self.bucket, "Key": self.key, } self.stubber.add_response( method='create_multipart_upload', service_response=create_upload_response, expected_params=expected_params) def stub_complete_multipart_upload(self, parts): complete_upload_response = { "Location": "us-west-2", "Bucket": self.bucket, "Key": self.key, "ETag": self.etag } expected_params = { "Bucket": self.bucket, "Key": self.key, "MultipartUpload": { "Parts": parts }, "UploadId": self.upload_id } self.stubber.add_response( method='complete_multipart_upload', service_response=complete_upload_response, expected_params=expected_params) class TestCopy(BaseTransferTest): def setUp(self): super(TestCopy, self).setUp() self.copy_source = {'Bucket': 'foo', 'Key': 'bar'} def stub_single_part_copy(self): self.stub_head(expected_params=self.copy_source) self.stub_copy_object() def stub_multipart_copy(self, part_size, num_parts): # Set the HEAD to return the total size total_size = part_size * num_parts self.stub_head( content_length=total_size, expected_params=self.copy_source) self.stub_create_multipart_upload() # Add the responses for each UploadPartCopy parts = [] for i in range(num_parts): # Fill in the parts part_number = i + 1 copy_range = "bytes=%s-%s" % ( i * part_size, i * part_size + (part_size - 1) ) self.stub_copy_part(part_number=part_number, copy_range=copy_range) parts.append({'ETag': self.etag, 'PartNumber': part_number}) self.stub_complete_multipart_upload(parts) def stub_copy_object(self): copy_response = { 'CopyObjectResult': { 'ETag': self.etag }, 'ResponseMetadata': { 'HTTPStatusCode': 200 } } expected_params = { "Bucket": self.bucket, "Key": self.key, "CopySource": self.copy_source } self.stubber.add_response( method='copy_object', service_response=copy_response, expected_params=expected_params) def stub_copy_part(self, part_number, copy_range): copy_part_response = { "CopyPartResult": { "ETag": self.etag }, 'ResponseMetadata': { 'HTTPStatusCode': 200 } } expected_params = { "Bucket": self.bucket, "Key": self.key, "CopySource": self.copy_source, "UploadId": self.upload_id, "PartNumber": part_number, "CopySourceRange": copy_range } self.stubber.add_response( method='upload_part_copy', service_response=copy_part_response, expected_params=expected_params) def test_client_copy(self): self.stub_single_part_copy() with self.stubber: response = self.s3.meta.client.copy( self.copy_source, self.bucket, self.key) # The response will be none on a successful transfer. self.assertIsNone(response) def test_bucket_copy(self): self.stub_single_part_copy() bucket = self.s3.Bucket(self.bucket) with self.stubber: response = bucket.copy(self.copy_source, self.key) # The response will be none on a successful transfer. self.assertIsNone(response) def test_object_copy(self): self.stub_single_part_copy() obj = self.s3.Object(self.bucket, self.key) with self.stubber: response = obj.copy(self.copy_source) self.assertIsNone(response) def test_copy_progress(self): chunksize = 8 * (1024 ** 2) self.stub_multipart_copy(chunksize, 3) transfer_config = TransferConfig( multipart_chunksize=chunksize, multipart_threshold=1, max_concurrency=1) def progress_callback(amount): self.progress += amount self.progress_times_called += 1 with self.stubber: self.s3.meta.client.copy( Bucket=self.bucket, Key=self.key, CopySource=self.copy_source, Config=transfer_config, Callback=progress_callback) # Assert that the progress callback was called the correct number of # times with the correct amounts. self.assertEqual(self.progress_times_called, 3) self.assertEqual(self.progress, chunksize * 3) class TestUploadFileobj(BaseTransferTest): def setUp(self): super(TestUploadFileobj, self).setUp() self.contents = six.BytesIO(b'foo\n') def stub_put_object(self): put_object_response = { "ETag": self.etag, "ResponseMetadata": { "HTTPStatusCode": 200 } } expected_params = { "Bucket": self.bucket, "Key": self.key, "Body": botocore.stub.ANY } self.stubber.add_response( method='put_object', service_response=put_object_response, expected_params=expected_params) def stub_upload_part(self, part_number): upload_part_response = { 'ETag': self.etag, 'ResponseMetadata': { 'HTTPStatusCode': 200 } } expected_params = { "Bucket": self.bucket, "Key": self.key, "Body": botocore.stub.ANY, "PartNumber": part_number, "UploadId": self.upload_id } self.stubber.add_response( method='upload_part', service_response=upload_part_response, expected_params=expected_params) def stub_multipart_upload(self, num_parts): self.stub_create_multipart_upload() # Add the responses for each UploadPartCopy parts = [] for i in range(num_parts): # Fill in the parts part_number = i + 1 self.stub_upload_part(part_number=part_number) parts.append({'ETag': self.etag, 'PartNumber': part_number}) self.stub_complete_multipart_upload(parts) def test_client_upload(self): self.stub_put_object() with self.stubber: # The stubber will assert that all the right parameters are called. self.s3.meta.client.upload_fileobj( Fileobj=self.contents, Bucket=self.bucket, Key=self.key) self.stubber.assert_no_pending_responses() def test_raises_value_error_on_invalid_fileobj(self): with self.stubber: with self.assertRaises(ValueError): self.s3.meta.client.upload_fileobj( Fileobj='foo', Bucket=self.bucket, Key=self.key) def test_bucket_upload(self): self.stub_put_object() bucket = self.s3.Bucket(self.bucket) with self.stubber: # The stubber will assert that all the right parameters are called. bucket.upload_fileobj(Fileobj=self.contents, Key=self.key) self.stubber.assert_no_pending_responses() def test_object_upload(self): self.stub_put_object() obj = self.s3.Object(self.bucket, self.key) with self.stubber: # The stubber will assert that all the right parameters are called. obj.upload_fileobj(Fileobj=self.contents) self.stubber.assert_no_pending_responses() def test_multipart_upload(self): chunksize = 8 * (1024 ** 2) contents = six.BytesIO(b'0' * (chunksize * 3)) self.stub_multipart_upload(num_parts=3) transfer_config = TransferConfig( multipart_chunksize=chunksize, multipart_threshold=1, max_concurrency=1) with self.stubber: # The stubber will assert that all the right parameters are called. self.s3.meta.client.upload_fileobj( Fileobj=contents, Bucket=self.bucket, Key=self.key, Config=transfer_config) self.stubber.assert_no_pending_responses() class TestDownloadFileobj(BaseTransferTest): def setUp(self): super(TestDownloadFileobj, self).setUp() self.contents = b'foo' self.fileobj = six.BytesIO() def stub_single_part_download(self): self.stub_head(content_length=len(self.contents)) self.stub_get_object(self.contents) def stub_get_object(self, full_contents, start_byte=0, end_byte=None): """ Stubs out the get_object operation. :param full_contents: The FULL contents of the object :param start_byte: The first byte to grab. :param end_byte: The last byte to grab. """ get_object_response = {} expected_params = {} contents = full_contents end_byte_range = end_byte # If the start byte is set and the end byte is not, the end byte is # the last byte. if start_byte != 0 and end_byte is None: end_byte = len(full_contents) - 1 # The range on get object where the the end byte is the last byte # should set the input range as e.g. Range='bytes=3-' if end_byte == len(full_contents) - 1: end_byte_range = '' # If this is a ranged get, ContentRange needs to be returned, # contents needs to be pruned, and Range needs to be an expected param. if end_byte is not None: contents = full_contents[start_byte:end_byte+1] part_range = 'bytes=%s-%s' % (start_byte, end_byte_range) content_range = 'bytes=%s-%s/%s' % ( start_byte, end_byte, len(full_contents)) get_object_response['ContentRange'] = content_range expected_params['Range'] = part_range get_object_response.update({ "AcceptRanges": "bytes", "ETag": self.etag, "ContentLength": len(contents), "ContentType": "binary/octet-stream", "Body": six.BytesIO(contents), "ResponseMetadata": { "HTTPStatusCode": 200 } }) expected_params.update({ "Bucket": self.bucket, "Key": self.key }) self.stubber.add_response( method='get_object', service_response=get_object_response, expected_params=expected_params) def stub_multipart_download(self, contents, part_size, num_parts): self.stub_head(content_length=len(contents)) for i in range(num_parts): start_byte = i * part_size end_byte = (i + 1) * part_size - 1 self.stub_get_object( full_contents=contents, start_byte=start_byte, end_byte=end_byte) def test_client_download(self): self.stub_single_part_download() with self.stubber: self.s3.meta.client.download_fileobj( Bucket=self.bucket, Key=self.key, Fileobj=self.fileobj) self.assertEqual(self.fileobj.getvalue(), self.contents) self.stubber.assert_no_pending_responses() def test_raises_value_error_on_invalid_fileobj(self): with self.stubber: with self.assertRaises(ValueError): self.s3.meta.client.download_fileobj( Bucket=self.bucket, Key=self.key, Fileobj='foo') def test_bucket_download(self): self.stub_single_part_download() bucket = self.s3.Bucket(self.bucket) with self.stubber: bucket.download_fileobj(Key=self.key, Fileobj=self.fileobj) self.assertEqual(self.fileobj.getvalue(), self.contents) self.stubber.assert_no_pending_responses() def test_object_download(self): self.stub_single_part_download() obj = self.s3.Object(self.bucket, self.key) with self.stubber: obj.download_fileobj(Fileobj=self.fileobj) self.assertEqual(self.fileobj.getvalue(), self.contents) self.stubber.assert_no_pending_responses() def test_multipart_download(self): self.contents = b'A' * 55 self.stub_multipart_download( contents=self.contents, part_size=5, num_parts=11) transfer_config = TransferConfig( multipart_chunksize=5, multipart_threshold=1, max_concurrency=1) with self.stubber: self.s3.meta.client.download_fileobj( Bucket=self.bucket, Key=self.key, Fileobj=self.fileobj, Config=transfer_config) self.assertEqual(self.fileobj.getvalue(), self.contents) self.stubber.assert_no_pending_responses() def test_download_progress(self): self.contents = b'A' * 55 self.stub_multipart_download( contents=self.contents, part_size=5, num_parts=11) transfer_config = TransferConfig( multipart_chunksize=5, multipart_threshold=1, max_concurrency=1) def progress_callback(amount): self.progress += amount self.progress_times_called += 1 with self.stubber: self.s3.meta.client.download_fileobj( Bucket=self.bucket, Key=self.key, Fileobj=self.fileobj, Config=transfer_config, Callback=progress_callback) # Assert that the progress callback was called the correct number of # times with the correct amounts. self.assertEqual(self.progress_times_called, 11) self.assertEqual(self.progress, 55) self.stubber.assert_no_pending_responses() class TestS3ObjectSummary(unittest.TestCase): def setUp(self): self.session = boto3.session.Session( aws_access_key_id='foo', aws_secret_access_key='bar', region_name='us-west-2') self.s3 = self.session.resource('s3') self.obj_summary = self.s3.ObjectSummary('my_bucket', 'my_key') self.obj_summary_size = 12 self.stubber = Stubber(self.s3.meta.client) self.stubber.activate() self.stubber.add_response( method='head_object', service_response={ 'ContentLength': self.obj_summary_size, 'ETag': 'my-etag', 'ContentType': 'binary' }, expected_params={ 'Bucket': 'my_bucket', 'Key': 'my_key' } ) def tearDown(self): self.stubber.deactivate() def test_has_load(self): self.assertTrue(hasattr(self.obj_summary, 'load'), 'load() was not injected onto ObjectSummary resource.') def test_autoloads_correctly(self): # In HeadObject the parameter returned is ContentLength, this # should get mapped to Size of ListObject since the resource uses # the shape returned to by ListObjects. self.assertEqual(self.obj_summary.size, self.obj_summary_size) def test_cannot_access_other_non_related_parameters(self): # Even though an HeadObject was used to load this, it should # only expose the attributes from its shape defined in ListObjects. self.assertFalse(hasattr(self.obj_summary, 'content_length')) class TestServiceResource(unittest.TestCase): def setUp(self): self.session = boto3.session.Session() def test_unsigned_signature_version_is_not_corrupted(self): config = Config(signature_version=botocore.UNSIGNED) resource = self.session.resource('s3', config=config) self.assertIs( resource.meta.client.meta.config.signature_version, botocore.UNSIGNED ) boto3-1.9.253/tests/functional/test_session.py000066400000000000000000000034201355237733400213340ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest import boto3.session class TestSession(unittest.TestCase): def setUp(self): self.session = boto3.session.Session(region_name='us-west-2') def test_events_attribute(self): # Create some function to register. def my_handler(my_list, **kwargs): return my_list.append('my_handler called') # Register the handler to the event. self.session.events.register('myevent', my_handler) initial_list = [] # Emit the event. self.session.events.emit('myevent', my_list=initial_list) # Ensure that the registered handler was called. self.assertEqual(initial_list, ['my_handler called']) def test_can_access_region_property(self): session = boto3.session.Session(region_name='us-west-1') self.assertEqual(session.region_name, 'us-west-1') def test_get_available_partitions(self): partitions = self.session.get_available_partitions() self.assertIsInstance(partitions, list) self.assertTrue(partitions) def test_get_available_regions(self): regions = self.session.get_available_regions('s3') self.assertIsInstance(regions, list) self.assertTrue(regions) boto3-1.9.253/tests/functional/test_smoke.py000066400000000000000000000053661355237733400210020ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from nose.tools import assert_true from boto3.session import Session import botocore.session def create_session(): session = Session(aws_access_key_id='dummy', aws_secret_access_key='dummy', region_name='us-east-1') return session def test_can_create_all_resources(): """Verify we can create all existing resources.""" session = create_session() for service_name in session.get_available_resources(): yield _test_create_resource, session, service_name def _test_create_resource(session, service_name): resource = session.resource(service_name) # Verifying we have a "meta" attr is just an arbitrary # sanity check. assert_true(hasattr(resource, 'meta')) def test_can_create_all_clients(): session = create_session() for service_name in session.get_available_services(): yield _test_create_client, session, service_name def _test_create_client(session, service_name): client = session.client(service_name) assert_true(hasattr(client, 'meta')) def test_api_versions_synced_with_botocore(): botocore_session = botocore.session.get_session() boto3_session = create_session() for service_name in boto3_session.get_available_resources(): yield (_assert_same_api_versions, service_name, botocore_session, boto3_session) def _assert_same_api_versions(service_name, botocore_session, boto3_session): resource = boto3_session.resource(service_name) boto3_api_version = resource.meta.client.meta.service_model.api_version client = botocore_session.create_client(service_name, region_name='us-east-1', aws_access_key_id='foo', aws_secret_access_key='bar') botocore_api_version = client.meta.service_model.api_version if botocore_api_version != boto3_api_version: raise AssertionError( "Different latest API versions found for %s: " "%s (botocore), %s (boto3)\n" % (service_name, botocore_api_version, boto3_api_version)) boto3-1.9.253/tests/functional/test_utils.py000066400000000000000000000026371355237733400210220ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest import botocore.session from boto3 import utils import boto3.session class TestUtils(unittest.TestCase): def test_runtime_error_raised_when_shadowing_client_method(self): botocore_session = botocore.session.get_session() session = boto3.session.Session(region_name='us-west-2', botocore_session=botocore_session) def shadows_put_object(class_attributes, **kwargs): utils.inject_attribute(class_attributes, 'put_object', 'invalid') botocore_session.register('creating-client-class', shadows_put_object) with self.assertRaises(RuntimeError): # This should raise an exception because we're trying to # shadow the put_object client method in the # shadows_put_object handler above. session.client('s3') boto3-1.9.253/tests/integration/000077500000000000000000000000001355237733400164225ustar00rootroot00000000000000boto3-1.9.253/tests/integration/__init__.py000066400000000000000000000010611355237733400205310ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/tests/integration/test_collections.py000066400000000000000000000036071355237733400223570ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import boto3.session from boto3.resources.collection import CollectionManager # A map of services to regions that cannot use us-west-2 # for the integration tests. REGION_MAP = { 'opsworks': 'us-east-1' } # A list of collections to ignore. They require parameters # or are very slow to run. BLACKLIST = { 'ec2': ['images'], 'iam': ['signing_certificates'], 'sqs': ['dead_letter_source_queues'] } def test_all_collections(): # This generator yields test functions for every collection # on every available resource, except those which have # been blacklisted. session = boto3.session.Session() for service_name in session.get_available_resources(): resource = session.resource( service_name, region_name=REGION_MAP.get(service_name, 'us-west-2')) for key in dir(resource): if key in BLACKLIST.get(service_name, []): continue value = getattr(resource, key) if isinstance(value, CollectionManager): yield _test_collection, service_name, key, value def _test_collection(service_name, collection_name, collection): # Create a list of the first page of items. This tests that # a remote request can be made, the response parsed, and that # resources are successfully created. list(collection.limit(1)) boto3-1.9.253/tests/integration/test_dynamodb.py000066400000000000000000000204031355237733400216270ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from decimal import Decimal import boto3.session from boto3.compat import collections_abc from boto3.dynamodb.types import Binary from boto3.dynamodb.conditions import Attr, Key from tests import unittest, unique_id class BaseDynamoDBTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.session = boto3.session.Session(region_name='us-west-2') cls.dynamodb = cls.session.resource('dynamodb') cls.table_name = unique_id('boto3db') cls.item_data = { 'MyHashKey': 'mykey', 'MyNull': None, 'MyBool': True, 'MyString': 'mystring', 'MyNumber': Decimal('1.25'), 'MyBinary': Binary(b'\x01'), 'MyStringSet': set(['foo']), 'MyNumberSet': set([Decimal('1.25')]), 'MyBinarySet': set([Binary(b'\x01')]), 'MyList': ['foo'], 'MyMap': {'foo': 'bar'} } cls.table = cls.dynamodb.create_table( TableName=cls.table_name, ProvisionedThroughput={"ReadCapacityUnits": 5, "WriteCapacityUnits": 5}, KeySchema=[{"AttributeName": "MyHashKey", "KeyType": "HASH"}], AttributeDefinitions=[{"AttributeName": "MyHashKey", "AttributeType": "S"}]) waiter = cls.dynamodb.meta.client.get_waiter('table_exists') waiter.wait(TableName=cls.table_name) @classmethod def tearDownClass(cls): cls.table.delete() class TestDynamoDBTypes(BaseDynamoDBTest): def test_put_get_item(self): self.table.put_item(Item=self.item_data) self.addCleanup(self.table.delete_item, Key={'MyHashKey': 'mykey'}) response = self.table.get_item(Key={'MyHashKey': 'mykey'}, ConsistentRead=True) self.assertEqual(response['Item'], self.item_data) class TestDynamoDBConditions(BaseDynamoDBTest): @classmethod def setUpClass(cls): super(TestDynamoDBConditions, cls).setUpClass() cls.table.put_item(Item=cls.item_data) @classmethod def tearDownClass(cls): cls.table.delete_item(Key={'MyHashKey': 'mykey'}) super(TestDynamoDBConditions, cls).tearDownClass() def scan(self, filter_expression): return self.table.scan(FilterExpression=filter_expression, ConsistentRead=True) def query(self, key_condition_expression, filter_expression=None): kwargs = { 'KeyConditionExpression': key_condition_expression, 'ConsistentRead': True } if filter_expression is not None: kwargs['FilterExpression'] = filter_expression return self.table.query(**kwargs) def test_filter_expression(self): r = self.scan( filter_expression=Attr('MyHashKey').eq('mykey')) self.assertEqual(r['Items'][0]['MyHashKey'], 'mykey') def test_key_condition_expression(self): r = self.query( key_condition_expression=Key('MyHashKey').eq('mykey')) self.assertEqual(r['Items'][0]['MyHashKey'], 'mykey') def test_key_condition_with_filter_condition_expression(self): r = self.query( key_condition_expression=Key('MyHashKey').eq('mykey'), filter_expression=Attr('MyString').eq('mystring')) self.assertEqual(r['Items'][0]['MyString'], 'mystring') def test_condition_less_than(self): r = self.scan( filter_expression=Attr('MyNumber').lt(Decimal('1.26'))) self.assertTrue(r['Items'][0]['MyNumber'] < Decimal('1.26')) def test_condition_less_than_equal(self): r = self.scan( filter_expression=Attr('MyNumber').lte(Decimal('1.26'))) self.assertTrue(r['Items'][0]['MyNumber'] <= Decimal('1.26')) def test_condition_greater_than(self): r = self.scan( filter_expression=Attr('MyNumber').gt(Decimal('1.24'))) self.assertTrue(r['Items'][0]['MyNumber'] > Decimal('1.24')) def test_condition_greater_than_equal(self): r = self.scan( filter_expression=Attr('MyNumber').gte(Decimal('1.24'))) self.assertTrue(r['Items'][0]['MyNumber'] >= Decimal('1.24')) def test_condition_begins_with(self): r = self.scan( filter_expression=Attr('MyString').begins_with('my')) self.assertTrue(r['Items'][0]['MyString'].startswith('my')) def test_condition_between(self): r = self.scan( filter_expression=Attr('MyNumber').between( Decimal('1.24'), Decimal('1.26'))) self.assertTrue(r['Items'][0]['MyNumber'] > Decimal('1.24')) self.assertTrue(r['Items'][0]['MyNumber'] < Decimal('1.26')) def test_condition_not_equal(self): r = self.scan( filter_expression=Attr('MyHashKey').ne('notmykey')) self.assertNotEqual(r['Items'][0]['MyHashKey'], 'notmykey') def test_condition_in(self): r = self.scan( filter_expression=Attr('MyHashKey').is_in(['notmykey', 'mykey'])) self.assertIn(r['Items'][0]['MyHashKey'], ['notmykey', 'mykey']) def test_condition_exists(self): r = self.scan( filter_expression=Attr('MyString').exists()) self.assertIn('MyString', r['Items'][0]) def test_condition_not_exists(self): r = self.scan( filter_expression=Attr('MyFakeKey').not_exists()) self.assertNotIn('MyFakeKey', r['Items'][0]) def test_condition_contains(self): r = self.scan( filter_expression=Attr('MyString').contains('my')) self.assertIn('my', r['Items'][0]['MyString']) def test_condition_size(self): r = self.scan( filter_expression=Attr('MyString').size().eq(len('mystring'))) self.assertEqual(len(r['Items'][0]['MyString']), len('mystring')) def test_condition_attribute_type(self): r = self.scan( filter_expression=Attr('MyMap').attribute_type('M')) self.assertIsInstance(r['Items'][0]['MyMap'], collections_abc.Mapping) def test_condition_and(self): r = self.scan( filter_expression=(Attr('MyHashKey').eq('mykey') & Attr('MyString').eq('mystring'))) item = r['Items'][0] self.assertTrue( item['MyHashKey'] == 'mykey' and item['MyString'] == 'mystring') def test_condition_or(self): r = self.scan( filter_expression=(Attr('MyHashKey').eq('mykey2') | Attr('MyString').eq('mystring'))) item = r['Items'][0] self.assertTrue( item['MyHashKey'] == 'mykey2' or item['MyString'] == 'mystring') def test_condition_not(self): r = self.scan( filter_expression=(~Attr('MyHashKey').eq('mykey2'))) item = r['Items'][0] self.assertTrue(item['MyHashKey'] != 'mykey2') def test_condition_in_map(self): r = self.scan( filter_expression=Attr('MyMap.foo').eq('bar')) self.assertEqual(r['Items'][0]['MyMap']['foo'], 'bar') def test_condition_in_list(self): r = self.scan( filter_expression=Attr('MyList[0]').eq('foo')) self.assertEqual(r['Items'][0]['MyList'][0], 'foo') class TestDynamodbBatchWrite(BaseDynamoDBTest): def test_batch_write_items(self): num_elements = 1000 items = [] for i in range(num_elements): items.append({'MyHashKey': 'foo%s' % i, 'OtherKey': 'bar%s' % i}) with self.table.batch_writer() as batch: for item in items: batch.put_item(Item=item) # Verify all the items were added to dynamodb. for obj in self.table.scan(ConsistentRead=True)['Items']: self.assertIn(obj, items) boto3-1.9.253/tests/integration/test_s3.py000066400000000000000000000646161355237733400203750ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import os import threading import math import tempfile import shutil import hashlib import string import datetime import logging from tests import unittest, unique_id from botocore.compat import six from botocore.client import Config import boto3.session import boto3.s3.transfer urlopen = six.moves.urllib.request.urlopen LOG = logging.getLogger('boto3.tests.integration') def assert_files_equal(first, second): if os.path.getsize(first) != os.path.getsize(second): raise AssertionError("Files are not equal: %s, %s" % (first, second)) first_md5 = md5_checksum(first) second_md5 = md5_checksum(second) if first_md5 != second_md5: raise AssertionError( "Files are not equal: %s(md5=%s) != %s(md5=%s)" % ( first, first_md5, second, second_md5)) def md5_checksum(filename): checksum = hashlib.md5() with open(filename, 'rb') as f: for chunk in iter(lambda: f.read(8192), b''): checksum.update(chunk) return checksum.hexdigest() def random_bucket_name(prefix='boto3-transfer', num_chars=10): base = string.ascii_lowercase + string.digits random_bytes = bytearray(os.urandom(num_chars)) return prefix + ''.join([base[b % len(base)] for b in random_bytes]) _SHARED_BUCKET = random_bucket_name() _DEFAULT_REGION = 'us-west-2' def setup_module(): s3 = boto3.client('s3') waiter = s3.get_waiter('bucket_exists') params = { 'Bucket': _SHARED_BUCKET, 'CreateBucketConfiguration': { 'LocationConstraint': _DEFAULT_REGION, } } try: s3.create_bucket(**params) except Exception as e: # A create_bucket can fail for a number of reasons. # We're going to defer to the waiter below to make the # final call as to whether or not the bucket exists. LOG.debug("create_bucket() raised an exception: %s", e, exc_info=True) waiter.wait(Bucket=_SHARED_BUCKET) def clear_out_bucket(bucket, region, delete_bucket=False): s3 = boto3.client('s3', region_name=region) page = s3.get_paginator('list_objects') # Use pages paired with batch delete_objects(). for page in page.paginate(Bucket=bucket): keys = [{'Key': obj['Key']} for obj in page.get('Contents', [])] if keys: s3.delete_objects(Bucket=bucket, Delete={'Objects': keys}) if delete_bucket: try: s3.delete_bucket(Bucket=bucket) except Exception as e: # We can sometimes get exceptions when trying to # delete a bucket. We'll let the waiter make # the final call as to whether the bucket was able # to be deleted. LOG.debug("delete_bucket() raised an exception: %s", e, exc_info=True) waiter = s3.get_waiter('bucket_not_exists') waiter.wait(Bucket=bucket) def teardown_module(): clear_out_bucket(_SHARED_BUCKET, _DEFAULT_REGION, delete_bucket=True) class FileCreator(object): def __init__(self): self.rootdir = tempfile.mkdtemp() def remove_all(self): shutil.rmtree(self.rootdir) def create_file(self, filename, contents, mode='w'): """Creates a file in a tmpdir ``filename`` should be a relative path, e.g. "foo/bar/baz.txt" It will be translated into a full path in a tmp dir. ``mode`` is the mode the file should be opened either as ``w`` or `wb``. Returns the full path to the file. """ full_path = os.path.join(self.rootdir, filename) if not os.path.isdir(os.path.dirname(full_path)): os.makedirs(os.path.dirname(full_path)) with open(full_path, mode) as f: f.write(contents) return full_path def create_file_with_size(self, filename, filesize): filename = self.create_file(filename, contents='') chunksize = 8192 with open(filename, 'wb') as f: for i in range(int(math.ceil(filesize / float(chunksize)))): f.write(b'a' * chunksize) return filename def append_file(self, filename, contents): """Append contents to a file ``filename`` should be a relative path, e.g. "foo/bar/baz.txt" It will be translated into a full path in a tmp dir. Returns the full path to the file. """ full_path = os.path.join(self.rootdir, filename) if not os.path.isdir(os.path.dirname(full_path)): os.makedirs(os.path.dirname(full_path)) with open(full_path, 'a') as f: f.write(contents) return full_path def full_path(self, filename): """Translate relative path to full path in temp dir. f.full_path('foo/bar.txt') -> /tmp/asdfasd/foo/bar.txt """ return os.path.join(self.rootdir, filename) class TestS3Resource(unittest.TestCase): def setUp(self): self.region = _DEFAULT_REGION self.bucket_name = _SHARED_BUCKET clear_out_bucket(self.bucket_name, self.region) self.session = boto3.session.Session(region_name=self.region) self.s3 = self.session.resource('s3') self.bucket = self.s3.Bucket(self.bucket_name) def create_bucket_resource(self, bucket_name=None, region=None): if bucket_name is None: bucket_name = random_bucket_name() if region is None: region = self.region kwargs = {'Bucket': bucket_name} if region != 'us-east-1': kwargs['CreateBucketConfiguration'] = { 'LocationConstraint': region } bucket = self.s3.create_bucket(**kwargs) self.addCleanup(bucket.delete) for _ in range(3): bucket.wait_until_exists() return bucket def test_s3(self): client = self.s3.meta.client # Create an object obj = self.bucket.Object('test.txt') obj.put( Body='hello, world') waiter = client.get_waiter('object_exists') waiter.wait(Bucket=self.bucket_name, Key='test.txt') self.addCleanup(obj.delete) # List objects and make sure ours is present self.assertIn('test.txt', [o.key for o in self.bucket.objects.all()]) # Lazy-loaded attribute self.assertEqual(12, obj.content_length) # Load a similar attribute from the collection response self.assertEqual(12, list(self.bucket.objects.all())[0].size) # Perform a resource action with a low-level response self.assertEqual(b'hello, world', obj.get()['Body'].read()) def test_s3_resource_waiter(self): # Create a bucket bucket_name = random_bucket_name() bucket = self.create_bucket_resource(bucket_name) # Wait till the bucket exists bucket.wait_until_exists() # Confirm the bucket exists by finding it in a list of all of our # buckets self.assertIn(bucket_name, [b.name for b in self.s3.buckets.all()]) # Create an object obj = bucket.Object('test.txt') obj.put( Body='hello, world') self.addCleanup(obj.delete) # Wait till the bucket exists obj.wait_until_exists() # List objects and make sure ours is present self.assertIn('test.txt', [o.key for o in bucket.objects.all()]) def test_can_create_object_directly(self): obj = self.s3.Object(self.bucket_name, 'test.txt') self.assertEqual(obj.bucket_name, self.bucket_name) self.assertEqual(obj.key, 'test.txt') def test_s3_multipart(self): # Create the multipart upload mpu = self.bucket.Object('mp-test.txt').initiate_multipart_upload() self.addCleanup(mpu.abort) # Create and upload a part part = mpu.Part(1) response = part.upload(Body='hello, world!') # Complete the upload, which requires info on all of the parts part_info = { 'Parts': [ { 'PartNumber': 1, 'ETag': response['ETag'] } ] } mpu.complete(MultipartUpload=part_info) self.addCleanup(self.bucket.Object('mp-test.txt').delete) contents = self.bucket.Object('mp-test.txt').get()['Body'].read() self.assertEqual(contents, b'hello, world!') def test_s3_batch_delete(self): bucket = self.create_bucket_resource() bucket.Versioning().enable() # Create several versions of an object obj = self.bucket.Object('test.txt') for i in range(10): obj.put(Body="Version %s" % i) # Delete all the versions of the object bucket.object_versions.all().delete() versions = list(bucket.object_versions.all()) self.assertEqual(len(versions), 0) class TestS3Transfers(unittest.TestCase): """Tests for the high level boto3.s3.transfer module.""" def setUp(self): self.region = _DEFAULT_REGION self.bucket_name = _SHARED_BUCKET clear_out_bucket(self.bucket_name, self.region) self.session = boto3.session.Session(region_name=self.region) self.client = self.session.client('s3', self.region) self.files = FileCreator() self.progress = 0 def tearDown(self): self.files.remove_all() def delete_object(self, key): self.client.delete_object( Bucket=self.bucket_name, Key=key) def object_exists(self, key): waiter = self.client.get_waiter('object_exists') waiter.wait(Bucket=self.bucket_name, Key=key) return True def wait_until_object_exists(self, key_name, extra_params=None, min_successes=3): waiter = self.client.get_waiter('object_exists') params = {'Bucket': self.bucket_name, 'Key': key_name} if extra_params is not None: params.update(extra_params) for _ in range(min_successes): waiter.wait(**params) def create_s3_transfer(self, config=None): return boto3.s3.transfer.S3Transfer(self.client, config=config) def assert_has_public_read_acl(self, response): grants = response['Grants'] public_read = [g['Grantee'].get('URI', '') for g in grants if g['Permission'] == 'READ'] self.assertIn('groups/global/AllUsers', public_read[0]) def test_copy(self): self.client.put_object( Bucket=self.bucket_name, Key='foo', Body='beach') self.addCleanup(self.delete_object, 'foo') self.client.copy( CopySource={'Bucket': self.bucket_name, 'Key': 'foo'}, Bucket=self.bucket_name, Key='bar' ) self.addCleanup(self.delete_object, 'bar') self.object_exists('bar') def test_upload_fileobj(self): fileobj = six.BytesIO(b'foo') self.client.upload_fileobj( Fileobj=fileobj, Bucket=self.bucket_name, Key='foo') self.addCleanup(self.delete_object, 'foo') self.object_exists('foo') def test_upload_fileobj_progress(self): # This has to be an integration test because the fileobj will never # actually be read from when using the stubber and therefore the # progress callbacks will not be invoked. chunksize = 5 * (1024 ** 2) config = boto3.s3.transfer.TransferConfig( multipart_chunksize=chunksize, multipart_threshold=chunksize, max_concurrency=1 ) fileobj = six.BytesIO(b'0' * (chunksize * 3)) def progress_callback(amount): self.progress += amount self.client.upload_fileobj( Fileobj=fileobj, Bucket=self.bucket_name, Key='foo', Config=config, Callback=progress_callback) self.addCleanup(self.delete_object, 'foo') self.object_exists('foo') self.assertEqual(self.progress, chunksize * 3) def test_download_fileobj(self): fileobj = six.BytesIO() self.client.put_object( Bucket=self.bucket_name, Key='foo', Body=b'beach') self.addCleanup(self.delete_object, 'foo') self.wait_until_object_exists('foo') self.client.download_fileobj( Bucket=self.bucket_name, Key='foo', Fileobj=fileobj) self.assertEqual(fileobj.getvalue(), b'beach') def test_upload_below_threshold(self): config = boto3.s3.transfer.TransferConfig( multipart_threshold=2 * 1024 * 1024) transfer = self.create_s3_transfer(config) filename = self.files.create_file_with_size( 'foo.txt', filesize=1024 * 1024) transfer.upload_file(filename, self.bucket_name, 'foo.txt') self.addCleanup(self.delete_object, 'foo.txt') self.assertTrue(self.object_exists('foo.txt')) def test_upload_above_threshold(self): config = boto3.s3.transfer.TransferConfig( multipart_threshold=2 * 1024 * 1024) transfer = self.create_s3_transfer(config) filename = self.files.create_file_with_size( '20mb.txt', filesize=20 * 1024 * 1024) transfer.upload_file(filename, self.bucket_name, '20mb.txt') self.addCleanup(self.delete_object, '20mb.txt') self.assertTrue(self.object_exists('20mb.txt')) def test_upload_file_above_threshold_with_acl(self): config = boto3.s3.transfer.TransferConfig( multipart_threshold=5 * 1024 * 1024) transfer = self.create_s3_transfer(config) filename = self.files.create_file_with_size( '6mb.txt', filesize=6 * 1024 * 1024) extra_args = {'ACL': 'public-read'} transfer.upload_file(filename, self.bucket_name, '6mb.txt', extra_args=extra_args) self.addCleanup(self.delete_object, '6mb.txt') self.assertTrue(self.object_exists('6mb.txt')) response = self.client.get_object_acl( Bucket=self.bucket_name, Key='6mb.txt') self.assert_has_public_read_acl(response) def test_upload_file_above_threshold_with_ssec(self): key_bytes = os.urandom(32) extra_args = { 'SSECustomerKey': key_bytes, 'SSECustomerAlgorithm': 'AES256', } config = boto3.s3.transfer.TransferConfig( multipart_threshold=5 * 1024 * 1024) transfer = self.create_s3_transfer(config) filename = self.files.create_file_with_size( '6mb.txt', filesize=6 * 1024 * 1024) transfer.upload_file(filename, self.bucket_name, '6mb.txt', extra_args=extra_args) self.addCleanup(self.delete_object, '6mb.txt') # A head object will fail if it has a customer key # associated with it and it's not provided in the HeadObject # request so we can use this to verify our functionality. response = self.client.head_object( Bucket=self.bucket_name, Key='6mb.txt', **extra_args) self.assertEqual(response['SSECustomerAlgorithm'], 'AES256') def test_progress_callback_on_upload(self): self.amount_seen = 0 lock = threading.Lock() def progress_callback(amount): with lock: self.amount_seen += amount transfer = self.create_s3_transfer() filename = self.files.create_file_with_size( '20mb.txt', filesize=20 * 1024 * 1024) transfer.upload_file(filename, self.bucket_name, '20mb.txt', callback=progress_callback) self.addCleanup(self.delete_object, '20mb.txt') # The callback should have been called enough times such that # the total amount of bytes we've seen (via the "amount" # arg to the callback function) should be the size # of the file we uploaded. self.assertEqual(self.amount_seen, 20 * 1024 * 1024) def test_callback_called_once_with_sigv4(self): # Verify #98, where the callback was being invoked # twice when using signature version 4. self.amount_seen = 0 lock = threading.Lock() def progress_callback(amount): with lock: self.amount_seen += amount client = self.session.client( 's3', self.region, config=Config(signature_version='s3v4')) transfer = boto3.s3.transfer.S3Transfer(client) filename = self.files.create_file_with_size( '10mb.txt', filesize=10 * 1024 * 1024) transfer.upload_file(filename, self.bucket_name, '10mb.txt', callback=progress_callback) self.addCleanup(self.delete_object, '10mb.txt') self.assertEqual(self.amount_seen, 10 * 1024 * 1024) def test_can_send_extra_params_on_upload(self): transfer = self.create_s3_transfer() filename = self.files.create_file_with_size('foo.txt', filesize=1024) transfer.upload_file(filename, self.bucket_name, 'foo.txt', extra_args={'ACL': 'public-read'}) self.addCleanup(self.delete_object, 'foo.txt') response = self.client.get_object_acl( Bucket=self.bucket_name, Key='foo.txt') self.assert_has_public_read_acl(response) def test_can_configure_threshold(self): config = boto3.s3.transfer.TransferConfig( multipart_threshold=6 * 1024 * 1024 ) transfer = self.create_s3_transfer(config) filename = self.files.create_file_with_size( 'foo.txt', filesize=8 * 1024 * 1024) transfer.upload_file(filename, self.bucket_name, 'foo.txt') self.addCleanup(self.delete_object, 'foo.txt') self.assertTrue(self.object_exists('foo.txt')) def test_can_send_extra_params_on_download(self): # We're picking the customer provided sse feature # of S3 to test the extra_args functionality of # S3. key_bytes = os.urandom(32) extra_args = { 'SSECustomerKey': key_bytes, 'SSECustomerAlgorithm': 'AES256', } self.client.put_object(Bucket=self.bucket_name, Key='foo.txt', Body=b'hello world', **extra_args) self.addCleanup(self.delete_object, 'foo.txt') transfer = self.create_s3_transfer() download_path = os.path.join(self.files.rootdir, 'downloaded.txt') self.wait_until_object_exists('foo.txt', extra_params=extra_args) transfer.download_file(self.bucket_name, 'foo.txt', download_path, extra_args=extra_args) with open(download_path, 'rb') as f: self.assertEqual(f.read(), b'hello world') def test_progress_callback_on_download(self): self.amount_seen = 0 lock = threading.Lock() def progress_callback(amount): with lock: self.amount_seen += amount transfer = self.create_s3_transfer() filename = self.files.create_file_with_size( '20mb.txt', filesize=20 * 1024 * 1024) with open(filename, 'rb') as f: self.client.put_object(Bucket=self.bucket_name, Key='20mb.txt', Body=f) self.addCleanup(self.delete_object, '20mb.txt') download_path = os.path.join(self.files.rootdir, 'downloaded.txt') transfer.download_file(self.bucket_name, '20mb.txt', download_path, callback=progress_callback) self.assertEqual(self.amount_seen, 20 * 1024 * 1024) def test_download_below_threshold(self): transfer = self.create_s3_transfer() filename = self.files.create_file_with_size( 'foo.txt', filesize=1024 * 1024) with open(filename, 'rb') as f: self.client.put_object(Bucket=self.bucket_name, Key='foo.txt', Body=f) self.addCleanup(self.delete_object, 'foo.txt') download_path = os.path.join(self.files.rootdir, 'downloaded.txt') self.wait_until_object_exists('foo.txt') transfer.download_file(self.bucket_name, 'foo.txt', download_path) assert_files_equal(filename, download_path) def test_download_above_threshold(self): transfer = self.create_s3_transfer() filename = self.files.create_file_with_size( 'foo.txt', filesize=20 * 1024 * 1024) with open(filename, 'rb') as f: self.client.put_object(Bucket=self.bucket_name, Key='foo.txt', Body=f) self.addCleanup(self.delete_object, 'foo.txt') download_path = os.path.join(self.files.rootdir, 'downloaded.txt') self.wait_until_object_exists('foo.txt') transfer.download_file(self.bucket_name, 'foo.txt', download_path) assert_files_equal(filename, download_path) def test_download_file_with_directory_not_exist(self): transfer = self.create_s3_transfer() self.client.put_object(Bucket=self.bucket_name, Key='foo.txt', Body=b'foo') self.addCleanup(self.delete_object, 'foo.txt') download_path = os.path.join(self.files.rootdir, 'a', 'b', 'c', 'downloaded.txt') self.wait_until_object_exists('foo.txt') with self.assertRaises(IOError): transfer.download_file(self.bucket_name, 'foo.txt', download_path) def test_download_large_file_directory_not_exist(self): transfer = self.create_s3_transfer() filename = self.files.create_file_with_size( 'foo.txt', filesize=20 * 1024 * 1024) with open(filename, 'rb') as f: self.client.put_object(Bucket=self.bucket_name, Key='foo.txt', Body=f) self.addCleanup(self.delete_object, 'foo.txt') download_path = os.path.join(self.files.rootdir, 'a', 'b', 'c', 'downloaded.txt') self.wait_until_object_exists('foo.txt') with self.assertRaises(IOError): transfer.download_file(self.bucket_name, 'foo.txt', download_path) def test_transfer_methods_through_client(self): # This is really just a sanity check to ensure that the interface # from the clients work. We're not exhaustively testing through # this client interface. filename = self.files.create_file_with_size( 'foo.txt', filesize=1024 * 1024) self.client.upload_file(Filename=filename, Bucket=self.bucket_name, Key='foo.txt') self.addCleanup(self.delete_object, 'foo.txt') download_path = os.path.join(self.files.rootdir, 'downloaded.txt') self.wait_until_object_exists('foo.txt') self.client.download_file(Bucket=self.bucket_name, Key='foo.txt', Filename=download_path) assert_files_equal(filename, download_path) def test_transfer_methods_do_not_use_threads(self): # This is just a smoke test to make sure that # setting use_threads to False has no issues transferring files as # the non-threaded implementation is ran under the same integration # and functional tests in s3transfer as the normal threaded # implementation # # The methods used are arbitrary other than one of the methods # use ``boto3.s3.transfer.S3Transfer`` and the other should be # using ``s3transfer.manager.TransferManager`` directly content = b'my content' filename = self.files.create_file('myfile', content.decode('utf-8')) key = 'foo' config = boto3.s3.transfer.TransferConfig(use_threads=False) self.client.upload_file( Bucket=self.bucket_name, Key=key, Filename=filename, Config=config) self.addCleanup(self.delete_object, key) self.assertTrue(self.object_exists(key)) fileobj = six.BytesIO() self.client.download_fileobj( Bucket=self.bucket_name, Key='foo', Fileobj=fileobj, Config=config) self.assertEqual(fileobj.getvalue(), content) def test_transfer_methods_through_bucket(self): # This is just a sanity check to ensure that the bucket interface work. key = 'bucket.txt' bucket = self.session.resource('s3').Bucket(self.bucket_name) filename = self.files.create_file_with_size(key, 1024*1024) bucket.upload_file(Filename=filename, Key=key) self.addCleanup(self.delete_object, key) download_path = os.path.join(self.files.rootdir, unique_id('foo')) bucket.download_file(Key=key, Filename=download_path) assert_files_equal(filename, download_path) def test_transfer_methods_through_object(self): # This is just a sanity check to ensure that the object interface work. key = 'object.txt' obj = self.session.resource('s3').Object(self.bucket_name, key) filename = self.files.create_file_with_size(key, 1024*1024) obj.upload_file(Filename=filename) self.addCleanup(self.delete_object, key) download_path = os.path.join(self.files.rootdir, unique_id('foo')) obj.download_file(Filename=download_path) assert_files_equal(filename, download_path) class TestCustomS3BucketLoad(unittest.TestCase): def setUp(self): self.region = _DEFAULT_REGION self.bucket_name = _SHARED_BUCKET clear_out_bucket(self.bucket_name, self.region) self.session = boto3.session.Session(region_name=self.region) self.s3 = self.session.resource('s3') def test_can_access_buckets_creation_date(self): bucket = self.s3.Bucket(self.bucket_name) self.assertIsInstance(bucket.creation_date, datetime.datetime) boto3-1.9.253/tests/integration/test_session.py000066400000000000000000000036111355237733400215170ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest, unique_id import botocore.session import boto3.session class TestUserAgentCustomizations(unittest.TestCase): def setUp(self): self.botocore_session = botocore.session.get_session() self.session = boto3.session.Session( region_name='us-west-2', botocore_session=self.botocore_session) self.actual_user_agent = None self.botocore_session.register('request-created', self.record_user_agent) def record_user_agent(self, request, **kwargs): self.actual_user_agent = request.headers['User-Agent'] def test_client_user_agent(self): client = self.session.client('s3') client.list_buckets() self.assertIn('Boto3', self.actual_user_agent) self.assertIn('Botocore', self.actual_user_agent) self.assertIn('Python', self.actual_user_agent) # We should *not* have any mention of resource # when using clients directly. self.assertNotIn('Resource', self.actual_user_agent) def test_resource_user_agent_has_customization(self): resource = self.session.resource('s3') list(resource.buckets.all()) # We should have customized the user agent for # resource calls with "Resource". self.assertTrue(self.actual_user_agent.endswith(' Resource')) boto3-1.9.253/tests/integration/test_sqs.py000066400000000000000000000026011355237733400206400ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import boto3.session from tests import unittest, unique_id class TestSQSResource(unittest.TestCase): def setUp(self): self.session = boto3.session.Session(region_name='us-west-2') self.sqs = self.session.resource('sqs') self.queue_name = unique_id('boto3-test') def test_sqs(self): # Create a new resource queue = self.sqs.create_queue(QueueName=self.queue_name) self.addCleanup(queue.delete) # Call an action queue.send_message(MessageBody='test') # Get pre-populated resources and access attributes messages = queue.receive_messages(WaitTimeSeconds=1) self.assertEqual(len(messages), 1) self.addCleanup(messages[0].delete) self.assertEqual(queue.url, messages[0].queue_url) self.assertEqual('test', messages[0].body) boto3-1.9.253/tests/unit/000077500000000000000000000000001355237733400150565ustar00rootroot00000000000000boto3-1.9.253/tests/unit/__init__.py000066400000000000000000000000001355237733400171550ustar00rootroot00000000000000boto3-1.9.253/tests/unit/data/000077500000000000000000000000001355237733400157675ustar00rootroot00000000000000boto3-1.9.253/tests/unit/data/examples/000077500000000000000000000000001355237733400176055ustar00rootroot00000000000000boto3-1.9.253/tests/unit/data/examples/myservice.rst000066400000000000000000000000601355237733400223410ustar00rootroot00000000000000** This is an example ** This is the contents! boto3-1.9.253/tests/unit/data/examples/otherservice.rst000066400000000000000000000000571355237733400230430ustar00rootroot00000000000000**Other example** This is for another service boto3-1.9.253/tests/unit/data/todo/000077500000000000000000000000001355237733400167345ustar00rootroot00000000000000boto3-1.9.253/tests/unit/data/todo/2015-04-01/000077500000000000000000000000001355237733400177625ustar00rootroot00000000000000boto3-1.9.253/tests/unit/data/todo/2015-04-01/resources-1.json000066400000000000000000000030131355237733400230220ustar00rootroot00000000000000{ "service": { "actions": { "CreateToDo": { "request": { "operation": "CreateToDo" }, "resource": { "type": "ToDo", "identifiers": [ { "target": "Id", "source": "response", "path": "Id" } ] } } }, "has": { "ToDo": { "resource": { "type": "ToDo", "identifiers": [ { "target": "Id", "source": "input" } ] } } }, "hasMany": { "ToDos": { "request": { "operation": "DescribeToDos" }, "resource": { "type": "ToDo", "identifiers": [ { "target": "Id", "source": "response", "path": "ToDoList[].Id" } ] } } } }, "resources": { "ToDo": { "identifiers": [ { "name": "Id" } ], "shape": "ToDoItem", "actions": { "Delete": { "request": { "operation": "DeleteToDo", "params": [ { "target": "Id", "source": "identifier", "name": "Id" } ] } } }, "waiters": { "Ready": { "waiterName": "ToDoReady", "params": [ { "target": "Id", "source": "identifier", "name": "Id" } ] } }, "has": { "MySelf": { "resource": { "type": "ToDo", "identifiers": [ { "target": "Id", "source": "data", "path": "Id" } ] } } } } } } boto3-1.9.253/tests/unit/data/todo/2015-04-01/service-2.json000066400000000000000000000122761355237733400224640ustar00rootroot00000000000000{ "metadata":{ "apiVersion":"2015-04-01", "endpointPrefix":"todo", "jsonVersion":"1.1", "serviceFullName":"AWS ToDo Sample API for Tasks", "serviceAbbreviation":"AWS ToDo Tasks", "signatureVersion":"v4", "protocol":"json" }, "documentation":"

AWS sample API that tracks to-do items.

    ", "operations":{ "CreateToDo":{ "name":"CreateToDo", "http":{ "method":"POST", "requestUri":"/todos" }, "input":{ "shape":"CreateToDoInput", "documentation":"

    Container of the newly created to-do's values.

    " }, "output":{ "shape":"ToDoItem", "documentation":"

    A single ToDo item.

    " }, "errors":[ { "shape":"ToDoServerException", "exception":true, "documentation":"

    A server-side error occurred during the API call. The error message will contain additional details about the cause.

    " }, { "shape":"ToDoClientException", "exception":true, "documentation":"

    The API was called with invalid parameters. The error message will contain additional details about the cause.

    " } ], "documentation":"

    Create a new to-do item.

    " }, "DescribeToDos": { "name":"DescribeToDos", "http":{ "method":"GET", "requestUri":"/todos" }, "output":{ "shape":"ToDoList", "documentation":"

    List of to-do items.

    " }, "errors":[ { "shape":"ToDoServerException", "exception":true, "documentation":"

    A server-side error occurred during the API call. The error message will contain additional details about the cause.

    " } ], "documentation":"

    Create a new to-do item.

    " }, "GetToDo":{ "name":"GetToDo", "http":{ "method":"GET", "requestUri":"/todos/{Id+}" }, "input":{ "shape":"ToDoInput" }, "output":{ "shape":"ToDoItem" }, "errors":[ { "shape":"ToDoServerException", "exception":true, "documentation":"

    A server-side error occurred during the API call. The error message will contain additional details about the cause.

    " }, { "shape":"ToDoClientException", "exception":true, "documentation":"

    The API was called with invalid parameters. The error message will contain additional details about the cause.

    " } ], "documentation":"

    Get an existing to-do item.

    " }, "DeleteToDo":{ "name":"DeleteToDo", "http":{ "method":"DELETE", "requestUri":"/todos/{Id+}" }, "input":{ "shape":"ToDoInput" }, "errors":[ { "shape":"ToDoServerException", "exception":true, "documentation":"

    A server-side error occurred during the API call. The error message will contain additional details about the cause.

    " }, { "shape":"ToDoClientException", "exception":true, "documentation":"

    The API was called with invalid parameters. The error message will contain additional details about the cause.

    " } ], "documentation":"

    Delete an existing to-do item.

    " } }, "shapes":{ "CreateToDoInput":{ "type":"structure", "required":[ "Title" ], "members":{ "Title":{ "shape":"String", "documentation":"The title of the to-do item." } }, "documentation":"

    Container for to-do values.

    " }, "String":{ "type":"string" }, "ToDoClientException":{ "type":"structure", "members":{ "message":{"shape":"ErrorMessage"} }, "exception":true, "documentation":"

    The API was called with invalid parameters. The error message will contain additional details about the cause.

    " }, "ToDoInput":{ "type":"structure", "required":[ "Id" ], "members":{ "Id":{ "shape":"String", "location":"uri", "locationName":"Id" } } }, "ToDoItem":{ "type":"structure", "members":{ "Id":{ "shape":"String", "documentation":"Unique identifier" }, "Title":{ "shape":"String", "documentation":"The title of the to-do item." }, "Status":{ "shape":"String", "documentation":"The status of the to-do item. Either CREATING, READY, or DONE." } }, "documentation":"A single to-do item." }, "ToDoList":{ "type":"list", "member":{ "shape":"ToDoItem", "documentation":"List of to-do items." } }, "ToDoServerException":{ "type":"structure", "members":{ "message":{"shape":"ErrorMessage"} }, "exception":true, "documentation":"

    A server-side error occurred during the API call. The error message will contain additional details about the cause.

    " }, "ErrorMessage":{ "type":"string" } } } boto3-1.9.253/tests/unit/data/todo/2015-04-01/waiters-2.json000066400000000000000000000007131355237733400224730ustar00rootroot00000000000000{ "version": 2, "waiters": { "ToDoReady": { "delay": 20, "operation": "GetToDo", "maxAttempts": 25, "acceptors": [ { "expected": "READY", "matcher": "path", "state": "success", "argument": "ToDo.Status" }, { "expected": "DONE", "matcher": "path", "state": "success", "argument": "ToDo.Status" } ] } } } boto3-1.9.253/tests/unit/docs/000077500000000000000000000000001355237733400160065ustar00rootroot00000000000000boto3-1.9.253/tests/unit/docs/__init__.py000066400000000000000000000256271355237733400201330ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import os import json import tempfile import shutil from tests import unittest import botocore.session from botocore.compat import OrderedDict from botocore.loaders import Loader from botocore.docs.bcdoc.restdoc import DocumentStructure from boto3.session import Session class BaseDocsTest(unittest.TestCase): def setUp(self): self.root_dir = tempfile.mkdtemp() self.version_dirs = os.path.join( self.root_dir, 'myservice', '2014-01-01') os.makedirs(self.version_dirs) self.model_file = os.path.join(self.version_dirs, 'service-2.json') self.waiter_model_file = os.path.join( self.version_dirs, 'waiters-2.json') self.paginator_model_file = os.path.join( self.version_dirs, 'paginators-1.json') self.resource_model_file = os.path.join( self.version_dirs, 'resources-1.json') self.example_model_file = os.path.join( self.version_dirs, 'examples-1.json') self.json_model = {} self.waiter_json_model = {} self.paginator_json_model = {} self.resource_json_model = {} self._setup_models() self.doc_name = 'MyDoc' self.doc_structure = DocumentStructure(self.doc_name) self.setup_client_and_resource() def tearDown(self): shutil.rmtree(self.root_dir) def setup_client_and_resource(self): self._write_models() self.loader = Loader(extra_search_paths=[self.root_dir]) self.botocore_session = botocore.session.get_session() self.botocore_session.register_component('data_loader', self.loader) self.session = Session( botocore_session=self.botocore_session, region_name='us-east-1') self.client = self.session.client('myservice', 'us-east-1') self.resource = self.session.resource('myservice', 'us-east-1') def _setup_models(self): self.json_model = { 'metadata': { 'apiVersion': '2014-01-01', 'endpointPrefix': 'myservice', 'signatureVersion': 'v4', 'serviceFullName': 'AWS MyService', 'protocol': 'query', 'serviceId': 'MyService', }, 'operations': { 'SampleOperation': { 'name': 'SampleOperation', 'input': {'shape': 'SampleOperationInputOutput'}, 'output': {'shape': 'SampleOperationInputOutput'} } }, 'shapes': { 'SampleOperationInputOutput': { 'type': 'structure', 'members': OrderedDict([ ('Foo', { 'shape': 'String', 'documentation': 'Documents Foo'}), ('Bar', { 'shape': 'String', 'documentation': 'Documents Bar'}), ]) }, 'String': { 'type': 'string' } } } self.example_json_model = { "version": 1, "examples": { "SampleOperation": [{ "id": "sample-id", "title": "sample-title", "description": "Sample Description.", "input": OrderedDict([ ("Foo", "bar"), ]), "comments": { "input": { "Foo": "biz" }, } }] } } self.waiter_json_model = { "version": 2, "waiters": { "SampleOperationComplete": { "delay": 15, "operation": "SampleOperation", "maxAttempts": 40, "acceptors": [ {"expected": "complete", "matcher": "pathAll", "state": "success", "argument": "Biz"}, {"expected": "failed", "matcher": "pathAny", "state": "failure", "argument": "Biz"} ] } } } self.paginator_json_model = { "pagination": { "SampleOperation": { "input_token": "NextResult", "output_token": "NextResult", "limit_key": "MaxResults", "result_key": "Biz" } } } self.resource_json_model = { "service": { "actions": OrderedDict([ ("SampleOperation", { "request": {"operation": "SampleOperation"} }), ("SampleListReturnOperation", { "request": {"operation": "SampleOperation"}, "resource": { "type": "Sample", "identifiers": [ {"target": "Name", "source": "response", "path": "Samples[].Name"} ], "path": "Samples[]" } }) ]), "has": { "Sample": { "resource": { "type": "Sample", "identifiers": [ {"target": "Name", "source": "input"} ] } } }, "hasMany": { "Samples": { "request": {"operation": "SampleOperation"}, "resource": { "type": "Sample", "identifiers": [ {"target": "Name", "source": "response", "path": "Samples[].Foo"} ] } } } }, "resources": { "Sample": { "identifiers": [ {"name": "Name", "memberName": "Foo"} ], "shape": "SampleOperationInputOutput", "load": { "request": { "operation": "SampleOperation", "params": [ {"target": "Foo", "source": "identifier", "name": "Name"} ] } }, "actions": { "Operate": { "request": { "operation": "SampleOperation", "params": [ {"target": "Foo", "source": "identifier", "name": "Name"} ] } } }, "batchActions": { "Operate": { "request": { "operation": "SampleOperation", "params": [ {"target": "Samples[].Foo", "source": "identifier", "name": "Name"} ] } } }, "has": { "RelatedSample": { "resource": { "type": "Sample", "identifiers": [ {"target": "Name", "source": "data", "path": "Foo"} ] } } }, "waiters": { "Complete": { "waiterName": "SampleOperationComplete", "params": [ {"target": "Foo", "source": "identifier", "name": "Name"} ] } } } } } def _write_models(self): with open(self.resource_model_file, 'w') as f: json.dump(self.resource_json_model, f) with open(self.waiter_model_file, 'w') as f: json.dump(self.waiter_json_model, f) with open(self.paginator_model_file, 'w') as f: json.dump(self.paginator_json_model, f) with open(self.model_file, 'w') as f: json.dump(self.json_model, f) with open(self.example_model_file, 'w') as f: json.dump(self.example_json_model, f) def add_shape(self, shape): shape_name = list(shape.keys())[0] self.json_model['shapes'][shape_name] = shape[shape_name] def add_shape_to_params(self, param_name, shape_name, documentation=None, is_required=False): params_shape = self.json_model['shapes']['SampleOperationInputOutput'] member = {'shape': shape_name} if documentation is not None: member['documentation'] = documentation params_shape['members'][param_name] = member if is_required: required_list = params_shape.get('required', []) required_list.append(param_name) params_shape['required'] = required_list def assert_contains_lines_in_order(self, lines, contents=None): if contents is None: contents = self.doc_structure.flush_structure().decode('utf-8') for line in lines: self.assertIn(line, contents) beginning = contents.find(line) contents = contents[(beginning + len(line)):] def assert_not_contains_lines(self, lines): contents = self.doc_structure.flush_structure().decode('utf-8') for line in lines: self.assertNotIn(line, contents) boto3-1.9.253/tests/unit/docs/test_action.py000066400000000000000000000065461355237733400207070ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.action import ActionDocumenter class TestActionDocumenter(BaseDocsTest): def test_document_service_resource_actions(self): action_documenter = ActionDocumenter(self.resource) action_documenter.document_actions(self.doc_structure) self.assert_contains_lines_in_order([ '.. py:method:: sample_operation(**kwargs)', ' **Request Syntax**', ' ::', ' response = myservice.sample_operation(', ' Foo=\'string\',', ' Bar=\'string\'', ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns:', ' **Response Syntax**', ' ::', ' {', ' \'Foo\': \'string\',', ' \'Bar\': \'string\'', ' }', ' **Response Structure**', ' - *(dict) --*', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar' ]) def test_document_nonservice_resource_actions(self): subresource = self.resource.Sample('mysample') action_documenter = ActionDocumenter(subresource) action_documenter.document_actions(self.doc_structure) self.assert_contains_lines_in_order([ '.. py:method:: load()', (' Calls :py:meth:`MyService.Client.sample_operation` to update ' 'the attributes of the Sample resource'), ' **Request Syntax** ', ' ::', ' sample.load()', ' :returns: None', '.. py:method:: operate(**kwargs)', ' **Request Syntax** ', ' ::', ' response = sample.operate(', " Bar='string'", ' )', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar', '.. py:method:: reload()', (' Calls :py:meth:`MyService.Client.sample_operation` to update ' 'the attributes of the Sample resource'), ' **Request Syntax** ', ' ::', ' sample.reload()', ' :returns: None' ]) boto3-1.9.253/tests/unit/docs/test_attr.py000066400000000000000000000056441355237733400204020ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.hooks import HierarchicalEmitter from tests.unit.docs import BaseDocsTest from boto3.docs.attr import document_attribute class TestDocumentAttribute(BaseDocsTest): def setUp(self): super(TestDocumentAttribute, self).setUp() self.add_shape({ 'NestedStruct': { 'type': 'structure', 'members': { 'NestedStrAttr': { 'shape': 'String', 'documentation': 'Documents a nested string attribute' } } } }) self.add_shape({ 'ResourceShape': { 'type': 'structure', 'members': { 'StringAttr': { 'shape': 'String', 'documentation': 'Documents a string attribute' }, 'NestedAttr': { 'shape': 'NestedStruct', 'documentation': 'Documents a nested attribute' } } } }) self.setup_client_and_resource() self.event_emitter = HierarchicalEmitter() self.service_name = 'myservice' self.resource_name = 'myresource' self.service_model = self.client.meta.service_model def test_document_attr_scalar(self): shape_model = self.service_model.shape_for('ResourceShape') attr_name = 'StringAttr' document_attribute( self.doc_structure, self.service_name, self.resource_name, attr_name, self.event_emitter, shape_model.members[attr_name]) self.assert_contains_lines_in_order([ '.. py:attribute:: StringAttr', ' - *(string) --* Documents a string attribute' ]) def test_document_attr_structure(self): shape_model = self.service_model.shape_for('ResourceShape') attr_name = 'NestedAttr' document_attribute( self.doc_structure, self.service_name, self.resource_name, attr_name, self.event_emitter, shape_model.members[attr_name]) self.assert_contains_lines_in_order([ '.. py:attribute:: NestedAttr', ' - *(dict) --* Documents a nested attribute', (' - **NestedStrAttr** *(string) --* Documents a nested ' 'string attribute') ]) boto3-1.9.253/tests/unit/docs/test_client.py000066400000000000000000000051251355237733400207000ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.client import Boto3ClientDocumenter class TestBoto3ClientDocumenter(BaseDocsTest): def setUp(self): super(TestBoto3ClientDocumenter, self).setUp() self.client_documenter = Boto3ClientDocumenter(self.client) def test_document_client(self): self.client_documenter.document_client(self.doc_structure) self.assert_contains_lines_in_order([ '======', 'Client', '======', '.. py:class:: MyService.Client', ' A low-level client representing AWS MyService::', ' import boto3', ' client = boto3.client(\'myservice\')', ' These are the available methods:', ' * :py:meth:`~MyService.Client.can_paginate`', ' * :py:meth:`~MyService.Client.get_paginator`', ' * :py:meth:`~MyService.Client.get_waiter`', ' * :py:meth:`~MyService.Client.sample_operation`', ' .. py:method:: can_paginate(operation_name)', ' .. py:method:: get_paginator(operation_name)', ' .. py:method:: get_waiter(waiter_name)', ' .. py:method:: sample_operation(**kwargs)', ' **Request Syntax**', ' ::', ' response = client.sample_operation(', ' Foo=\'string\'', ' Bar=\'string\'', ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns:', ' **Response Syntax**', ' ::', ' {', ' \'Foo\': \'string\'', ' \'Bar\': \'string\'', ' }', ' **Response Structure**', ' - *(dict) --*', ' - **Foo** *(string) --*', ' - **Bar** *(string) --*' ]) boto3-1.9.253/tests/unit/docs/test_collection.py000066400000000000000000000103611355237733400215530ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.collection import CollectionDocumenter class TestCollectionDocumenter(BaseDocsTest): def test_document_collections(self): collection_documenter = CollectionDocumenter(self.resource) collection_documenter.document_collections(self.doc_structure) self.assert_contains_lines_in_order([ '.. py:attribute:: samples', ' A collection of Sample resources', ' .. py:method:: all()', (' Creates an iterable of all Sample resources in the ' 'collection.'), ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.all()', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ' .. py:method:: filter(**kwargs)', (' Creates an iterable of all Sample resources in ' 'the collection filtered by kwargs passed to method.'), ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.filter(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ' .. py:method:: limit(**kwargs)', (' Creates an iterable up to a specified amount of ' 'Sample resources in the collection.'), ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.limit(', ' count=123', ' )', ' :type count: integer', (' :param count: The limit to the number of resources ' 'in the iterable.'), ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ' .. py:method:: operate(**kwargs)', ' **Request Syntax** ', ' response = myservice.samples.operate(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar', ' .. py:method:: page_size(**kwargs)', (' Creates an iterable of all Sample resources in the ' 'collection, but limits the number of items returned by ' 'each service call by the specified amount.'), ' **Request Syntax** ', ' ::', '', ' sample_iterator = myservice.samples.page_size(', ' count=123', ' )', ' :type count: integer', (' :param count: The number of items returned by ' 'each service call'), ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ' ' ]) boto3-1.9.253/tests/unit/docs/test_docstring.py000066400000000000000000000240441355237733400214170ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import mock from botocore.compat import six from tests.unit.docs import BaseDocsTest class TestResourceDocstrings(BaseDocsTest): def test_action_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.sample_operation) action_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' **Request Syntax**', ' ::', ' response = myservice.sample_operation(', ' Foo=\'string\',', ' Bar=\'string\'', ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns:', ' **Response Syntax**', ' ::', ' {', ' \'Foo\': \'string\',', ' \'Bar\': \'string\'', ' }', ' **Response Structure**', ' - *(dict) --*', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar' ], action_docstring) def test_load_help(self): sub_resource = self.resource.Sample('Id') with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(sub_resource.load) load_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ (' Calls :py:meth:`MyService.Client.sample_operation` to update ' 'the attributes of the Sample resource'), ' **Request Syntax** ', ' ::', ' sample.load()', ' :returns: None', ], load_docstring) def test_sub_resource_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.Sample) sub_resource_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' Creates a Sample resource.::', " sample = myservice.Sample('name')", ' :type name: string', " :param name: The Sample's name identifier.", ' :rtype: :py:class:`MyService.Sample`', ' :returns: A Sample resource', ], sub_resource_docstring) def test_attribute_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.Sample('id').__class__.foo) attribute_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' - *(string) --* Documents Foo' ], attribute_docstring) def test_identifier_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.Sample('id').__class__.name) identifier_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ " *(string)* The Sample's name identifier. This " "**must** be set." ], identifier_docstring) def test_reference_help(self): sample_resource = self.resource.Sample('id') with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(sample_resource.__class__.related_sample) reference_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ " (:py:class:`Sample`) The related related_sample " "if set, otherwise ``None``." ], reference_docstring) def test_collection_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.__class__.samples) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' A collection of Sample resources' ], collection_method_docstring) def test_collection_all_method_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.samples.all) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ (' Creates an iterable of all Sample resources in the ' 'collection.'), ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.all()', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ], collection_method_docstring) def test_collection_filter_method_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.samples.filter) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.filter(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ], collection_method_docstring) def test_collection_limit_method_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.samples.limit) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.limit(', ' count=123', ' )', ' :type count: integer', (' :param count: The limit to the number of resources ' 'in the iterable.'), ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ], collection_method_docstring) def test_collection_page_size_method_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.samples.page_size) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.page_size(', ' count=123', ' )', ' :type count: integer', (' :param count: The number of items returned by ' 'each service call'), ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ], collection_method_docstring) def test_collection_chaining_help(self): collection = self.resource.samples.all() with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(collection.all) collection_method_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ (' Creates an iterable of all Sample resources in the ' 'collection.'), ' **Request Syntax** ', ' ::', ' sample_iterator = myservice.samples.all()', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resources', ], collection_method_docstring) def test_batch_action_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.samples.operate) batch_action_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ ' **Request Syntax** ', ' ::', ' response = myservice.samples.operate(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar', ], batch_action_docstring) def test_resource_waiter_help(self): with mock.patch('sys.stdout', six.StringIO()) as mock_stdout: help(self.resource.Sample('id').wait_until_complete) resource_waiter_docstring = mock_stdout.getvalue() self.assert_contains_lines_in_order([ (' Waits until this Sample is complete. This method calls ' ':py:meth:`MyService.Waiter.sample_operation_complete.wait` ' 'which polls. :py:meth:`MyService.Client.sample_operation` every ' '15 seconds until a successful state is reached. An error ' 'is returned after 40 failed checks.'), ' **Request Syntax** ', ' ::', ' sample.wait_until_complete(', " Bar='string'", ' )', ' :type Bar: string', ' :param Bar: Documents Bar', ' :returns: None', ], resource_waiter_docstring) boto3-1.9.253/tests/unit/docs/test_method.py000066400000000000000000000254421355237733400207060ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.hooks import HierarchicalEmitter from botocore.docs.utils import DocumentedShape from tests.unit.docs import BaseDocsTest from boto3.resources.model import ResponseResource from boto3.docs.method import document_model_driven_resource_method class TestDocumentModelDrivenResourceMethod(BaseDocsTest): def setUp(self): super(TestDocumentModelDrivenResourceMethod, self).setUp() self.event_emitter = HierarchicalEmitter() self.service_model = self.client.meta.service_model self.operation_model = self.service_model.operation_model( 'SampleOperation') self.service_resource_model = self.resource.meta.resource_model def test_default(self): document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='response = myservice.foo', resource_action_model=self.service_resource_model.actions[0] ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' response = myservice.foo(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar' ]) def test_returns_resource(self): resource_action = self.service_resource_model.actions[0] # Override the return type of the action to be a resource # instead of the regular dictionary. resource_action.resource = ResponseResource( {'type': 'Sample', 'identifiers': [{ 'target': 'Name', 'source': 'requestParameter', 'path': 'Foo'}]}, self.resource_json_model) document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='sample = myservice.foo', resource_action_model=resource_action ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' sample = myservice.foo(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: :py:class:`myservice.Sample`', ' :returns: Sample resource' ]) def test_returns_list_of_resource(self): resource_action = self.service_resource_model.actions[1] document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='samples = myservice.foo', resource_action_model=resource_action ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' samples = myservice.foo(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: list(:py:class:`myservice.Sample`)', ' :returns: A list of Sample resource' ]) def test_include_input(self): include_params = [ DocumentedShape( name='Biz', type_name='string', documentation='biz docs') ] document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='response = myservice.foo', include_input=include_params, resource_action_model=self.service_resource_model.actions[0] ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' response = myservice.foo(', " Foo='string',", " Bar='string',", " Biz='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :type Biz: string', ' :param Biz: biz docs', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar' ]) def test_include_output(self): include_params = [ DocumentedShape( name='Biz', type_name='string', documentation='biz docs') ] document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='response = myservice.foo', include_output=include_params, resource_action_model=self.service_resource_model.actions[0] ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' response = myservice.foo(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string',", " 'Biz': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar', ' - **Biz** *(string) --* biz docs' ]) def test_exclude_input(self): document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='response = myservice.foo', exclude_input=['Bar'], resource_action_model=self.service_resource_model.actions[0] ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' response = myservice.foo(', " Foo='string',", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string',", " 'Bar': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ' - **Bar** *(string) --* Documents Bar' ]) self.assert_not_contains_lines([ ':param Bar: string', 'Bar=\'string\'' ]) def test_exclude_output(self): document_model_driven_resource_method( self.doc_structure, 'foo', self.operation_model, event_emitter=self.event_emitter, method_description='This describes the foo method.', example_prefix='response = myservice.foo', exclude_output=['Bar'], resource_action_model=self.service_resource_model.actions[0] ) self.assert_contains_lines_in_order([ '.. py:method:: foo(**kwargs)', ' This describes the foo method.', ' **Request Syntax** ', ' ::', ' response = myservice.foo(', " Foo='string',", " Bar='string'", ' )', ' :type Foo: string', ' :param Foo: Documents Foo', ' :type Bar: string', ' :param Bar: Documents Bar', ' :rtype: dict', ' :returns: ', ' **Response Syntax** ', ' ::', ' {', " 'Foo': 'string'", ' }', ' **Response Structure** ', ' - *(dict) --* ', ' - **Foo** *(string) --* Documents Foo', ]) self.assert_not_contains_lines([ '\'Bar\': \'string\'', '- **Bar** *(string) --*', ]) boto3-1.9.253/tests/unit/docs/test_resource.py000066400000000000000000000101031355237733400212410ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.resource import ResourceDocumenter from boto3.docs.resource import ServiceResourceDocumenter class TestResourceDocumenter(BaseDocsTest): def test_document_resource(self): resource = self.resource.Sample('mysample') resource_documenter = ResourceDocumenter( resource, self.botocore_session) resource_documenter.document_resource(self.doc_structure) self.assert_contains_lines_in_order([ '======', 'Sample', '======', '.. py:class:: MyService.Sample(name)', ' A resource representing an AWS MyService Sample::', ' import boto3', " myservice = boto3.resource('myservice')", " sample = myservice.Sample('name')", " These are the resource's available identifiers:", ' * :py:attr:`name`', " These are the resource's available attributes:", ' * :py:attr:`bar`', ' * :py:attr:`foo`', " These are the resource's available actions:", ' * :py:meth:`load()`', ' * :py:meth:`operate()`', ' * :py:meth:`reload()`', " These are the resource's available waiters:", ' * :py:meth:`wait_until_complete()`', ' .. rst-class:: admonition-title', ' Identifiers', ' .. py:attribute:: name', ' .. rst-class:: admonition-title', ' Attributes', ' .. py:attribute:: bar', ' - *(string) --* Documents Bar', ' .. py:attribute:: foo', ' - *(string) --* Documents Foo', ' .. rst-class:: admonition-title', ' Actions', ' .. py:method:: load()', ' .. py:method:: operate(**kwargs)', ' .. py:method:: reload()', ' .. rst-class:: admonition-title', ' Waiters', ' .. py:method:: wait_until_complete(**kwargs)', ]) class TestServiceResourceDocumenter(BaseDocsTest): def test_document_resource(self): resource_documenter = ServiceResourceDocumenter( self.resource, self.botocore_session) resource_documenter.document_resource(self.doc_structure) self.assert_contains_lines_in_order([ '================', 'Service Resource', '================', '.. py:class:: MyService.ServiceResource()', ' A resource representing AWS MyService::', ' import boto3', " myservice = boto3.resource('myservice')", " These are the resource's available actions:", ' * :py:meth:`sample_operation()`', " These are the resource's available sub-resources:", ' * :py:meth:`Sample()`', " These are the resource's available collections:", ' * :py:attr:`samples`', ' .. rst-class:: admonition-title', ' Actions', ' .. py:method:: sample_operation(**kwargs)', ' .. rst-class:: admonition-title', ' Sub-resources', ' .. py:method:: Sample(name)', ' .. rst-class:: admonition-title', ' Collections', ' .. py:attribute:: samples', ' .. py:method:: all()', ' .. py:method:: filter(**kwargs)', ' .. py:method:: limit(**kwargs)', ' .. py:method:: page_size(**kwargs)', ]) boto3-1.9.253/tests/unit/docs/test_service.py000066400000000000000000000141151355237733400210610ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import os import mock import boto3 from tests.unit.docs import BaseDocsTest from boto3.docs.service import ServiceDocumenter class TestServiceDocumenter(BaseDocsTest): def test_document_service(self): service_documenter = ServiceDocumenter('myservice', self.session) contents = service_documenter.document_service().decode('utf-8') lines = [ '*********', 'MyService', '*********', '.. contents:: Table of Contents', ' :depth: 2', '======', 'Client', '======', '.. py:class:: MyService.Client', ' These are the available methods:', ' * :py:meth:`~MyService.Client.sample_operation`', ' **Examples** ', ' Sample Description.', ' ::', ' response = client.sample_operation(', '==========', 'Paginators', '==========', 'The available paginators are:', '* :py:class:`MyService.Paginator.SampleOperation`', '.. py:class:: MyService.Paginator.SampleOperation', ' .. py:method:: paginate(**kwargs)', '=======', 'Waiters', '=======', 'The available waiters are:', '* :py:class:`MyService.Waiter.SampleOperationComplete`', '.. py:class:: MyService.Waiter.SampleOperationComplete', ' .. py:method:: wait(**kwargs)', '================', 'Service Resource', '================', '.. py:class:: MyService.ServiceResource()', " These are the resource's available actions:", ' * :py:meth:`sample_operation()`', " These are the resource's available sub-resources:", ' * :py:meth:`Sample()`', " These are the resource's available collections:", ' * :py:attr:`samples`', ' .. py:method:: sample_operation(**kwargs)', ' .. py:method:: Sample(name)', ' .. py:attribute:: samples', ' .. py:method:: all()', ' .. py:method:: filter(**kwargs)', ' .. py:method:: limit(**kwargs)', ' .. py:method:: page_size(**kwargs)', '======', 'Sample', '======', '.. py:class:: MyService.Sample(name)', " These are the resource's available identifiers:", ' * :py:attr:`name`', " These are the resource's available attributes:", ' * :py:attr:`bar`', ' * :py:attr:`foo`', " These are the resource's available actions:", ' * :py:meth:`load()`', ' * :py:meth:`operate()`', ' * :py:meth:`reload()`', " These are the resource's available waiters:", ' * :py:meth:`wait_until_complete()`', ' .. py:attribute:: name', ' .. py:attribute:: bar', ' .. py:attribute:: foo', ' .. py:method:: load()', ' .. py:method:: operate(**kwargs)', ' .. py:method:: reload()', ' .. py:method:: wait_until_complete(**kwargs)', ] self.assert_contains_lines_in_order(lines, contents) def test_document_service_no_resource(self): os.remove(self.resource_model_file) service_documenter = ServiceDocumenter('myservice', self.session) contents = service_documenter.document_service().decode('utf-8') self.assertNotIn('Service Resource', contents) def test_document_service_no_paginators(self): # Delete the resource model so that the resource is not documented # as it may try to look at the paginator model during documentation. os.remove(self.resource_model_file) os.remove(self.paginator_model_file) service_documenter = ServiceDocumenter('myservice', self.session) contents = service_documenter.document_service().decode('utf-8') self.assertNotIn('Paginators', contents) def test_document_service_no_waiter(self): # Delete the resource model so that the resource is not documented # as it may try to look at the waiter model during documentation. os.remove(self.resource_model_file) os.remove(self.waiter_model_file) service_documenter = ServiceDocumenter('myservice', self.session) contents = service_documenter.document_service().decode('utf-8') self.assertNotIn('Waiters', contents) def test_creates_correct_path_to_examples_based_on_service_name(self): path = os.sep.join([os.path.dirname(boto3.__file__), 'examples', 'myservice.rst']) path = os.path.realpath(path) with mock.patch('os.path.isfile') as isfile: isfile.return_value = False s = ServiceDocumenter('myservice', self.session) s.document_service() self.assertEqual( isfile.call_args_list[-1], mock.call(path)) def test_injects_examples_when_found(self): examples_path = os.sep.join([os.path.dirname(__file__), '..', 'data', 'examples']) service_documenter = ServiceDocumenter( 'myservice', self.session) service_documenter.EXAMPLE_PATH = examples_path contents = service_documenter.document_service().decode('utf-8') self.assertIn('This is an example', contents) self.assertNotIn('This is for another service', contents) boto3-1.9.253/tests/unit/docs/test_subresource.py000066400000000000000000000024141355237733400217610ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.subresource import SubResourceDocumenter class TestSubResourceDocumenter(BaseDocsTest): def test_document_sub_resources(self): sub_resource_documentor = SubResourceDocumenter(self.resource) sub_resource_documentor.document_sub_resources(self.doc_structure) self.assert_contains_lines_in_order([ '.. py:method:: Sample(name)', ' Creates a Sample resource.::', " sample = myservice.Sample('name')", ' :type name: string', " :param name: The Sample's name identifier.", ' :rtype: :py:class:`MyService.Sample`', ' :returns: A Sample resource', ]) boto3-1.9.253/tests/unit/docs/test_utils.py000066400000000000000000000034151355237733400205620ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest from boto3.resources.model import Parameter from boto3.docs.utils import get_resource_ignore_params class TestGetResourceIgnoreParams(unittest.TestCase): def test_target_is_single_resource(self): param = Parameter('InstanceId', 'response') ignore_params = get_resource_ignore_params([param]) self.assertEqual(ignore_params, ['InstanceId']) def test_target_is_multiple_resources(self): param = Parameter('InstanceIds[]', 'response') ignore_params = get_resource_ignore_params([param]) self.assertEqual(ignore_params, ['InstanceIds']) def test_target_is_element_of_multiple_resources(self): param = Parameter('InstanceIds[0]', 'response') ignore_params = get_resource_ignore_params([param]) self.assertEqual(ignore_params, ['InstanceIds']) def test_target_is_nested_param(self): param = Parameter('Filters[0].Name', 'response') ignore_params = get_resource_ignore_params([param]) self.assertEqual(ignore_params, ['Filters']) param = Parameter('Filters[0].Values[0]', 'response') ignore_params = get_resource_ignore_params([param]) self.assertEqual(ignore_params, ['Filters']) boto3-1.9.253/tests/unit/docs/test_waiter.py000066400000000000000000000034351355237733400207170ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests.unit.docs import BaseDocsTest from boto3.docs.waiter import WaiterResourceDocumenter class TestWaiterResourceDocumenter(BaseDocsTest): def test_document_resource_waiters(self): service_waiter_model = self.botocore_session.get_waiter_model( 'myservice') subresource = self.resource.Sample('mysample') waiter_documenter = WaiterResourceDocumenter( subresource, service_waiter_model) waiter_documenter.document_resource_waiters(self.doc_structure) self.assert_contains_lines_in_order([ '.. py:method:: wait_until_complete(**kwargs)', (' Waits until this Sample is complete. This method calls ' ':py:meth:`MyService.Waiter.sample_operation_complete.wait` ' 'which polls. :py:meth:`MyService.Client.sample_operation` ' 'every 15 seconds until a successful state is reached. An ' 'error is returned after 40 failed checks.'), ' **Request Syntax** ', ' ::', ' sample.wait_until_complete(', " Bar='string'", ' )', ' :type Bar: string', ' :param Bar: Documents Bar', ' :returns: None' ]) boto3-1.9.253/tests/unit/dynamodb/000077500000000000000000000000001355237733400166535ustar00rootroot00000000000000boto3-1.9.253/tests/unit/dynamodb/__init__.py000066400000000000000000000010611355237733400207620ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/tests/unit/dynamodb/test_conditions.py000066400000000000000000000506361355237733400224470ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import copy from tests import unittest from boto3.exceptions import DynamoDBOperationNotSupportedError from boto3.exceptions import DynamoDBNeedsConditionError from boto3.exceptions import DynamoDBNeedsKeyConditionError from boto3.dynamodb.conditions import Attr, Key from boto3.dynamodb.conditions import And, Or, Not, Equals, LessThan from boto3.dynamodb.conditions import LessThanEquals, GreaterThan from boto3.dynamodb.conditions import GreaterThanEquals, BeginsWith, Between from boto3.dynamodb.conditions import NotEquals, In, AttributeExists from boto3.dynamodb.conditions import AttributeNotExists, Contains, Size from boto3.dynamodb.conditions import AttributeType from boto3.dynamodb.conditions import ConditionExpressionBuilder class TestK(unittest.TestCase): def setUp(self): self.attr = Key('mykey') self.attr2 = Key('myotherkey') self.value = 'foo' self.value2 = 'foo2' def test_and(self): with self.assertRaisesRegexp( DynamoDBOperationNotSupportedError, 'AND'): self.attr & self.attr2 def test_or(self): with self.assertRaisesRegexp( DynamoDBOperationNotSupportedError, 'OR'): self.attr | self.attr2 def test_not(self): with self.assertRaisesRegexp( DynamoDBOperationNotSupportedError, 'NOT'): ~self.attr def test_eq(self): self.assertEqual( self.attr.eq(self.value), Equals(self.attr, self.value)) def test_lt(self): self.assertEqual( self.attr.lt(self.value), LessThan(self.attr, self.value)) def test_lte(self): self.assertEqual( self.attr.lte(self.value), LessThanEquals(self.attr, self.value)) def test_gt(self): self.assertEqual( self.attr.gt(self.value), GreaterThan(self.attr, self.value)) def test_gte(self): self.assertEqual( self.attr.gte(self.value), GreaterThanEquals(self.attr, self.value)) def test_begins_with(self): self.assertEqual(self.attr.begins_with(self.value), BeginsWith(self.attr, self.value)) def test_between(self): self.assertEqual(self.attr.between(self.value, self.value2), Between(self.attr, self.value, self.value2)) def test_attribute_equality(self): attr_copy = copy.deepcopy(self.attr) self.assertIsNot(self.attr, attr_copy) self.assertEqual(self.attr, attr_copy) def test_eq_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.eq(self.value) comp2 = attr_copy.eq(self.value) self.assertEqual(comp, comp2) def test_eq_inequality(self): attr_copy = copy.deepcopy(self.attr) self.assertNotEqual(self.attr.eq(self.value), attr_copy.eq(self.value2)) def test_lt_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.lt(self.value) comp2 = attr_copy.lt(self.value) self.assertEqual(comp, comp2) def test_lte_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.lte(self.value) comp2 = attr_copy.lte(self.value) self.assertEqual(comp, comp2) def test_gt_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.gt(self.value) comp2 = attr_copy.gt(self.value) self.assertEqual(comp, comp2) def test_gte_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.gte(self.value) comp2 = attr_copy.gte(self.value) self.assertEqual(comp, comp2) def test_begins_with_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.begins_with(self.value) comp2 = attr_copy.begins_with(self.value) self.assertEqual(comp, comp2) def test_between_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.between(self.value, self.value2) comp2 = attr_copy.between(self.value, self.value2) self.assertEqual(comp, comp2) class TestA(TestK): def setUp(self): self.attr = Attr('mykey') self.attr2 = Attr('myotherkey') self.value = 'foo' self.value2 = 'foo2' def test_ne(self): self.assertEqual(self.attr.ne(self.value), NotEquals(self.attr, self.value)) def test_is_in(self): self.assertEqual(self.attr.is_in([self.value]), In(self.attr, [self.value])) def test_exists(self): self.assertEqual(self.attr.exists(), AttributeExists(self.attr)) def test_not_exists(self): self.assertEqual(self.attr.not_exists(), AttributeNotExists(self.attr)) def test_contains(self): self.assertEqual(self.attr.contains(self.value), Contains(self.attr, self.value)) def test_size(self): self.assertEqual(self.attr.size(), Size(self.attr)) def test_attribute_type(self): self.assertEqual(self.attr.attribute_type(self.value), AttributeType(self.attr, self.value)) def test_ne_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.ne(self.value) comp2 = attr_copy.ne(self.value) self.assertEqual(comp, comp2) def test_is_in_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.is_in([self.value]) comp2 = attr_copy.is_in([self.value]) self.assertEqual(comp, comp2) def test_exists_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.exists() comp2 = attr_copy.exists() self.assertEqual(comp, comp2) def test_not_exists_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.not_exists() comp2 = attr_copy.not_exists() self.assertEqual(comp, comp2) def test_contains_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.contains(self.value) comp2 = attr_copy.contains(self.value) self.assertEqual(comp, comp2) def test_size_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.size() comp2 = attr_copy.size() self.assertEqual(comp, comp2) def test_attribute_type_equality(self): attr_copy = copy.deepcopy(self.attr) comp = self.attr.attribute_type(self.value) comp2 = attr_copy.attribute_type(self.value) self.assertEqual(comp, comp2) class TestConditions(unittest.TestCase): def setUp(self): self.value = Attr('mykey') self.value2 = 'foo' def build_and_assert_expression(self, condition, reference_expression_dict): expression_dict = condition.get_expression() self.assertDictEqual(expression_dict, reference_expression_dict) def test_equal_operator(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value2) self.assertTrue(cond1 == cond2) def test_equal_operator_type(self): cond1 = Equals(self.value, self.value2) cond2 = NotEquals(self.value, self.value2) self.assertFalse(cond1 == cond2) def test_equal_operator_value(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value) self.assertFalse(cond1 == cond2) def test_not_equal_operator(self): cond1 = Equals(self.value, self.value2) cond2 = NotEquals(self.value, self.value) self.assertTrue(cond1 != cond2) def test_and_operator(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value2) self.assertEqual(cond1 & cond2, And(cond1, cond2)) def test_and_operator_throws_excepetion(self): cond1 = Equals(self.value, self.value2) with self.assertRaisesRegexp( DynamoDBOperationNotSupportedError, 'AND'): cond1 & self.value2 def test_or_operator(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value2) self.assertEqual(cond1 | cond2, Or(cond1, cond2)) def test_or_operator_throws_excepetion(self): cond1 = Equals(self.value, self.value2) with self.assertRaisesRegexp( DynamoDBOperationNotSupportedError, 'OR'): cond1 | self.value2 def test_not_operator(self): cond1 = Equals(self.value, self.value2) self.assertEqual(~cond1, Not(cond1)) def test_eq(self): self.build_and_assert_expression( Equals(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '=', 'values': (self.value, self.value2)}) def test_ne(self): self.build_and_assert_expression( NotEquals(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '<>', 'values': (self.value, self.value2)}) def test_lt(self): self.build_and_assert_expression( LessThan(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '<', 'values': (self.value, self.value2)}) def test_lte(self): self.build_and_assert_expression( LessThanEquals(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '<=', 'values': (self.value, self.value2)}) def test_gt(self): self.build_and_assert_expression( GreaterThan(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '>', 'values': (self.value, self.value2)}) def test_gte(self): self.build_and_assert_expression( GreaterThanEquals(self.value, self.value2), {'format': '{0} {operator} {1}', 'operator': '>=', 'values': (self.value, self.value2)}) def test_in(self): cond = In(self.value, (self.value2)) self.build_and_assert_expression( cond, {'format': '{0} {operator} {1}', 'operator': 'IN', 'values': (self.value, (self.value2))}) self.assertTrue(cond.has_grouped_values) def test_bet(self): self.build_and_assert_expression( Between(self.value, self.value2, 'foo2'), {'format': '{0} {operator} {1} AND {2}', 'operator': 'BETWEEN', 'values': (self.value, self.value2, 'foo2')}) def test_beg(self): self.build_and_assert_expression( BeginsWith(self.value, self.value2), {'format': '{operator}({0}, {1})', 'operator': 'begins_with', 'values': (self.value, self.value2)}) def test_cont(self): self.build_and_assert_expression( Contains(self.value, self.value2), {'format': '{operator}({0}, {1})', 'operator': 'contains', 'values': (self.value, self.value2)}) def test_ae(self): self.build_and_assert_expression( AttributeExists(self.value), {'format': '{operator}({0})', 'operator': 'attribute_exists', 'values': (self.value,)}) def test_ane(self): self.build_and_assert_expression( AttributeNotExists(self.value), {'format': '{operator}({0})', 'operator': 'attribute_not_exists', 'values': (self.value,)}) def test_size(self): self.build_and_assert_expression( Size(self.value), {'format': '{operator}({0})', 'operator': 'size', 'values': (self.value,)}) def test_size_can_use_attr_methods(self): size = Size(self.value) self.build_and_assert_expression( size.eq(self.value), {'format': '{0} {operator} {1}', 'operator': '=', 'values': (size, self.value)}) def test_size_can_use_and(self): size = Size(self.value) ae = AttributeExists(self.value) self.build_and_assert_expression( size & ae, {'format': '({0} {operator} {1})', 'operator': 'AND', 'values': (size, ae)}) def test_attribute_type(self): self.build_and_assert_expression( AttributeType(self.value, self.value2), {'format': '{operator}({0}, {1})', 'operator': 'attribute_type', 'values': (self.value, self.value2)}) def test_and(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value2) and_cond = And(cond1, cond2) self.build_and_assert_expression( and_cond, {'format': '({0} {operator} {1})', 'operator': 'AND', 'values': (cond1, cond2)}) def test_or(self): cond1 = Equals(self.value, self.value2) cond2 = Equals(self.value, self.value2) or_cond = Or(cond1, cond2) self.build_and_assert_expression( or_cond, {'format': '({0} {operator} {1})', 'operator': 'OR', 'values': (cond1, cond2)}) def test_not(self): cond = Equals(self.value, self.value2) not_cond = Not(cond) self.build_and_assert_expression( not_cond, {'format': '({operator} {0})', 'operator': 'NOT', 'values': (cond,)}) class TestConditionExpressionBuilder(unittest.TestCase): def setUp(self): self.builder = ConditionExpressionBuilder() def assert_condition_expression_build( self, condition, ref_string, ref_names, ref_values, is_key_condition=False): exp_string, names, values = self.builder.build_expression( condition, is_key_condition=is_key_condition) self.assertEqual(exp_string, ref_string) self.assertEqual(names, ref_names) self.assertEqual(values, ref_values) def test_bad_input(self): a = Attr('myattr') with self.assertRaises(DynamoDBNeedsConditionError): self.builder.build_expression(a) def test_build_expression_eq(self): a = Attr('myattr') self.assert_condition_expression_build( a.eq('foo'), '#n0 = :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_reset(self): a = Attr('myattr') self.assert_condition_expression_build( a.eq('foo'), '#n0 = :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) self.assert_condition_expression_build( a.eq('foo'), '#n1 = :v1', {'#n1': 'myattr'}, {':v1': 'foo'}) self.builder.reset() self.assert_condition_expression_build( a.eq('foo'), '#n0 = :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_lt(self): a = Attr('myattr') self.assert_condition_expression_build( a.lt('foo'), '#n0 < :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_lte(self): a1 = Attr('myattr') self.assert_condition_expression_build( a1.lte('foo'), '#n0 <= :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_gt(self): a = Attr('myattr') self.assert_condition_expression_build( a.gt('foo'), '#n0 > :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_gte(self): a = Attr('myattr') self.assert_condition_expression_build( a.gte('foo'), '#n0 >= :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_begins_with(self): a = Attr('myattr') self.assert_condition_expression_build( a.begins_with('foo'), 'begins_with(#n0, :v0)', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_between(self): a = Attr('myattr') self.assert_condition_expression_build( a.between('foo', 'foo2'), '#n0 BETWEEN :v0 AND :v1', {'#n0': 'myattr'}, {':v0': 'foo', ':v1': 'foo2'}) def test_build_expression_ne(self): a = Attr('myattr') self.assert_condition_expression_build( a.ne('foo'), '#n0 <> :v0', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_expression_in(self): a = Attr('myattr') self.assert_condition_expression_build( a.is_in([1, 2, 3]), '#n0 IN (:v0, :v1, :v2)', {'#n0': 'myattr'}, {':v0': 1, ':v1': 2, ':v2': 3}) def test_build_expression_exists(self): a = Attr('myattr') self.assert_condition_expression_build( a.exists(), 'attribute_exists(#n0)', {'#n0': 'myattr'}, {}) def test_build_expression_not_exists(self): a = Attr('myattr') self.assert_condition_expression_build( a.not_exists(), 'attribute_not_exists(#n0)', {'#n0': 'myattr'}, {}) def test_build_contains(self): a = Attr('myattr') self.assert_condition_expression_build( a.contains('foo'), 'contains(#n0, :v0)', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_size(self): a = Attr('myattr') self.assert_condition_expression_build( a.size(), 'size(#n0)', {'#n0': 'myattr'}, {}) def test_build_size_with_other_conditons(self): a = Attr('myattr') self.assert_condition_expression_build( a.size().eq(5), 'size(#n0) = :v0', {'#n0': 'myattr'}, {':v0': 5}) def test_build_attribute_type(self): a = Attr('myattr') self.assert_condition_expression_build( a.attribute_type('foo'), 'attribute_type(#n0, :v0)', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_and(self): a = Attr('myattr') a2 = Attr('myattr2') self.assert_condition_expression_build( a.eq('foo') & a2.eq('bar'), '(#n0 = :v0 AND #n1 = :v1)', {'#n0': 'myattr', '#n1': 'myattr2'}, {':v0': 'foo', ':v1': 'bar'}) def test_build_or(self): a = Attr('myattr') a2 = Attr('myattr2') self.assert_condition_expression_build( a.eq('foo') | a2.eq('bar'), '(#n0 = :v0 OR #n1 = :v1)', {'#n0': 'myattr', '#n1': 'myattr2'}, {':v0': 'foo', ':v1': 'bar'}) def test_build_not(self): a = Attr('myattr') self.assert_condition_expression_build( ~a.eq('foo'), '(NOT #n0 = :v0)', {'#n0': 'myattr'}, {':v0': 'foo'}) def test_build_attribute_with_attr_value(self): a = Attr('myattr') value = Attr('myreference') self.assert_condition_expression_build( a.eq(value), '#n0 = #n1', {'#n0': 'myattr', '#n1': 'myreference'}, {}) def test_build_with_is_key_condition(self): k = Key('myattr') self.assert_condition_expression_build( k.eq('foo'), '#n0 = :v0', {'#n0': 'myattr'}, {':v0': 'foo'}, is_key_condition=True) def test_build_with_is_key_condition_throws_error(self): a = Attr('myattr') with self.assertRaises(DynamoDBNeedsKeyConditionError): self.builder.build_expression(a.eq('foo'), is_key_condition=True) def test_build_attr_map(self): a = Attr('MyMap.MyKey') self.assert_condition_expression_build( a.eq('foo'), '#n0.#n1 = :v0', {'#n0': 'MyMap', '#n1': 'MyKey'}, {':v0': 'foo'}) def test_build_attr_list(self): a = Attr('MyList[0]') self.assert_condition_expression_build( a.eq('foo'), '#n0[0] = :v0', {'#n0': 'MyList'}, {':v0': 'foo'}) def test_build_nested_attr_map_list(self): a = Attr('MyMap.MyList[2].MyElement') self.assert_condition_expression_build( a.eq('foo'), '#n0.#n1[2].#n2 = :v0', {'#n0': 'MyMap', '#n1': 'MyList', '#n2': 'MyElement'}, {':v0': 'foo'}) def test_build_double_nested_and_or(self): a = Attr('myattr') a2 = Attr('myattr2') self.assert_condition_expression_build( (a.eq('foo') & a2.eq('foo2')) | (a.eq('bar') & a2.eq('bar2')), '((#n0 = :v0 AND #n1 = :v1) OR (#n2 = :v2 AND #n3 = :v3))', {'#n0': 'myattr', '#n1': 'myattr2', '#n2': 'myattr', '#n3': 'myattr2'}, {':v0': 'foo', ':v1': 'foo2', ':v2': 'bar', ':v3': 'bar2'}) boto3-1.9.253/tests/unit/dynamodb/test_table.py000066400000000000000000000327741355237733400213700ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest, mock from boto3.dynamodb.table import BatchWriter class BaseTransformationTest(unittest.TestCase): maxDiff = None def setUp(self): self.client = mock.Mock() self.client.batch_write_item.return_value = {'UnprocessedItems': {}} self.table_name = 'tablename' self.flush_amount = 2 self.batch_writer = BatchWriter(self.table_name, self.client, self.flush_amount) def assert_batch_write_calls_are(self, expected_batch_writes): self.assertEqual(self.client.batch_write_item.call_count, len(expected_batch_writes)) batch_write_calls = [ args[1] for args in self.client.batch_write_item.call_args_list ] self.assertEqual(batch_write_calls, expected_batch_writes) def test_batch_write_does_not_immediately_write(self): self.batch_writer.put_item(Item={'Hash': 'foo'}) self.assertFalse(self.client.batch_write_item.called) def test_batch_write_flushes_at_flush_amount(self): self.batch_writer.put_item(Item={'Hash': 'foo1'}) self.batch_writer.put_item(Item={'Hash': 'foo2'}) expected = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } self.assert_batch_write_calls_are([expected]) def test_multiple_flushes_reset_items_to_put(self): self.batch_writer.put_item(Item={'Hash': 'foo1'}) self.batch_writer.put_item(Item={'Hash': 'foo2'}) self.batch_writer.put_item(Item={'Hash': 'foo3'}) self.batch_writer.put_item(Item={'Hash': 'foo4'}) # We should have two batch calls, one for foo1,foo2 and # one for foo3,foo4. first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } second_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo3'}}}, {'PutRequest': {'Item': {'Hash': 'foo4'}}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch]) def test_can_handle_puts_and_deletes(self): self.batch_writer.put_item(Item={'Hash': 'foo1'}) self.batch_writer.delete_item(Key={'Hash': 'foo2'}) expected = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'DeleteRequest': {'Key': {'Hash': 'foo2'}}}, ] } } self.assert_batch_write_calls_are([expected]) def test_multiple_batch_calls_with_mixed_deletes(self): self.batch_writer.put_item(Item={'Hash': 'foo1'}) self.batch_writer.delete_item(Key={'Hash': 'foo2'}) self.batch_writer.delete_item(Key={'Hash': 'foo3'}) self.batch_writer.put_item(Item={'Hash': 'foo4'}) first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'DeleteRequest': {'Key': {'Hash': 'foo2'}}}, ] } } second_batch = { 'RequestItems': { self.table_name: [ {'DeleteRequest': {'Key': {'Hash': 'foo3'}}}, {'PutRequest': {'Item': {'Hash': 'foo4'}}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch]) def test_unprocessed_items_added_to_next_batch(self): self.client.batch_write_item.side_effect = [ { 'UnprocessedItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo2'}}} ], }, }, # Then the last response shows that everything went through {'UnprocessedItems': {}} ] self.batch_writer.put_item(Item={'Hash': 'foo1'}) self.batch_writer.put_item(Item={'Hash': 'foo2'}) self.batch_writer.put_item(Item={'Hash': 'foo3'}) # We should have sent two batch requests consisting of 2 # 2 requests. foo1,foo2 and foo2,foo3. # foo2 is sent twice because the first response has it listed # as an unprocessed item which means it needs to be part # of the next batch. first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } second_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo2'}}}, {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch]) def test_all_items_flushed_on_exit(self): with self.batch_writer as b: b.put_item(Item={'Hash': 'foo1'}) self.assert_batch_write_calls_are([ { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, ] }, }, ]) def test_never_send_more_than_max_batch_size(self): # Suppose the server sends backs a response that indicates that # all the items were unprocessed. self.client.batch_write_item.side_effect = [ { 'UnprocessedItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ], }, }, { 'UnprocessedItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ], }, }, { 'UnprocessedItems': {} }, ] with BatchWriter(self.table_name, self.client, flush_amount=2) as b: b.put_item(Item={'Hash': 'foo1'}) b.put_item(Item={'Hash': 'foo2'}) b.put_item(Item={'Hash': 'foo3'}) # Note how we're never sending more than flush_amount=2. first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } # Even when the server sends us unprocessed items of 2 elements, # we'll still only send 2 at a time, in order. second_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } # And then we still see one more unprocessed item so # we need to send another batch. third_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo3'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch, third_batch]) def test_repeated_flushing_on_exit(self): # We're going to simulate unprocessed_items # returning multiple unprocessed items across calls. self.client.batch_write_item.side_effect = [ { 'UnprocessedItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo2'}}}, {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ], }, }, { 'UnprocessedItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ], }, }, { 'UnprocessedItems': {} }, ] with BatchWriter(self.table_name, self.client, flush_amount=4) as b: b.put_item(Item={'Hash': 'foo1'}) b.put_item(Item={'Hash': 'foo2'}) b.put_item(Item={'Hash': 'foo3'}) # So when we exit, we expect three calls. # First we try the normal batch write with 3 items: first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo1'}}}, {'PutRequest': {'Item': {'Hash': 'foo2'}}}, {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ] } } # Then we see two unprocessed items so we send another batch. second_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo2'}}}, {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ] } } # And then we still see one more unprocessed item so # we need to send another batch. third_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': {'Item': {'Hash': 'foo3'}}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch, third_batch]) def test_auto_dedup_for_dup_requests(self): with BatchWriter(self.table_name, self.client, flush_amount=5, overwrite_by_pkeys=["pkey", "skey"]) as b: # dup 1 b.put_item(Item={ 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other1' }) b.put_item(Item={ 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other2' }) # dup 2 b.delete_item(Key={ 'pkey': 'foo1', 'skey': 'bar2', }) b.put_item(Item={ 'pkey': 'foo1', 'skey': 'bar2', 'other': 'other3' }) # dup 3 b.put_item(Item={ 'pkey': 'foo2', 'skey': 'bar2', 'other': 'other3' }) b.delete_item(Key={ 'pkey': 'foo2', 'skey': 'bar2', }) # dup 4 b.delete_item(Key={ 'pkey': 'foo2', 'skey': 'bar3', }) b.delete_item(Key={ 'pkey': 'foo2', 'skey': 'bar3', }) # 5 b.delete_item(Key={ 'pkey': 'foo3', 'skey': 'bar3', }) # 2nd batch b.put_item(Item={ 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other1' }) b.put_item(Item={ 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other2' }) first_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': { 'Item': { 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other2' }}}, {'PutRequest': { 'Item': { 'pkey': 'foo1', 'skey': 'bar2', 'other': 'other3' }}}, {'DeleteRequest': {'Key': { 'pkey': 'foo2', 'skey': 'bar2', }}}, {'DeleteRequest': {'Key': { 'pkey': 'foo2', 'skey': 'bar3', }}}, {'DeleteRequest': {'Key': { 'pkey': 'foo3', 'skey': 'bar3', }}}, ] } } second_batch = { 'RequestItems': { self.table_name: [ {'PutRequest': { 'Item': { 'pkey': 'foo1', 'skey': 'bar1', 'other': 'other2' }}}, ] } } self.assert_batch_write_calls_are([first_batch, second_batch]) boto3-1.9.253/tests/unit/dynamodb/test_transform.py000066400000000000000000000522331355237733400223040ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest, mock from botocore.model import ServiceModel, OperationModel from boto3.resources.base import ResourceMeta, ServiceResource from boto3.dynamodb.transform import ParameterTransformer from boto3.dynamodb.transform import TransformationInjector from boto3.dynamodb.transform import DynamoDBHighLevelResource from boto3.dynamodb.transform import register_high_level_interface from boto3.dynamodb.transform import copy_dynamodb_params from boto3.dynamodb.conditions import Attr, Key class BaseTransformationTest(unittest.TestCase): def setUp(self): self.target_shape = 'MyShape' self.original_value = 'orginal' self.transformed_value = 'transformed' self.transformer = ParameterTransformer() self.json_model = {} self.nested_json_model = {} self.setup_models() self.build_models() def setup_models(self): self.json_model = { 'operations': { 'SampleOperation': { 'name': 'SampleOperation', 'input': {'shape': 'SampleOperationInputOutput'}, 'output': {'shape': 'SampleOperationInputOutput'} } }, 'shapes': { 'SampleOperationInputOutput': { 'type': 'structure', 'members': {} }, 'String': { 'type': 'string' } } } def build_models(self): self.service_model = ServiceModel(self.json_model) self.operation_model = OperationModel( self.json_model['operations']['SampleOperation'], self.service_model ) def add_input_shape(self, shape): self.add_shape(shape) params_shape = self.json_model['shapes']['SampleOperationInputOutput'] shape_name = list(shape.keys())[0] params_shape['members'][shape_name] = {'shape': shape_name} def add_shape(self, shape): shape_name = list(shape.keys())[0] self.json_model['shapes'][shape_name] = shape[shape_name] class TestInputOutputTransformer(BaseTransformationTest): def setUp(self): super(TestInputOutputTransformer, self).setUp() self.transformation = lambda params: self.transformed_value self.add_shape({self.target_shape: {'type': 'string'}}) def test_transform_structure(self): input_params = { 'Structure': { 'TransformMe': self.original_value, 'LeaveAlone': self.original_value, } } input_shape = { 'Structure': { 'type': 'structure', 'members': { 'TransformMe': {'shape': self.target_shape}, 'LeaveAlone': {'shape': 'String'} } } } self.add_input_shape(input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'Structure': { 'TransformMe': self.transformed_value, 'LeaveAlone': self.original_value}} ) def test_transform_map(self): input_params = { 'TransformMe': {'foo': self.original_value}, 'LeaveAlone': {'foo': self.original_value} } targeted_input_shape = { 'TransformMe': { 'type': 'map', 'key': {'shape': 'String'}, 'value': {'shape': self.target_shape} } } untargeted_input_shape = { 'LeaveAlone': { 'type': 'map', 'key': {'shape': 'String'}, 'value': {'shape': 'String'} } } self.add_input_shape(targeted_input_shape) self.add_input_shape(untargeted_input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'TransformMe': {'foo': self.transformed_value}, 'LeaveAlone': {'foo': self.original_value}} ) def test_transform_list(self): input_params = { 'TransformMe': [ self.original_value, self.original_value ], 'LeaveAlone': [ self.original_value, self.original_value ] } targeted_input_shape = { 'TransformMe': { 'type': 'list', 'member': {'shape': self.target_shape} } } untargeted_input_shape = { 'LeaveAlone': { 'type': 'list', 'member': {'shape': 'String'} } } self.add_input_shape(targeted_input_shape) self.add_input_shape(untargeted_input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'TransformMe': [self.transformed_value, self.transformed_value], 'LeaveAlone': [self.original_value, self.original_value]} ) def test_transform_nested_structure(self): input_params = { 'WrapperStructure': { 'Structure': { 'TransformMe': self.original_value, 'LeaveAlone': self.original_value } } } structure_shape = { 'Structure': { 'type': 'structure', 'members': { 'TransformMe': {'shape': self.target_shape}, 'LeaveAlone': {'shape': 'String'} } } } input_shape = { 'WrapperStructure': { 'type': 'structure', 'members': {'Structure': {'shape': 'Structure'}}} } self.add_shape(structure_shape) self.add_input_shape(input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'WrapperStructure': { 'Structure': {'TransformMe': self.transformed_value, 'LeaveAlone': self.original_value}}} ) def test_transform_nested_map(self): input_params = { 'TargetedWrapperMap': { 'foo': { 'bar': self.original_value } }, 'UntargetedWrapperMap': { 'foo': { 'bar': self.original_value } } } targeted_map_shape = { 'TransformMeMap': { 'type': 'map', 'key': {'shape': 'String'}, 'value': {'shape': self.target_shape} } } targeted_wrapper_shape = { 'TargetedWrapperMap': { 'type': 'map', 'key': {'shape': 'Name'}, 'value': {'shape': 'TransformMeMap'}} } self.add_shape(targeted_map_shape) self.add_input_shape(targeted_wrapper_shape) untargeted_map_shape = { 'LeaveAloneMap': { 'type': 'map', 'key': {'shape': 'String'}, 'value': {'shape': 'String'} } } untargeted_wrapper_shape = { 'UntargetedWrapperMap': { 'type': 'map', 'key': {'shape': 'Name'}, 'value': {'shape': 'LeaveAloneMap'}} } self.add_shape(untargeted_map_shape) self.add_input_shape(untargeted_wrapper_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'TargetedWrapperMap': {'foo': {'bar': self.transformed_value}}, 'UntargetedWrapperMap': {'foo': {'bar': self.original_value}}} ) def test_transform_nested_list(self): input_params = { 'TargetedWrapperList': [ [self.original_value, self.original_value] ], 'UntargetedWrapperList': [ [self.original_value, self.original_value] ] } targeted_list_shape = { 'TransformMe': { 'type': 'list', 'member': {'shape': self.target_shape} } } targeted_wrapper_shape = { 'TargetedWrapperList': { 'type': 'list', 'member': {'shape': 'TransformMe'}} } self.add_shape(targeted_list_shape) self.add_input_shape(targeted_wrapper_shape) untargeted_list_shape = { 'LeaveAlone': { 'type': 'list', 'member': {'shape': 'String'} } } untargeted_wrapper_shape = { 'UntargetedWrapperList': { 'type': 'list', 'member': {'shape': 'LeaveAlone'}} } self.add_shape(untargeted_list_shape) self.add_input_shape(untargeted_wrapper_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual( input_params, {'TargetedWrapperList': [[ self.transformed_value, self.transformed_value]], 'UntargetedWrapperList': [[ self.original_value, self.original_value]]} ) def test_transform_incorrect_type_for_structure(self): input_params = { 'Structure': 'foo' } input_shape = { 'Structure': { 'type': 'structure', 'members': { 'TransformMe': {'shape': self.target_shape}, } } } self.add_input_shape(input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual(input_params, {'Structure': 'foo'}) def test_transform_incorrect_type_for_map(self): input_params = { 'Map': 'foo' } input_shape = { 'Map': { 'type': 'map', 'key': {'shape': 'String'}, 'value': {'shape': self.target_shape} } } self.add_input_shape(input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual(input_params, {'Map': 'foo'}) def test_transform_incorrect_type_for_list(self): input_params = { 'List': 'foo' } input_shape = { 'List': { 'type': 'list', 'member': {'shape': self.target_shape} } } self.add_input_shape(input_shape) self.transformer.transform( params=input_params, model=self.operation_model.input_shape, transformation=self.transformation, target_shape=self.target_shape) self.assertEqual(input_params, {'List': 'foo'}) class BaseTransformAttributeValueTest(BaseTransformationTest): def setUp(self): self.target_shape = 'AttributeValue' self.setup_models() self.build_models() self.python_value = 'mystring' self.dynamodb_value = {'S': self.python_value} self.injector = TransformationInjector() self.add_shape({self.target_shape: {'type': 'string'}}) class TestTransformAttributeValueInput(BaseTransformAttributeValueTest): def test_handler(self): input_params = { 'Structure': { 'TransformMe': self.python_value, 'LeaveAlone': 'unchanged' } } input_shape = { 'Structure': { 'type': 'structure', 'members': { 'TransformMe': {'shape': self.target_shape}, 'LeaveAlone': {'shape': 'String'} } } } self.add_input_shape(input_shape) self.injector.inject_attribute_value_input( params=input_params, model=self.operation_model) self.assertEqual( input_params, {'Structure': { 'TransformMe': self.dynamodb_value, 'LeaveAlone': 'unchanged'}} ) class TestTransformAttributeValueOutput(BaseTransformAttributeValueTest): def test_handler(self): parsed = { 'Structure': { 'TransformMe': self.dynamodb_value, 'LeaveAlone': 'unchanged' } } input_shape = { 'Structure': { 'type': 'structure', 'members': { 'TransformMe': {'shape': self.target_shape}, 'LeaveAlone': {'shape': 'String'} } } } self.add_input_shape(input_shape) self.injector.inject_attribute_value_output( parsed=parsed, model=self.operation_model) self.assertEqual( parsed, {'Structure': { 'TransformMe': self.python_value, 'LeaveAlone': 'unchanged'}} ) def test_no_output(self): service_model = ServiceModel({ 'operations': { 'SampleOperation': { 'name': 'SampleOperation', 'input': {'shape': 'SampleOperationInputOutput'}, } }, 'shapes': { 'SampleOperationInput': { 'type': 'structure', 'members': {} }, 'String': { 'type': 'string' } } }) operation_model = service_model.operation_model('SampleOperation') parsed = {} self.injector.inject_attribute_value_output( parsed=parsed, model=operation_model) self.assertEqual(parsed, {}) class TestTransformConditionExpression(BaseTransformationTest): def setUp(self): super(TestTransformConditionExpression, self).setUp() self.add_shape({'ConditionExpression': {'type': 'string'}}) self.add_shape({'KeyExpression': {'type': 'string'}}) shapes = self.json_model['shapes'] input_members = shapes['SampleOperationInputOutput']['members'] input_members['KeyCondition'] = {'shape': 'KeyExpression'} input_members['AttrCondition'] = {'shape': 'ConditionExpression'} self.injector = TransformationInjector() self.build_models() def test_non_condition_input(self): params = { 'KeyCondition': 'foo', 'AttrCondition': 'bar' } self.injector.inject_condition_expressions( params, self.operation_model) self.assertEqual( params, {'KeyCondition': 'foo', 'AttrCondition': 'bar'}) def test_single_attr_condition_expression(self): params = { 'AttrCondition': Attr('foo').eq('bar') } self.injector.inject_condition_expressions( params, self.operation_model) self.assertEqual( params, {'AttrCondition': '#n0 = :v0', 'ExpressionAttributeNames': {'#n0': 'foo'}, 'ExpressionAttributeValues': {':v0': 'bar'}} ) def test_single_key_conditon_expression(self): params = { 'KeyCondition': Key('foo').eq('bar') } self.injector.inject_condition_expressions( params, self.operation_model) self.assertEqual( params, {'KeyCondition': '#n0 = :v0', 'ExpressionAttributeNames': {'#n0': 'foo'}, 'ExpressionAttributeValues': {':v0': 'bar'}} ) def test_key_and_attr_conditon_expression(self): params = { 'KeyCondition': Key('foo').eq('bar'), 'AttrCondition': Attr('biz').eq('baz') } self.injector.inject_condition_expressions( params, self.operation_model) self.assertEqual( params, {'KeyCondition': '#n1 = :v1', 'AttrCondition': '#n0 = :v0', 'ExpressionAttributeNames': {'#n0': 'biz', '#n1': 'foo'}, 'ExpressionAttributeValues': {':v0': 'baz', ':v1': 'bar'}} ) def test_key_and_attr_conditon_expression_with_placeholders(self): params = { 'KeyCondition': Key('foo').eq('bar'), 'AttrCondition': Attr('biz').eq('baz'), 'ExpressionAttributeNames': {'#a': 'b'}, 'ExpressionAttributeValues': {':c': 'd'} } self.injector.inject_condition_expressions( params, self.operation_model) self.assertEqual( params, {'KeyCondition': '#n1 = :v1', 'AttrCondition': '#n0 = :v0', 'ExpressionAttributeNames': { '#n0': 'biz', '#n1': 'foo', '#a': 'b'}, 'ExpressionAttributeValues': { ':v0': 'baz', ':v1': 'bar', ':c': 'd'}} ) class TestCopyDynamoDBParams(unittest.TestCase): def test_copy_dynamodb_params(self): params = {'foo': 'bar'} new_params = copy_dynamodb_params(params) self.assertEqual(params, new_params) self.assertIsNot(new_params, params) class TestDynamoDBHighLevelResource(unittest.TestCase): def setUp(self): self.events = mock.Mock() self.client = mock.Mock() self.client.meta.events = self.events self.meta = ResourceMeta('dynamodb') def test_instantiation(self): # Instantiate the class. dynamodb_class = type( 'dynamodb', (DynamoDBHighLevelResource, ServiceResource), {'meta': self.meta}) with mock.patch('boto3.dynamodb.transform.TransformationInjector') \ as mock_injector: with mock.patch( 'boto3.dynamodb.transform.DocumentModifiedShape.' 'replace_documentation_for_matching_shape') \ as mock_modify_documentation_method: dynamodb_class(client=self.client) # It should have fired the following events upon instantiation. event_call_args = self.events.register.call_args_list self.assertEqual( event_call_args, [mock.call( 'provide-client-params.dynamodb', copy_dynamodb_params, unique_id='dynamodb-create-params-copy'), mock.call( 'before-parameter-build.dynamodb', mock_injector.return_value.inject_condition_expressions, unique_id='dynamodb-condition-expression'), mock.call( 'before-parameter-build.dynamodb', mock_injector.return_value.inject_attribute_value_input, unique_id='dynamodb-attr-value-input'), mock.call( 'after-call.dynamodb', mock_injector.return_value.inject_attribute_value_output, unique_id='dynamodb-attr-value-output'), mock.call( 'docs.*.dynamodb.*.complete-section', mock_modify_documentation_method, unique_id='dynamodb-attr-value-docs'), mock.call( 'docs.*.dynamodb.*.complete-section', mock_modify_documentation_method, unique_id='dynamodb-key-expression-docs'), mock.call( 'docs.*.dynamodb.*.complete-section', mock_modify_documentation_method, unique_id='dynamodb-cond-expression-docs')] ) class TestRegisterHighLevelInterface(unittest.TestCase): def test_register(self): base_classes = [object] register_high_level_interface(base_classes) # Check that the base classes are as expected self.assertEqual(base_classes, [DynamoDBHighLevelResource, object]) boto3-1.9.253/tests/unit/dynamodb/test_types.py000066400000000000000000000163601355237733400214360ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from decimal import Decimal from tests import unittest from botocore.compat import six from boto3.dynamodb.types import Binary, TypeSerializer, TypeDeserializer class TestBinary(unittest.TestCase): def test_bytes_input(self): data = Binary(b'\x01') self.assertEqual(b'\x01', data) self.assertEqual(b'\x01', data.value) def test_non_ascii_bytes_input(self): # Binary data that is out of ASCII range data = Binary(b'\x88') self.assertEqual(b'\x88', data) self.assertEqual(b'\x88', data.value) def test_bytearray_input(self): data = Binary(bytearray([1])) self.assertEqual(b'\x01', data) self.assertEqual(b'\x01', data.value) def test_unicode_throws_error(self): with self.assertRaises(TypeError): Binary(u'\u00e9') def test_integer_throws_error(self): with self.assertRaises(TypeError): Binary(1) def test_not_equal(self): self.assertTrue(Binary(b'\x01') != b'\x02') def test_str(self): self.assertEqual(Binary(b'\x01').__str__(), b'\x01') def test_repr(self): self.assertIn('Binary', repr(Binary(b'1'))) class TestSerializer(unittest.TestCase): def setUp(self): self.serializer = TypeSerializer() def test_serialize_unsupported_type(self): with self.assertRaisesRegexp(TypeError, 'Unsupported type'): self.serializer.serialize(object()) def test_serialize_null(self): self.assertEqual(self.serializer.serialize(None), {'NULL': True}) def test_serialize_boolean(self): self.assertEqual(self.serializer.serialize(False), {'BOOL': False}) def test_serialize_integer(self): self.assertEqual(self.serializer.serialize(1), {'N': '1'}) def test_serialize_decimal(self): self.assertEqual( self.serializer.serialize(Decimal('1.25')), {'N': '1.25'}) def test_serialize_float_error(self): with self.assertRaisesRegexp( TypeError, 'Float types are not supported. Use Decimal types instead'): self.serializer.serialize(1.25) def test_serialize_NaN_error(self): with self.assertRaisesRegexp( TypeError, 'Infinity and NaN not supported'): self.serializer.serialize(Decimal('NaN')) def test_serialize_string(self): self.assertEqual(self.serializer.serialize('foo'), {'S': 'foo'}) def test_serialize_binary(self): self.assertEqual(self.serializer.serialize( Binary(b'\x01')), {'B': b'\x01'}) def test_serialize_bytearray(self): self.assertEqual(self.serializer.serialize(bytearray([1])), {'B': b'\x01'}) @unittest.skipIf(six.PY2, 'This is a test when using python3 version of bytes') def test_serialize_bytes(self): self.assertEqual(self.serializer.serialize(b'\x01'), {'B': b'\x01'}) def test_serialize_number_set(self): serialized_value = self.serializer.serialize(set([1, 2, 3])) self.assertEqual(len(serialized_value), 1) self.assertIn('NS', serialized_value) self.assertCountEqual(serialized_value['NS'], ['1', '2', '3']) def test_serialize_string_set(self): serialized_value = self.serializer.serialize(set(['foo', 'bar'])) self.assertEqual(len(serialized_value), 1) self.assertIn('SS', serialized_value) self.assertCountEqual(serialized_value['SS'], ['foo', 'bar']) def test_serialize_binary_set(self): serialized_value = self.serializer.serialize( set([Binary(b'\x01'), Binary(b'\x02')])) self.assertEqual(len(serialized_value), 1) self.assertIn('BS', serialized_value) self.assertCountEqual(serialized_value['BS'], [b'\x01', b'\x02']) def test_serialize_list(self): serialized_value = self.serializer.serialize(['foo', 1, [1]]) self.assertEqual(len(serialized_value), 1) self.assertIn('L', serialized_value) self.assertCountEqual( serialized_value['L'], [{'S': 'foo'}, {'N': '1'}, {'L': [{'N': '1'}]}] ) def test_serialize_map(self): serialized_value = self.serializer.serialize( {'foo': 'bar', 'baz': {'biz': 1}}) self.assertEqual( serialized_value, {'M': {'foo': {'S': 'bar'}, 'baz': {'M': {'biz': {'N': '1'}}}}}) class TestDeserializer(unittest.TestCase): def setUp(self): self.deserializer = TypeDeserializer() def test_deserialize_invalid_type(self): with self.assertRaisesRegexp(TypeError, 'FOO is not supported'): self.deserializer.deserialize({'FOO': 'bar'}) def test_deserialize_empty_structure(self): with self.assertRaisesRegexp(TypeError, 'Value must be a nonempty'): self.assertEqual(self.deserializer.deserialize({}), {}) def test_deserialize_null(self): self.assertEqual(self.deserializer.deserialize({"NULL": True}), None) def test_deserialize_boolean(self): self.assertEqual(self.deserializer.deserialize({"BOOL": False}), False) def test_deserialize_integer(self): self.assertEqual( self.deserializer.deserialize({'N': '1'}), Decimal('1')) def test_deserialize_decimal(self): self.assertEqual( self.deserializer.deserialize({'N': '1.25'}), Decimal('1.25')) def test_deserialize_string(self): self.assertEqual( self.deserializer.deserialize({'S': 'foo'}), 'foo') def test_deserialize_binary(self): self.assertEqual( self.deserializer.deserialize({'B': b'\x00'}), Binary(b'\x00')) def test_deserialize_number_set(self): self.assertEqual( self.deserializer.deserialize( {'NS': ['1', '1.25']}), set([Decimal('1'), Decimal('1.25')])) def test_deserialize_string_set(self): self.assertEqual( self.deserializer.deserialize( {'SS': ['foo', 'bar']}), set(['foo', 'bar'])) def test_deserialize_binary_set(self): self.assertEqual( self.deserializer.deserialize( {'BS': [b'\x00', b'\x01']}), set([Binary(b'\x00'), Binary(b'\x01')])) def test_deserialize_list(self): self.assertEqual( self.deserializer.deserialize( {'L': [{'N': '1'}, {'S': 'foo'}, {'L': [{'N': '1.25'}]}]}), [Decimal('1'), 'foo', [Decimal('1.25')]]) def test_deserialize_map(self): self.assertEqual( self.deserializer.deserialize( {'M': {'foo': {'S': 'mystring'}, 'bar': {'M': {'baz': {'N': '1'}}}}}), {'foo': 'mystring', 'bar': {'baz': Decimal('1')}} ) boto3-1.9.253/tests/unit/ec2/000077500000000000000000000000001355237733400155275ustar00rootroot00000000000000boto3-1.9.253/tests/unit/ec2/__init__.py000066400000000000000000000010611355237733400176360ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. boto3-1.9.253/tests/unit/ec2/test_createtags.py000066400000000000000000000052121355237733400212620ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest import mock import boto3.session from boto3.ec2 import createtags class TestCreateTags(unittest.TestCase): def setUp(self): self.client = mock.Mock() self.resource = mock.Mock() self.resource.meta.client = self.client self.ref_tags = [ 'tag1', 'tag2', 'tag3', 'tag4', 'tag5', 'tag6' ] self.resource.Tag.side_effect = self.ref_tags def test_create_tags(self): ref_kwargs = { 'Resources': ['foo', 'bar'], 'Tags': [ {'Key': 'key1', 'Value': 'value1'}, {'Key': 'key2', 'Value': 'value2'}, {'Key': 'key3', 'Value': 'value3'} ] } result_tags = createtags.create_tags(self.resource, **ref_kwargs) # Ensure the client method was called properly. self.client.create_tags.assert_called_with(**ref_kwargs) # Ensure the calls to the Tag reference were correct. self.assertEqual( self.resource.Tag.call_args_list, [mock.call('foo', 'key1', 'value1'), mock.call('foo', 'key2', 'value2'), mock.call('foo', 'key3', 'value3'), mock.call('bar', 'key1', 'value1'), mock.call('bar', 'key2', 'value2'), mock.call('bar', 'key3', 'value3')]) # Ensure the return values are as expected. self.assertEqual(result_tags, self.ref_tags) class TestCreateTagsInjection(unittest.TestCase): def test_create_tags_injected_to_resource(self): session = boto3.session.Session(region_name='us-west-2') with mock.patch('boto3.ec2.createtags.create_tags') as mock_method: resource = session.resource('ec2') self.assertTrue(hasattr(resource, 'create_tags'), 'EC2 resource does not have create_tags method.') self.assertIs(resource.create_tags, mock_method, 'custom create_tags method was not injected onto ' 'EC2 service resource') boto3-1.9.253/tests/unit/ec2/test_deletetags.py000066400000000000000000000024621355237733400212650ustar00rootroot00000000000000# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import unittest import mock from boto3.ec2.deletetags import delete_tags class TestDeleteTags(unittest.TestCase): def setUp(self): self.client = mock.Mock() self.resource = mock.Mock() self.resource.meta.client = self.client self.instance_id = 'instance_id' self.resource.id = self.instance_id def test_delete_tags(self): tags = { 'Tags': [ {'Key': 'key1', 'Value': 'value1'}, {'Key': 'key2', 'Value': 'value2'}, {'Key': 'key3', 'Value': 'value3'} ] } delete_tags(self.resource, **tags) kwargs = tags kwargs['Resources'] = [self.instance_id] self.client.delete_tags.assert_called_with(**kwargs) boto3-1.9.253/tests/unit/resources/000077500000000000000000000000001355237733400170705ustar00rootroot00000000000000boto3-1.9.253/tests/unit/resources/__init__.py000066400000000000000000000000001355237733400211670ustar00rootroot00000000000000boto3-1.9.253/tests/unit/resources/test_action.py000066400000000000000000000216661355237733400217710ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from boto3.utils import ServiceContext from boto3.resources.action import BatchAction, ServiceAction, WaiterAction from boto3.resources.base import ResourceMeta from boto3.resources.model import Action, Waiter from tests import BaseTestCase, mock class TestServiceActionCall(BaseTestCase): def setUp(self): super(TestServiceActionCall, self).setUp() self.action_def = { 'request': { 'operation': 'GetFrobs', 'params': [] } } @property def action(self): return Action('test', self.action_def, {}) @mock.patch('boto3.resources.action.create_request_parameters', return_value={}) def test_service_action_creates_params(self, params_mock): resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) action = ServiceAction(self.action) action(resource, foo=1) self.assertTrue(params_mock.called, 'Parameters for operation not created') @mock.patch('boto3.resources.action.create_request_parameters', return_value={'bar': 'baz'}) def test_service_action_calls_operation(self, params_mock): resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) operation = resource.meta.client.get_frobs operation.return_value = 'response' action = ServiceAction(self.action) response = action(resource, foo=1) operation.assert_called_with(foo=1, bar='baz') self.assertEqual(response, 'response', 'Unexpected low-level response data returned') @mock.patch('boto3.resources.action.create_request_parameters', return_value={}) @mock.patch('boto3.resources.action.RawHandler') def test_service_action_calls_raw_handler(self, handler_mock, params_mock): resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) operation = resource.meta.client.get_frobs operation.return_value = 'response' action = ServiceAction(self.action) handler_mock.return_value.return_value = 'response' action(resource) handler_mock.assert_called_with(None) handler_mock.return_value.assert_called_with(resource, {}, 'response') @mock.patch('boto3.resources.action.create_request_parameters', return_value={}) @mock.patch('boto3.resources.action.ResourceHandler') def test_service_action_calls_resource_handler(self, handler_mock, params_mock): self.action_def['resource'] = { 'type': 'Frob', 'path': 'Container' } resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) operation = resource.meta.client.get_frobs operation.return_value = 'response' factory = mock.Mock() resource_defs = {} service_model = mock.Mock() action_model = self.action service_context = ServiceContext( service_name='test', service_model=service_model, resource_json_definitions=resource_defs, service_waiter_model=None ) action = ServiceAction( action_model=action_model, factory=factory, service_context=service_context ) handler_mock.return_value.return_value = 'response' action(resource) handler_mock.assert_called_with( search_path='Container', factory=factory, resource_model=action_model.resource, service_context=service_context, operation_name='GetFrobs' ) class TestWaiterActionCall(BaseTestCase): def setUp(self): super(TestWaiterActionCall, self).setUp() self.waiter_resource_name = 'wait_until_exists' self.waiter_def = { "waiterName": "FrobExists", "params": [ {"target": "Frob", "sourceType": "identifier", "source": "Name"}] } @property def waiter(self): return Waiter('test', self.waiter_def) @mock.patch('boto3.resources.action.create_request_parameters', return_value={}) def test_service_waiter_creates_params(self, params_mock): resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) action = WaiterAction(self.waiter, self.waiter_resource_name) action(resource, foo=1) self.assertTrue(params_mock.called, 'Parameters for operation not created') @mock.patch('boto3.resources.action.create_request_parameters', return_value={'bar': 'baz'}) def test_service_action_calls_operation(self, params_mock): resource = mock.Mock() resource.meta = ResourceMeta('test', client=mock.Mock()) get_waiter = resource.meta.client.get_waiter mock_waiter = mock.Mock() get_waiter.return_value = mock_waiter action = WaiterAction(self.waiter, self.waiter_resource_name) action(resource, foo=1) get_waiter.assert_called_with('frob_exists') mock_waiter.wait.assert_called_with(foo=1, bar='baz') class TestBatchActionCall(BaseTestCase): def setUp(self): super(TestBatchActionCall, self).setUp() self.action_def = { 'request': { 'operation': 'GetFrobs', 'params': [] } } @property def model(self): return Action('test', self.action_def, {}) def test_batch_action_gets_pages_from_collection(self): collection = mock.Mock() collection.pages.return_value = [] action = BatchAction(self.model) action(collection) collection.pages.assert_called_with() def test_batch_action_creates_parameters_from_items(self): self.action_def['request']['params'] = [ {'target': 'Bucket', 'source': 'data', 'path': 'BucketName'}, {'target': 'Delete.Objects[].Key', 'source': 'data', 'path': 'Key'} ] client = mock.Mock() item1 = mock.Mock() item1.meta = ResourceMeta('test', client=client, data={ 'BucketName': 'bucket', 'Key': 'item1' }) item2 = mock.Mock() item2.meta = ResourceMeta('test', client=client, data={ 'BucketName': 'bucket', 'Key': 'item2' }) collection = mock.Mock() collection.pages.return_value = [[item1, item2]] action = BatchAction(self.model) action(collection) client.get_frobs.assert_called_with(Bucket='bucket', Delete={ 'Objects': [ {'Key': 'item1'}, {'Key': 'item2'} ] }) @mock.patch('boto3.resources.action.create_request_parameters', return_value={}) def test_batch_action_skips_operation(self, crp_mock): # In this test we have an item from the collection, but no # parameters are set up. Because of this, we do NOT call # the batch operation. client = mock.Mock() item = mock.Mock() item.meta = ResourceMeta('test', client=client) collection = mock.Mock() collection.pages.return_value = [[item]] model = self.model action = BatchAction(model) action(collection) crp_mock.assert_called_with(item, model.request, params={}, index=0) client.get_frobs.assert_not_called() @mock.patch('boto3.resources.action.create_request_parameters') def test_batch_action_calls_operation(self, crp_mock): # In this test we have an item and parameters, so the call # to the batch operation should be made. def side_effect(resource, model, params=None, index=None): params['foo'] = 'bar' crp_mock.side_effect = side_effect client = mock.Mock() item = mock.Mock() item.meta = ResourceMeta('test', client=client) collection = mock.Mock() collection.pages.return_value = [[item]] model = self.model action = BatchAction(model) action(collection) # Here the call is made with params={}, but they are edited # in-place so we need to compare to the final edited value. crp_mock.assert_called_with(item, model.request, params={'foo': 'bar'}, index=0) client.get_frobs.assert_called_with(foo='bar') boto3-1.9.253/tests/unit/resources/test_collection.py000066400000000000000000000552231355237733400226430ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.hooks import HierarchicalEmitter from botocore.model import ServiceModel from boto3.utils import ServiceContext from boto3.resources.collection import CollectionFactory, CollectionManager, \ ResourceCollection from boto3.resources.base import ResourceMeta from boto3.resources.factory import ResourceFactory from boto3.resources.model import Collection from tests import BaseTestCase, mock class TestCollectionFactory(BaseTestCase): def setUp(self): super(TestCollectionFactory, self).setUp() self.client = mock.Mock() self.client.can_paginate.return_value = False self.parent = mock.Mock() self.parent.meta = ResourceMeta('test', client=self.client) self.resource_factory = ResourceFactory(mock.Mock()) self.service_model = ServiceModel({}) self.event_emitter = HierarchicalEmitter() self.factory = CollectionFactory() self.load = self.factory.load_from_definition def test_create_subclasses(self): resource_defs = { 'Frob': {}, 'Chain': { 'hasMany': { 'Frobs': { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob' } } } } } collection_model = Collection( 'Frobs', resource_defs['Chain']['hasMany']['Frobs'], resource_defs) service_context = ServiceContext( service_name='test', resource_json_definitions=resource_defs, service_model=self.service_model, service_waiter_model=None ) collection_cls = self.load( resource_name='Chain', collection_model=collection_model, service_context=service_context, event_emitter=self.event_emitter ) collection = collection_cls( collection_model=collection_model, parent=self.parent, factory=self.resource_factory, service_context=service_context ) self.assertEqual(collection_cls.__name__, 'test.Chain.FrobsCollectionManager') self.assertIsInstance(collection, CollectionManager) # Make sure that collection manager created from the factory # returns a ResourceCollection. self.assertIsInstance(collection.all(), ResourceCollection) # Make sure that the collection returned from the collection # manager can be chained and return a ResourceCollection as well. self.assertIsInstance(collection.all().all(), ResourceCollection) @mock.patch('boto3.resources.collection.BatchAction') def test_create_batch_actions(self, action_mock): resource_defs = { 'Frob': { 'batchActions': { 'Delete': { 'request': { 'operation': 'DeleteFrobs' } } } }, 'Chain': { 'hasMany': { 'Frobs': { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob' } } } } } collection_model = Collection( 'Frobs', resource_defs['Chain']['hasMany']['Frobs'], resource_defs) service_context = ServiceContext( service_name='test', resource_json_definitions=resource_defs, service_model=self.service_model, service_waiter_model=None ) collection_cls = self.load( resource_name='Chain', collection_model=collection_model, service_context=service_context, event_emitter=self.event_emitter ) collection = collection_cls( collection_model=collection_model, parent=self.parent, factory=self.resource_factory, service_context=service_context ) self.assertTrue(hasattr(collection, 'delete')) collection.delete() action_mock.return_value.assert_called_with(collection) class TestResourceCollection(BaseTestCase): def setUp(self): super(TestResourceCollection, self).setUp() # Minimal definition so things like repr work self.collection_def = { 'request': { 'operation': 'TestOperation' }, 'resource': { 'type': 'Frob' } } self.client = mock.Mock() self.client.can_paginate.return_value = False self.parent = mock.Mock() self.parent.meta = ResourceMeta('test', client=self.client) self.factory = ResourceFactory(mock.Mock()) self.service_model = ServiceModel({}) def get_collection(self): resource_defs = { 'Frob': { 'identifiers': [] } } # Build up a resource def identifier list based on what # the collection is expecting to be required from its # definition. This saves a bunch of repetitive typing # and lets you just define a collection in the tests # below. Any identifiers you expect to be availabe in # the resource definition will automatically be there. resource_def = self.collection_def.get('resource', {}) for identifier in resource_def.get('identifiers', []): resource_defs['Frob']['identifiers'].append( {'name': identifier['target']}) collection_model = Collection( 'test', self.collection_def, resource_defs) collection = CollectionManager( collection_model=collection_model, parent=self.parent, factory=self.factory, service_context=ServiceContext( service_name='test', service_model=self.service_model, resource_json_definitions=resource_defs, service_waiter_model=None ) ) return collection def test_repr(self): collection = self.get_collection() self.assertIn('CollectionManager', repr(collection)) def test_iteration_manager(self): # A collection manager is not iterable. You must first call # .all or .filter or another method to get an iterable. collection = self.get_collection() with self.assertRaises(TypeError): list(collection) def test_iteration_non_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.get_frobs.return_value = { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'}, {'Id': 'three'}, {'Id': 'four'} ] } collection = self.get_collection() items = list(collection.all()) self.assertEqual(len(items), 4) self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') self.assertEqual(items[2].id, 'three') self.assertEqual(items[3].id, 'four') def test_limit_param_non_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.get_frobs.return_value = { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'}, {'Id': 'three'}, {'Id': 'four'} ] } collection = self.get_collection() items = list(collection.all().limit(2)) self.assertEqual(len(items), 2) # Only the first two should be present self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') def test_limit_method_non_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.get_frobs.return_value = { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'}, {'Id': 'three'}, {'Id': 'four'} ] } collection = self.get_collection() items = list(collection.limit(2)) self.assertEqual(len(items), 2) # Only the first two should be present self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') @mock.patch('boto3.resources.collection.ResourceHandler') def test_filters_non_paginated(self, handler): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [] } } self.client.get_frobs.return_value = {} handler.return_value.return_value = [] collection = self.get_collection() list(collection.filter(Param1='foo', Param2=3).limit(2)) # Note - limit is not passed through to the low-level call self.client.get_frobs.assert_called_with(Param1='foo', Param2=3) def test_page_iterator_returns_pages_of_items(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [ { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'} ] }, { 'Frobs': [ {'Id': 'three'}, {'Id': 'four'} ] } ] collection = self.get_collection() pages = list(collection.limit(3).pages()) self.assertEqual(len(pages), 2) self.assertEqual(len(pages[0]), 2) self.assertEqual(len(pages[1]), 1) def test_page_iterator_page_size(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.can_paginate.return_value = True paginator = self.client.get_paginator.return_value paginator.paginate.return_value = [] collection = self.get_collection() list(collection.page_size(5).pages()) paginator.paginate.assert_called_with( PaginationConfig={'PageSize': 5, 'MaxItems': None}) def test_iteration_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [ { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'} ] }, { 'Frobs': [ {'Id': 'three'}, {'Id': 'four'} ] } ] collection = self.get_collection() items = list(collection.all()) self.assertEqual(len(items), 4) self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') self.assertEqual(items[2].id, 'three') self.assertEqual(items[3].id, 'four') # Low-level pagination should have been called self.client.get_paginator.assert_called_with('get_frobs') paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': None, 'MaxItems': None}) def test_limit_param_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [ { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'} ] }, { 'Frobs': [ {'Id': 'three'}, {'Id': 'four'} ] } ] collection = self.get_collection() items = list(collection.all().limit(2)) self.assertEqual(len(items), 2) # Only the first two should be present self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') def test_limit_method_paginated(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [ { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'} ] }, { 'Frobs': [ {'Id': 'three'}, {'Id': 'four'} ] } ] collection = self.get_collection() items = list(collection.all().limit(2)) self.assertEqual(len(items), 2) # Only the first two should be present self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') @mock.patch('boto3.resources.collection.ResourceHandler') def test_filters_paginated(self, handler): self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() list(collection.filter(Param1='foo', Param2=3).limit(2)) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': None, 'MaxItems': 2}, Param1='foo', Param2=3) @mock.patch('boto3.resources.collection.ResourceHandler') def test_filter_does_not_clobber_existing_list_values(self, handler): self.collection_def = { 'request': { 'operation': 'GetFrobs', "params": [ {"target": "Filters[0].Name", "source": "string", "value": "frob-id"}, {"target": "Filters[0].Values[0]", "source": "identifier", "name": "Id"} ] }, 'resource': { 'type': 'Frob', 'identifiers': [ {'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id'} ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() self.parent.id = 'my-id' list(collection.filter( Filters=[{'Name': 'another-filter', 'Values': ['foo']}])) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': None, 'MaxItems': None}, Filters=[ {'Values': ['my-id'], 'Name': 'frob-id'}, {'Values': ['foo'], 'Name': 'another-filter'} ] ) @mock.patch('boto3.resources.collection.ResourceHandler') def test_page_size_param(self, handler): self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() list(collection.all().page_size(1)) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': 1, 'MaxItems': None}) @mock.patch('boto3.resources.collection.ResourceHandler') def test_page_size_method(self, handler): self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() list(collection.page_size(1)) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': 1, 'MaxItems': None}) def test_chaining(self): self.collection_def = { 'request': { 'operation': 'GetFrobs' }, 'resource': { 'type': 'Frob', 'identifiers': [ { 'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id' } ] } } self.client.get_frobs.return_value = { 'Frobs': [ {'Id': 'one'}, {'Id': 'two'}, {'Id': 'three'}, {'Id': 'four'} ] } collection = self.get_collection() items = list(collection.filter().all().all()) self.assertEqual(len(items), 4) self.assertEqual(items[0].id, 'one') self.assertEqual(items[1].id, 'two') self.assertEqual(items[2].id, 'three') self.assertEqual(items[3].id, 'four') @mock.patch('boto3.resources.collection.ResourceHandler') def test_chaining_copies_parameters(self, handler): self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() list(collection.all().filter(CustomArg=1).limit(3).page_size(3)) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': 3, 'MaxItems': 3}, CustomArg=1) @mock.patch('boto3.resources.collection.ResourceHandler') def test_chaining_filters_does_not_clobber_list_values(self, handler): self.collection_def = { 'request': { 'operation': 'GetFrobs', "params": [ {"target": "Filters[0].Name", "source": "string", "value": "frob-id"}, {"target": "Filters[0].Values[0]", "source": "identifier", "name": "Id"} ] }, 'resource': { 'type': 'Frob', 'identifiers': [ {'target': 'Id', 'source': 'response', 'path': 'Frobs[].Id'} ] } } self.client.can_paginate.return_value = True self.client.get_paginator.return_value.paginate.return_value = [] handler.return_value.return_value = [] collection = self.get_collection() self.parent.id = 'my-id' collection = collection.filter( Filters=[{'Name': 'second-filter', 'Values': ['foo']}]) list(collection.filter( Filters=[{'Name': 'third-filter', 'Values': ['bar']}])) paginator = self.client.get_paginator.return_value paginator.paginate.assert_called_with( PaginationConfig={'PageSize': None, 'MaxItems': None}, Filters=[ {'Values': ['my-id'], 'Name': 'frob-id'}, {'Values': ['foo'], 'Name': 'second-filter'}, {'Values': ['bar'], 'Name': 'third-filter'} ] ) def test_chained_repr(self): collection = self.get_collection() self.assertIn('ResourceCollection', repr(collection.all())) boto3-1.9.253/tests/unit/resources/test_collection_smoke.py000066400000000000000000000120241355237733400240310ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import botocore.session from botocore import xform_name from nose.tools import assert_false from boto3.session import Session from boto3.resources.model import ResourceModel # A list of names that are common names of a pagination parameter. # Note that this list is not comprehensive. It may have to be updated # in the future, but this covers a lot of the pagination parameters. COMMON_PAGINATION_PARAM_NAMES = [ 'nextToken', 'NextToken', 'marker', 'Marker', 'NextMarker', 'nextPageToken', 'NextPageToken', ] def operation_looks_paginated(operation_model): """Checks whether an operation looks like it can be paginated :type operation_model: botocore.model.OperationModel :param operation_model: The model for a particular operation :returns: True if determines it can be paginated. False otherwise. """ has_input_param = _shape_has_pagination_param(operation_model.input_shape) has_output_param = _shape_has_pagination_param( operation_model.output_shape) # If there is a parameter in either the input or output that # is used in pagination, mark the operation as paginateable. return (has_input_param and has_output_param) def _shape_has_pagination_param(shape): if shape: members = shape.members # Go through the list of common names that may be a pagination # parameter name for param in COMMON_PAGINATION_PARAM_NAMES: # Go through all of the shapes members. for member in members: # See if the name is the member name. If it is, mark # it as a pagination parameter. if param == member: return True return False def test_all_collections_have_paginators_if_needed(): # If a collection relies on an operation that is paginated, it # will require a paginator to iterate through all of the resources # with the all() method. If there is no paginator, it will only # make it through the first page of results. So we need to make sure # if a collection looks like it uses a paginated operation then there # should be a paginator applied to it. botocore_session = botocore.session.get_session() session = Session(botocore_session=botocore_session) loader = botocore_session.get_component('data_loader') for service_name in session.get_available_resources(): client = session.client(service_name, region_name='us-east-1') json_resource_model = loader.load_service_model( service_name, 'resources-1') resource_defs = json_resource_model['resources'] resource_models = [] # Get the service resource model service_resource_model = ResourceModel( service_name, json_resource_model['service'], resource_defs) resource_models.append(service_resource_model) # Generate all of the resource models for a service for resource_name, resource_defintion in resource_defs.items(): resource_models.append(ResourceModel( resource_name, resource_defintion, resource_defs)) for resource_model in resource_models: # Iterate over all of the collections for each resource model # and ensure that the collection has a paginator if it needs one. for collection_model in resource_model.collections: yield ( _assert_collection_has_paginator_if_needed, client, service_name, resource_name, collection_model) def _assert_collection_has_paginator_if_needed( client, service_name, resource_name, collection_model): underlying_operation_name = collection_model.request.operation # See if the operation can be paginated from the client. can_paginate_operation = client.can_paginate( xform_name(underlying_operation_name)) # See if the operation looks paginated. looks_paginated = operation_looks_paginated( client.meta.service_model.operation_model(underlying_operation_name)) # Make sure that if the operation looks paginated then there is # a paginator for the client to use for the collection. if not can_paginate_operation: assert_false( looks_paginated, 'Collection %s on resource %s of service %s uses the operation ' '%s, but the operation has no paginator even though it looks ' 'paginated.' % ( collection_model.name, resource_name, service_name, underlying_operation_name)) boto3-1.9.253/tests/unit/resources/test_factory.py000066400000000000000000000727561355237733400221710ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.model import DenormalizedStructureBuilder, ServiceModel from tests import BaseTestCase, mock from boto3.exceptions import ResourceLoadException from boto3.utils import ServiceContext from boto3.resources.base import ServiceResource from boto3.resources.collection import CollectionManager from boto3.resources.factory import ResourceFactory from boto3.resources.action import WaiterAction class BaseTestResourceFactory(BaseTestCase): def setUp(self): super(BaseTestResourceFactory, self).setUp() self.emitter = mock.Mock() self.factory = ResourceFactory(self.emitter) def load(self, resource_name, resource_json_definition=None, resource_json_definitions=None, service_model=None): if resource_json_definition is None: resource_json_definition = {} if resource_json_definitions is None: resource_json_definitions = {} service_context=ServiceContext( service_name='test', resource_json_definitions=resource_json_definitions, service_model=service_model, service_waiter_model=None ) return self.factory.load_from_definition( resource_name=resource_name, single_resource_json_definition=resource_json_definition, service_context=service_context ) class TestResourceFactory(BaseTestResourceFactory): def test_get_service_returns_resource_class(self): TestResource = self.load('test') self.assertIn(ServiceResource, TestResource.__bases__, 'Did not return a ServiceResource subclass for service') def test_get_resource_returns_resource_class(self): QueueResource = self.load('Queue') self.assertIn(ServiceResource, QueueResource.__bases__, 'Did not return a ServiceResource subclass for resource') def test_factory_sets_service_name(self): QueueResource = self.load('Queue') self.assertEqual(QueueResource.meta.service_name, 'test', 'Service name not set') def test_factory_sets_identifiers(self): model = { 'identifiers': [ {'name': 'QueueUrl'}, {'name': 'ReceiptHandle'}, ], } MessageResource = self.load('Message', model) self.assertIn('queue_url', MessageResource.meta.identifiers, 'Missing queue_url identifier from model') self.assertIn('receipt_handle', MessageResource.meta.identifiers, 'Missing receipt_handle identifier from model') def test_identifiers_in_repr(self): model = { 'identifiers': [ {'name': 'QueueUrl'}, {'name': 'ReceiptHandle'}, ], } defs = { 'Message': model } resource = self.load('Message', model, defs)('url', 'handle') # Class name self.assertIn('test.Message', repr(resource)) # Identifier names and values self.assertIn('queue_url', repr(resource)) self.assertIn("'url'", repr(resource)) self.assertIn('receipt_handle', repr(resource)) self.assertIn("'handle'", repr(resource)) def test_factory_creates_dangling_resources(self): model = { 'has': { 'Queue': { 'resource': { 'type': 'Queue', 'identifiers': [ {'target': 'Url', 'source': 'input'} ] } }, 'Message': { 'resource': { 'type': 'Message', 'identifiers': [ {'target': 'QueueUrl', 'source': 'input'}, {'target': 'Handle', 'source': 'input'} ] } } } } defs = { 'Queue': {}, 'Message': {} } TestResource = self.load('test', model, defs) self.assertTrue(hasattr(TestResource, 'Queue'), 'Missing Queue class from model') self.assertTrue(hasattr(TestResource, 'Message'), 'Missing Message class from model') def test_factory_creates_properties(self): model = { 'shape': 'TestShape', 'load': { 'request': { 'operation': 'DescribeTest', } } } shape = DenormalizedStructureBuilder().with_members({ 'ETag': { 'type': 'string', }, 'LastModified': { 'type': 'string' } }).build_model() service_model = mock.Mock() service_model.shape_for.return_value = shape TestResource = self.load('test', model, service_model=service_model) self.assertTrue(hasattr(TestResource, 'e_tag'), 'ETag shape member not available on resource') self.assertTrue(hasattr(TestResource, 'last_modified'), 'LastModified shape member not available on resource') def test_factory_renames_on_clobber_identifier(self): model = { 'identifiers': [ {'name': 'Meta'} ] } # Each resource has a ``meta`` defined, so this identifier # must be renamed. cls = self.load('test', model) self.assertTrue(hasattr(cls, 'meta_identifier')) def test_factory_fails_on_clobber_action(self): model = { 'identifiers': [ {'name': 'Test'}, {'name': 'TestAction'} ], 'actions': { 'Test': { 'request': { 'operation': 'GetTest' } } } } # This fails because the resource has an identifier # that would be clobbered by the action name. with self.assertRaises(ValueError) as cm: self.load('test', model) self.assertIn('test', str(cm.exception)) self.assertIn('action', str(cm.exception)) def test_can_instantiate_service_resource(self): TestResource = self.load('test') resource = TestResource() self.assertIsInstance(resource, ServiceResource, 'Object is not an instance of ServiceResource') def test_non_service_resource_missing_defs(self): # Only services should get dangling defs defs = { 'Queue': { 'identifiers': [ {'name': 'Url'} ] }, 'Message': { 'identifiers': [ {'name': 'QueueUrl'}, {'name': 'ReceiptHandle'} ] } } model = defs['Queue'] queue = self.load('Queue', model, defs)('url') self.assertTrue(not hasattr(queue, 'Queue')) self.assertTrue(not hasattr(queue, 'Message')) def test_subresource_requires_only_identifier(self): defs = { 'Queue': { 'identifiers': [ {'name': 'Url'} ], 'has': { 'Message': { 'resource': { 'type': 'Message', 'identifiers': [ {'target': 'QueueUrl', 'source': 'identifier', 'name': 'Url'}, {'target': 'ReceiptHandle', 'source': 'input'} ] } } } }, 'Message': { 'identifiers': [ {'name': 'QueueUrl'}, {'name': 'ReceiptHandle'} ] } } model = defs['Queue'] queue = self.load('Queue', model, defs)('url') # Let's create a message and only give it a receipt handle # The required queue_url identifier should be set from the # queue itself. message = queue.Message('receipt') self.assertEqual(message.queue_url, 'url', 'Wrong queue URL set on the message resource instance') self.assertEqual(message.receipt_handle, 'receipt', 'Wrong receipt handle set on the message resource instance') def test_resource_meta_unique(self): queue_cls = self.load('Queue') queue1 = queue_cls() queue2 = queue_cls() self.assertEqual(queue1.meta, queue2.meta, 'Queue meta copies not equal after creation') queue1.meta.data = {'id': 'foo'} queue2.meta.data = {'id': 'bar'} self.assertNotEqual(queue_cls.meta, queue1.meta, 'Modified queue instance data should not modify the class data') self.assertNotEqual(queue1.meta, queue2.meta, 'Queue data should be unique to queue instance') self.assertNotEqual(queue1.meta, 'bad-value') def test_resource_meta_repr(self): queue_cls = self.load('Queue') queue = queue_cls() self.assertEqual(repr(queue.meta), 'ResourceMeta(\'test\', identifiers=[])') @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_calls_action(self, action_cls): model = { 'actions': { 'GetMessageStatus': { 'request': { 'operation': 'DescribeMessageStatus' } } } } action = action_cls.return_value queue = self.load('Queue', model)() queue.get_message_status('arg1', arg2=2) action.assert_called_with(queue, 'arg1', arg2=2) @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_action_clears_data(self, action_cls): model = { 'load': { 'request': { 'operation': 'DescribeQueue' } }, 'actions': { 'GetMessageStatus': { 'request': { 'operation': 'DescribeMessageStatus' } } } } queue = self.load('Queue', model)() # Simulate loaded data queue.meta.data = {'some': 'data'} # Perform a call queue.get_message_status() # Cached data should be cleared self.assertIsNone(queue.meta.data) @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_action_leaves_data(self, action_cls): # This model has NO load method. Cached data should # never be cleared since it cannot be reloaded! model = { 'actions': { 'GetMessageStatus': { 'request': { 'operation': 'DescribeMessageStatus' } } } } queue = self.load('Queue', model)() # Simulate loaded data queue.meta.data = {'some': 'data'} # Perform a call queue.get_message_status() # Cached data should not be cleared self.assertEqual(queue.meta.data, {'some': 'data'}) @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_lazy_loads_properties(self, action_cls): model = { 'shape': 'TestShape', 'identifiers': [ {'name': 'Url'} ], 'load': { 'request': { 'operation': 'DescribeTest', } } } shape = DenormalizedStructureBuilder().with_members({ 'ETag': { 'type': 'string', 'shape_name': 'ETag' }, 'LastModified': { 'type': 'string', 'shape_name': 'LastModified' }, 'Url': { 'type': 'string', 'shape_name': 'Url' } }).build_model() service_model = mock.Mock() service_model.shape_for.return_value = shape action = action_cls.return_value action.return_value = {'ETag': 'tag', 'LastModified': 'never'} resource = self.load( 'test', model, service_model=service_model)('url') # Accessing an identifier should not call load, even if it's in # the shape members. resource.url action.assert_not_called() # Accessing a property should call load self.assertEqual(resource.e_tag, 'tag', 'ETag property returned wrong value') self.assertEqual(action.call_count, 1) # Both params should have been loaded into the data bag self.assertIn('ETag', resource.meta.data) self.assertIn('LastModified', resource.meta.data) # Accessing another property should use cached value # instead of making a second call. self.assertEqual(resource.last_modified, 'never', 'LastModified property returned wrong value') self.assertEqual(action.call_count, 1) @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_lazy_properties_missing_load(self, action_cls): model = { 'shape': 'TestShape', 'identifiers': [ {'name': 'Url'} ] # Note the lack of a `load` method. These resources # are usually loaded via a call on a parent resource. } shape = DenormalizedStructureBuilder().with_members({ 'ETag': { 'type': 'string', }, 'LastModified': { 'type': 'string' }, 'Url': { 'type': 'string' } }).build_model() service_model = mock.Mock() service_model.shape_for.return_value = shape action = action_cls.return_value action.return_value = {'ETag': 'tag', 'LastModified': 'never'} resource = self.load( 'test', model, service_model=service_model)('url') with self.assertRaises(ResourceLoadException): resource.last_modified @mock.patch('boto3.resources.factory.ServiceAction') def test_resource_aliases_identifiers(self, action_cls): model = { 'shape': 'TestShape', 'identifiers': [ {'name': 'id', 'memberName': 'foo_id'} ] } shape = DenormalizedStructureBuilder().with_members({ 'foo_id': { 'type': 'string', }, 'bar': { 'type': 'string' }, }).build_model() service_model = mock.Mock() service_model.shape_for.return_value = shape shape_id = 'baz' resource = self.load( 'test', model, service_model=service_model)(shape_id) try: self.assertEqual(resource.id, shape_id) self.assertEqual(resource.foo_id, shape_id) except ResourceLoadException: self.fail("Load attempted on identifier alias.") def test_resource_loads_references(self): model = { 'shape': 'InstanceShape', 'identifiers': [{'name': 'GroupId'}], 'has': { 'Subnet': { 'resource': { 'type': 'Subnet', 'identifiers': [ {'target': 'Id', 'source': 'data', 'path': 'SubnetId'} ] } }, 'Vpcs': { 'resource': { 'type': 'Vpc', 'identifiers': [ {'target': 'Id', 'source': 'data', 'path': 'Vpcs[].Id'} ] } } } } defs = { 'Subnet': { 'identifiers': [{'name': 'Id'}] }, 'Vpc': { 'identifiers': [{'name': 'Id'}] } } service_model = ServiceModel({ 'shapes': { 'InstanceShape': { 'type': 'structure', 'members': { 'SubnetId': { 'shape': 'String' } } }, 'String': { 'type': 'string' } } }) resource = self.load('Instance', model, defs, service_model)('group-id') # Load the resource with no data resource.meta.data = {} self.assertTrue( hasattr(resource, 'subnet'), 'Resource should have a subnet reference') self.assertIsNone( resource.subnet, 'Missing identifier, should return None') self.assertIsNone(resource.vpcs) # Load the resource with data to instantiate a reference resource.meta.data = { 'SubnetId': 'abc123', 'Vpcs': [ {'Id': 'vpc1'}, {'Id': 'vpc2'} ] } self.assertIsInstance(resource.subnet, ServiceResource) self.assertEqual(resource.subnet.id, 'abc123') vpcs = resource.vpcs self.assertIsInstance(vpcs, list) self.assertEqual(len(vpcs), 2) self.assertEqual(vpcs[0].id, 'vpc1') self.assertEqual(vpcs[1].id, 'vpc2') @mock.patch('boto3.resources.model.Collection') def test_resource_loads_collections(self, mock_model): model = { 'hasMany': { u'Queues': { 'request': { 'operation': 'ListQueues' }, 'resource': { 'type': 'Queue' } } } } defs = { 'Queue': {} } service_model = ServiceModel({}) mock_model.return_value.name = 'queues' resource = self.load('test', model, defs, service_model)() self.assertTrue(hasattr(resource, 'queues'), 'Resource should expose queues collection') self.assertIsInstance(resource.queues, CollectionManager, 'Queues collection should be a collection manager') def test_resource_loads_waiters(self): model = { "waiters": { "Exists": { "waiterName": "BucketExists", "params": [ {"target": "Bucket", "source": "identifier", "name": "Name"}] } } } defs = { 'Bucket': {} } service_model = ServiceModel({}) resource = self.load('test', model, defs, service_model)() self.assertTrue(hasattr(resource, 'wait_until_exists'), 'Resource should expose resource waiter: wait_until_exists') @mock.patch('boto3.resources.factory.WaiterAction') def test_resource_waiter_calls_waiter_method(self, waiter_action_cls): model = { "waiters": { "Exists": { "waiterName": "BucketExists", "params": [ {"target": "Bucket", "source": "identifier", "name": "Name"}] } } } defs = { 'Bucket': {} } service_model = ServiceModel({}) waiter_action = waiter_action_cls.return_value resource = self.load('test', model, defs, service_model)() resource.wait_until_exists('arg1', arg2=2) waiter_action.assert_called_with(resource, 'arg1', arg2=2) class TestResourceFactoryDanglingResource(BaseTestResourceFactory): def setUp(self): super(TestResourceFactoryDanglingResource, self).setUp() self.model = { 'has': { 'Queue': { 'resource': { 'type': 'Queue', 'identifiers': [ {'target': 'Url', 'source': 'input'} ] } } } } self.defs = { 'Queue': { 'identifiers': [ {'name': 'Url'} ] } } def test_dangling_resources_create_resource_instance(self): resource = self.load('test', self.model, self.defs)() q = resource.Queue('test') self.assertIsInstance(q, ServiceResource, 'Dangling resource instance not a ServiceResource') def test_hash_resource_equal(self): resource = self.load('test', self.model, self.defs)() p = resource.Queue('test') q = resource.Queue('test') self.assertEqual(p, q, "Should be equal resource") self.assertEqual(hash(p), hash(q), "Hash values should be equal") def test_hash_resource_not_equal(self): resource = self.load('test', self.model, self.defs)() p = resource.Queue('test1') q = resource.Queue('test2') self.assertNotEquals(p, q, "Should not be equal resource") self.assertNotEquals(hash(p), hash(q), "Hash values should be different") def test_dangling_resource_create_with_kwarg(self): resource = self.load('test', self.model, self.defs)() q = resource.Queue(url='test') self.assertIsInstance(q, ServiceResource, 'Dangling resource created with kwargs is not a ServiceResource') def test_dangling_resource_shares_client(self): resource = self.load('test', self.model, self.defs)() q = resource.Queue('test') self.assertEqual(resource.meta.client, q.meta.client, 'Client was not shared to dangling resource instance') def test_dangling_resource_requires_identifier(self): resource = self.load('test', self.model, self.defs)() with self.assertRaises(ValueError): resource.Queue() def test_dangling_resource_raises_for_unknown_arg(self): resource = self.load('test', self.model, self.defs)() with self.assertRaises(ValueError): resource.Queue(url='foo', bar='baz') def test_dangling_resource_identifier_is_immutable(self): resource = self.load('test', self.model, self.defs)() queue = resource.Queue('url') # We should not be able to change the identifier's value with self.assertRaises(AttributeError): queue.url = 'foo' def test_dangling_resource_equality(self): resource = self.load('test', self.model, self.defs)() q1 = resource.Queue('url') q2 = resource.Queue('url') self.assertEqual(q1, q2) def test_dangling_resource_inequality(self): self.defs = { 'Queue': { 'identifiers': [{'name': 'Url'}], 'has': { 'Message': { 'resource': { 'type': 'Message', 'identifiers': [ {'target': 'QueueUrl', 'source': 'identifier', 'name': 'Url'}, {'target': 'Handle', 'source': 'input'} ] } } } }, 'Message': { 'identifiers': [{'name': 'QueueUrl'}, {'name': 'Handle'}] } } resource = self.load('test', self.model, self.defs)() q1 = resource.Queue('url') q2 = resource.Queue('different') m = q1.Message('handle') self.assertNotEqual(q1, q2) self.assertNotEqual(q1, m) def test_dangling_resource_loads_data(self): # Given a loadable resource instance that contains a reference # to another resource which has a resource data path, the # referenced resource should be loaded with all of the data # contained at that path. This allows loading references # which would otherwise not be loadable (missing load method) # and prevents extra load calls for others when we already # have the data available. self.defs = { 'Instance': { 'identifiers': [{'name': 'Id'}], 'has': { 'NetworkInterface': { 'resource': { 'type': 'NetworkInterface', 'identifiers': [ {'target': 'Id', 'source': 'data', 'path': 'NetworkInterface.Id'} ], 'path': 'NetworkInterface' } } } }, 'NetworkInterface': { 'identifiers': [{'name': 'Id'}], 'shape': 'NetworkInterfaceShape' } } self.model = self.defs['Instance'] shape = DenormalizedStructureBuilder().with_members({ 'Id': { 'type': 'string', }, 'PublicIp': { 'type': 'string' } }).build_model() service_model = mock.Mock() service_model.shape_for.return_value = shape cls = self.load('Instance', self.model, self.defs, service_model) instance = cls('instance-id') # Set some data as if we had completed a load action. def set_meta_data(): instance.meta.data = { 'NetworkInterface': { 'Id': 'network-interface-id', 'PublicIp': '127.0.0.1' } } instance.load = mock.Mock(side_effect=set_meta_data) # Now, get the reference and make sure it has its data # set as expected. interface = instance.network_interface self.assertIsNotNone(interface.meta.data) self.assertEqual(interface.public_ip, '127.0.0.1') class TestServiceResourceSubresources(BaseTestResourceFactory): def setUp(self): super(TestServiceResourceSubresources, self).setUp() self.model = { 'has': { 'QueueObject': { 'resource': { 'type': 'Queue', 'identifiers': [ {'target': 'Url', 'source': 'input'} ] } }, 'PriorityQueue': { 'resource': { 'type': 'Queue', 'identifiers': [ {'target': 'Url', 'source': 'input'} ] } } } } self.defs = { 'Queue': { 'identifiers': [ {'name': 'Url'} ] }, 'Message': { 'identifiers': [ {'name': 'QueueUrl'}, {'name': 'ReceiptHandle'} ] } } def test_subresource_custom_name(self): resource = self.load('test', self.model, self.defs)() self.assertTrue(hasattr(resource, 'QueueObject')) def test_contains_all_subresources(self): resource = self.load('test', self.model, self.defs)() self.assertIn('QueueObject', dir(resource)) self.assertIn('PriorityQueue', dir(resource)) self.assertIn('Message', dir(resource)) def test_get_available_subresources(self): resource = self.load('test', self.model, self.defs)() self.assertTrue(hasattr(resource, 'get_available_subresources')) subresources = sorted(resource.get_available_subresources()) expected = sorted(['PriorityQueue', 'Message', 'QueueObject']) self.assertEqual(subresources, expected) def test_subresource_missing_all_subresources(self): resource = self.load('test', self.model, self.defs)() message = resource.Message('url', 'handle') self.assertNotIn('QueueObject', dir(message)) self.assertNotIn('PriorityQueue', dir(message)) self.assertNotIn('Queue', dir(message)) self.assertNotIn('Message', dir(message)) def test_event_emitted_when_class_created(self): self.load('test', self.model, self.defs) self.assertTrue(self.emitter.emit.called) call_args = self.emitter.emit.call_args # Verify the correct event name emitted. self.assertEqual(call_args[0][0], 'creating-resource-class.test.ServiceResource') # Verify we send out the class attributes dict. actual_class_attrs = sorted(call_args[1]['class_attributes']) self.assertEqual(actual_class_attrs, [ 'Message', 'PriorityQueue', 'QueueObject', 'get_available_subresources', 'meta']) base_classes = sorted(call_args[1]['base_classes']) self.assertEqual(base_classes, [ServiceResource]) boto3-1.9.253/tests/unit/resources/test_model.py000066400000000000000000000331311355237733400216020ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore.model import DenormalizedStructureBuilder from boto3.resources.model import ResourceModel, Action, Collection, Waiter from tests import BaseTestCase class TestModels(BaseTestCase): def test_resource_name(self): model = ResourceModel('test', {}, {}) self.assertEqual(model.name, 'test') def test_resource_shape(self): model = ResourceModel('test', { 'shape': 'Frob' }, {}) self.assertEqual(model.shape, 'Frob') def test_resource_identifiers(self): model = ResourceModel('test', { 'identifiers': [ {'name': 'one'}, {'name': 'two', 'memberName': 'three'} ] }, {}) self.assertEqual(model.identifiers[0].name, 'one') self.assertEqual(model.identifiers[1].name, 'two') self.assertEqual(model.identifiers[1].member_name, 'three') def test_resource_action_raw(self): model = ResourceModel('test', { 'actions': { 'GetFrobs': { 'request': { 'operation': 'GetFrobsOperation', 'params': [ {'target': 'FrobId', 'source': 'identifier', 'name': 'Id'} ] }, 'path': 'Container.Frobs[]' } } }, {}) self.assertIsInstance(model.actions, list) self.assertEqual(len(model.actions), 1) action = model.actions[0] self.assertIsInstance(action, Action) self.assertEqual(action.request.operation, 'GetFrobsOperation') self.assertIsInstance(action.request.params, list) self.assertEqual(len(action.request.params), 1) self.assertEqual(action.request.params[0].target, 'FrobId') self.assertEqual(action.request.params[0].source, 'identifier') self.assertEqual(action.request.params[0].name, 'Id') self.assertEqual(action.path, 'Container.Frobs[]') def test_resource_action_response_resource(self): model = ResourceModel('test', { 'actions': { 'GetFrobs': { 'resource': { 'type': 'Frob', 'path': 'Container.Frobs[]' } } } }, { 'Frob': {} }) action = model.actions[0] self.assertEqual(action.resource.type, 'Frob') self.assertEqual(action.resource.path, 'Container.Frobs[]') self.assertIsInstance(action.resource.model, ResourceModel) self.assertEqual(action.resource.model.name, 'Frob') def test_resource_load_action(self): model = ResourceModel('test', { 'load': { 'request': { 'operation': 'GetFrobInfo' }, 'path': '$' } }, {}) self.assertIsInstance(model.load, Action) self.assertEqual(model.load.request.operation, 'GetFrobInfo') self.assertEqual(model.load.path, '$') def test_resource_batch_action(self): model = ResourceModel('test', { 'batchActions': { 'Delete': { 'request': { 'operation': 'DeleteObjects', 'params': [ {'target': 'Bucket', 'sourceType': 'identifier', 'source': 'BucketName'} ] } } } }, {}) self.assertIsInstance(model.batch_actions, list) action = model.batch_actions[0] self.assertIsInstance(action, Action) self.assertEqual(action.request.operation, 'DeleteObjects') self.assertEqual(action.request.params[0].target, 'Bucket') def test_sub_resources(self): model = ResourceModel('test', { 'has': { 'RedFrob': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target': 'Id', 'source': 'input'} ] } }, 'GreenFrob': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target': 'Id', 'source': 'input'} ] } } } }, { 'Frob': {} }) self.assertIsInstance(model.subresources, list) self.assertEqual(len(model.subresources), 2) action = model.subresources[0] resource = action.resource self.assertIn(action.name, ['RedFrob', 'GreenFrob']) self.assertEqual(resource.identifiers[0].target, 'Id') self.assertEqual(resource.identifiers[0].source, 'input') self.assertEqual(resource.type, 'Frob') def test_resource_references(self): model_def = { 'has': { 'Frob': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target':'Id', 'source':'data', 'path':'FrobId'} ] } } } } resource_defs = { 'Frob': {} } model = ResourceModel('test', model_def, resource_defs) self.assertIsInstance(model.references, list) self.assertEqual(len(model.references), 1) ref = model.references[0] self.assertEqual(ref.name, 'frob') self.assertEqual(ref.resource.type, 'Frob') self.assertEqual(ref.resource.identifiers[0].target, 'Id') self.assertEqual(ref.resource.identifiers[0].source, 'data') self.assertEqual(ref.resource.identifiers[0].path, 'FrobId') def test_resource_collections(self): model = ResourceModel('test', { 'hasMany': { 'Frobs': { 'request': { 'operation': 'GetFrobList' }, 'resource': { 'type': 'Frob', 'path': 'FrobList[]' } } } }, { 'Frob': {} }) self.assertIsInstance(model.collections, list) self.assertEqual(len(model.collections), 1) self.assertIsInstance(model.collections[0], Collection) self.assertEqual(model.collections[0].request.operation, 'GetFrobList') self.assertEqual(model.collections[0].resource.type, 'Frob') self.assertEqual(model.collections[0].resource.model.name, 'Frob') self.assertEqual(model.collections[0].resource.path, 'FrobList[]') def test_waiter(self): model = ResourceModel('test', { 'waiters': { 'Exists': { 'waiterName': 'ObjectExists', 'params': [ {'target': 'Bucket', 'sourceType': 'identifier', 'source': 'BucketName'} ] } } }, {}) self.assertIsInstance(model.waiters, list) waiter = model.waiters[0] self.assertIsInstance(waiter, Waiter) self.assertEqual(waiter.name, 'wait_until_exists') self.assertEqual(waiter.waiter_name, 'ObjectExists') self.assertEqual(waiter.params[0].target, 'Bucket') class TestRenaming(BaseTestCase): def test_multiple(self): # This tests a bunch of different renames working together model = ResourceModel('test', { 'identifiers': [{'name': 'Foo'}], 'actions': { 'Foo': {} }, 'has': { 'Foo': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target':'Id', 'source':'data', 'path': 'FrobId'} ] } } }, 'hasMany': { 'Foo': {} }, 'waiters': { 'Foo': {} } }, { 'Frob': {} }) shape = DenormalizedStructureBuilder().with_members({ 'Foo': { 'type': 'string', }, 'Bar': { 'type': 'string' } }).build_model() model.load_rename_map(shape) self.assertEqual(model.identifiers[0].name, 'foo') self.assertEqual(model.actions[0].name, 'foo_action') self.assertEqual(model.references[0].name, 'foo_reference') self.assertEqual(model.collections[0].name, 'foo_collection') self.assertEqual(model.waiters[0].name, 'wait_until_foo') # If an identifier and an attribute share the same name, then # the attribute is essentially hidden. self.assertNotIn('foo_attribute', model.get_attributes(shape)) # Other attributes need to be there, though self.assertIn('bar', model.get_attributes(shape)) # The rest of the tests below ensure the correct order of precedence # for the various categories of attributes/properties/methods on the # resource model. def test_meta_beats_identifier(self): model = ResourceModel('test', { 'identifiers': [{'name': 'Meta'}] }, {}) model.load_rename_map() self.assertEqual(model.identifiers[0].name, 'meta_identifier') def test_load_beats_identifier(self): model = ResourceModel('test', { 'identifiers': [{'name': 'Load'}], 'load': { 'request': { 'operation': 'GetFrobs' } } }, {}) model.load_rename_map() self.assertTrue(model.load) self.assertEqual(model.identifiers[0].name, 'load_identifier') def test_identifier_beats_action(self): model = ResourceModel('test', { 'identifiers': [{'name': 'foo'}], 'actions': { 'Foo': { 'request': { 'operation': 'GetFoo' } } } }, {}) model.load_rename_map() self.assertEqual(model.identifiers[0].name, 'foo') self.assertEqual(model.actions[0].name, 'foo_action') def test_action_beats_reference(self): model = ResourceModel('test', { 'actions': { 'Foo': { 'request': { 'operation': 'GetFoo' } } }, 'has': { 'Foo': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target':'Id', 'source':'data', 'path': 'FrobId'} ] } } } }, {'Frob': {}}) model.load_rename_map() self.assertEqual(model.actions[0].name, 'foo') self.assertEqual(model.references[0].name, 'foo_reference') def test_reference_beats_collection(self): model = ResourceModel('test', { 'has': { 'Foo': { 'resource': { 'type': 'Frob', 'identifiers': [ {'target':'Id', 'source':'data', 'path': 'FrobId'} ] } } }, 'hasMany': { 'Foo': { 'resource': { 'type': 'Frob' } } } }, {'Frob': {}}) model.load_rename_map() self.assertEqual(model.references[0].name, 'foo') self.assertEqual(model.collections[0].name, 'foo_collection') def test_collection_beats_waiter(self): model = ResourceModel('test', { 'hasMany': { 'WaitUntilFoo': { 'resource': { 'type': 'Frob' } } }, 'waiters': { 'Foo': {} } }, {'Frob': {}}) model.load_rename_map() self.assertEqual(model.collections[0].name, 'wait_until_foo') self.assertEqual(model.waiters[0].name, 'wait_until_foo_waiter') def test_waiter_beats_attribute(self): model = ResourceModel('test', { 'waiters': { 'Foo': {} } }, {'Frob': {}}) shape = DenormalizedStructureBuilder().with_members({ 'WaitUntilFoo': { 'type': 'string', } }).build_model() model.load_rename_map(shape) self.assertEqual(model.waiters[0].name, 'wait_until_foo') self.assertIn('wait_until_foo_attribute', model.get_attributes(shape)) boto3-1.9.253/tests/unit/resources/test_params.py000066400000000000000000000220321355237733400217630ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from boto3.exceptions import ResourceLoadException from boto3.resources.base import ResourceMeta, ServiceResource from boto3.resources.model import Request from boto3.resources.params import create_request_parameters, \ build_param_structure from tests import BaseTestCase, mock class TestServiceActionParams(BaseTestCase): def test_service_action_params_identifier(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'WarehouseUrl', 'source': 'identifier', 'name': 'Url' } ] }) parent = mock.Mock() parent.url = 'w-url' params = create_request_parameters(parent, request_model) self.assertEqual(params['WarehouseUrl'], 'w-url', 'Parameter not set from resource identifier') def test_service_action_params_data_member(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'WarehouseUrl', 'source': 'data', 'path': 'SomeMember' } ] }) parent = mock.Mock() parent.meta = ResourceMeta('test', data={ 'SomeMember': 'w-url' }) params = create_request_parameters(parent, request_model) self.assertEqual(params['WarehouseUrl'], 'w-url', 'Parameter not set from resource property') def test_service_action_params_data_member_missing(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'WarehouseUrl', 'source': 'data', 'path': 'SomeMember' } ] }) parent = mock.Mock() def load_data(): parent.meta.data = { 'SomeMember': 'w-url' } parent.load.side_effect = load_data parent.meta = ResourceMeta('test') params = create_request_parameters(parent, request_model) parent.load.assert_called_with() self.assertEqual(params['WarehouseUrl'], 'w-url', 'Parameter not set from resource property') def test_service_action_params_data_member_missing_no_load(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'WarehouseUrl', 'source': 'data', 'path': 'SomeMember' } ] }) # This mock has no ``load`` method. parent = mock.Mock(spec=ServiceResource) parent.meta = ResourceMeta('test', data=None) with self.assertRaises(ResourceLoadException): params = create_request_parameters(parent, request_model) def test_service_action_params_constants(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'Param1', 'source': 'string', 'value': 'param1' }, { 'target': 'Param2', 'source': 'integer', 'value': 123 }, { 'target': 'Param3', 'source': 'boolean', 'value': True } ] }) params = create_request_parameters(None, request_model) self.assertEqual(params['Param1'], 'param1', 'Parameter not set from string constant') self.assertEqual(params['Param2'], 123, 'Parameter not set from integer constant') self.assertEqual(params['Param3'], True, 'Parameter not set from boolean constant') def test_service_action_params_input(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ {'target': 'Param1', 'source': 'input'} ] }) params = create_request_parameters(None, request_model) self.assertEqual(params, {}) params['param1'] = 'myinput' params = create_request_parameters(None, request_model, params=params) self.assertEqual(params, {'param1': 'myinput'}) def test_service_action_params_invalid(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'Param1', 'source': 'invalid' } ] }) with self.assertRaises(NotImplementedError): create_request_parameters(None, request_model) def test_service_action_params_list(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'WarehouseUrls[0]', 'source': 'string', 'value': 'w-url' } ] }) params = create_request_parameters(None, request_model) self.assertIsInstance(params['WarehouseUrls'], list, 'Parameter did not create a list') self.assertEqual(len(params['WarehouseUrls']), 1, 'Parameter list should only have a single item') self.assertIn('w-url', params['WarehouseUrls'], 'Parameter not in expected list') def test_service_action_params_reuse(self): request_model = Request({ 'operation': 'GetFrobs', 'params': [ { 'target': 'Delete.Objects[].Key', 'source': 'data', 'path': 'Key' } ] }) item1 = mock.Mock() item1.meta = ResourceMeta('test', data={ 'Key': 'item1' }) item2 = mock.Mock() item2.meta = ResourceMeta('test', data={ 'Key': 'item2' }) # Here we create params and then re-use it to build up a more # complex structure over multiple calls. params = create_request_parameters(item1, request_model) create_request_parameters(item2, request_model, params=params) self.assertEqual(params, { 'Delete': { 'Objects': [ {'Key': 'item1'}, {'Key': 'item2'} ] } }) class TestStructBuilder(BaseTestCase): def test_simple_value(self): params = {} build_param_structure(params, 'foo', 'bar') self.assertEqual(params['foo'], 'bar') def test_nested_dict(self): params = {} build_param_structure(params, 'foo.bar.baz', 123) self.assertEqual(params['foo']['bar']['baz'], 123) def test_nested_list(self): params = {} build_param_structure(params, 'foo.bar[0]', 'test') self.assertEqual(params['foo']['bar'][0], 'test') def test_strange_offset(self): params = {} build_param_structure(params, 'foo[2]', 'test') self.assertEqual(params['foo'], [{}, {}, 'test']) def test_nested_list_dict(self): params = {} build_param_structure(params, 'foo.bar[0].baz', 123) self.assertEqual(params['foo']['bar'][0]['baz'], 123) def test_modify_existing(self): params = { 'foo': [ {'key': 'abc'} ] } build_param_structure(params, 'foo[0].secret', 123) self.assertEqual(params['foo'][0]['key'], 'abc') self.assertEqual(params['foo'][0]['secret'], 123) def test_append_no_index(self): params = {} build_param_structure(params, 'foo[]', 123) self.assertEqual(params['foo'], [123]) build_param_structure(params, 'foo[]', 456) self.assertEqual(params['foo'], [123, 456]) def test_provided_index_with_wildcard(self): params = {} index = 0 build_param_structure(params, 'foo[*].bar', 123, index) build_param_structure(params, 'foo[*].baz', 456, index) self.assertEqual(params['foo'][index], {'bar': 123, 'baz': 456}) index = 1 build_param_structure(params, 'foo[*].bar', 789, index) build_param_structure(params, 'foo[*].baz', 123, index) self.assertEqual(params['foo'], [ {'bar': 123, 'baz': 456}, {'bar': 789, 'baz': 123} ]) boto3-1.9.253/tests/unit/resources/test_response.py000066400000000000000000000330521355237733400223420ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import BaseTestCase, mock from boto3.utils import ServiceContext from boto3.resources.base import ResourceMeta, ServiceResource from boto3.resources.model import ResponseResource, Parameter from boto3.resources.factory import ResourceFactory from boto3.resources.response import build_identifiers, build_empty_response,\ RawHandler, ResourceHandler class TestBuildIdentifiers(BaseTestCase): def test_build_identifier_from_res_path_scalar(self): identifiers = [Parameter(target='Id', source='response', path='Container.Frob.Id')] parent = mock.Mock() params = {} response = { 'Container': { 'Frob': { 'Id': 'response-path' } } } values = build_identifiers(identifiers, parent, params, response) self.assertEqual(values[0][1], 'response-path', 'Identifier loaded from responsePath scalar not set') def test_build_identifier_from_res_path_list(self): identifiers = [Parameter(target='Id', source='response', path='Container.Frobs[].Id')] parent = mock.Mock() params = {} response = { 'Container': { 'Frobs': [ { 'Id': 'response-path' } ] } } values = build_identifiers(identifiers, parent, params, response) self.assertEqual(values[0][1], ['response-path'], 'Identifier loaded from responsePath list not set') def test_build_identifier_from_parent_identifier(self): identifiers = [Parameter(target='Id', source='identifier', name='Id')] parent = mock.Mock() parent.id = 'identifier' params = {} response = { 'Container': { 'Frobs': [] } } values = build_identifiers(identifiers, parent, params, response) self.assertEqual(values[0][1], 'identifier', 'Identifier loaded from parent identifier not set') def test_build_identifier_from_parent_data_member(self): identifiers = [Parameter(target='Id', source='data', path='Member')] parent = mock.Mock() parent.meta = ResourceMeta('test', data={ 'Member': 'data-member' }) params = {} response = { 'Container': { 'Frobs': [] } } values = build_identifiers(identifiers, parent, params, response) self.assertEqual(values[0][1], 'data-member', 'Identifier loaded from parent data member not set') def test_build_identifier_from_req_param(self): identifiers = [Parameter(target='Id', source='requestParameter', path='Param')] parent = mock.Mock() params = { 'Param': 'request-param' } response = { 'Container': { 'Frobs': [] } } values = build_identifiers(identifiers, parent, params, response) self.assertEqual(values[0][1], 'request-param', 'Identifier loaded from request parameter not set') def test_build_identifier_from_invalid_source_type(self): identifiers = [Parameter(target='Id', source='invalid')] parent = mock.Mock() params = {} response = { 'Container': { 'Frobs': [] } } with self.assertRaises(NotImplementedError): build_identifiers(identifiers, parent, params, response) class TestBuildEmptyResponse(BaseTestCase): def setUp(self): super(TestBuildEmptyResponse, self).setUp() self.search_path = '' self.operation_name = 'GetFrobs' self.output_shape = mock.Mock() operation_model = mock.Mock() operation_model.output_shape = self.output_shape self.service_model = mock.Mock() self.service_model.operation_model.return_value = operation_model def get_response(self): return build_empty_response(self.search_path, self.operation_name, self.service_model) def test_empty_structure(self): self.output_shape.type_name = 'structure' response = self.get_response() self.assertIsInstance(response, dict, 'Structure should default to empty dictionary') self.assertFalse(response.items(), 'Dictionary should be empty') def test_empty_list(self): self.output_shape.type_name = 'list' response = self.get_response() self.assertIsInstance(response, list, 'List should default to empty list') self.assertFalse(len(response), 'List should be empty') def test_empty_map(self): self.output_shape.type_name = 'map' response = self.get_response() self.assertIsInstance(response, dict, 'Map should default to empty dictionary') self.assertFalse(response.items(), 'Dictionary should be empty') def test_empty_string(self): self.output_shape.type_name = 'string' response = self.get_response() self.assertIsNone(response, 'String should default to None') def test_empty_integer(self): self.output_shape.type_name = 'integer' response = self.get_response() self.assertIsNone(response, 'Integer should default to None') def test_empty_unkown_returns_none(self): self.output_shape.type_name = 'invalid' response = self.get_response() self.assertIsNone(response, 'Unknown types should default to None') def test_path_structure(self): self.search_path = 'Container.Frob' frob = mock.Mock() frob.type_name = 'integer' container = mock.Mock() container.type_name = 'structure' container.members = { 'Frob': frob } self.output_shape.type_name = 'structure' self.output_shape.members = { 'Container': container } response = self.get_response() self.assertEqual(response, None) def test_path_list(self): self.search_path = 'Container[1].Frob' frob = mock.Mock() frob.type_name = 'integer' container = mock.Mock() container.type_name = 'list' container.member = frob self.output_shape.type_name = 'structure' self.output_shape.members = { 'Container': container } response = self.get_response() self.assertEqual(response, None) def test_path_invalid(self): self.search_path = 'Container.Invalid' container = mock.Mock() container.type_name = 'invalid' self.output_shape.type_name = 'structure' self.output_shape.members = { 'Container': container } with self.assertRaises(NotImplementedError): self.get_response() class TestRawHandler(BaseTestCase): def test_raw_handler_response(self): parent = mock.Mock() params = {} response = { 'Id': 'foo' } handler = RawHandler(search_path=None) parsed_response = handler(parent, params, response) self.assertEqual(parsed_response, response, 'Raw response not passed through unmodified') def test_raw_handler_response_path(self): parent = mock.Mock() params = {} frob = { 'Id': 'foo' } response = { 'Container': { 'Frob': frob } } handler = RawHandler(search_path='Container.Frob') parsed_response = handler(parent, params, response) self.assertEqual(parsed_response, frob, 'Search path not processed correctly') class TestResourceHandler(BaseTestCase): def setUp(self): super(TestResourceHandler, self).setUp() self.identifier_path = '' self.factory = ResourceFactory(mock.Mock()) self.resource_defs = { 'Frob': { 'shape': 'Frob', 'identifiers': [ {'name': 'Id'} ] } } self.service_model = mock.Mock() shape = mock.Mock() shape.members = {} self.service_model.shape_for.return_value = shape frobs = mock.Mock() frobs.type_name = 'list' container = mock.Mock() container.type_name = 'structure' container.members = { 'Frobs': frobs } self.output_shape = mock.Mock() self.output_shape.type_name = 'structure' self.output_shape.members = { 'Container': container } operation_model = mock.Mock() operation_model.output_shape = self.output_shape self.service_model.operation_model.return_value = operation_model self.parent = mock.Mock() self.parent.meta = ResourceMeta('test', client=mock.Mock()) self.params = {} def get_resource(self, search_path, response): request_resource_def = { 'type': 'Frob', 'identifiers': [ {'target': 'Id', 'source': 'response', 'path': self.identifier_path}, ] } resource_model = ResponseResource( request_resource_def, self.resource_defs) handler = ResourceHandler( search_path=search_path, factory=self.factory, resource_model=resource_model, service_context=ServiceContext( service_name='myservice', resource_json_definitions=self.resource_defs, service_model=self.service_model, service_waiter_model=None ), operation_name='GetFrobs' ) return handler(self.parent, self.params, response) def test_create_resource_scalar(self): self.identifier_path = 'Container.Id' search_path = 'Container' response = { 'Container': { 'Id': 'a-frob', 'OtherValue': 'other', } } resource = self.get_resource(search_path, response) self.assertIsInstance(resource, ServiceResource, 'No resource instance returned from handler') @mock.patch('boto3.resources.response.build_empty_response') def test_missing_data_scalar_builds_empty_response(self, build_mock): self.identifier_path = 'Container.Id' search_path = 'Container' response = { 'something': 'irrelevant' } resources = self.get_resource(search_path, response) self.assertTrue(build_mock.called, 'build_empty_response was never called') self.assertEqual(resources, build_mock.return_value, 'build_empty_response return value was not returned') def test_create_resource_list(self): self.identifier_path = 'Container.Frobs[].Id' search_path = 'Container.Frobs[]' response = { 'Container': { 'Frobs': [ { 'Id': 'a-frob', 'OtherValue': 'other', }, { 'Id': 'another-frob', 'OtherValue': 'foo', } ] } } resources = self.get_resource(search_path, response) self.assertIsInstance(resources, list, 'No list returned from handler') self.assertEqual(len(resources), 2, 'Exactly two frobs should be returned') self.assertIsInstance(resources[0], ServiceResource, 'List items are not resource instances') def test_create_resource_list_no_search_path(self): self.identifier_path = '[].Id' search_path = '' response = [ { 'Id': 'a-frob', 'OtherValue': 'other' } ] resources = self.get_resource(search_path, response) self.assertIsInstance(resources, list, 'No list returned from handler') self.assertEqual(len(resources), 1, 'Exactly one frob should be returned') self.assertIsInstance(resources[0], ServiceResource, 'List items are not resource instances') @mock.patch('boto3.resources.response.build_empty_response') def test_missing_data_list_builds_empty_response(self, build_mock): self.identifier_path = 'Container.Frobs[].Id' search_path = 'Container.Frobs[]' response = { 'something': 'irrelevant' } resources = self.get_resource(search_path, response) self.assertTrue(build_mock.called, 'build_empty_response was never called') self.assertEqual(resources, build_mock.return_value, 'build_empty_response return value was not returned') boto3-1.9.253/tests/unit/s3/000077500000000000000000000000001355237733400154035ustar00rootroot00000000000000boto3-1.9.253/tests/unit/s3/__init__.py000066400000000000000000000000001355237733400175020ustar00rootroot00000000000000boto3-1.9.253/tests/unit/s3/test_inject.py000066400000000000000000000202171355237733400202720ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import mock from botocore.exceptions import ClientError from botocore.compat import six from boto3.s3 import inject from tests import unittest class TestInjectTransferMethods(unittest.TestCase): def test_inject_upload_download_file_to_client(self): class_attributes = {} inject.inject_s3_transfer_methods(class_attributes=class_attributes) self.assertIn('upload_file', class_attributes) self.assertIn('download_file', class_attributes) def test_upload_file_proxies_to_transfer_object(self): with mock.patch('boto3.s3.inject.S3Transfer') as transfer: inject.upload_file(mock.sentinel.CLIENT, Filename='filename', Bucket='bucket', Key='key') transfer_in_context_manager = \ transfer.return_value.__enter__.return_value transfer_in_context_manager.upload_file.assert_called_with( filename='filename', bucket='bucket', key='key', extra_args=None, callback=None) def test_download_file_proxies_to_transfer_object(self): with mock.patch('boto3.s3.inject.S3Transfer') as transfer: inject.download_file( mock.sentinel.CLIENT, Bucket='bucket', Key='key', Filename='filename') transfer_in_context_manager = \ transfer.return_value.__enter__.return_value transfer_in_context_manager.download_file.assert_called_with( bucket='bucket', key='key', filename='filename', extra_args=None, callback=None) class TestBucketLoad(unittest.TestCase): def setUp(self): self.client = mock.Mock() self.resource = mock.Mock() self.resource.meta.client = self.client def test_bucket_load_finds_bucket(self): self.resource.name = 'MyBucket' self.client.list_buckets.return_value = { 'Buckets': [ {'Name': 'NotMyBucket', 'CreationDate': 1}, {'Name': self.resource.name, 'CreationDate': 2}, ], } inject.bucket_load(self.resource) self.assertEqual( self.resource.meta.data, {'Name': self.resource.name, 'CreationDate': 2}) def test_bucket_load_doesnt_find_bucket(self): self.resource.name = 'MyBucket' self.client.list_buckets.return_value = { 'Buckets': [ {'Name': 'NotMyBucket', 'CreationDate': 1}, {'Name': 'NotMine2', 'CreationDate': 2}, ], } inject.bucket_load(self.resource) self.assertEqual(self.resource.meta.data, {}) def test_bucket_load_encounters_access_exception(self): self.client.list_buckets.side_effect = ClientError( {'Error': {'Code': 'AccessDenied', 'Message': 'Access Denied'}}, 'ListBuckets') inject.bucket_load(self.resource) self.assertEqual(self.resource.meta.data, {}) def test_bucket_load_encounters_other_exception(self): self.client.list_buckets.side_effect = ClientError( {'Error': {'Code': 'ExpiredToken', 'Message': 'The provided token has expired.'}}, 'ListBuckets') with self.assertRaises(ClientError): inject.bucket_load(self.resource) class TestBucketTransferMethods(unittest.TestCase): def setUp(self): self.bucket = mock.Mock(name='my_bucket') self.copy_source = {'Bucket': 'foo', 'Key': 'bar'} def test_upload_file_proxies_to_meta_client(self): inject.bucket_upload_file(self.bucket, Filename='foo', Key='key') self.bucket.meta.client.upload_file.assert_called_with( Filename='foo', Bucket=self.bucket.name, Key='key', ExtraArgs=None, Callback=None, Config=None) def test_download_file_proxies_to_meta_client(self): inject.bucket_download_file(self.bucket, Key='key', Filename='foo') self.bucket.meta.client.download_file.assert_called_with( Bucket=self.bucket.name, Key='key', Filename='foo', ExtraArgs=None, Callback=None, Config=None) def test_copy(self): inject.bucket_copy(self.bucket, self.copy_source, Key='key') self.bucket.meta.client.copy.assert_called_with( CopySource=self.copy_source, Bucket=self.bucket.name, Key='key', ExtraArgs=None, Callback=None, SourceClient=None, Config=None) def test_upload_fileobj(self): fileobj = six.BytesIO(b'foo') inject.bucket_upload_fileobj(self.bucket, Key='key', Fileobj=fileobj) self.bucket.meta.client.upload_fileobj.assert_called_with( Bucket=self.bucket.name, Fileobj=fileobj, Key='key', ExtraArgs=None, Callback=None, Config=None) def test_download_fileobj(self): obj = six.BytesIO() inject.bucket_download_fileobj(self.bucket, Key='key', Fileobj=obj) self.bucket.meta.client.download_fileobj.assert_called_with( Bucket=self.bucket.name, Key='key', Fileobj=obj, ExtraArgs=None, Callback=None, Config=None) class TestObjectTransferMethods(unittest.TestCase): def setUp(self): self.obj = mock.Mock(bucket_name='my_bucket', key='my_key') self.copy_source = {'Bucket': 'foo', 'Key': 'bar'} def test_upload_file_proxies_to_meta_client(self): inject.object_upload_file(self.obj, Filename='foo') self.obj.meta.client.upload_file.assert_called_with( Filename='foo', Bucket=self.obj.bucket_name, Key=self.obj.key, ExtraArgs=None, Callback=None, Config=None) def test_download_file_proxies_to_meta_client(self): inject.object_download_file(self.obj, Filename='foo') self.obj.meta.client.download_file.assert_called_with( Bucket=self.obj.bucket_name, Key=self.obj.key, Filename='foo', ExtraArgs=None, Callback=None, Config=None) def test_copy(self): inject.object_copy(self.obj, self.copy_source) self.obj.meta.client.copy.assert_called_with( CopySource=self.copy_source, Bucket=self.obj.bucket_name, Key=self.obj.key, ExtraArgs=None, Callback=None, SourceClient=None, Config=None) def test_upload_fileobj(self): fileobj = six.BytesIO(b'foo') inject.object_upload_fileobj(self.obj, Fileobj=fileobj) self.obj.meta.client.upload_fileobj.assert_called_with( Bucket=self.obj.bucket_name, Fileobj=fileobj, Key=self.obj.key, ExtraArgs=None, Callback=None, Config=None) def test_download_fileobj(self): fileobj = six.BytesIO() inject.object_download_fileobj(self.obj, Fileobj=fileobj) self.obj.meta.client.download_fileobj.assert_called_with( Bucket=self.obj.bucket_name, Key=self.obj.key, Fileobj=fileobj, ExtraArgs=None, Callback=None, Config=None) class TestObejctSummaryLoad(unittest.TestCase): def setUp(self): self.client = mock.Mock() self.resource = mock.Mock() self.resource.meta.client = self.client self.head_object_response = { 'ContentLength': 5, 'ETag': 'my-etag' } self.client.head_object.return_value = self.head_object_response def test_object_summary_load(self): inject.object_summary_load(self.resource) self.assertEqual( self.resource.meta.data, {'Size': 5, 'ETag': 'my-etag'}) def test_can_handle_missing_content_length(self): self.head_object_response.pop('ContentLength') inject.object_summary_load(self.resource) self.assertEqual(self.resource.meta.data, {'ETag': 'my-etag'}) boto3-1.9.253/tests/unit/s3/test_transfer.py000066400000000000000000000214011355237733400206360ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file accompanying this file. This file is # distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from tests import unittest import mock from s3transfer.manager import TransferManager from s3transfer.futures import NonThreadedExecutor from boto3.exceptions import RetriesExceededError from boto3.exceptions import S3UploadFailedError from boto3.s3.transfer import create_transfer_manager from boto3.s3.transfer import S3Transfer from boto3.s3.transfer import OSUtils, TransferConfig, ProgressCallbackInvoker from boto3.s3.transfer import ClientError, S3TransferRetriesExceededError class TestCreateTransferManager(unittest.TestCase): def test_create_transfer_manager(self): client = object() config = TransferConfig() osutil = OSUtils() with mock.patch('boto3.s3.transfer.TransferManager') as manager: create_transfer_manager(client, config, osutil) self.assertEqual( manager.call_args, mock.call(client, config, osutil, None) ) def test_create_transfer_manager_with_no_threads(self): client = object() config = TransferConfig() config.use_threads = False with mock.patch( 'boto3.s3.transfer.TransferManager') as manager: create_transfer_manager(client, config) self.assertEqual( manager.call_args, mock.call(client, config, None, NonThreadedExecutor) ) class TestTransferConfig(unittest.TestCase): def assert_value_of_actual_and_alias(self, config, actual, alias, ref_value): # Ensure that the name set in the underlying TransferConfig (i.e. # the actual) is the correct value. self.assertEqual(getattr(config, actual), ref_value) # Ensure that backcompat name (i.e. the alias) is the correct value. self.assertEqual(getattr(config, alias), ref_value) def test_alias_max_concurreny(self): ref_value = 10 config = TransferConfig(max_concurrency=ref_value) self.assert_value_of_actual_and_alias( config, 'max_request_concurrency', 'max_concurrency', ref_value) # Set a new value using the alias new_value = 15 config.max_concurrency = new_value # Make sure it sets the value for both the alias and the actual # value that will be used in the TransferManager self.assert_value_of_actual_and_alias( config, 'max_request_concurrency', 'max_concurrency', new_value) def test_alias_max_io_queue(self): ref_value = 10 config = TransferConfig(max_io_queue=ref_value) self.assert_value_of_actual_and_alias( config, 'max_io_queue_size', 'max_io_queue', ref_value) # Set a new value using the alias new_value = 15 config.max_io_queue = new_value # Make sure it sets the value for both the alias and the actual # value that will be used in the TransferManager self.assert_value_of_actual_and_alias( config, 'max_io_queue_size', 'max_io_queue', new_value) class TestProgressCallbackInvoker(unittest.TestCase): def test_on_progress(self): callback = mock.Mock() subscriber = ProgressCallbackInvoker(callback) subscriber.on_progress(bytes_transferred=1) callback.assert_called_with(1) class TestS3Transfer(unittest.TestCase): def setUp(self): self.client = mock.Mock() self.manager = mock.Mock(TransferManager(self.client)) self.transfer = S3Transfer(manager=self.manager) self.callback = mock.Mock() def assert_callback_wrapped_in_subscriber(self, call_args): subscribers = call_args[0][4] # Make sure only one subscriber was passed in. self.assertEqual(len(subscribers), 1) subscriber = subscribers[0] # Make sure that the subscriber is of the correct type self.assertIsInstance(subscriber, ProgressCallbackInvoker) # Make sure that the on_progress method() calls out to the wrapped # callback by actually invoking it. subscriber.on_progress(bytes_transferred=1) self.callback.assert_called_with(1) def test_upload_file(self): extra_args = {'ACL': 'public-read'} self.transfer.upload_file('smallfile', 'bucket', 'key', extra_args=extra_args) self.manager.upload.assert_called_with( 'smallfile', 'bucket', 'key', extra_args, None) def test_download_file(self): extra_args = { 'SSECustomerKey': 'foo', 'SSECustomerAlgorithm': 'AES256', } self.transfer.download_file('bucket', 'key', '/tmp/smallfile', extra_args=extra_args) self.manager.download.assert_called_with( 'bucket', 'key', '/tmp/smallfile', extra_args, None) def test_upload_wraps_callback(self): self.transfer.upload_file( 'smallfile', 'bucket', 'key', callback=self.callback) self.assert_callback_wrapped_in_subscriber( self.manager.upload.call_args) def test_download_wraps_callback(self): self.transfer.download_file( 'bucket', 'key', '/tmp/smallfile', callback=self.callback) self.assert_callback_wrapped_in_subscriber( self.manager.download.call_args) def test_propogation_of_retry_error(self): future = mock.Mock() future.result.side_effect = S3TransferRetriesExceededError(Exception()) self.manager.download.return_value = future with self.assertRaises(RetriesExceededError): self.transfer.download_file('bucket', 'key', '/tmp/smallfile') def test_propogation_s3_upload_failed_error(self): future = mock.Mock() future.result.side_effect = ClientError({'Error': {}}, 'op_name') self.manager.upload.return_value = future with self.assertRaises(S3UploadFailedError): self.transfer.upload_file('smallfile', 'bucket', 'key') def test_can_create_with_just_client(self): transfer = S3Transfer(client=mock.Mock()) self.assertIsInstance(transfer, S3Transfer) def test_can_create_with_extra_configurations(self): transfer = S3Transfer( client=mock.Mock(), config=TransferConfig(), osutil=OSUtils()) self.assertIsInstance(transfer, S3Transfer) def test_client_or_manager_is_required(self): with self.assertRaises(ValueError): S3Transfer() def test_client_and_manager_are_mutually_exclusive(self): with self.assertRaises(ValueError): S3Transfer(self.client, manager=self.manager) def test_config_and_manager_are_mutually_exclusive(self): with self.assertRaises(ValueError): S3Transfer(config=mock.Mock(), manager=self.manager) def test_osutil_and_manager_are_mutually_exclusive(self): with self.assertRaises(ValueError): S3Transfer(osutil=mock.Mock(), manager=self.manager) def test_upload_requires_string_filename(self): transfer = S3Transfer(client=mock.Mock()) with self.assertRaises(ValueError): transfer.upload_file(filename=object(), bucket='foo', key='bar') def test_download_requires_string_filename(self): transfer = S3Transfer(client=mock.Mock()) with self.assertRaises(ValueError): transfer.download_file(bucket='foo', key='bar', filename=object()) def test_context_manager(self): manager = mock.Mock() manager.__exit__ = mock.Mock() with S3Transfer(manager=manager): pass # The underlying transfer manager should have had its __exit__ # called as well. self.assertEqual( manager.__exit__.call_args, mock.call(None, None, None)) def test_context_manager_with_errors(self): manager = mock.Mock() manager.__exit__ = mock.Mock() raised_exception = ValueError() with self.assertRaises(type(raised_exception)): with S3Transfer(manager=manager): raise raised_exception # The underlying transfer manager should have had its __exit__ # called as well and pass on the error as well. self.assertEqual( manager.__exit__.call_args, mock.call(type(raised_exception), raised_exception, mock.ANY)) boto3-1.9.253/tests/unit/test_boto3.py000066400000000000000000000073701355237733400175240ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import boto3 from tests import mock, unittest class TestBoto3(unittest.TestCase): def setUp(self): self.session_patch = mock.patch('boto3.Session', autospec=True) self.Session = self.session_patch.start() def tearDown(self): boto3.DEFAULT_SESSION = None self.session_patch.stop() def test_create_default_session(self): session = self.Session.return_value boto3.setup_default_session() self.assertEqual(boto3.DEFAULT_SESSION, session, 'Default session not created properly') def test_create_default_session_with_args(self): boto3.setup_default_session( aws_access_key_id='key', aws_secret_access_key='secret') self.Session.assert_called_with( aws_access_key_id='key', aws_secret_access_key='secret') @mock.patch('boto3.setup_default_session', wraps=boto3.setup_default_session) def test_client_creates_default_session(self, setup_session): boto3.DEFAULT_SESSION = None boto3.client('sqs') self.assertTrue(setup_session.called, 'setup_default_session not called') self.assertTrue(boto3.DEFAULT_SESSION.client.called, 'Default session client method not called') @mock.patch('boto3.setup_default_session', wraps=boto3.setup_default_session) def test_client_uses_existing_session(self, setup_session): boto3.DEFAULT_SESSION = self.Session() boto3.client('sqs') self.assertFalse(setup_session.called, 'setup_default_session should not have been called') self.assertTrue(boto3.DEFAULT_SESSION.client.called, 'Default session client method not called') def test_client_passes_through_arguments(self): boto3.DEFAULT_SESSION = self.Session() boto3.client('sqs', region_name='us-west-2', verify=False) boto3.DEFAULT_SESSION.client.assert_called_with( 'sqs', region_name='us-west-2', verify=False) @mock.patch('boto3.setup_default_session', wraps=boto3.setup_default_session) def test_resource_creates_default_session(self, setup_session): boto3.DEFAULT_SESSION = None boto3.resource('sqs') self.assertTrue(setup_session.called, 'setup_default_session not called') self.assertTrue(boto3.DEFAULT_SESSION.resource.called, 'Default session resource method not called') @mock.patch('boto3.setup_default_session', wraps=boto3.setup_default_session) def test_resource_uses_existing_session(self, setup_session): boto3.DEFAULT_SESSION = self.Session() boto3.resource('sqs') self.assertFalse(setup_session.called, 'setup_default_session should not have been called') self.assertTrue(boto3.DEFAULT_SESSION.resource.called, 'Default session resource method not called') def test_resource_passes_through_arguments(self): boto3.DEFAULT_SESSION = self.Session() boto3.resource('sqs', region_name='us-west-2', verify=False) boto3.DEFAULT_SESSION.resource.assert_called_with( 'sqs', region_name='us-west-2', verify=False) boto3-1.9.253/tests/unit/test_session.py000066400000000000000000000345051355237733400201610ustar00rootroot00000000000000# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. from botocore import loaders from botocore.exceptions import DataNotFoundError, UnknownServiceError from botocore.client import Config from boto3 import __version__ from boto3.exceptions import NoVersionFound, ResourceNotExistsError from boto3.session import Session from tests import mock, BaseTestCase class TestSession(BaseTestCase): def test_repr(self): bc_session = self.bc_session_cls.return_value bc_session.get_credentials.return_value.access_key = 'abc123' bc_session.get_config_variable.return_value = 'us-west-2' session = Session('abc123', region_name='us-west-2') self.assertEqual(repr(session), 'Session(region_name=\'us-west-2\')') def test_repr_on_subclasses(self): bc_session = self.bc_session_cls.return_value bc_session.get_credentials.return_value.access_key = 'abc123' bc_session.get_config_variable.return_value = 'us-west-2' class MySession(Session): pass session = MySession('abc123', region_name='us-west-2') self.assertEqual(repr(session), 'MySession(region_name=\'us-west-2\')') def test_can_access_region_name(self): bc_session = self.bc_session_cls.return_value bc_session.get_config_variable.return_value = 'us-west-2' session = Session('abc123', region_name='us-west-2') bc_session.set_config_variable.assert_called_with('region', 'us-west-2') self.assertEqual(session.region_name, 'us-west-2') def test_arguments_not_required(self): Session() self.assertTrue(self.bc_session_cls.called, 'Botocore session was not created') def test_credentials_can_be_set(self): bc_session = self.bc_session_cls.return_value # Set values in constructor Session(aws_access_key_id='key', aws_secret_access_key='secret', aws_session_token='token') self.assertTrue(self.bc_session_cls.called, 'Botocore session was not created') self.assertTrue(bc_session.set_credentials.called, 'Botocore session set_credentials not called from constructor') bc_session.set_credentials.assert_called_with( 'key', 'secret', 'token') def test_can_get_credentials(self): access_key = 'foo' secret_key = 'bar' token = 'baz' creds = mock.Mock() creds.access_key = access_key creds.secret_key = secret_key creds.token = token bc_session = self.bc_session_cls.return_value bc_session.get_credentials.return_value = creds session = Session( aws_access_key_id=access_key, aws_secret_access_key=secret_key, aws_session_token=token) credentials = session.get_credentials() self.assertEqual(credentials.access_key, access_key) self.assertEqual(credentials.secret_key, secret_key) self.assertEqual(credentials.token, token) def test_profile_can_be_set(self): bc_session = self.bc_session_cls.return_value session = Session(profile_name='foo') bc_session.set_config_variable.assert_called_with( 'profile', 'foo') bc_session.profile = 'foo' # We should also be able to read the value self.assertEqual(session.profile_name, 'foo') def test_profile_default(self): self.bc_session_cls.return_value.profile = None session = Session() self.assertEqual(session.profile_name, 'default') def test_available_profiles(self): bc_session = mock.Mock() bc_session.available_profiles.return_value = ['foo','bar'] session = Session(botocore_session=bc_session) profiles = session.available_profiles self.assertEqual(len(profiles.return_value), 2) def test_custom_session(self): bc_session = self.bc_session_cls() self.bc_session_cls.reset_mock() Session(botocore_session=bc_session) # No new session was created self.assertFalse(self.bc_session_cls.called) def test_user_agent(self): # Here we get the underlying Botocore session, create a Boto 3 # session, and ensure that the user-agent is modified as expected bc_session = self.bc_session_cls.return_value bc_session.user_agent_name = 'Botocore' bc_session.user_agent_version = '0.68.0' bc_session.user_agent_extra = '' Session(botocore_session=bc_session) self.assertEqual(bc_session.user_agent_name, 'Boto3') self.assertEqual(bc_session.user_agent_version, __version__) self.assertEqual(bc_session.user_agent_extra, 'Botocore/0.68.0') def test_user_agent_extra(self): # This test is the same as above, but includes custom extra content # which must still be in the final modified user-agent. bc_session = self.bc_session_cls.return_value bc_session.user_agent_name = 'Botocore' bc_session.user_agent_version = '0.68.0' bc_session.user_agent_extra = 'foo' Session(botocore_session=bc_session) self.assertEqual(bc_session.user_agent_extra, 'foo Botocore/0.68.0') def test_custom_user_agent(self): # This test ensures that a customized user-agent is left untouched. bc_session = self.bc_session_cls.return_value bc_session.user_agent_name = 'Custom' bc_session.user_agent_version = '1.0' bc_session.user_agent_extra = '' Session(botocore_session=bc_session) self.assertEqual(bc_session.user_agent_name, 'Custom') self.assertEqual(bc_session.user_agent_version, '1.0') self.assertEqual(bc_session.user_agent_extra, '') def test_get_available_services(self): bc_session = self.bc_session_cls.return_value session = Session() session.get_available_services() self.assertTrue(bc_session.get_available_services.called, 'Botocore session get_available_services not called') def test_get_available_resources(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.list_available_services.return_value = ['foo', 'bar'] mock_bc_session.get_component.return_value = loader session = Session(botocore_session=mock_bc_session) names = session.get_available_resources() self.assertEqual(names, ['foo', 'bar']) def test_get_available_partitions(self): bc_session = mock.Mock() bc_session.get_available_partitions.return_value = ['foo'] session = Session(botocore_session=bc_session) partitions = session.get_available_partitions() self.assertEqual(partitions, ['foo']) def test_get_available_regions(self): bc_session = mock.Mock() bc_session.get_available_regions.return_value = ['foo'] session = Session(botocore_session=bc_session) partitions = session.get_available_regions('myservice') bc_session.get_available_regions.assert_called_with( service_name='myservice', partition_name='aws', allow_non_regional=False ) self.assertEqual(partitions, ['foo']) def test_create_client(self): session = Session(region_name='us-east-1') client = session.client('sqs', region_name='us-west-2') self.assertTrue(client, 'No low-level client was returned') def test_create_client_with_args(self): bc_session = self.bc_session_cls.return_value session = Session(region_name='us-east-1') session.client('sqs', region_name='us-west-2') bc_session.create_client.assert_called_with( 'sqs', aws_secret_access_key=None, aws_access_key_id=None, endpoint_url=None, use_ssl=True, aws_session_token=None, verify=None, region_name='us-west-2', api_version=None, config=None) def test_create_resource_with_args(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.determine_latest_version.return_value = '2014-11-02' loader.load_service_model.return_value = { 'resources': [], 'service': []} mock_bc_session.get_component.return_value = loader session = Session(botocore_session=mock_bc_session) session.resource_factory.load_from_definition = mock.Mock() session.client = mock.Mock() session.resource('sqs', verify=False) session.client.assert_called_with( 'sqs', aws_secret_access_key=None, aws_access_key_id=None, endpoint_url=None, use_ssl=True, aws_session_token=None, verify=False, region_name=None, api_version='2014-11-02', config=mock.ANY) client_config = session.client.call_args[1]['config'] self.assertEqual(client_config.user_agent_extra, 'Resource') self.assertEqual(client_config.signature_version, None) def test_create_resource_with_config(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.determine_latest_version.return_value = '2014-11-02' loader.load_service_model.return_value = { 'resources': [], 'service': []} mock_bc_session.get_component.return_value = loader session = Session(botocore_session=mock_bc_session) session.resource_factory.load_from_definition = mock.Mock() session.client = mock.Mock() config = Config(signature_version='v4') session.resource('sqs', config=config) session.client.assert_called_with( 'sqs', aws_secret_access_key=None, aws_access_key_id=None, endpoint_url=None, use_ssl=True, aws_session_token=None, verify=None, region_name=None, api_version='2014-11-02', config=mock.ANY) client_config = session.client.call_args[1]['config'] self.assertEqual(client_config.user_agent_extra, 'Resource') self.assertEqual(client_config.signature_version, 'v4') def test_create_resource_with_config_override_user_agent_extra(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.determine_latest_version.return_value = '2014-11-02' loader.load_service_model.return_value = { 'resources': [], 'service': []} mock_bc_session.get_component.return_value = loader session = Session(botocore_session=mock_bc_session) session.resource_factory.load_from_definition = mock.Mock() session.client = mock.Mock() config = Config(signature_version='v4', user_agent_extra='foo') session.resource('sqs', config=config) session.client.assert_called_with( 'sqs', aws_secret_access_key=None, aws_access_key_id=None, endpoint_url=None, use_ssl=True, aws_session_token=None, verify=None, region_name=None, api_version='2014-11-02', config=mock.ANY) client_config = session.client.call_args[1]['config'] self.assertEqual(client_config.user_agent_extra, 'foo') self.assertEqual(client_config.signature_version, 'v4') def test_create_resource_latest_version(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.determine_latest_version.return_value = '2014-11-02' loader.load_service_model.return_value = { 'resources': [], 'service': []} mock_bc_session.get_component.return_value = loader session = Session(botocore_session=mock_bc_session) session.resource_factory.load_from_definition = mock.Mock() session.resource('sqs') loader.load_service_model.assert_called_with( 'sqs', 'resources-1', None) def test_bad_resource_name(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.load_service_model.side_effect = UnknownServiceError( service_name='foo', known_service_names='asdf' ) mock_bc_session.get_component.return_value = loader loader.list_available_services.return_value = ['good-resource'] mock_bc_session.get_available_services.return_value = ['sqs'] session = Session(botocore_session=mock_bc_session) with self.assertRaises(ResourceNotExistsError) as e: session.resource('sqs') err_msg = str(e.exception) # 1. should say the resource doesn't exist. self.assertIn('resource does not exist', err_msg) self.assertIn('sqs', err_msg) # 2. Should list available resources you can choose. self.assertIn('good-resource', err_msg) # 3. Should list client if available. self.assertIn('client', err_msg) def test_bad_resource_name_with_no_client_has_simple_err_msg(self): mock_bc_session = mock.Mock() loader = mock.Mock(spec=loaders.Loader) loader.load_service_model.side_effect = UnknownServiceError( service_name='foo', known_service_names='asdf' ) mock_bc_session.get_component.return_value = loader loader.list_available_services.return_value = ['good-resource'] mock_bc_session.get_available_services.return_value = ['good-client'] session = Session(botocore_session=mock_bc_session) with self.assertRaises(ResourceNotExistsError) as e: session.resource('bad-client') err_msg = str(e.exception) # Shouldn't mention anything about clients because # 'bad-client' it not a valid boto3.client(...) self.assertNotIn('boto3.client', err_msg) def test_can_reach_events(self): mock_bc_session = self.bc_session_cls() session = Session(botocore_session=mock_bc_session) session.events mock_bc_session.get_component.assert_called_with('event_emitter') boto3-1.9.253/tests/unit/test_utils.py000066400000000000000000000042421355237733400176310ustar00rootroot00000000000000# Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file is # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import types from tests import unittest import mock from boto3 import utils class FakeModule(object): @staticmethod def entry_point(**kwargs): return kwargs class TestUtils(unittest.TestCase): def test_lazy_call(self): with mock.patch('boto3.utils.import_module') as importer: importer.return_value = FakeModule lazy_function = utils.lazy_call( 'fakemodule.FakeModule.entry_point') self.assertEqual(lazy_function(a=1, b=2), {'a': 1, 'b': 2}) def test_import_module(self): module = utils.import_module('boto3.s3.transfer') self.assertEqual(module.__name__, 'boto3.s3.transfer') self.assertIsInstance(module, types.ModuleType) def test_inject_attributes_with_no_shadowing(self): class_attributes = {} utils.inject_attribute(class_attributes, 'foo', 'bar') self.assertEqual(class_attributes['foo'], 'bar') def test_shadowing_existing_var_raises_exception(self): class_attributes = {'foo': 'preexisting'} with self.assertRaises(RuntimeError): utils.inject_attribute(class_attributes, 'foo', 'bar') class TestLazyLoadedWaiterModel(unittest.TestCase): def test_get_waiter_model_is_lazy(self): session = mock.Mock() waiter_model = utils.LazyLoadedWaiterModel( session, 'myservice', '2014-01-01') self.assertFalse(session.get_waiter_model.called) waiter_model.get_waiter('Foo') self.assertTrue(session.get_waiter_model.called) session.get_waiter_model.return_value.get_waiter.assert_called_with( 'Foo') boto3-1.9.253/tox.ini000066400000000000000000000004311355237733400142460ustar00rootroot00000000000000[tox] envlist = py26,py27,py33,py34,py35,py36 # Comment to build sdist and install into virtualenv # This is helpful to test installation but takes extra time skipsdist = True [testenv] commands = {toxinidir}/scripts/ci/install {toxinidir}/scripts/ci/run-tests {posargs}