├── .gitignore ├── LICENSE ├── README.md ├── img ├── autocomplete.png ├── documentation.png ├── pyboto1.png └── pyboto3.png ├── pyboto3 ├── __init__.py ├── accessanalyzer.py ├── acm.py ├── acmpca.py ├── alexaforbusiness.py ├── amplify.py ├── apigateway.py ├── apigatewaymanagementapi.py ├── apigatewayv2.py ├── appconfig.py ├── applicationautoscaling.py ├── applicationdiscoveryservice.py ├── applicationinsights.py ├── appmesh.py ├── appstream.py ├── appsync.py ├── athena.py ├── augmentedairuntime.py ├── autoscaling.py ├── autoscalingplans.py ├── backup.py ├── batch.py ├── boto3_interface_generator.py ├── budgets.py ├── chime.py ├── clients.py ├── cloud9.py ├── clouddirectory.py ├── cloudformation.py ├── cloudfront.py ├── cloudhsm.py ├── cloudhsmv2.py ├── cloudsearch.py ├── cloudsearchdomain.py ├── cloudtrail.py ├── cloudwatch.py ├── cloudwatchevents.py ├── cloudwatchlogs.py ├── codebuild.py ├── codecommit.py ├── codedeploy.py ├── codeguruprofiler.py ├── codegurureviewer.py ├── codepipeline.py ├── codestar.py ├── codestarconnections.py ├── codestarnotifications.py ├── cognitoidentity.py ├── cognitoidentityprovider.py ├── cognitosync.py ├── comprehend.py ├── comprehendmedical.py ├── computeoptimizer.py ├── configservice.py ├── connect.py ├── connectparticipant.py ├── costandusagereportservice.py ├── costexplorer.py ├── databasemigrationservice.py ├── dataexchange.py ├── datapipeline.py ├── datasync.py ├── dax.py ├── detective.py ├── devicefarm.py ├── directconnect.py ├── directoryservice.py ├── dlm.py ├── docdb.py ├── dynamodb.py ├── dynamodbstreams.py ├── ebs.py ├── ec2.py ├── ec2instanceconnect.py ├── ecr.py ├── ecs.py ├── efs.py ├── eks.py ├── elasticache.py ├── elasticbeanstalk.py ├── elasticinference.py ├── elasticloadbalancing.py ├── elasticloadbalancingv2.py ├── elasticsearchservice.py ├── elastictranscoder.py ├── emr.py ├── eventbridge.py ├── firehose.py ├── fms.py ├── forecastqueryservice.py ├── forecastservice.py ├── frauddetector.py ├── fsx.py ├── gamelift.py ├── glacier.py ├── globalaccelerator.py ├── glue.py ├── greengrass.py ├── groundstation.py ├── guardduty.py ├── health.py ├── iam.py ├── imagebuilder.py ├── importexport.py ├── inspector.py ├── iot.py ├── iot1clickdevicesservice.py ├── iot1clickprojects.py ├── iotanalytics.py ├── iotdataplane.py ├── iotevents.py ├── ioteventsdata.py ├── iotjobsdataplane.py ├── iotsecuretunneling.py ├── iotsitewise.py ├── iotthingsgraph.py ├── kafka.py ├── kendra.py ├── kinesis.py ├── kinesisanalytics.py ├── kinesisanalyticsv2.py ├── kinesisvideo.py ├── kinesisvideoarchivedmedia.py ├── kinesisvideomedia.py ├── kinesisvideosignalingchannels.py ├── kms.py ├── lakeformation.py ├── lambda_.py ├── lexmodelbuildingservice.py ├── lexruntimeservice.py ├── licensemanager.py ├── lightsail.py ├── machinelearning.py ├── macie.py ├── macie2.py ├── managedblockchain.py ├── marketplacecatalog.py ├── marketplacecommerceanalytics.py ├── marketplaceentitlementservice.py ├── marketplacemetering.py ├── mediaconnect.py ├── mediaconvert.py ├── medialive.py ├── mediapackage.py ├── mediapackagevod.py ├── mediastore.py ├── mediastoredata.py ├── mediatailor.py ├── migrationhub.py ├── migrationhubconfig.py ├── mobile.py ├── mq.py ├── mturk.py ├── neptune.py ├── networkmanager.py ├── opsworks.py ├── opsworkscm.py ├── organizations.py ├── outposts.py ├── personalize.py ├── personalizeevents.py ├── personalizeruntime.py ├── pi.py ├── pinpoint.py ├── pinpointemail.py ├── pinpointsmsvoice.py ├── polly.py ├── pricing.py ├── qldb.py ├── qldbsession.py ├── quicksight.py ├── ram.py ├── rds.py ├── rdsdataservice.py ├── redshift.py ├── rekognition.py ├── resourcegroups.py ├── resourcegroupstaggingapi.py ├── robomaker.py ├── route53.py ├── route53domains.py ├── route53resolver.py ├── s3.py ├── s3control.py ├── sagemaker.py ├── sagemakerruntime.py ├── savingsplans.py ├── schemas.py ├── secretsmanager.py ├── securityhub.py ├── serverlessapplicationrepository.py ├── servicecatalog.py ├── servicediscovery.py ├── servicequotas.py ├── ses.py ├── sesv2.py ├── sfn.py ├── shield.py ├── signer.py ├── simpledb.py ├── sms.py ├── snowball.py ├── sns.py ├── sqs.py ├── ssm.py ├── sso.py ├── ssooidc.py ├── storagegateway.py ├── sts.py ├── support.py ├── swf.py ├── synthetics.py ├── textract.py ├── transcribeservice.py ├── transfer.py ├── translate.py ├── waf.py ├── wafregional.py ├── wafv2.py ├── workdocs.py ├── worklink.py ├── workmail.py ├── workmailmessageflow.py ├── workspaces.py └── xray.py ├── pytest.ini ├── requirements.txt ├── setup.py └── tests ├── test_generator.py └── test_parser.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | .venv/ 85 | 86 | # Spyder project settings 87 | .spyderproject 88 | 89 | # Rope project settings 90 | .ropeproject 91 | 92 | # pycharm 93 | .idea/ 94 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 WavyCloud 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pyboto3 interface stubs 2 | Pythonic Interface for AWS boto3 that gives you autocomplete on all AWS services 3 | 4 | The code is not to be imported. you can only use it as a typehint for autocomplete in pycharm. 5 | 6 | This package will minimize the time you have to look for AWS documentation online. You shouldn't leave your coding environment. 7 | 8 | # Screenshots 9 | ## Ctrl+Space 10 | 11 | ![Ctrl+Space Autocomplete Image](https://github.com/gehadshaat/pyboto3/blob/master/img/autocomplete.png) 12 | 13 | ## Ctrl+Q 14 | 15 | ![Ctrl+Q Documentation](https://github.com/gehadshaat/pyboto3/blob/master/img/documentation.png) 16 | 17 | # Installation 18 | ``` 19 | pip install pyboto3 20 | ``` 21 | 22 | # Usage 23 | ```python 24 | import boto3 25 | s3 = boto3.client('s3') 26 | """ :type : pyboto3.s3 """ 27 | # s3. -> will give you autocomplete for s3 methods in pycharm 28 | ``` 29 | enjoy autocomplete and navigate to class to read documentation from S3 class code 30 | 31 | # Update services to latest version 32 | * Clone repo 33 | * Install virtual environment 34 | ``` 35 | cd 36 | virtualenv .venv 37 | source .venv/bin/activate 38 | pip install -r requirements.txt 39 | ``` 40 | * Run boto3_interface_generator 41 | ``` 42 | cd pyboto3 43 | python boto3_interface_generator.py 44 | ``` 45 | * Add new & modified files to git 46 | # Release Instructions 47 | ``` 48 | python setup.py sdist 49 | twine upload dist/* 50 | ``` 51 | 52 | # Contributing 53 | 54 | We need your help! The code needs work and testing to make it friendly with python 3 and other systems. Feel free to test, commit and push changes! 55 | 56 | # Issues 57 | The package have been tested on Python 2.7 only 58 | 59 | 60 | -------------------------------------------------------------------------------- /img/autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wavycloud/pyboto3/4a0c2851a8bc04fb1c71c36086f7bb257e48181d/img/autocomplete.png -------------------------------------------------------------------------------- /img/documentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wavycloud/pyboto3/4a0c2851a8bc04fb1c71c36086f7bb257e48181d/img/documentation.png -------------------------------------------------------------------------------- /img/pyboto1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wavycloud/pyboto3/4a0c2851a8bc04fb1c71c36086f7bb257e48181d/img/pyboto1.png -------------------------------------------------------------------------------- /img/pyboto3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wavycloud/pyboto3/4a0c2851a8bc04fb1c71c36086f7bb257e48181d/img/pyboto3.png -------------------------------------------------------------------------------- /pyboto3/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wavycloud/pyboto3/4a0c2851a8bc04fb1c71c36086f7bb257e48181d/pyboto3/__init__.py -------------------------------------------------------------------------------- /pyboto3/apigatewaymanagementapi.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def delete_connection(ConnectionId=None): 38 | """ 39 | Delete the connection with the provided id. 40 | See also: AWS API Documentation 41 | 42 | Exceptions 43 | 44 | :example: response = client.delete_connection( 45 | ConnectionId='string' 46 | ) 47 | 48 | 49 | :type ConnectionId: string 50 | :param ConnectionId: [REQUIRED] 51 | 52 | """ 53 | pass 54 | 55 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 56 | """ 57 | Generate a presigned url given a client, its method, and arguments 58 | 59 | :type ClientMethod: string 60 | :param ClientMethod: The client method to presign for 61 | 62 | :type Params: dict 63 | :param Params: The parameters normally passed to\nClientMethod. 64 | 65 | :type ExpiresIn: int 66 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 67 | 68 | :type HttpMethod: string 69 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 70 | 71 | """ 72 | pass 73 | 74 | def get_connection(ConnectionId=None): 75 | """ 76 | Get information about the connection with the provided id. 77 | See also: AWS API Documentation 78 | 79 | Exceptions 80 | 81 | :example: response = client.get_connection( 82 | ConnectionId='string' 83 | ) 84 | 85 | 86 | :type ConnectionId: string 87 | :param ConnectionId: [REQUIRED] 88 | 89 | :rtype: dict 90 | ReturnsResponse Syntax{ 91 | 'ConnectedAt': datetime(2015, 1, 1), 92 | 'Identity': { 93 | 'SourceIp': 'string', 94 | 'UserAgent': 'string' 95 | }, 96 | 'LastActiveAt': datetime(2015, 1, 1) 97 | } 98 | 99 | 100 | Response Structure 101 | 102 | (dict) -- 103 | ConnectedAt (datetime) --The time in ISO 8601 format for when the connection was established. 104 | 105 | Identity (dict) -- 106 | SourceIp (string) --The source IP address of the TCP connection making the request to API Gateway. 107 | 108 | UserAgent (string) --The User Agent of the API caller. 109 | 110 | 111 | 112 | LastActiveAt (datetime) --The time in ISO 8601 format for when the connection was last active. 113 | 114 | 115 | 116 | 117 | 118 | 119 | Exceptions 120 | 121 | ApiGatewayManagementApi.Client.exceptions.GoneException 122 | ApiGatewayManagementApi.Client.exceptions.LimitExceededException 123 | ApiGatewayManagementApi.Client.exceptions.ForbiddenException 124 | 125 | 126 | :return: { 127 | 'ConnectedAt': datetime(2015, 1, 1), 128 | 'Identity': { 129 | 'SourceIp': 'string', 130 | 'UserAgent': 'string' 131 | }, 132 | 'LastActiveAt': datetime(2015, 1, 1) 133 | } 134 | 135 | 136 | """ 137 | pass 138 | 139 | def get_paginator(operation_name=None): 140 | """ 141 | Create a paginator for an operation. 142 | 143 | :type operation_name: string 144 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 145 | 146 | :rtype: L{botocore.paginate.Paginator} 147 | ReturnsA paginator object. 148 | 149 | 150 | """ 151 | pass 152 | 153 | def get_waiter(waiter_name=None): 154 | """ 155 | Returns an object that can wait for some condition. 156 | 157 | :type waiter_name: str 158 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 159 | 160 | :rtype: botocore.waiter.Waiter 161 | 162 | 163 | """ 164 | pass 165 | 166 | def post_to_connection(Data=None, ConnectionId=None): 167 | """ 168 | Sends the provided data to the specified connection. 169 | See also: AWS API Documentation 170 | 171 | Exceptions 172 | 173 | :example: response = client.post_to_connection( 174 | Data=b'bytes'|file, 175 | ConnectionId='string' 176 | ) 177 | 178 | 179 | :type Data: bytes or seekable file-like object 180 | :param Data: [REQUIRED]\nThe data to be sent to the client specified by its connection id.\n 181 | 182 | :type ConnectionId: string 183 | :param ConnectionId: [REQUIRED]\nThe identifier of the connection that a specific client is using.\n 184 | 185 | :returns: 186 | ApiGatewayManagementApi.Client.exceptions.GoneException 187 | ApiGatewayManagementApi.Client.exceptions.LimitExceededException 188 | ApiGatewayManagementApi.Client.exceptions.PayloadTooLargeException 189 | ApiGatewayManagementApi.Client.exceptions.ForbiddenException 190 | 191 | """ 192 | pass 193 | 194 | -------------------------------------------------------------------------------- /pyboto3/augmentedairuntime.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def delete_human_loop(HumanLoopName=None): 38 | """ 39 | Deletes the specified human loop for a flow definition. 40 | See also: AWS API Documentation 41 | 42 | Exceptions 43 | 44 | :example: response = client.delete_human_loop( 45 | HumanLoopName='string' 46 | ) 47 | 48 | 49 | :type HumanLoopName: string 50 | :param HumanLoopName: [REQUIRED]\nThe name of the human loop that you want to delete.\n 51 | 52 | :rtype: dict 53 | ReturnsResponse Syntax{} 54 | 55 | 56 | Response Structure 57 | 58 | (dict) -- 59 | 60 | 61 | 62 | Exceptions 63 | 64 | AugmentedAIRuntime.Client.exceptions.ValidationException 65 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 66 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 67 | AugmentedAIRuntime.Client.exceptions.InternalServerException 68 | 69 | 70 | :return: {} 71 | 72 | 73 | :returns: 74 | AugmentedAIRuntime.Client.exceptions.ValidationException 75 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 76 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 77 | AugmentedAIRuntime.Client.exceptions.InternalServerException 78 | 79 | """ 80 | pass 81 | 82 | def describe_human_loop(HumanLoopName=None): 83 | """ 84 | Returns information about the specified human loop. 85 | See also: AWS API Documentation 86 | 87 | Exceptions 88 | 89 | :example: response = client.describe_human_loop( 90 | HumanLoopName='string' 91 | ) 92 | 93 | 94 | :type HumanLoopName: string 95 | :param HumanLoopName: [REQUIRED]\nThe name of the human loop that you want information about.\n 96 | 97 | :rtype: dict 98 | ReturnsResponse Syntax{ 99 | 'CreationTime': datetime(2015, 1, 1), 100 | 'FailureReason': 'string', 101 | 'FailureCode': 'string', 102 | 'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping', 103 | 'HumanLoopName': 'string', 104 | 'HumanLoopArn': 'string', 105 | 'FlowDefinitionArn': 'string', 106 | 'HumanLoopOutput': { 107 | 'OutputS3Uri': 'string' 108 | } 109 | } 110 | 111 | 112 | Response Structure 113 | 114 | (dict) -- 115 | CreationTime (datetime) --The creation time when Amazon Augmented AI created the human loop. 116 | 117 | FailureReason (string) --The reason why a human loop failed. The failure reason is returned when the status of the human loop is Failed . 118 | 119 | FailureCode (string) --A failure code that identifies the type of failure. 120 | 121 | HumanLoopStatus (string) --The status of the human loop. 122 | 123 | HumanLoopName (string) --The name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up to 63 characters. Valid characters: a-z, 0-9, and - (hyphen). 124 | 125 | HumanLoopArn (string) --The Amazon Resource Name (ARN) of the human loop. 126 | 127 | FlowDefinitionArn (string) --The Amazon Resource Name (ARN) of the flow definition. 128 | 129 | HumanLoopOutput (dict) --An object that contains information about the output of the human loop. 130 | 131 | OutputS3Uri (string) --The location of the Amazon S3 object where Amazon Augmented AI stores your human loop output. 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | Exceptions 141 | 142 | AugmentedAIRuntime.Client.exceptions.ValidationException 143 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 144 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 145 | AugmentedAIRuntime.Client.exceptions.InternalServerException 146 | 147 | 148 | :return: { 149 | 'CreationTime': datetime(2015, 1, 1), 150 | 'FailureReason': 'string', 151 | 'FailureCode': 'string', 152 | 'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping', 153 | 'HumanLoopName': 'string', 154 | 'HumanLoopArn': 'string', 155 | 'FlowDefinitionArn': 'string', 156 | 'HumanLoopOutput': { 157 | 'OutputS3Uri': 'string' 158 | } 159 | } 160 | 161 | 162 | """ 163 | pass 164 | 165 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 166 | """ 167 | Generate a presigned url given a client, its method, and arguments 168 | 169 | :type ClientMethod: string 170 | :param ClientMethod: The client method to presign for 171 | 172 | :type Params: dict 173 | :param Params: The parameters normally passed to\nClientMethod. 174 | 175 | :type ExpiresIn: int 176 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 177 | 178 | :type HttpMethod: string 179 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 180 | 181 | """ 182 | pass 183 | 184 | def get_paginator(operation_name=None): 185 | """ 186 | Create a paginator for an operation. 187 | 188 | :type operation_name: string 189 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 190 | 191 | :rtype: L{botocore.paginate.Paginator} 192 | ReturnsA paginator object. 193 | 194 | 195 | """ 196 | pass 197 | 198 | def get_waiter(waiter_name=None): 199 | """ 200 | Returns an object that can wait for some condition. 201 | 202 | :type waiter_name: str 203 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 204 | 205 | :rtype: botocore.waiter.Waiter 206 | 207 | 208 | """ 209 | pass 210 | 211 | def list_human_loops(CreationTimeAfter=None, CreationTimeBefore=None, FlowDefinitionArn=None, SortOrder=None, NextToken=None, MaxResults=None): 212 | """ 213 | Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included. 214 | See also: AWS API Documentation 215 | 216 | Exceptions 217 | 218 | :example: response = client.list_human_loops( 219 | CreationTimeAfter=datetime(2015, 1, 1), 220 | CreationTimeBefore=datetime(2015, 1, 1), 221 | FlowDefinitionArn='string', 222 | SortOrder='Ascending'|'Descending', 223 | NextToken='string', 224 | MaxResults=123 225 | ) 226 | 227 | 228 | :type CreationTimeAfter: datetime 229 | :param CreationTimeAfter: (Optional) The timestamp of the date when you want the human loops to begin in ISO 8601 format. For example, 2020-02-24 . 230 | 231 | :type CreationTimeBefore: datetime 232 | :param CreationTimeBefore: (Optional) The timestamp of the date before which you want the human loops to begin in ISO 8601 format. For example, 2020-02-24 . 233 | 234 | :type FlowDefinitionArn: string 235 | :param FlowDefinitionArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of a flow definition.\n 236 | 237 | :type SortOrder: string 238 | :param SortOrder: Optional. The order for displaying results. Valid values: Ascending and Descending . 239 | 240 | :type NextToken: string 241 | :param NextToken: A token to display the next page of results. 242 | 243 | :type MaxResults: integer 244 | :param MaxResults: The total number of items to return. If the total number of available items is more than the value specified in MaxResults , then a NextToken is returned in the output. You can use this token to display the next page of results. 245 | 246 | :rtype: dict 247 | 248 | ReturnsResponse Syntax 249 | { 250 | 'HumanLoopSummaries': [ 251 | { 252 | 'HumanLoopName': 'string', 253 | 'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping', 254 | 'CreationTime': datetime(2015, 1, 1), 255 | 'FailureReason': 'string', 256 | 'FlowDefinitionArn': 'string' 257 | }, 258 | ], 259 | 'NextToken': 'string' 260 | } 261 | 262 | 263 | Response Structure 264 | 265 | (dict) -- 266 | 267 | HumanLoopSummaries (list) -- 268 | An array of objects that contain information about the human loops. 269 | 270 | (dict) -- 271 | Summary information about the human loop. 272 | 273 | HumanLoopName (string) -- 274 | The name of the human loop. 275 | 276 | HumanLoopStatus (string) -- 277 | The status of the human loop. 278 | 279 | CreationTime (datetime) -- 280 | When Amazon Augmented AI created the human loop. 281 | 282 | FailureReason (string) -- 283 | The reason why the human loop failed. A failure reason is returned when the status of the human loop is Failed . 284 | 285 | FlowDefinitionArn (string) -- 286 | The Amazon Resource Name (ARN) of the flow definition used to configure the human loop. 287 | 288 | 289 | 290 | 291 | 292 | NextToken (string) -- 293 | A token to display the next page of results. 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | Exceptions 302 | 303 | AugmentedAIRuntime.Client.exceptions.ValidationException 304 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 305 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 306 | AugmentedAIRuntime.Client.exceptions.InternalServerException 307 | 308 | 309 | :return: { 310 | 'HumanLoopSummaries': [ 311 | { 312 | 'HumanLoopName': 'string', 313 | 'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping', 314 | 'CreationTime': datetime(2015, 1, 1), 315 | 'FailureReason': 'string', 316 | 'FlowDefinitionArn': 'string' 317 | }, 318 | ], 319 | 'NextToken': 'string' 320 | } 321 | 322 | 323 | :returns: 324 | AugmentedAIRuntime.Client.exceptions.ValidationException 325 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 326 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 327 | AugmentedAIRuntime.Client.exceptions.InternalServerException 328 | 329 | """ 330 | pass 331 | 332 | def start_human_loop(HumanLoopName=None, FlowDefinitionArn=None, HumanLoopInput=None, DataAttributes=None): 333 | """ 334 | Starts a human loop, provided that at least one activation condition is met. 335 | See also: AWS API Documentation 336 | 337 | Exceptions 338 | 339 | :example: response = client.start_human_loop( 340 | HumanLoopName='string', 341 | FlowDefinitionArn='string', 342 | HumanLoopInput={ 343 | 'InputContent': 'string' 344 | }, 345 | DataAttributes={ 346 | 'ContentClassifiers': [ 347 | 'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent', 348 | ] 349 | } 350 | ) 351 | 352 | 353 | :type HumanLoopName: string 354 | :param HumanLoopName: [REQUIRED]\nThe name of the human loop.\n 355 | 356 | :type FlowDefinitionArn: string 357 | :param FlowDefinitionArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the flow definition associated with this human loop.\n 358 | 359 | :type HumanLoopInput: dict 360 | :param HumanLoopInput: [REQUIRED]\nAn object that contains information about the human loop.\n\nInputContent (string) -- [REQUIRED]Serialized input from the human loop. The input must be a string representation of a file in JSON format.\n\n\n 361 | 362 | :type DataAttributes: dict 363 | :param DataAttributes: Attributes of the specified data. Use DataAttributes to specify if your data is free of personally identifiable information and/or free of adult content.\n\nContentClassifiers (list) -- [REQUIRED]Declares that your content is free of personally identifiable information or adult content.\nAmazon SageMaker can restrict the Amazon Mechanical Turk workers who can view your task based on this information.\n\n(string) --\n\n\n\n 364 | 365 | :rtype: dict 366 | 367 | ReturnsResponse Syntax 368 | { 369 | 'HumanLoopArn': 'string' 370 | } 371 | 372 | 373 | Response Structure 374 | 375 | (dict) -- 376 | 377 | HumanLoopArn (string) -- 378 | The Amazon Resource Name (ARN) of the human loop. 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | Exceptions 387 | 388 | AugmentedAIRuntime.Client.exceptions.ValidationException 389 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 390 | AugmentedAIRuntime.Client.exceptions.ServiceQuotaExceededException 391 | AugmentedAIRuntime.Client.exceptions.InternalServerException 392 | AugmentedAIRuntime.Client.exceptions.ConflictException 393 | 394 | 395 | :return: { 396 | 'HumanLoopArn': 'string' 397 | } 398 | 399 | 400 | :returns: 401 | AugmentedAIRuntime.Client.exceptions.ValidationException 402 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 403 | AugmentedAIRuntime.Client.exceptions.ServiceQuotaExceededException 404 | AugmentedAIRuntime.Client.exceptions.InternalServerException 405 | AugmentedAIRuntime.Client.exceptions.ConflictException 406 | 407 | """ 408 | pass 409 | 410 | def stop_human_loop(HumanLoopName=None): 411 | """ 412 | Stops the specified human loop. 413 | See also: AWS API Documentation 414 | 415 | Exceptions 416 | 417 | :example: response = client.stop_human_loop( 418 | HumanLoopName='string' 419 | ) 420 | 421 | 422 | :type HumanLoopName: string 423 | :param HumanLoopName: [REQUIRED]\nThe name of the human loop that you want to stop.\n 424 | 425 | :rtype: dict 426 | ReturnsResponse Syntax{} 427 | 428 | 429 | Response Structure 430 | 431 | (dict) -- 432 | 433 | 434 | 435 | Exceptions 436 | 437 | AugmentedAIRuntime.Client.exceptions.ValidationException 438 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 439 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 440 | AugmentedAIRuntime.Client.exceptions.InternalServerException 441 | 442 | 443 | :return: {} 444 | 445 | 446 | :returns: 447 | AugmentedAIRuntime.Client.exceptions.ValidationException 448 | AugmentedAIRuntime.Client.exceptions.ResourceNotFoundException 449 | AugmentedAIRuntime.Client.exceptions.ThrottlingException 450 | AugmentedAIRuntime.Client.exceptions.InternalServerException 451 | 452 | """ 453 | pass 454 | 455 | -------------------------------------------------------------------------------- /pyboto3/boto3_interface_generator.py: -------------------------------------------------------------------------------- 1 | """ 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2016 WavyCloud 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | """ 24 | import logging 25 | import os 26 | import sys 27 | import re 28 | from collections import OrderedDict 29 | 30 | import requests 31 | from bs4 import BeautifulSoup 32 | 33 | logging.getLogger().setLevel(logging.INFO) 34 | 35 | 36 | def get_param_description(params_soup): 37 | result = ''.join(params_soup.findAll(text=True)).replace('\n\n', '\n') 38 | i = result.find(' --') 39 | if i < 0: 40 | return '' 41 | else: 42 | return result[i + 4:].replace(' ', ' ') 43 | 44 | 45 | def get_params_soup(method_soup): 46 | fields_block = method_soup.find('dl', class_='docutils field-list') 47 | if not fields_block or not fields_block.find(string='Parameters'): 48 | return 49 | 50 | return fields_block.find('dd', class_='field-body') 51 | 52 | def get_request_syntax(method_soup): 53 | highlights = method_soup.findAll("div", {"class":"highlight-python"}) 54 | if highlights: 55 | return highlights[0].text 56 | else: 57 | return '' 58 | 59 | def get_description(method_soup): 60 | description = "" 61 | for desc in method_soup.contents[3].findAll('p', recursive=False): 62 | description += desc.text + os.linesep 63 | description = re.sub('Request Syntax', '', description, re.IGNORECASE) 64 | description = re.sub('Usage', '', description, re.IGNORECASE) 65 | return description 66 | 67 | def get_return_type(method_soup): 68 | match = re.search('Return type(.*)', method_soup.text, re.IGNORECASE) 69 | if match: 70 | return match.group(1) 71 | else: 72 | return "" 73 | 74 | def get_response_syntax(method_soup): 75 | highlights = method_soup.findAll("div", {"class": "highlight-python"}) 76 | if len(highlights) > 1: 77 | return highlights[1].text 78 | else: 79 | return '' 80 | 81 | 82 | def get_response_structure(method_soup): 83 | highlights = method_soup.findAll("ul", {"class": "simple"}) 84 | if len(highlights) > 1: 85 | return highlights[1].text 86 | else: 87 | return '' 88 | 89 | def iter_params(method_soup): 90 | params_soup = get_params_soup(method_soup) 91 | if not params_soup: 92 | return 93 | if params_soup.find('strong', recursive=False): 94 | description = get_param_description(params_soup) 95 | yield params_soup.strong.text, params_soup.em.text, description 96 | else: 97 | for li in params_soup.find('ul').find_all('li', recursive=False): 98 | description = get_param_description(li) 99 | yield li.strong.text, li.em.text, description 100 | 101 | 102 | def iter_methods(soup): 103 | methods_set = set() 104 | for method_html in soup.find_all('dl', class_='method'): 105 | method_name = method_html.find('tt', class_='descname').text 106 | if method_name in methods_set: 107 | continue 108 | methods_set.add(method_name) 109 | yield method_name, method_html 110 | 111 | 112 | def iter_method_params(soup): 113 | for method, method_soup in iter_methods(soup.find(id='client')): 114 | param_dict = OrderedDict((param, (type, description)) for param, type, description in iter_params(method_soup)) 115 | request_syntax = get_request_syntax(method_soup) 116 | description = get_description(method_soup) 117 | return_type = get_return_type(method_soup) 118 | response_syntax = get_response_syntax(method_soup) 119 | response_structure = get_response_structure(method_soup) 120 | yield method, \ 121 | param_dict, \ 122 | re.sub(r'[^\x00-\x7F]+', '', description).replace('\\n','\n'), \ 123 | re.sub(r'[^\x00-\x7F]+', '', request_syntax).replace('\\n','\n'), \ 124 | re.sub(r'[^\x00-\x7F]+', '', return_type).replace('\\n','\n'), \ 125 | re.sub(r'[^\x00-\x7F]+', '', response_syntax).replace('\\n','\n'), \ 126 | re.sub(r'[^\x00-\x7F]+', '', response_structure).replace('\\n','\n') 127 | 128 | 129 | def iter_method_params_description(soup): 130 | for method, method_soup in iter_methods(soup.find(id='client')): 131 | param_dict = OrderedDict((param, type) for param, type, description in iter_params(method_soup)) 132 | yield method, param_dict 133 | 134 | 135 | def to_python_type(param_type): 136 | return param_type 137 | 138 | 139 | def iter_all_services(services_url='https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/index.html'): 140 | soup = BeautifulSoup(requests.get(services_url)._content, 'html.parser') 141 | for x in soup.find_all(class_='toctree-wrapper compound'): 142 | for li in x.find_all('li', class_='toctree-l1'): 143 | yield li.a.text, services_url.replace('index.html', li.a.attrs['href']) 144 | 145 | 146 | def generate_service_code(url, dist_filepath): 147 | import tempfile 148 | tempdir = tempfile.gettempdir() 149 | cache_file = os.path.join(tempdir, os.path.basename(url)) 150 | if os.path.exists(cache_file): 151 | content = open(cache_file, 'r').read() 152 | else: 153 | content = str(requests.get(url)._content) 154 | with open(cache_file, 'w+') as f: 155 | f.write(content) 156 | soup = BeautifulSoup(content, 'html.parser') 157 | import codecs 158 | with codecs.open(dist_filepath, 'w+', encoding='utf-8') as f: 159 | for line in iter_code_lines(soup): 160 | f.write('{}\n'.format(re.sub(r'[^\x00-\x7F]+', ' ', line))) 161 | 162 | return soup 163 | 164 | 165 | def get_init_path(): 166 | return os.path.join(os.path.dirname(__file__), '__init__.py') 167 | 168 | 169 | def append_class_to_init(service_name, class_name): 170 | with open(get_init_path(), 'a') as f: 171 | line = 'from pyboto3.{} import {}\n'.format(service_name, class_name) 172 | f.write(line) 173 | 174 | 175 | replacement_name = { 176 | 'lambda': 'lambda_' 177 | } 178 | def get_filename(service_name): 179 | filename = service_name.lower() 180 | if filename in replacement_name: 181 | filename = replacement_name[filename] 182 | return filename 183 | 184 | 185 | def generate_all_services_code(dir_path): 186 | open(get_init_path(), 'w+').close() 187 | clients = [] 188 | for service_name, url in iter_all_services(): 189 | filename = get_filename(service_name) 190 | dist_filepath = os.path.join(dir_path, '{}.py'.format(filename)) 191 | logging.info("Generating code for service {} to {}".format(service_name, dist_filepath)) 192 | service_soup = generate_service_code(url, dist_filepath) 193 | client_name = get_client_name(service_soup) 194 | logging.info("Code for service {} generated successfully to {}".format(service_name, dist_filepath)) 195 | clients.append(client_name) 196 | 197 | 198 | with open(os.path.join(os.path.dirname(get_init_path()), 'clients.py'), 'w+') as f: 199 | f.write('import boto3{}'.format(os.linesep)) 200 | for client in clients: 201 | var_name = client.replace('-', '_') 202 | if var_name in replacement_name: 203 | var_name = replacement_name[var_name] 204 | f.write('{} = boto3.client("{}"){}'.format(var_name, client, os.linesep)) 205 | f.write('""":type : pyboto3.{}"""{}'.format(var_name, os.linesep)) 206 | 207 | def get_method_description(method_soup): 208 | return method_soup.dd.p.text 209 | 210 | 211 | def clean_param_description(param_description, indent=3): 212 | result = param_description 213 | result = result.replace('"', "'") 214 | result = result.replace('\n\n', '\n') 215 | # indent params 216 | result = result.replace('\n', '\n' + ' ' * 4 * indent) 217 | return result 218 | 219 | 220 | def clean_class_name(name): 221 | return re.sub('[^a-zA-Z0-9]', '', name).capitalize() 222 | 223 | 224 | def get_class_name(service_soup): 225 | """ 226 | : 227 | :param service_soup: 228 | :return: 229 | :returns 230 | """ 231 | return clean_class_name(service_soup.find(class_='descclassname').text.strip('.')) 232 | 233 | def get_client_name(service_soup): 234 | """ 235 | : 236 | :param service_soup: 237 | :return: 238 | :returns 239 | """ 240 | return service_soup.find(class_='highlight').find(class_='s1').text.strip("'") 241 | 242 | 243 | 244 | def iter_code_lines(soup): 245 | ''' 246 | 247 | :param soup: 248 | :return: 249 | ''' 250 | yield "'''" 251 | yield globals()['__doc__'] 252 | yield "'''" 253 | yield "" 254 | for method_name, params, description, request_syntax, return_type, response_syntax, response_structure in iter_method_params(soup): 255 | yield 'def {}({}{}):'.format(method_name, '=None, '.join(params.keys()), 256 | '=None' if params else '') 257 | yield ' """' 258 | description = description or '' 259 | yield ' {}'.format(description.replace('\n', '\n ')) 260 | if request_syntax: 261 | yield ' :example: {}'.format(request_syntax.replace('\n', '\n ')) 262 | for param, (param_type, param_description) in params.items(): 263 | param_description = clean_param_description(param_description) 264 | yield ' :type {}: {}'.format(param, to_python_type(param_type)) 265 | yield ' :param {}: {}'.format(param, param_description) 266 | yield '' 267 | if return_type: 268 | yield ' :rtype: {}'.format(to_python_type(return_type)) 269 | if response_syntax: 270 | yield ' :return: {}'.format(response_syntax.replace('\n', '\n ')) 271 | if response_structure: 272 | yield ' :returns: {}'.format(response_structure.replace('\n', '\n ')) 273 | yield ' """' 274 | yield " pass" 275 | yield "" 276 | 277 | if __name__ == '__main__': 278 | generate_all_services_code(os.path.dirname(__file__)) 279 | -------------------------------------------------------------------------------- /pyboto3/ebs.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_snapshot_block(SnapshotId=None, BlockIndex=None, BlockToken=None): 71 | """ 72 | Returns the data in a block in an Amazon Elastic Block Store snapshot. 73 | See also: AWS API Documentation 74 | 75 | Exceptions 76 | 77 | :example: response = client.get_snapshot_block( 78 | SnapshotId='string', 79 | BlockIndex=123, 80 | BlockToken='string' 81 | ) 82 | 83 | 84 | :type SnapshotId: string 85 | :param SnapshotId: [REQUIRED]\nThe ID of the snapshot containing the block from which to get data.\n 86 | 87 | :type BlockIndex: integer 88 | :param BlockIndex: [REQUIRED]\nThe block index of the block from which to get data.\nObtain the BlockIndex by running the ListChangedBlocks or ListSnapshotBlocks operations.\n 89 | 90 | :type BlockToken: string 91 | :param BlockToken: [REQUIRED]\nThe block token of the block from which to get data.\nObtain the BlockToken by running the ListChangedBlocks or ListSnapshotBlocks operations.\n 92 | 93 | :rtype: dict 94 | 95 | ReturnsResponse Syntax 96 | { 97 | 'DataLength': 123, 98 | 'BlockData': StreamingBody(), 99 | 'Checksum': 'string', 100 | 'ChecksumAlgorithm': 'SHA256' 101 | } 102 | 103 | 104 | Response Structure 105 | 106 | (dict) -- 107 | 108 | DataLength (integer) -- 109 | The size of the data in the block. 110 | 111 | BlockData (StreamingBody) -- 112 | The data content of the block. 113 | 114 | Checksum (string) -- 115 | The checksum generated for the block, which is Base64 encoded. 116 | 117 | ChecksumAlgorithm (string) -- 118 | The algorithm used to generate the checksum for the block, such as SHA256. 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | Exceptions 127 | 128 | EBS.Client.exceptions.ValidationException 129 | EBS.Client.exceptions.ResourceNotFoundException 130 | 131 | 132 | :return: { 133 | 'DataLength': 123, 134 | 'BlockData': StreamingBody(), 135 | 'Checksum': 'string', 136 | 'ChecksumAlgorithm': 'SHA256' 137 | } 138 | 139 | 140 | :returns: 141 | EBS.Client.exceptions.ValidationException 142 | EBS.Client.exceptions.ResourceNotFoundException 143 | 144 | """ 145 | pass 146 | 147 | def get_waiter(waiter_name=None): 148 | """ 149 | Returns an object that can wait for some condition. 150 | 151 | :type waiter_name: str 152 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 153 | 154 | :rtype: botocore.waiter.Waiter 155 | 156 | 157 | """ 158 | pass 159 | 160 | def list_changed_blocks(FirstSnapshotId=None, SecondSnapshotId=None, NextToken=None, MaxResults=None, StartingBlockIndex=None): 161 | """ 162 | Returns the block indexes and block tokens for blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage. 163 | See also: AWS API Documentation 164 | 165 | Exceptions 166 | 167 | :example: response = client.list_changed_blocks( 168 | FirstSnapshotId='string', 169 | SecondSnapshotId='string', 170 | NextToken='string', 171 | MaxResults=123, 172 | StartingBlockIndex=123 173 | ) 174 | 175 | 176 | :type FirstSnapshotId: string 177 | :param FirstSnapshotId: The ID of the first snapshot to use for the comparison.\n\nWarning\nThe FirstSnapshotID parameter must be specified with a SecondSnapshotId parameter; otherwise, an error occurs.\n\n 178 | 179 | :type SecondSnapshotId: string 180 | :param SecondSnapshotId: [REQUIRED]\nThe ID of the second snapshot to use for the comparison.\n\nWarning\nThe SecondSnapshotId parameter must be specified with a FirstSnapshotID parameter; otherwise, an error occurs.\n\n 181 | 182 | :type NextToken: string 183 | :param NextToken: The token to request the next page of results. 184 | 185 | :type MaxResults: integer 186 | :param MaxResults: The number of results to return. 187 | 188 | :type StartingBlockIndex: integer 189 | :param StartingBlockIndex: The block index from which the comparison should start.\nThe list in the response will start from this block index or the next valid block index in the snapshots.\n 190 | 191 | :rtype: dict 192 | 193 | ReturnsResponse Syntax 194 | { 195 | 'ChangedBlocks': [ 196 | { 197 | 'BlockIndex': 123, 198 | 'FirstBlockToken': 'string', 199 | 'SecondBlockToken': 'string' 200 | }, 201 | ], 202 | 'ExpiryTime': datetime(2015, 1, 1), 203 | 'VolumeSize': 123, 204 | 'BlockSize': 123, 205 | 'NextToken': 'string' 206 | } 207 | 208 | 209 | Response Structure 210 | 211 | (dict) -- 212 | 213 | ChangedBlocks (list) -- 214 | An array of objects containing information about the changed blocks. 215 | 216 | (dict) -- 217 | A block of data in an Amazon Elastic Block Store snapshot that is different from another snapshot of the same volume/snapshot lineage. 218 | 219 | BlockIndex (integer) -- 220 | The block index. 221 | 222 | FirstBlockToken (string) -- 223 | The block token for the block index of the FirstSnapshotId specified in the ListChangedBlocks operation. This value is absent if the first snapshot does not have the changed block that is on the second snapshot. 224 | 225 | SecondBlockToken (string) -- 226 | The block token for the block index of the SecondSnapshotId specified in the ListChangedBlocks operation. 227 | 228 | 229 | 230 | 231 | 232 | ExpiryTime (datetime) -- 233 | The time when the BlockToken expires. 234 | 235 | VolumeSize (integer) -- 236 | The size of the volume in GB. 237 | 238 | BlockSize (integer) -- 239 | The size of the block. 240 | 241 | NextToken (string) -- 242 | The token to use to retrieve the next page of results. This value is null when there are no more results to return. 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | Exceptions 251 | 252 | EBS.Client.exceptions.ValidationException 253 | EBS.Client.exceptions.ResourceNotFoundException 254 | 255 | 256 | :return: { 257 | 'ChangedBlocks': [ 258 | { 259 | 'BlockIndex': 123, 260 | 'FirstBlockToken': 'string', 261 | 'SecondBlockToken': 'string' 262 | }, 263 | ], 264 | 'ExpiryTime': datetime(2015, 1, 1), 265 | 'VolumeSize': 123, 266 | 'BlockSize': 123, 267 | 'NextToken': 'string' 268 | } 269 | 270 | 271 | :returns: 272 | EBS.Client.exceptions.ValidationException 273 | EBS.Client.exceptions.ResourceNotFoundException 274 | 275 | """ 276 | pass 277 | 278 | def list_snapshot_blocks(SnapshotId=None, NextToken=None, MaxResults=None, StartingBlockIndex=None): 279 | """ 280 | Returns the block indexes and block tokens for blocks in an Amazon Elastic Block Store snapshot. 281 | See also: AWS API Documentation 282 | 283 | Exceptions 284 | 285 | :example: response = client.list_snapshot_blocks( 286 | SnapshotId='string', 287 | NextToken='string', 288 | MaxResults=123, 289 | StartingBlockIndex=123 290 | ) 291 | 292 | 293 | :type SnapshotId: string 294 | :param SnapshotId: [REQUIRED]\nThe ID of the snapshot from which to get block indexes and block tokens.\n 295 | 296 | :type NextToken: string 297 | :param NextToken: The token to request the next page of results. 298 | 299 | :type MaxResults: integer 300 | :param MaxResults: The number of results to return. 301 | 302 | :type StartingBlockIndex: integer 303 | :param StartingBlockIndex: The block index from which the list should start. The list in the response will start from this block index or the next valid block index in the snapshot. 304 | 305 | :rtype: dict 306 | 307 | ReturnsResponse Syntax 308 | { 309 | 'Blocks': [ 310 | { 311 | 'BlockIndex': 123, 312 | 'BlockToken': 'string' 313 | }, 314 | ], 315 | 'ExpiryTime': datetime(2015, 1, 1), 316 | 'VolumeSize': 123, 317 | 'BlockSize': 123, 318 | 'NextToken': 'string' 319 | } 320 | 321 | 322 | Response Structure 323 | 324 | (dict) -- 325 | 326 | Blocks (list) -- 327 | An array of objects containing information about the blocks. 328 | 329 | (dict) -- 330 | A block of data in an Amazon Elastic Block Store snapshot. 331 | 332 | BlockIndex (integer) -- 333 | The block index. 334 | 335 | BlockToken (string) -- 336 | The block token for the block index. 337 | 338 | 339 | 340 | 341 | 342 | ExpiryTime (datetime) -- 343 | The time when the BlockToken expires. 344 | 345 | VolumeSize (integer) -- 346 | The size of the volume in GB. 347 | 348 | BlockSize (integer) -- 349 | The size of the block. 350 | 351 | NextToken (string) -- 352 | The token to use to retrieve the next page of results. This value is null when there are no more results to return. 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | Exceptions 361 | 362 | EBS.Client.exceptions.ValidationException 363 | EBS.Client.exceptions.ResourceNotFoundException 364 | 365 | 366 | :return: { 367 | 'Blocks': [ 368 | { 369 | 'BlockIndex': 123, 370 | 'BlockToken': 'string' 371 | }, 372 | ], 373 | 'ExpiryTime': datetime(2015, 1, 1), 374 | 'VolumeSize': 123, 375 | 'BlockSize': 123, 376 | 'NextToken': 'string' 377 | } 378 | 379 | 380 | :returns: 381 | EBS.Client.exceptions.ValidationException 382 | EBS.Client.exceptions.ResourceNotFoundException 383 | 384 | """ 385 | pass 386 | 387 | -------------------------------------------------------------------------------- /pyboto3/ec2instanceconnect.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_waiter(waiter_name=None): 71 | """ 72 | Returns an object that can wait for some condition. 73 | 74 | :type waiter_name: str 75 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 76 | 77 | :rtype: botocore.waiter.Waiter 78 | 79 | 80 | """ 81 | pass 82 | 83 | def send_ssh_public_key(InstanceId=None, InstanceOSUser=None, SSHPublicKey=None, AvailabilityZone=None): 84 | """ 85 | Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds. 86 | See also: AWS API Documentation 87 | 88 | Exceptions 89 | 90 | :example: response = client.send_ssh_public_key( 91 | InstanceId='string', 92 | InstanceOSUser='string', 93 | SSHPublicKey='string', 94 | AvailabilityZone='string' 95 | ) 96 | 97 | 98 | :type InstanceId: string 99 | :param InstanceId: [REQUIRED]\nThe EC2 instance you wish to publish the SSH key to.\n 100 | 101 | :type InstanceOSUser: string 102 | :param InstanceOSUser: [REQUIRED]\nThe OS user on the EC2 instance whom the key may be used to authenticate as.\n 103 | 104 | :type SSHPublicKey: string 105 | :param SSHPublicKey: [REQUIRED]\nThe public key to be published to the instance. To use it after publication you must have the matching private key.\n 106 | 107 | :type AvailabilityZone: string 108 | :param AvailabilityZone: [REQUIRED]\nThe availability zone the EC2 instance was launched in.\n 109 | 110 | :rtype: dict 111 | 112 | ReturnsResponse Syntax 113 | { 114 | 'RequestId': 'string', 115 | 'Success': True|False 116 | } 117 | 118 | 119 | Response Structure 120 | 121 | (dict) -- 122 | 123 | RequestId (string) -- 124 | The request ID as logged by EC2 Connect. Please provide this when contacting AWS Support. 125 | 126 | Success (boolean) -- 127 | Indicates request success. 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | Exceptions 136 | 137 | EC2InstanceConnect.Client.exceptions.AuthException 138 | EC2InstanceConnect.Client.exceptions.InvalidArgsException 139 | EC2InstanceConnect.Client.exceptions.ServiceException 140 | EC2InstanceConnect.Client.exceptions.ThrottlingException 141 | EC2InstanceConnect.Client.exceptions.EC2InstanceNotFoundException 142 | 143 | 144 | :return: { 145 | 'RequestId': 'string', 146 | 'Success': True|False 147 | } 148 | 149 | 150 | :returns: 151 | EC2InstanceConnect.Client.exceptions.AuthException 152 | EC2InstanceConnect.Client.exceptions.InvalidArgsException 153 | EC2InstanceConnect.Client.exceptions.ServiceException 154 | EC2InstanceConnect.Client.exceptions.ThrottlingException 155 | EC2InstanceConnect.Client.exceptions.EC2InstanceNotFoundException 156 | 157 | """ 158 | pass 159 | 160 | -------------------------------------------------------------------------------- /pyboto3/forecastqueryservice.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_waiter(waiter_name=None): 71 | """ 72 | Returns an object that can wait for some condition. 73 | 74 | :type waiter_name: str 75 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 76 | 77 | :rtype: botocore.waiter.Waiter 78 | 79 | 80 | """ 81 | pass 82 | 83 | def query_forecast(ForecastArn=None, StartDate=None, EndDate=None, Filters=None, NextToken=None): 84 | """ 85 | Retrieves a forecast for a single item, filtered by the supplied criteria. 86 | The criteria is a key-value pair. The key is either item_id (or the equivalent non-timestamp, non-target field) from the TARGET_TIME_SERIES dataset, or one of the forecast dimensions specified as part of the FeaturizationConfig object. 87 | By default, QueryForecast returns the complete date range for the filtered forecast. You can request a specific date range. 88 | To get the full forecast, use the CreateForecastExportJob operation. 89 | See also: AWS API Documentation 90 | 91 | Exceptions 92 | 93 | :example: response = client.query_forecast( 94 | ForecastArn='string', 95 | StartDate='string', 96 | EndDate='string', 97 | Filters={ 98 | 'string': 'string' 99 | }, 100 | NextToken='string' 101 | ) 102 | 103 | 104 | :type ForecastArn: string 105 | :param ForecastArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the forecast to query.\n 106 | 107 | :type StartDate: string 108 | :param StartDate: The start date for the forecast. Specify the date using this format: yyyy-MM-dd\'T\'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T08:00:00. 109 | 110 | :type EndDate: string 111 | :param EndDate: The end date for the forecast. Specify the date using this format: yyyy-MM-dd\'T\'HH:mm:ss (ISO 8601 format). For example, 2015-01-01T20:00:00. 112 | 113 | :type Filters: dict 114 | :param Filters: [REQUIRED]\nThe filtering criteria to apply when retrieving the forecast. For example, to get the forecast for client_21 in the electricity usage dataset, specify the following:\n\n{'item_id' : 'client_21'}\nTo get the full forecast, use the CreateForecastExportJob operation.\n\n(string) --\n(string) --\n\n\n\n 115 | 116 | :type NextToken: string 117 | :param NextToken: If the result of the previous request was truncated, the response includes a NextToken . To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours. 118 | 119 | :rtype: dict 120 | 121 | ReturnsResponse Syntax 122 | { 123 | 'Forecast': { 124 | 'Predictions': { 125 | 'string': [ 126 | { 127 | 'Timestamp': 'string', 128 | 'Value': 123.0 129 | }, 130 | ] 131 | } 132 | } 133 | } 134 | 135 | 136 | Response Structure 137 | 138 | (dict) -- 139 | 140 | Forecast (dict) -- 141 | The forecast. 142 | 143 | Predictions (dict) -- 144 | The forecast. 145 | The string of the string-to-array map is one of the following values: 146 | 147 | p10 148 | p50 149 | p90 150 | 151 | 152 | (string) -- 153 | 154 | (list) -- 155 | 156 | (dict) -- 157 | The forecast value for a specific date. Part of the Forecast object. 158 | 159 | Timestamp (string) -- 160 | The timestamp of the specific forecast. 161 | 162 | Value (float) -- 163 | The forecast value. 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | Exceptions 182 | 183 | ForecastQueryService.Client.exceptions.ResourceNotFoundException 184 | ForecastQueryService.Client.exceptions.ResourceInUseException 185 | ForecastQueryService.Client.exceptions.InvalidInputException 186 | ForecastQueryService.Client.exceptions.LimitExceededException 187 | ForecastQueryService.Client.exceptions.InvalidNextTokenException 188 | 189 | 190 | :return: { 191 | 'Forecast': { 192 | 'Predictions': { 193 | 'string': [ 194 | { 195 | 'Timestamp': 'string', 196 | 'Value': 123.0 197 | }, 198 | ] 199 | } 200 | } 201 | } 202 | 203 | 204 | :returns: 205 | p10 206 | p50 207 | p90 208 | 209 | """ 210 | pass 211 | 212 | -------------------------------------------------------------------------------- /pyboto3/iotdataplane.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def delete_thing_shadow(thingName=None): 38 | """ 39 | Deletes the thing shadow for the specified thing. 40 | For more information, see DeleteThingShadow in the AWS IoT Developer Guide . 41 | See also: AWS API Documentation 42 | 43 | Exceptions 44 | 45 | :example: response = client.delete_thing_shadow( 46 | thingName='string' 47 | ) 48 | 49 | 50 | :type thingName: string 51 | :param thingName: [REQUIRED]\nThe name of the thing.\n 52 | 53 | :rtype: dict 54 | ReturnsResponse Syntax{ 55 | 'payload': StreamingBody() 56 | } 57 | 58 | 59 | Response Structure 60 | 61 | (dict) --The output from the DeleteThingShadow operation. 62 | 63 | payload (StreamingBody) --The state information, in JSON format. 64 | 65 | 66 | 67 | 68 | 69 | 70 | Exceptions 71 | 72 | IoTDataPlane.Client.exceptions.ResourceNotFoundException 73 | IoTDataPlane.Client.exceptions.InvalidRequestException 74 | IoTDataPlane.Client.exceptions.ThrottlingException 75 | IoTDataPlane.Client.exceptions.UnauthorizedException 76 | IoTDataPlane.Client.exceptions.ServiceUnavailableException 77 | IoTDataPlane.Client.exceptions.InternalFailureException 78 | IoTDataPlane.Client.exceptions.MethodNotAllowedException 79 | IoTDataPlane.Client.exceptions.UnsupportedDocumentEncodingException 80 | 81 | 82 | :return: { 83 | 'payload': StreamingBody() 84 | } 85 | 86 | 87 | """ 88 | pass 89 | 90 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 91 | """ 92 | Generate a presigned url given a client, its method, and arguments 93 | 94 | :type ClientMethod: string 95 | :param ClientMethod: The client method to presign for 96 | 97 | :type Params: dict 98 | :param Params: The parameters normally passed to\nClientMethod. 99 | 100 | :type ExpiresIn: int 101 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 102 | 103 | :type HttpMethod: string 104 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 105 | 106 | """ 107 | pass 108 | 109 | def get_paginator(operation_name=None): 110 | """ 111 | Create a paginator for an operation. 112 | 113 | :type operation_name: string 114 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 115 | 116 | :rtype: L{botocore.paginate.Paginator} 117 | ReturnsA paginator object. 118 | 119 | 120 | """ 121 | pass 122 | 123 | def get_thing_shadow(thingName=None): 124 | """ 125 | Gets the thing shadow for the specified thing. 126 | For more information, see GetThingShadow in the AWS IoT Developer Guide . 127 | See also: AWS API Documentation 128 | 129 | Exceptions 130 | 131 | :example: response = client.get_thing_shadow( 132 | thingName='string' 133 | ) 134 | 135 | 136 | :type thingName: string 137 | :param thingName: [REQUIRED]\nThe name of the thing.\n 138 | 139 | :rtype: dict 140 | ReturnsResponse Syntax{ 141 | 'payload': StreamingBody() 142 | } 143 | 144 | 145 | Response Structure 146 | 147 | (dict) --The output from the GetThingShadow operation. 148 | 149 | payload (StreamingBody) --The state information, in JSON format. 150 | 151 | 152 | 153 | 154 | 155 | 156 | Exceptions 157 | 158 | IoTDataPlane.Client.exceptions.InvalidRequestException 159 | IoTDataPlane.Client.exceptions.ResourceNotFoundException 160 | IoTDataPlane.Client.exceptions.ThrottlingException 161 | IoTDataPlane.Client.exceptions.UnauthorizedException 162 | IoTDataPlane.Client.exceptions.ServiceUnavailableException 163 | IoTDataPlane.Client.exceptions.InternalFailureException 164 | IoTDataPlane.Client.exceptions.MethodNotAllowedException 165 | IoTDataPlane.Client.exceptions.UnsupportedDocumentEncodingException 166 | 167 | 168 | :return: { 169 | 'payload': StreamingBody() 170 | } 171 | 172 | 173 | """ 174 | pass 175 | 176 | def get_waiter(waiter_name=None): 177 | """ 178 | Returns an object that can wait for some condition. 179 | 180 | :type waiter_name: str 181 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 182 | 183 | :rtype: botocore.waiter.Waiter 184 | 185 | 186 | """ 187 | pass 188 | 189 | def publish(topic=None, qos=None, payload=None): 190 | """ 191 | Publishes state information. 192 | For more information, see HTTP Protocol in the AWS IoT Developer Guide . 193 | See also: AWS API Documentation 194 | 195 | Exceptions 196 | 197 | :example: response = client.publish( 198 | topic='string', 199 | qos=123, 200 | payload=b'bytes'|file 201 | ) 202 | 203 | 204 | :type topic: string 205 | :param topic: [REQUIRED]\nThe name of the MQTT topic.\n 206 | 207 | :type qos: integer 208 | :param qos: The Quality of Service (QoS) level. 209 | 210 | :type payload: bytes or seekable file-like object 211 | :param payload: The state information, in JSON format. 212 | 213 | :returns: 214 | IoTDataPlane.Client.exceptions.InternalFailureException 215 | IoTDataPlane.Client.exceptions.InvalidRequestException 216 | IoTDataPlane.Client.exceptions.UnauthorizedException 217 | IoTDataPlane.Client.exceptions.MethodNotAllowedException 218 | 219 | """ 220 | pass 221 | 222 | def update_thing_shadow(thingName=None, payload=None): 223 | """ 224 | Updates the thing shadow for the specified thing. 225 | For more information, see UpdateThingShadow in the AWS IoT Developer Guide . 226 | See also: AWS API Documentation 227 | 228 | Exceptions 229 | 230 | :example: response = client.update_thing_shadow( 231 | thingName='string', 232 | payload=b'bytes'|file 233 | ) 234 | 235 | 236 | :type thingName: string 237 | :param thingName: [REQUIRED]\nThe name of the thing.\n 238 | 239 | :type payload: bytes or seekable file-like object 240 | :param payload: [REQUIRED]\nThe state information, in JSON format.\n 241 | 242 | :rtype: dict 243 | 244 | ReturnsResponse Syntax 245 | { 246 | 'payload': StreamingBody() 247 | } 248 | 249 | 250 | Response Structure 251 | 252 | (dict) -- 253 | The output from the UpdateThingShadow operation. 254 | 255 | payload (StreamingBody) -- 256 | The state information, in JSON format. 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | Exceptions 265 | 266 | IoTDataPlane.Client.exceptions.ConflictException 267 | IoTDataPlane.Client.exceptions.RequestEntityTooLargeException 268 | IoTDataPlane.Client.exceptions.InvalidRequestException 269 | IoTDataPlane.Client.exceptions.ThrottlingException 270 | IoTDataPlane.Client.exceptions.UnauthorizedException 271 | IoTDataPlane.Client.exceptions.ServiceUnavailableException 272 | IoTDataPlane.Client.exceptions.InternalFailureException 273 | IoTDataPlane.Client.exceptions.MethodNotAllowedException 274 | IoTDataPlane.Client.exceptions.UnsupportedDocumentEncodingException 275 | 276 | 277 | :return: { 278 | 'payload': StreamingBody() 279 | } 280 | 281 | 282 | :returns: 283 | IoTDataPlane.Client.exceptions.ConflictException 284 | IoTDataPlane.Client.exceptions.RequestEntityTooLargeException 285 | IoTDataPlane.Client.exceptions.InvalidRequestException 286 | IoTDataPlane.Client.exceptions.ThrottlingException 287 | IoTDataPlane.Client.exceptions.UnauthorizedException 288 | IoTDataPlane.Client.exceptions.ServiceUnavailableException 289 | IoTDataPlane.Client.exceptions.InternalFailureException 290 | IoTDataPlane.Client.exceptions.MethodNotAllowedException 291 | IoTDataPlane.Client.exceptions.UnsupportedDocumentEncodingException 292 | 293 | """ 294 | pass 295 | 296 | -------------------------------------------------------------------------------- /pyboto3/kinesisvideomedia.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_media(StreamName=None, StreamARN=None, StartSelector=None): 57 | """ 58 | Use this API to retrieve media content from a Kinesis video stream. In the request, you identify the stream name or stream Amazon Resource Name (ARN), and the starting chunk. Kinesis Video Streams then returns a stream of chunks in order by fragment number. 59 | When you put media data (fragments) on a stream, Kinesis Video Streams stores each incoming fragment and related metadata in what is called a "chunk." For more information, see PutMedia . The GetMedia API returns a stream of these chunks starting from the chunk that you specify in the request. 60 | The following limits apply when using the GetMedia API: 61 | See also: AWS API Documentation 62 | 63 | Exceptions 64 | 65 | :example: response = client.get_media( 66 | StreamName='string', 67 | StreamARN='string', 68 | StartSelector={ 69 | 'StartSelectorType': 'FRAGMENT_NUMBER'|'SERVER_TIMESTAMP'|'PRODUCER_TIMESTAMP'|'NOW'|'EARLIEST'|'CONTINUATION_TOKEN', 70 | 'AfterFragmentNumber': 'string', 71 | 'StartTimestamp': datetime(2015, 1, 1), 72 | 'ContinuationToken': 'string' 73 | } 74 | ) 75 | 76 | 77 | :type StreamName: string 78 | :param StreamName: The Kinesis video stream name from where you want to get the media content. If you don\'t specify the streamName , you must specify the streamARN . 79 | 80 | :type StreamARN: string 81 | :param StreamARN: The ARN of the stream from where you want to get the media content. If you don\'t specify the streamARN , you must specify the streamName . 82 | 83 | :type StartSelector: dict 84 | :param StartSelector: [REQUIRED]\nIdentifies the starting chunk to get from the specified stream.\n\nStartSelectorType (string) -- [REQUIRED]Identifies the fragment on the Kinesis video stream where you want to start getting the data from.\n\nNOW - Start with the latest chunk on the stream.\nEARLIEST - Start with earliest available chunk on the stream.\nFRAGMENT_NUMBER - Start with the chunk after a specific fragment. You must also specify the AfterFragmentNumber parameter.\nPRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with the chunk containing a fragment with the specified producer or server timestamp. You specify the timestamp by adding StartTimestamp .\nCONTINUATION_TOKEN - Read using the specified continuation token.\n\n\nNote\nIf you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the startSelectorType , you don\'t provide any additional information in the startSelector .\n\n\nAfterFragmentNumber (string) --Specifies the fragment number from where you want the GetMedia API to start returning the fragments.\n\nStartTimestamp (datetime) --A timestamp value. This value is required if you choose the PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the startSelectorType . The GetMedia API then starts with the chunk containing the fragment that has the specified timestamp.\n\nContinuationToken (string) --Continuation token that Kinesis Video Streams returned in the previous GetMedia response. The GetMedia API then starts with the chunk identified by the continuation token.\n\n\n 85 | 86 | :rtype: dict 87 | 88 | ReturnsResponse Syntax 89 | { 90 | 'ContentType': 'string', 91 | 'Payload': StreamingBody() 92 | } 93 | 94 | 95 | Response Structure 96 | 97 | (dict) -- 98 | 99 | ContentType (string) -- 100 | The content type of the requested media. 101 | 102 | Payload (StreamingBody) -- 103 | The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information about the chunks, see . The chunks that Kinesis Video Streams returns in the GetMedia call also include the following additional Matroska (MKV) tags: 104 | 105 | AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call terminates, you can use this continuation token in your next request to get the next chunk where the last request terminated. 106 | AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream. 107 | AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk. 108 | AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment. 109 | AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment. 110 | 111 | The following tags will be present if an error occurs: 112 | 113 | AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop. 114 | AWS_KINESISVIDEO_ERROR_ID: Integer code of the error. 115 | 116 | The error codes are as follows: 117 | 118 | 3002 - Error writing to the stream 119 | 4000 - Requested fragment is not found 120 | 4500 - Access denied for the stream\'s KMS key 121 | 4501 - Stream\'s KMS key is disabled 122 | 4502 - Validation error on the stream\'s KMS key 123 | 4503 - KMS key specified in the stream is unavailable 124 | 4504 - Invalid usage of the KMS key specified in the stream 125 | 4505 - Invalid state of the KMS key specified in the stream 126 | 4506 - Unable to find the KMS key specified in the stream 127 | 5000 - Internal error 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | Exceptions 137 | 138 | KinesisVideoMedia.Client.exceptions.ResourceNotFoundException 139 | KinesisVideoMedia.Client.exceptions.NotAuthorizedException 140 | KinesisVideoMedia.Client.exceptions.InvalidEndpointException 141 | KinesisVideoMedia.Client.exceptions.ClientLimitExceededException 142 | KinesisVideoMedia.Client.exceptions.ConnectionLimitExceededException 143 | KinesisVideoMedia.Client.exceptions.InvalidArgumentException 144 | 145 | 146 | :return: { 147 | 'ContentType': 'string', 148 | 'Payload': StreamingBody() 149 | } 150 | 151 | 152 | :returns: 153 | x-amz-ErrorType HTTP header \xe2\x80\x93 contains a more specific error type in addition to what the HTTP status code provides. 154 | x-amz-RequestId HTTP header \xe2\x80\x93 if you want to report an issue to AWS, the support team can better diagnose the problem if given the Request Id. 155 | 156 | """ 157 | pass 158 | 159 | def get_paginator(operation_name=None): 160 | """ 161 | Create a paginator for an operation. 162 | 163 | :type operation_name: string 164 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 165 | 166 | :rtype: L{botocore.paginate.Paginator} 167 | ReturnsA paginator object. 168 | 169 | 170 | """ 171 | pass 172 | 173 | def get_waiter(waiter_name=None): 174 | """ 175 | Returns an object that can wait for some condition. 176 | 177 | :type waiter_name: str 178 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 179 | 180 | :rtype: botocore.waiter.Waiter 181 | 182 | 183 | """ 184 | pass 185 | 186 | -------------------------------------------------------------------------------- /pyboto3/kinesisvideosignalingchannels.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_ice_server_config(ChannelARN=None, ClientId=None, Service=None, Username=None): 57 | """ 58 | Gets the Interactive Connectivity Establishment (ICE) server configuration information, including URIs, username, and password which can be used to configure the WebRTC connection. The ICE component uses this configuration information to setup the WebRTC connection, including authenticating with the Traversal Using Relays around NAT (TURN) relay server. 59 | TURN is a protocol that is used to improve the connectivity of peer-to-peer applications. By providing a cloud-based relay service, TURN ensures that a connection can be established even when one or more peers are incapable of a direct peer-to-peer connection. For more information, see A REST API For Access To TURN Services . 60 | You can invoke this API to establish a fallback mechanism in case either of the peers is unable to establish a direct peer-to-peer connection over a signaling channel. You must specify either a signaling channel ARN or the client ID in order to invoke this API. 61 | See also: AWS API Documentation 62 | 63 | Exceptions 64 | 65 | :example: response = client.get_ice_server_config( 66 | ChannelARN='string', 67 | ClientId='string', 68 | Service='TURN', 69 | Username='string' 70 | ) 71 | 72 | 73 | :type ChannelARN: string 74 | :param ChannelARN: [REQUIRED]\nThe ARN of the signaling channel to be used for the peer-to-peer connection between configured peers.\n 75 | 76 | :type ClientId: string 77 | :param ClientId: Unique identifier for the viewer. Must be unique within the signaling channel. 78 | 79 | :type Service: string 80 | :param Service: Specifies the desired service. Currently, TURN is the only valid value. 81 | 82 | :type Username: string 83 | :param Username: An optional user ID to be associated with the credentials. 84 | 85 | :rtype: dict 86 | 87 | ReturnsResponse Syntax 88 | { 89 | 'IceServerList': [ 90 | { 91 | 'Uris': [ 92 | 'string', 93 | ], 94 | 'Username': 'string', 95 | 'Password': 'string', 96 | 'Ttl': 123 97 | }, 98 | ] 99 | } 100 | 101 | 102 | Response Structure 103 | 104 | (dict) -- 105 | 106 | IceServerList (list) -- 107 | The list of ICE server information objects. 108 | 109 | (dict) -- 110 | A structure for the ICE server connection data. 111 | 112 | Uris (list) -- 113 | An array of URIs, in the form specified in the I-D.petithuguenin-behave-turn-uris spec. These URIs provide the different addresses and/or protocols that can be used to reach the TURN server. 114 | 115 | (string) -- 116 | 117 | 118 | Username (string) -- 119 | A username to login to the ICE server. 120 | 121 | Password (string) -- 122 | A password to login to the ICE server. 123 | 124 | Ttl (integer) -- 125 | The period of time, in seconds, during which the username and password are valid. 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | Exceptions 138 | 139 | KinesisVideoSignalingChannels.Client.exceptions.InvalidClientException 140 | KinesisVideoSignalingChannels.Client.exceptions.SessionExpiredException 141 | KinesisVideoSignalingChannels.Client.exceptions.ClientLimitExceededException 142 | KinesisVideoSignalingChannels.Client.exceptions.ResourceNotFoundException 143 | KinesisVideoSignalingChannels.Client.exceptions.InvalidArgumentException 144 | KinesisVideoSignalingChannels.Client.exceptions.NotAuthorizedException 145 | 146 | 147 | :return: { 148 | 'IceServerList': [ 149 | { 150 | 'Uris': [ 151 | 'string', 152 | ], 153 | 'Username': 'string', 154 | 'Password': 'string', 155 | 'Ttl': 123 156 | }, 157 | ] 158 | } 159 | 160 | 161 | :returns: 162 | (string) -- 163 | 164 | """ 165 | pass 166 | 167 | def get_paginator(operation_name=None): 168 | """ 169 | Create a paginator for an operation. 170 | 171 | :type operation_name: string 172 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 173 | 174 | :rtype: L{botocore.paginate.Paginator} 175 | ReturnsA paginator object. 176 | 177 | 178 | """ 179 | pass 180 | 181 | def get_waiter(waiter_name=None): 182 | """ 183 | Returns an object that can wait for some condition. 184 | 185 | :type waiter_name: str 186 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 187 | 188 | :rtype: botocore.waiter.Waiter 189 | 190 | 191 | """ 192 | pass 193 | 194 | def send_alexa_offer_to_master(ChannelARN=None, SenderClientId=None, MessagePayload=None): 195 | """ 196 | This API allows you to connect WebRTC-enabled devices with Alexa display devices. When invoked, it sends the Alexa Session Description Protocol (SDP) offer to the master peer. The offer is delivered as soon as the master is connected to the specified signaling channel. This API returns the SDP answer from the connected master. If the master is not connected to the signaling channel, redelivery requests are made until the message expires. 197 | See also: AWS API Documentation 198 | 199 | Exceptions 200 | 201 | :example: response = client.send_alexa_offer_to_master( 202 | ChannelARN='string', 203 | SenderClientId='string', 204 | MessagePayload='string' 205 | ) 206 | 207 | 208 | :type ChannelARN: string 209 | :param ChannelARN: [REQUIRED]\nThe ARN of the signaling channel by which Alexa and the master peer communicate.\n 210 | 211 | :type SenderClientId: string 212 | :param SenderClientId: [REQUIRED]\nThe unique identifier for the sender client.\n 213 | 214 | :type MessagePayload: string 215 | :param MessagePayload: [REQUIRED]\nThe base64-encoded SDP offer content.\n 216 | 217 | :rtype: dict 218 | 219 | ReturnsResponse Syntax 220 | { 221 | 'Answer': 'string' 222 | } 223 | 224 | 225 | Response Structure 226 | 227 | (dict) -- 228 | 229 | Answer (string) -- 230 | The base64-encoded SDP answer content. 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | Exceptions 239 | 240 | KinesisVideoSignalingChannels.Client.exceptions.ClientLimitExceededException 241 | KinesisVideoSignalingChannels.Client.exceptions.ResourceNotFoundException 242 | KinesisVideoSignalingChannels.Client.exceptions.InvalidArgumentException 243 | KinesisVideoSignalingChannels.Client.exceptions.NotAuthorizedException 244 | 245 | 246 | :return: { 247 | 'Answer': 'string' 248 | } 249 | 250 | 251 | :returns: 252 | KinesisVideoSignalingChannels.Client.exceptions.ClientLimitExceededException 253 | KinesisVideoSignalingChannels.Client.exceptions.ResourceNotFoundException 254 | KinesisVideoSignalingChannels.Client.exceptions.InvalidArgumentException 255 | KinesisVideoSignalingChannels.Client.exceptions.NotAuthorizedException 256 | 257 | """ 258 | pass 259 | 260 | -------------------------------------------------------------------------------- /pyboto3/marketplacecommerceanalytics.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_data_set(dataSetType=None, dataSetPublicationDate=None, roleNameArn=None, destinationS3BucketName=None, destinationS3Prefix=None, snsTopicArn=None, customerDefinedValues=None): 38 | """ 39 | Given a data set type and data set publication date, asynchronously publishes the requested data set to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy. 40 | See also: AWS API Documentation 41 | 42 | Exceptions 43 | 44 | :example: response = client.generate_data_set( 45 | dataSetType='customer_subscriber_hourly_monthly_subscriptions'|'customer_subscriber_annual_subscriptions'|'daily_business_usage_by_instance_type'|'daily_business_fees'|'daily_business_free_trial_conversions'|'daily_business_new_instances'|'daily_business_new_product_subscribers'|'daily_business_canceled_product_subscribers'|'monthly_revenue_billing_and_revenue_data'|'monthly_revenue_annual_subscriptions'|'monthly_revenue_field_demonstration_usage'|'monthly_revenue_flexible_payment_schedule'|'disbursed_amount_by_product'|'disbursed_amount_by_product_with_uncollected_funds'|'disbursed_amount_by_instance_hours'|'disbursed_amount_by_customer_geo'|'disbursed_amount_by_age_of_uncollected_funds'|'disbursed_amount_by_age_of_disbursed_funds'|'disbursed_amount_by_age_of_past_due_funds'|'disbursed_amount_by_uncollected_funds_breakdown'|'customer_profile_by_industry'|'customer_profile_by_revenue'|'customer_profile_by_geography'|'sales_compensation_billed_revenue'|'us_sales_and_use_tax_records', 46 | dataSetPublicationDate=datetime(2015, 1, 1), 47 | roleNameArn='string', 48 | destinationS3BucketName='string', 49 | destinationS3Prefix='string', 50 | snsTopicArn='string', 51 | customerDefinedValues={ 52 | 'string': 'string' 53 | } 54 | ) 55 | 56 | 57 | :type dataSetType: string 58 | :param dataSetType: [REQUIRED]\nThe desired data set type.\n\ncustomer_subscriber_hourly_monthly_subscriptions From 2017-09-15 to present: Available daily by 24:00 UTC.\ncustomer_subscriber_annual_subscriptions From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_usage_by_instance_type From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_fees From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_free_trial_conversions From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_new_instances From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_new_product_subscribers From 2017-09-15 to present: Available daily by 24:00 UTC.\ndaily_business_canceled_product_subscribers From 2017-09-15 to present: Available daily by 24:00 UTC.\nmonthly_revenue_billing_and_revenue_data From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes metered transactions (e.g. hourly) from one month prior.\nmonthly_revenue_annual_subscriptions From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes up-front software charges (e.g. annual) from one month prior.\nmonthly_revenue_field_demonstration_usage From 2018-03-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.\nmonthly_revenue_flexible_payment_schedule From 2018-11-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.\ndisbursed_amount_by_product From 2017-09-15 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_instance_hours From 2017-09-15 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_customer_geo From 2017-09-15 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_age_of_uncollected_funds From 2017-09-15 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_age_of_disbursed_funds From 2017-09-15 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_age_of_past_due_funds From 2018-04-07 to present: Available every 30 days by 24:00 UTC.\ndisbursed_amount_by_uncollected_funds_breakdown From 2019-10-04 to present: Available every 30 days by 24:00 UTC.\nsales_compensation_billed_revenue From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC. Data includes metered transactions (e.g. hourly) from one month prior, and up-front software charges (e.g. annual) from one month prior.\nus_sales_and_use_tax_records From 2017-09-15 to present: Available monthly on the 15th day of the month by 24:00 UTC.\n\n 59 | 60 | :type dataSetPublicationDate: datetime 61 | :param dataSetPublicationDate: [REQUIRED] The date a data set was published. For daily data sets, provide a date with day-level granularity for the desired day. For monthly data sets except those with prefix disbursed_amount, provide a date with month-level granularity for the desired month (the day value will be ignored). For data sets with prefix disbursed_amount, provide a date with day-level granularity for the desired day. For these data sets we will look backwards in time over the range of 31 days until the first data set is found (the latest one). 62 | 63 | :type roleNameArn: string 64 | :param roleNameArn: [REQUIRED] The Amazon Resource Name (ARN) of the Role with an attached permissions policy to interact with the provided AWS services. 65 | 66 | :type destinationS3BucketName: string 67 | :param destinationS3BucketName: [REQUIRED] The name (friendly name, not ARN) of the destination S3 bucket. 68 | 69 | :type destinationS3Prefix: string 70 | :param destinationS3Prefix: (Optional) The desired S3 prefix for the published data set, similar to a directory path in standard file systems. For example, if given the bucket name 'mybucket' and the prefix 'myprefix/mydatasets', the output file 'outputfile' would be published to 's3://mybucket/myprefix/mydatasets/outputfile'. If the prefix directory structure does not exist, it will be created. If no prefix is provided, the data set will be published to the S3 bucket root. 71 | 72 | :type snsTopicArn: string 73 | :param snsTopicArn: [REQUIRED] Amazon Resource Name (ARN) for the SNS Topic that will be notified when the data set has been published or if an error has occurred. 74 | 75 | :type customerDefinedValues: dict 76 | :param customerDefinedValues: (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file. These key-value pairs can be used to correlated responses with tracking information from other systems.\n\n(string) --\n(string) --\n\n\n\n 77 | 78 | :rtype: dict 79 | 80 | ReturnsResponse Syntax 81 | { 82 | 'dataSetRequestId': 'string' 83 | } 84 | 85 | 86 | Response Structure 87 | 88 | (dict) -- Container for the result of the GenerateDataSet operation. 89 | dataSetRequestId (string) -- A unique identifier representing a specific request to the GenerateDataSet operation. This identifier can be used to correlate a request with notifications from the SNS topic. 90 | 91 | 92 | 93 | 94 | 95 | 96 | Exceptions 97 | 98 | MarketplaceCommerceAnalytics.Client.exceptions.MarketplaceCommerceAnalyticsException 99 | 100 | 101 | :return: { 102 | 'dataSetRequestId': 'string' 103 | } 104 | 105 | 106 | :returns: 107 | (dict) -- Container for the result of the GenerateDataSet operation. 108 | dataSetRequestId (string) -- A unique identifier representing a specific request to the GenerateDataSet operation. This identifier can be used to correlate a request with notifications from the SNS topic. 109 | 110 | 111 | 112 | """ 113 | pass 114 | 115 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 116 | """ 117 | Generate a presigned url given a client, its method, and arguments 118 | 119 | :type ClientMethod: string 120 | :param ClientMethod: The client method to presign for 121 | 122 | :type Params: dict 123 | :param Params: The parameters normally passed to\nClientMethod. 124 | 125 | :type ExpiresIn: int 126 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 127 | 128 | :type HttpMethod: string 129 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 130 | 131 | """ 132 | pass 133 | 134 | def get_paginator(operation_name=None): 135 | """ 136 | Create a paginator for an operation. 137 | 138 | :type operation_name: string 139 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 140 | 141 | :rtype: L{botocore.paginate.Paginator} 142 | ReturnsA paginator object. 143 | 144 | 145 | """ 146 | pass 147 | 148 | def get_waiter(waiter_name=None): 149 | """ 150 | Returns an object that can wait for some condition. 151 | 152 | :type waiter_name: str 153 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 154 | 155 | :rtype: botocore.waiter.Waiter 156 | 157 | 158 | """ 159 | pass 160 | 161 | def start_support_data_export(dataSetType=None, fromDate=None, roleNameArn=None, destinationS3BucketName=None, destinationS3Prefix=None, snsTopicArn=None, customerDefinedValues=None): 162 | """ 163 | Given a data set type and a from date, asynchronously publishes the requested customer support data to the specified S3 bucket and notifies the specified SNS topic once the data is available. Returns a unique request identifier that can be used to correlate requests with notifications from the SNS topic. Data sets will be published in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD\'T\'HH-mm-ss\'Z\'.csv. If a file with the same name already exists (e.g. if the same data set is requested twice), the original file will be overwritten by the new file. Requires a Role with an attached permissions policy providing Allow permissions for the following actions: s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy. 164 | See also: AWS API Documentation 165 | 166 | Exceptions 167 | 168 | :example: response = client.start_support_data_export( 169 | dataSetType='customer_support_contacts_data'|'test_customer_support_contacts_data', 170 | fromDate=datetime(2015, 1, 1), 171 | roleNameArn='string', 172 | destinationS3BucketName='string', 173 | destinationS3Prefix='string', 174 | snsTopicArn='string', 175 | customerDefinedValues={ 176 | 'string': 'string' 177 | } 178 | ) 179 | 180 | 181 | :type dataSetType: string 182 | :param dataSetType: [REQUIRED]\nSpecifies the data set type to be written to the output csv file. The data set types customer_support_contacts_data and test_customer_support_contacts_data both result in a csv file containing the following fields: Product Id, Product Code, Customer Guid, Subscription Guid, Subscription Start Date, Organization, AWS Account Id, Given Name, Surname, Telephone Number, Email, Title, Country Code, ZIP Code, Operation Type, and Operation Time.\n\ncustomer_support_contacts_data Customer support contact data. The data set will contain all changes (Creates, Updates, and Deletes) to customer support contact data from the date specified in the from_date parameter.\ntest_customer_support_contacts_data An example data set containing static test data in the same format as customer_support_contacts_data\n\n 183 | 184 | :type fromDate: datetime 185 | :param fromDate: [REQUIRED] The start date from which to retrieve the data set in UTC. This parameter only affects the customer_support_contacts_data data set type. 186 | 187 | :type roleNameArn: string 188 | :param roleNameArn: [REQUIRED] The Amazon Resource Name (ARN) of the Role with an attached permissions policy to interact with the provided AWS services. 189 | 190 | :type destinationS3BucketName: string 191 | :param destinationS3BucketName: [REQUIRED] The name (friendly name, not ARN) of the destination S3 bucket. 192 | 193 | :type destinationS3Prefix: string 194 | :param destinationS3Prefix: (Optional) The desired S3 prefix for the published data set, similar to a directory path in standard file systems. For example, if given the bucket name 'mybucket' and the prefix 'myprefix/mydatasets', the output file 'outputfile' would be published to 's3://mybucket/myprefix/mydatasets/outputfile'. If the prefix directory structure does not exist, it will be created. If no prefix is provided, the data set will be published to the S3 bucket root. 195 | 196 | :type snsTopicArn: string 197 | :param snsTopicArn: [REQUIRED] Amazon Resource Name (ARN) for the SNS Topic that will be notified when the data set has been published or if an error has occurred. 198 | 199 | :type customerDefinedValues: dict 200 | :param customerDefinedValues: (Optional) Key-value pairs which will be returned, unmodified, in the Amazon SNS notification message and the data set metadata file.\n\n(string) --\n(string) --\n\n\n\n 201 | 202 | :rtype: dict 203 | 204 | ReturnsResponse Syntax 205 | { 206 | 'dataSetRequestId': 'string' 207 | } 208 | 209 | 210 | Response Structure 211 | 212 | (dict) -- Container for the result of the StartSupportDataExport operation. 213 | dataSetRequestId (string) -- A unique identifier representing a specific request to the StartSupportDataExport operation. This identifier can be used to correlate a request with notifications from the SNS topic. 214 | 215 | 216 | 217 | 218 | 219 | 220 | Exceptions 221 | 222 | MarketplaceCommerceAnalytics.Client.exceptions.MarketplaceCommerceAnalyticsException 223 | 224 | 225 | :return: { 226 | 'dataSetRequestId': 'string' 227 | } 228 | 229 | 230 | :returns: 231 | (dict) -- Container for the result of the StartSupportDataExport operation. 232 | dataSetRequestId (string) -- A unique identifier representing a specific request to the StartSupportDataExport operation. This identifier can be used to correlate a request with notifications from the SNS topic. 233 | 234 | 235 | 236 | """ 237 | pass 238 | 239 | -------------------------------------------------------------------------------- /pyboto3/marketplaceentitlementservice.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_entitlements(ProductCode=None, Filter=None, NextToken=None, MaxResults=None): 57 | """ 58 | GetEntitlements retrieves entitlement values for a given product. The results can be filtered based on customer identifier or product dimensions. 59 | See also: AWS API Documentation 60 | 61 | Exceptions 62 | 63 | :example: response = client.get_entitlements( 64 | ProductCode='string', 65 | Filter={ 66 | 'string': [ 67 | 'string', 68 | ] 69 | }, 70 | NextToken='string', 71 | MaxResults=123 72 | ) 73 | 74 | 75 | :type ProductCode: string 76 | :param ProductCode: [REQUIRED]\nProduct code is used to uniquely identify a product in AWS Marketplace. The product code will be provided by AWS Marketplace when the product listing is created.\n 77 | 78 | :type Filter: dict 79 | :param Filter: Filter is used to return entitlements for a specific customer or for a specific dimension. Filters are described as keys mapped to a lists of values. Filtered requests are unioned for each value in the value list, and then intersected for each filter key.\n\n(string) --\n(list) --\n(string) --\n\n\n\n\n\n 80 | 81 | :type NextToken: string 82 | :param NextToken: For paginated calls to GetEntitlements, pass the NextToken from the previous GetEntitlementsResult. 83 | 84 | :type MaxResults: integer 85 | :param MaxResults: The maximum number of items to retrieve from the GetEntitlements operation. For pagination, use the NextToken field in subsequent calls to GetEntitlements. 86 | 87 | :rtype: dict 88 | 89 | ReturnsResponse Syntax 90 | { 91 | 'Entitlements': [ 92 | { 93 | 'ProductCode': 'string', 94 | 'Dimension': 'string', 95 | 'CustomerIdentifier': 'string', 96 | 'Value': { 97 | 'IntegerValue': 123, 98 | 'DoubleValue': 123.0, 99 | 'BooleanValue': True|False, 100 | 'StringValue': 'string' 101 | }, 102 | 'ExpirationDate': datetime(2015, 1, 1) 103 | }, 104 | ], 105 | 'NextToken': 'string' 106 | } 107 | 108 | 109 | Response Structure 110 | 111 | (dict) -- 112 | The GetEntitlementsRequest contains results from the GetEntitlements operation. 113 | 114 | Entitlements (list) -- 115 | The set of entitlements found through the GetEntitlements operation. If the result contains an empty set of entitlements, NextToken might still be present and should be used. 116 | 117 | (dict) -- 118 | An entitlement represents capacity in a product owned by the customer. For example, a customer might own some number of users or seats in an SaaS application or some amount of data capacity in a multi-tenant database. 119 | 120 | ProductCode (string) -- 121 | The product code for which the given entitlement applies. Product codes are provided by AWS Marketplace when the product listing is created. 122 | 123 | Dimension (string) -- 124 | The dimension for which the given entitlement applies. Dimensions represent categories of capacity in a product and are specified when the product is listed in AWS Marketplace. 125 | 126 | CustomerIdentifier (string) -- 127 | The customer identifier is a handle to each unique customer in an application. Customer identifiers are obtained through the ResolveCustomer operation in AWS Marketplace Metering Service. 128 | 129 | Value (dict) -- 130 | The EntitlementValue represents the amount of capacity that the customer is entitled to for the product. 131 | 132 | IntegerValue (integer) -- 133 | The IntegerValue field will be populated with an integer value when the entitlement is an integer type. Otherwise, the field will not be set. 134 | 135 | DoubleValue (float) -- 136 | The DoubleValue field will be populated with a double value when the entitlement is a double type. Otherwise, the field will not be set. 137 | 138 | BooleanValue (boolean) -- 139 | The BooleanValue field will be populated with a boolean value when the entitlement is a boolean type. Otherwise, the field will not be set. 140 | 141 | StringValue (string) -- 142 | The StringValue field will be populated with a string value when the entitlement is a string type. Otherwise, the field will not be set. 143 | 144 | 145 | 146 | ExpirationDate (datetime) -- 147 | The expiration date represents the minimum date through which this entitlement is expected to remain valid. For contractual products listed on AWS Marketplace, the expiration date is the date at which the customer will renew or cancel their contract. Customers who are opting to renew their contract will still have entitlements with an expiration date. 148 | 149 | 150 | 151 | 152 | 153 | NextToken (string) -- 154 | For paginated results, use NextToken in subsequent calls to GetEntitlements. If the result contains an empty set of entitlements, NextToken might still be present and should be used. 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | Exceptions 163 | 164 | MarketplaceEntitlementService.Client.exceptions.InvalidParameterException 165 | MarketplaceEntitlementService.Client.exceptions.ThrottlingException 166 | MarketplaceEntitlementService.Client.exceptions.InternalServiceErrorException 167 | 168 | 169 | :return: { 170 | 'Entitlements': [ 171 | { 172 | 'ProductCode': 'string', 173 | 'Dimension': 'string', 174 | 'CustomerIdentifier': 'string', 175 | 'Value': { 176 | 'IntegerValue': 123, 177 | 'DoubleValue': 123.0, 178 | 'BooleanValue': True|False, 179 | 'StringValue': 'string' 180 | }, 181 | 'ExpirationDate': datetime(2015, 1, 1) 182 | }, 183 | ], 184 | 'NextToken': 'string' 185 | } 186 | 187 | 188 | :returns: 189 | MarketplaceEntitlementService.Client.exceptions.InvalidParameterException 190 | MarketplaceEntitlementService.Client.exceptions.ThrottlingException 191 | MarketplaceEntitlementService.Client.exceptions.InternalServiceErrorException 192 | 193 | """ 194 | pass 195 | 196 | def get_paginator(operation_name=None): 197 | """ 198 | Create a paginator for an operation. 199 | 200 | :type operation_name: string 201 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 202 | 203 | :rtype: L{botocore.paginate.Paginator} 204 | ReturnsA paginator object. 205 | 206 | 207 | """ 208 | pass 209 | 210 | def get_waiter(waiter_name=None): 211 | """ 212 | Returns an object that can wait for some condition. 213 | 214 | :type waiter_name: str 215 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 216 | 217 | :rtype: botocore.waiter.Waiter 218 | 219 | 220 | """ 221 | pass 222 | 223 | -------------------------------------------------------------------------------- /pyboto3/migrationhubconfig.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def create_home_region_control(HomeRegion=None, Target=None, DryRun=None): 38 | """ 39 | This API sets up the home region for the calling account only. 40 | See also: AWS API Documentation 41 | 42 | Exceptions 43 | 44 | :example: response = client.create_home_region_control( 45 | HomeRegion='string', 46 | Target={ 47 | 'Type': 'ACCOUNT', 48 | 'Id': 'string' 49 | }, 50 | DryRun=True|False 51 | ) 52 | 53 | 54 | :type HomeRegion: string 55 | :param HomeRegion: [REQUIRED]\nThe name of the home region of the calling account.\n 56 | 57 | :type Target: dict 58 | :param Target: [REQUIRED]\nThe account for which this command sets up a home region control. The Target is always of type ACCOUNT .\n\nType (string) -- [REQUIRED]The target type is always an ACCOUNT .\n\nId (string) --The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)\n\n\n 59 | 60 | :type DryRun: boolean 61 | :param DryRun: Optional Boolean flag to indicate whether any effect should take place. It tests whether the caller has permission to make the call. 62 | 63 | :rtype: dict 64 | 65 | ReturnsResponse Syntax 66 | { 67 | 'HomeRegionControl': { 68 | 'ControlId': 'string', 69 | 'HomeRegion': 'string', 70 | 'Target': { 71 | 'Type': 'ACCOUNT', 72 | 'Id': 'string' 73 | }, 74 | 'RequestedTime': datetime(2015, 1, 1) 75 | } 76 | } 77 | 78 | 79 | Response Structure 80 | 81 | (dict) -- 82 | 83 | HomeRegionControl (dict) -- 84 | This object is the HomeRegionControl object that\'s returned by a successful call to CreateHomeRegionControl . 85 | 86 | ControlId (string) -- 87 | A unique identifier that\'s generated for each home region control. It\'s always a string that begins with "hrc-" followed by 12 lowercase letters and numbers. 88 | 89 | HomeRegion (string) -- 90 | The AWS Region that\'s been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions. 91 | 92 | Target (dict) -- 93 | The target parameter specifies the identifier to which the home region is applied, which is always an ACCOUNT . It applies the home region to the current ACCOUNT . 94 | 95 | Type (string) -- 96 | The target type is always an ACCOUNT . 97 | 98 | Id (string) -- 99 | The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.) 100 | 101 | 102 | 103 | RequestedTime (datetime) -- 104 | A timestamp representing the time when the customer called CreateHomeregionControl and set the home region for the account. 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Exceptions 115 | 116 | MigrationHubConfig.Client.exceptions.InternalServerError 117 | MigrationHubConfig.Client.exceptions.ServiceUnavailableException 118 | MigrationHubConfig.Client.exceptions.AccessDeniedException 119 | MigrationHubConfig.Client.exceptions.ThrottlingException 120 | MigrationHubConfig.Client.exceptions.DryRunOperation 121 | MigrationHubConfig.Client.exceptions.InvalidInputException 122 | 123 | 124 | :return: { 125 | 'HomeRegionControl': { 126 | 'ControlId': 'string', 127 | 'HomeRegion': 'string', 128 | 'Target': { 129 | 'Type': 'ACCOUNT', 130 | 'Id': 'string' 131 | }, 132 | 'RequestedTime': datetime(2015, 1, 1) 133 | } 134 | } 135 | 136 | 137 | :returns: 138 | MigrationHubConfig.Client.exceptions.InternalServerError 139 | MigrationHubConfig.Client.exceptions.ServiceUnavailableException 140 | MigrationHubConfig.Client.exceptions.AccessDeniedException 141 | MigrationHubConfig.Client.exceptions.ThrottlingException 142 | MigrationHubConfig.Client.exceptions.DryRunOperation 143 | MigrationHubConfig.Client.exceptions.InvalidInputException 144 | 145 | """ 146 | pass 147 | 148 | def describe_home_region_controls(ControlId=None, HomeRegion=None, Target=None, MaxResults=None, NextToken=None): 149 | """ 150 | This API permits filtering on the ControlId and HomeRegion fields. 151 | See also: AWS API Documentation 152 | 153 | Exceptions 154 | 155 | :example: response = client.describe_home_region_controls( 156 | ControlId='string', 157 | HomeRegion='string', 158 | Target={ 159 | 'Type': 'ACCOUNT', 160 | 'Id': 'string' 161 | }, 162 | MaxResults=123, 163 | NextToken='string' 164 | ) 165 | 166 | 167 | :type ControlId: string 168 | :param ControlId: The ControlID is a unique identifier string of your HomeRegionControl object. 169 | 170 | :type HomeRegion: string 171 | :param HomeRegion: The name of the home region you\'d like to view. 172 | 173 | :type Target: dict 174 | :param Target: The target parameter specifies the identifier to which the home region is applied, which is always of type ACCOUNT . It applies the home region to the current ACCOUNT .\n\nType (string) -- [REQUIRED]The target type is always an ACCOUNT .\n\nId (string) --The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)\n\n\n 175 | 176 | :type MaxResults: integer 177 | :param MaxResults: The maximum number of filtering results to display per page. 178 | 179 | :type NextToken: string 180 | :param NextToken: If a NextToken was returned by a previous call, more results are available. To retrieve the next page of results, make the call again using the returned token in NextToken . 181 | 182 | :rtype: dict 183 | 184 | ReturnsResponse Syntax 185 | { 186 | 'HomeRegionControls': [ 187 | { 188 | 'ControlId': 'string', 189 | 'HomeRegion': 'string', 190 | 'Target': { 191 | 'Type': 'ACCOUNT', 192 | 'Id': 'string' 193 | }, 194 | 'RequestedTime': datetime(2015, 1, 1) 195 | }, 196 | ], 197 | 'NextToken': 'string' 198 | } 199 | 200 | 201 | Response Structure 202 | 203 | (dict) -- 204 | 205 | HomeRegionControls (list) -- 206 | An array that contains your HomeRegionControl objects. 207 | 208 | (dict) -- 209 | A home region control is an object that specifies the home region for an account, with some additional information. It contains a target (always of type ACCOUNT ), an ID, and a time at which the home region was set. 210 | 211 | ControlId (string) -- 212 | A unique identifier that\'s generated for each home region control. It\'s always a string that begins with "hrc-" followed by 12 lowercase letters and numbers. 213 | 214 | HomeRegion (string) -- 215 | The AWS Region that\'s been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions. 216 | 217 | Target (dict) -- 218 | The target parameter specifies the identifier to which the home region is applied, which is always an ACCOUNT . It applies the home region to the current ACCOUNT . 219 | 220 | Type (string) -- 221 | The target type is always an ACCOUNT . 222 | 223 | Id (string) -- 224 | The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.) 225 | 226 | 227 | 228 | RequestedTime (datetime) -- 229 | A timestamp representing the time when the customer called CreateHomeregionControl and set the home region for the account. 230 | 231 | 232 | 233 | 234 | 235 | NextToken (string) -- 236 | If a NextToken was returned by a previous call, more results are available. To retrieve the next page of results, make the call again using the returned token in NextToken . 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | Exceptions 245 | 246 | MigrationHubConfig.Client.exceptions.InternalServerError 247 | MigrationHubConfig.Client.exceptions.ServiceUnavailableException 248 | MigrationHubConfig.Client.exceptions.AccessDeniedException 249 | MigrationHubConfig.Client.exceptions.ThrottlingException 250 | MigrationHubConfig.Client.exceptions.InvalidInputException 251 | 252 | 253 | :return: { 254 | 'HomeRegionControls': [ 255 | { 256 | 'ControlId': 'string', 257 | 'HomeRegion': 'string', 258 | 'Target': { 259 | 'Type': 'ACCOUNT', 260 | 'Id': 'string' 261 | }, 262 | 'RequestedTime': datetime(2015, 1, 1) 263 | }, 264 | ], 265 | 'NextToken': 'string' 266 | } 267 | 268 | 269 | :returns: 270 | MigrationHubConfig.Client.exceptions.InternalServerError 271 | MigrationHubConfig.Client.exceptions.ServiceUnavailableException 272 | MigrationHubConfig.Client.exceptions.AccessDeniedException 273 | MigrationHubConfig.Client.exceptions.ThrottlingException 274 | MigrationHubConfig.Client.exceptions.InvalidInputException 275 | 276 | """ 277 | pass 278 | 279 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 280 | """ 281 | Generate a presigned url given a client, its method, and arguments 282 | 283 | :type ClientMethod: string 284 | :param ClientMethod: The client method to presign for 285 | 286 | :type Params: dict 287 | :param Params: The parameters normally passed to\nClientMethod. 288 | 289 | :type ExpiresIn: int 290 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 291 | 292 | :type HttpMethod: string 293 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 294 | 295 | """ 296 | pass 297 | 298 | def get_home_region(): 299 | """ 300 | Returns the calling account\xe2\x80\x99s home region, if configured. This API is used by other AWS services to determine the regional endpoint for calling AWS Application Discovery Service and Migration Hub. You must call GetHomeRegion at least once before you call any other AWS Application Discovery Service and AWS Migration Hub APIs, to obtain the account\'s Migration Hub home region. 301 | See also: AWS API Documentation 302 | 303 | Exceptions 304 | 305 | :example: response = client.get_home_region() 306 | 307 | 308 | :rtype: dict 309 | ReturnsResponse Syntax{ 310 | 'HomeRegion': 'string' 311 | } 312 | 313 | 314 | Response Structure 315 | 316 | (dict) -- 317 | HomeRegion (string) --The name of the home region of the calling account. 318 | 319 | 320 | 321 | 322 | 323 | 324 | Exceptions 325 | 326 | MigrationHubConfig.Client.exceptions.InternalServerError 327 | MigrationHubConfig.Client.exceptions.ServiceUnavailableException 328 | MigrationHubConfig.Client.exceptions.AccessDeniedException 329 | MigrationHubConfig.Client.exceptions.ThrottlingException 330 | MigrationHubConfig.Client.exceptions.InvalidInputException 331 | 332 | 333 | :return: { 334 | 'HomeRegion': 'string' 335 | } 336 | 337 | 338 | """ 339 | pass 340 | 341 | def get_paginator(operation_name=None): 342 | """ 343 | Create a paginator for an operation. 344 | 345 | :type operation_name: string 346 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 347 | 348 | :rtype: L{botocore.paginate.Paginator} 349 | ReturnsA paginator object. 350 | 351 | 352 | """ 353 | pass 354 | 355 | def get_waiter(waiter_name=None): 356 | """ 357 | Returns an object that can wait for some condition. 358 | 359 | :type waiter_name: str 360 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 361 | 362 | :rtype: botocore.waiter.Waiter 363 | 364 | 365 | """ 366 | pass 367 | 368 | -------------------------------------------------------------------------------- /pyboto3/personalizeevents.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_waiter(waiter_name=None): 71 | """ 72 | Returns an object that can wait for some condition. 73 | 74 | :type waiter_name: str 75 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 76 | 77 | :rtype: botocore.waiter.Waiter 78 | 79 | 80 | """ 81 | pass 82 | 83 | def put_events(trackingId=None, userId=None, sessionId=None, eventList=None): 84 | """ 85 | Records user interaction event data. 86 | See also: AWS API Documentation 87 | 88 | Exceptions 89 | 90 | :example: response = client.put_events( 91 | trackingId='string', 92 | userId='string', 93 | sessionId='string', 94 | eventList=[ 95 | { 96 | 'eventId': 'string', 97 | 'eventType': 'string', 98 | 'properties': 'string', 99 | 'sentAt': datetime(2015, 1, 1) 100 | }, 101 | ] 102 | ) 103 | 104 | 105 | :type trackingId: string 106 | :param trackingId: [REQUIRED]\nThe tracking ID for the event. The ID is generated by a call to the CreateEventTracker API.\n 107 | 108 | :type userId: string 109 | :param userId: The user associated with the event. 110 | 111 | :type sessionId: string 112 | :param sessionId: [REQUIRED]\nThe session ID associated with the user\'s visit.\n 113 | 114 | :type eventList: list 115 | :param eventList: [REQUIRED]\nA list of event data from the session.\n\n(dict) --Represents user interaction event information sent using the PutEvents API.\n\neventId (string) --An ID associated with the event. If an event ID is not provided, Amazon Personalize generates a unique ID for the event. An event ID is not used as an input to the model. Amazon Personalize uses the event ID to distinquish unique events. Any subsequent events after the first with the same event ID are not used in model training.\n\neventType (string) -- [REQUIRED]The type of event. This property corresponds to the EVENT_TYPE field of the Interactions schema.\n\nproperties (string) -- [REQUIRED]A string map of event-specific data that you might choose to record. For example, if a user rates a movie on your site, you might send the movie ID and rating, and the number of movie ratings made by the user.\nEach item in the map consists of a key-value pair. For example,\n\n{'itemId': 'movie1'}{'itemId': 'movie2', 'eventValue': '4.5'}\n{'itemId': 'movie3', 'eventValue': '3', 'numberOfRatings': '12'}\n\nThe keys use camel case names that match the fields in the Interactions schema. The itemId and eventValue keys correspond to the ITEM_ID and EVENT_VALUE fields. In the above example, the eventType might be \'MovieRating\' with eventValue being the rating. The numberOfRatings would match the \'NUMBER_OF_RATINGS\' field defined in the Interactions schema.\n\nsentAt (datetime) -- [REQUIRED]The timestamp on the client side when the event occurred.\n\n\n\n\n 116 | 117 | :returns: 118 | PersonalizeEvents.Client.exceptions.InvalidInputException 119 | 120 | """ 121 | pass 122 | 123 | -------------------------------------------------------------------------------- /pyboto3/personalizeruntime.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_personalized_ranking(campaignArn=None, inputList=None, userId=None, context=None): 71 | """ 72 | Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user. 73 | See also: AWS API Documentation 74 | 75 | Exceptions 76 | 77 | :example: response = client.get_personalized_ranking( 78 | campaignArn='string', 79 | inputList=[ 80 | 'string', 81 | ], 82 | userId='string', 83 | context={ 84 | 'string': 'string' 85 | } 86 | ) 87 | 88 | 89 | :type campaignArn: string 90 | :param campaignArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking.\n 91 | 92 | :type inputList: list 93 | :param inputList: [REQUIRED]\nA list of items (itemId\'s) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. The maximum is 500.\n\n(string) --\n\n 94 | 95 | :type userId: string 96 | :param userId: [REQUIRED]\nThe user for which you want the campaign to provide a personalized ranking.\n 97 | 98 | :type context: dict 99 | :param context: The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user\'s recommendations, such as the user\'s current location or device type.\n\n(string) --\n(string) --\n\n\n\n 100 | 101 | :rtype: dict 102 | 103 | ReturnsResponse Syntax 104 | { 105 | 'personalizedRanking': [ 106 | { 107 | 'itemId': 'string', 108 | 'score': 123.0 109 | }, 110 | ] 111 | } 112 | 113 | 114 | Response Structure 115 | 116 | (dict) -- 117 | 118 | personalizedRanking (list) -- 119 | A list of items in order of most likely interest to the user. The maximum is 500. 120 | 121 | (dict) -- 122 | An object that identifies an item. 123 | The and APIs return a list of PredictedItem s. 124 | 125 | itemId (string) -- 126 | The recommended item ID. 127 | 128 | score (float) -- 129 | A numeric representation of the model\'s certainty in the item\'s suitability. For more information on scoring logic, see how-scores-work . 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | Exceptions 142 | 143 | PersonalizeRuntime.Client.exceptions.InvalidInputException 144 | PersonalizeRuntime.Client.exceptions.ResourceNotFoundException 145 | 146 | 147 | :return: { 148 | 'personalizedRanking': [ 149 | { 150 | 'itemId': 'string', 151 | 'score': 123.0 152 | }, 153 | ] 154 | } 155 | 156 | 157 | :returns: 158 | PersonalizeRuntime.Client.exceptions.InvalidInputException 159 | PersonalizeRuntime.Client.exceptions.ResourceNotFoundException 160 | 161 | """ 162 | pass 163 | 164 | def get_recommendations(campaignArn=None, itemId=None, userId=None, numResults=None, context=None): 165 | """ 166 | Returns a list of recommended items. The required input depends on the recipe type used to create the solution backing the campaign, as follows: 167 | See also: AWS API Documentation 168 | 169 | Exceptions 170 | 171 | :example: response = client.get_recommendations( 172 | campaignArn='string', 173 | itemId='string', 174 | userId='string', 175 | numResults=123, 176 | context={ 177 | 'string': 'string' 178 | } 179 | ) 180 | 181 | 182 | :type campaignArn: string 183 | :param campaignArn: [REQUIRED]\nThe Amazon Resource Name (ARN) of the campaign to use for getting recommendations.\n 184 | 185 | :type itemId: string 186 | :param itemId: The item ID to provide recommendations for.\nRequired for RELATED_ITEMS recipe type.\n 187 | 188 | :type userId: string 189 | :param userId: The user ID to provide recommendations for.\nRequired for USER_PERSONALIZATION recipe type.\n 190 | 191 | :type numResults: integer 192 | :param numResults: The number of results to return. The default is 25. The maximum is 500. 193 | 194 | :type context: dict 195 | :param context: The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user\'s recommendations, such as the user\'s current location or device type.\n\n(string) --\n(string) --\n\n\n\n 196 | 197 | :rtype: dict 198 | 199 | ReturnsResponse Syntax 200 | { 201 | 'itemList': [ 202 | { 203 | 'itemId': 'string', 204 | 'score': 123.0 205 | }, 206 | ] 207 | } 208 | 209 | 210 | Response Structure 211 | 212 | (dict) -- 213 | 214 | itemList (list) -- 215 | A list of recommendations sorted in ascending order by prediction score. There can be a maximum of 500 items in the list. 216 | 217 | (dict) -- 218 | An object that identifies an item. 219 | The and APIs return a list of PredictedItem s. 220 | 221 | itemId (string) -- 222 | The recommended item ID. 223 | 224 | score (float) -- 225 | A numeric representation of the model\'s certainty in the item\'s suitability. For more information on scoring logic, see how-scores-work . 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | Exceptions 238 | 239 | PersonalizeRuntime.Client.exceptions.InvalidInputException 240 | PersonalizeRuntime.Client.exceptions.ResourceNotFoundException 241 | 242 | 243 | :return: { 244 | 'itemList': [ 245 | { 246 | 'itemId': 'string', 247 | 'score': 123.0 248 | }, 249 | ] 250 | } 251 | 252 | 253 | :returns: 254 | campaignArn (string) -- [REQUIRED] 255 | The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. 256 | 257 | itemId (string) -- The item ID to provide recommendations for. 258 | Required for RELATED_ITEMS recipe type. 259 | 260 | userId (string) -- The user ID to provide recommendations for. 261 | Required for USER_PERSONALIZATION recipe type. 262 | 263 | numResults (integer) -- The number of results to return. The default is 25. The maximum is 500. 264 | context (dict) -- The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user\'s recommendations, such as the user\'s current location or device type. 265 | 266 | (string) -- 267 | (string) -- 268 | 269 | 270 | 271 | 272 | 273 | """ 274 | pass 275 | 276 | def get_waiter(waiter_name=None): 277 | """ 278 | Returns an object that can wait for some condition. 279 | 280 | :type waiter_name: str 281 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 282 | 283 | :rtype: botocore.waiter.Waiter 284 | 285 | 286 | """ 287 | pass 288 | 289 | -------------------------------------------------------------------------------- /pyboto3/qldbsession.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_waiter(waiter_name=None): 71 | """ 72 | Returns an object that can wait for some condition. 73 | 74 | :type waiter_name: str 75 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 76 | 77 | :rtype: botocore.waiter.Waiter 78 | 79 | 80 | """ 81 | pass 82 | 83 | def send_command(SessionToken=None, StartSession=None, StartTransaction=None, EndSession=None, CommitTransaction=None, AbortTransaction=None, ExecuteStatement=None, FetchPage=None): 84 | """ 85 | Sends a command to an Amazon QLDB ledger. 86 | See also: AWS API Documentation 87 | 88 | Exceptions 89 | 90 | :example: response = client.send_command( 91 | SessionToken='string', 92 | StartSession={ 93 | 'LedgerName': 'string' 94 | }, 95 | StartTransaction={} 96 | , 97 | EndSession={} 98 | , 99 | CommitTransaction={ 100 | 'TransactionId': 'string', 101 | 'CommitDigest': b'bytes' 102 | }, 103 | AbortTransaction={} 104 | , 105 | ExecuteStatement={ 106 | 'TransactionId': 'string', 107 | 'Statement': 'string', 108 | 'Parameters': [ 109 | { 110 | 'IonBinary': b'bytes', 111 | 'IonText': 'string' 112 | }, 113 | ] 114 | }, 115 | FetchPage={ 116 | 'TransactionId': 'string', 117 | 'NextPageToken': 'string' 118 | } 119 | ) 120 | 121 | 122 | :type SessionToken: string 123 | :param SessionToken: Specifies the session token for the current command. A session token is constant throughout the life of the session.\nTo obtain a session token, run the StartSession command. This SessionToken is required for every subsequent command that is issued during the current session.\n 124 | 125 | :type StartSession: dict 126 | :param StartSession: Command to start a new session. A session token is obtained as part of the response.\n\nLedgerName (string) -- [REQUIRED]The name of the ledger to start a new session against.\n\n\n 127 | 128 | :type StartTransaction: dict 129 | :param StartTransaction: Command to start a new transaction. 130 | 131 | :type EndSession: dict 132 | :param EndSession: Command to end the current session. 133 | 134 | :type CommitTransaction: dict 135 | :param CommitTransaction: Command to commit the specified transaction.\n\nTransactionId (string) -- [REQUIRED]Specifies the transaction id of the transaction to commit.\n\nCommitDigest (bytes) -- [REQUIRED]Specifies the commit digest for the transaction to commit. For every active transaction, the commit digest must be passed. QLDB validates CommitDigest and rejects the commit with an error if the digest computed on the client does not match the digest computed by QLDB.\n\n\n 136 | 137 | :type AbortTransaction: dict 138 | :param AbortTransaction: Command to abort the current transaction. 139 | 140 | :type ExecuteStatement: dict 141 | :param ExecuteStatement: Command to execute a statement in the specified transaction.\n\nTransactionId (string) -- [REQUIRED]Specifies the transaction id of the request.\n\nStatement (string) -- [REQUIRED]Specifies the statement of the request.\n\nParameters (list) --Specifies the parameters for the parameterized statement in the request.\n\n(dict) --A structure that can contains values in multiple encoding formats.\n\nIonBinary (bytes) --An Amazon Ion binary value contained in a ValueHolder structure.\n\nIonText (string) --An Amazon Ion plaintext value contained in a ValueHolder structure.\n\n\n\n\n\n\n 142 | 143 | :type FetchPage: dict 144 | :param FetchPage: Command to fetch a page.\n\nTransactionId (string) -- [REQUIRED]Specifies the transaction id of the page to be fetched.\n\nNextPageToken (string) -- [REQUIRED]Specifies the next page token of the page to be fetched.\n\n\n 145 | 146 | :rtype: dict 147 | 148 | ReturnsResponse Syntax 149 | { 150 | 'StartSession': { 151 | 'SessionToken': 'string' 152 | }, 153 | 'StartTransaction': { 154 | 'TransactionId': 'string' 155 | }, 156 | 'EndSession': {}, 157 | 'CommitTransaction': { 158 | 'TransactionId': 'string', 159 | 'CommitDigest': b'bytes' 160 | }, 161 | 'AbortTransaction': {}, 162 | 'ExecuteStatement': { 163 | 'FirstPage': { 164 | 'Values': [ 165 | { 166 | 'IonBinary': b'bytes', 167 | 'IonText': 'string' 168 | }, 169 | ], 170 | 'NextPageToken': 'string' 171 | } 172 | }, 173 | 'FetchPage': { 174 | 'Page': { 175 | 'Values': [ 176 | { 177 | 'IonBinary': b'bytes', 178 | 'IonText': 'string' 179 | }, 180 | ], 181 | 'NextPageToken': 'string' 182 | } 183 | } 184 | } 185 | 186 | 187 | Response Structure 188 | 189 | (dict) -- 190 | 191 | StartSession (dict) -- 192 | Contains the details of the started session that includes a session token. This SessionToken is required for every subsequent command that is issued during the current session. 193 | 194 | SessionToken (string) -- 195 | Session token of the started session. This SessionToken is required for every subsequent command that is issued during the current session. 196 | 197 | 198 | 199 | StartTransaction (dict) -- 200 | Contains the details of the started transaction. 201 | 202 | TransactionId (string) -- 203 | The transaction id of the started transaction. 204 | 205 | 206 | 207 | EndSession (dict) -- 208 | Contains the details of the ended session. 209 | 210 | CommitTransaction (dict) -- 211 | Contains the details of the committed transaction. 212 | 213 | TransactionId (string) -- 214 | The transaction id of the committed transaction. 215 | 216 | CommitDigest (bytes) -- 217 | The commit digest of the committed transaction. 218 | 219 | 220 | 221 | AbortTransaction (dict) -- 222 | Contains the details of the aborted transaction. 223 | 224 | ExecuteStatement (dict) -- 225 | Contains the details of the executed statement. 226 | 227 | FirstPage (dict) -- 228 | Contains the details of the first fetched page. 229 | 230 | Values (list) -- 231 | A structure that contains values in multiple encoding formats. 232 | 233 | (dict) -- 234 | A structure that can contains values in multiple encoding formats. 235 | 236 | IonBinary (bytes) -- 237 | An Amazon Ion binary value contained in a ValueHolder structure. 238 | 239 | IonText (string) -- 240 | An Amazon Ion plaintext value contained in a ValueHolder structure. 241 | 242 | 243 | 244 | 245 | 246 | NextPageToken (string) -- 247 | The token of the next page. 248 | 249 | 250 | 251 | 252 | 253 | FetchPage (dict) -- 254 | Contains the details of the fetched page. 255 | 256 | Page (dict) -- 257 | Contains details of the fetched page. 258 | 259 | Values (list) -- 260 | A structure that contains values in multiple encoding formats. 261 | 262 | (dict) -- 263 | A structure that can contains values in multiple encoding formats. 264 | 265 | IonBinary (bytes) -- 266 | An Amazon Ion binary value contained in a ValueHolder structure. 267 | 268 | IonText (string) -- 269 | An Amazon Ion plaintext value contained in a ValueHolder structure. 270 | 271 | 272 | 273 | 274 | 275 | NextPageToken (string) -- 276 | The token of the next page. 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | Exceptions 289 | 290 | QLDBSession.Client.exceptions.BadRequestException 291 | QLDBSession.Client.exceptions.InvalidSessionException 292 | QLDBSession.Client.exceptions.OccConflictException 293 | QLDBSession.Client.exceptions.RateExceededException 294 | QLDBSession.Client.exceptions.LimitExceededException 295 | 296 | 297 | :return: { 298 | 'StartSession': { 299 | 'SessionToken': 'string' 300 | }, 301 | 'StartTransaction': { 302 | 'TransactionId': 'string' 303 | }, 304 | 'EndSession': {}, 305 | 'CommitTransaction': { 306 | 'TransactionId': 'string', 307 | 'CommitDigest': b'bytes' 308 | }, 309 | 'AbortTransaction': {}, 310 | 'ExecuteStatement': { 311 | 'FirstPage': { 312 | 'Values': [ 313 | { 314 | 'IonBinary': b'bytes', 315 | 'IonText': 'string' 316 | }, 317 | ], 318 | 'NextPageToken': 'string' 319 | } 320 | }, 321 | 'FetchPage': { 322 | 'Page': { 323 | 'Values': [ 324 | { 325 | 'IonBinary': b'bytes', 326 | 'IonText': 'string' 327 | }, 328 | ], 329 | 'NextPageToken': 'string' 330 | } 331 | } 332 | } 333 | 334 | 335 | :returns: 336 | QLDBSession.Client.exceptions.BadRequestException 337 | QLDBSession.Client.exceptions.InvalidSessionException 338 | QLDBSession.Client.exceptions.OccConflictException 339 | QLDBSession.Client.exceptions.RateExceededException 340 | QLDBSession.Client.exceptions.LimitExceededException 341 | 342 | """ 343 | pass 344 | 345 | -------------------------------------------------------------------------------- /pyboto3/sagemakerruntime.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_waiter(waiter_name=None): 71 | """ 72 | Returns an object that can wait for some condition. 73 | 74 | :type waiter_name: str 75 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 76 | 77 | :rtype: botocore.waiter.Waiter 78 | 79 | 80 | """ 81 | pass 82 | 83 | def invoke_endpoint(EndpointName=None, Body=None, ContentType=None, Accept=None, CustomAttributes=None, TargetModel=None): 84 | """ 85 | After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint. 86 | For an overview of Amazon SageMaker, see How It Works . 87 | Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. 88 | Calls to InvokeEndpoint are authenticated by using AWS Signature Version 4. For information, see Authenticating Requests (AWS Signature Version 4) in the Amazon S3 API Reference . 89 | A customer\'s model containers must respond to requests within 60 seconds. The model itself can have a maximum processing time of 60 seconds before responding to the /invocations. If your model is going to take 50-60 seconds of processing time, the SDK socket timeout should be set to be 70 seconds. 90 | See also: AWS API Documentation 91 | 92 | Exceptions 93 | 94 | :example: response = client.invoke_endpoint( 95 | EndpointName='string', 96 | Body=b'bytes'|file, 97 | ContentType='string', 98 | Accept='string', 99 | CustomAttributes='string', 100 | TargetModel='string' 101 | ) 102 | 103 | 104 | :type EndpointName: string 105 | :param EndpointName: [REQUIRED]\nThe name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.\n 106 | 107 | :type Body: bytes or seekable file-like object 108 | :param Body: [REQUIRED]\nProvides input data, in the format specified in the ContentType request header. Amazon SageMaker passes all of the data in the body to the model.\nFor information about the format of the request body, see Common Data Formats\xe2\x80\x94Inference .\n 109 | 110 | :type ContentType: string 111 | :param ContentType: The MIME type of the input data in the request body. 112 | 113 | :type Accept: string 114 | :param Accept: The desired MIME type of the inference in the response. 115 | 116 | :type CustomAttributes: string 117 | :param CustomAttributes: Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). This feature is currently supported in the AWS SDKs but not in the Amazon SageMaker Python SDK. 118 | 119 | :type TargetModel: string 120 | :param TargetModel: Specifies the model to be requested for an inference when invoking a multi-model endpoint. 121 | 122 | :rtype: dict 123 | 124 | ReturnsResponse Syntax 125 | { 126 | 'Body': StreamingBody(), 127 | 'ContentType': 'string', 128 | 'InvokedProductionVariant': 'string', 129 | 'CustomAttributes': 'string' 130 | } 131 | 132 | 133 | Response Structure 134 | 135 | (dict) -- 136 | 137 | Body (StreamingBody) -- 138 | Includes the inference provided by the model. 139 | For information about the format of the response body, see Common Data Formats\xe2\x80\x94Inference . 140 | 141 | ContentType (string) -- 142 | The MIME type of the inference returned in the response body. 143 | 144 | InvokedProductionVariant (string) -- 145 | Identifies the production variant that was invoked. 146 | 147 | CustomAttributes (string) -- 148 | Provides additional information in the response about the inference returned by a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to return an ID received in the CustomAttributes header of a request or other metadata that a service endpoint was programmed to produce. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1). If the customer wants the custom attribute returned, the model must set the custom attribute to be included on the way back. 149 | This feature is currently supported in the AWS SDKs but not in the Amazon SageMaker Python SDK. 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | Exceptions 158 | 159 | SageMakerRuntime.Client.exceptions.InternalFailure 160 | SageMakerRuntime.Client.exceptions.ServiceUnavailable 161 | SageMakerRuntime.Client.exceptions.ValidationError 162 | SageMakerRuntime.Client.exceptions.ModelError 163 | 164 | 165 | :return: { 166 | 'Body': StreamingBody(), 167 | 'ContentType': 'string', 168 | 'InvokedProductionVariant': 'string', 169 | 'CustomAttributes': 'string' 170 | } 171 | 172 | 173 | :returns: 174 | SageMakerRuntime.Client.exceptions.InternalFailure 175 | SageMakerRuntime.Client.exceptions.ServiceUnavailable 176 | SageMakerRuntime.Client.exceptions.ValidationError 177 | SageMakerRuntime.Client.exceptions.ModelError 178 | 179 | """ 180 | pass 181 | 182 | -------------------------------------------------------------------------------- /pyboto3/sso.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_role_credentials(roleName=None, accountId=None, accessToken=None): 71 | """ 72 | Returns the STS short-term credentials for a given role name that is assigned to the user. 73 | See also: AWS API Documentation 74 | 75 | Exceptions 76 | 77 | :example: response = client.get_role_credentials( 78 | roleName='string', 79 | accountId='string', 80 | accessToken='string' 81 | ) 82 | 83 | 84 | :type roleName: string 85 | :param roleName: [REQUIRED]\nThe friendly name of the role that is assigned to the user.\n 86 | 87 | :type accountId: string 88 | :param accountId: [REQUIRED]\nThe identifier for the AWS account that is assigned to the user.\n 89 | 90 | :type accessToken: string 91 | :param accessToken: [REQUIRED]\nThe token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide .\n 92 | 93 | :rtype: dict 94 | 95 | ReturnsResponse Syntax 96 | { 97 | 'roleCredentials': { 98 | 'accessKeyId': 'string', 99 | 'secretAccessKey': 'string', 100 | 'sessionToken': 'string', 101 | 'expiration': 123 102 | } 103 | } 104 | 105 | 106 | Response Structure 107 | 108 | (dict) -- 109 | 110 | roleCredentials (dict) -- 111 | The credentials for the role that is assigned to the user. 112 | 113 | accessKeyId (string) -- 114 | The identifier used for the temporary security credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide . 115 | 116 | secretAccessKey (string) -- 117 | The key that is used to sign the request. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide . 118 | 119 | sessionToken (string) -- 120 | The token used for temporary credentials. For more information, see Using Temporary Security Credentials to Request Access to AWS Resources in the AWS IAM User Guide . 121 | 122 | expiration (integer) -- 123 | The date on which temporary security credentials expire. 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | Exceptions 134 | 135 | SSO.Client.exceptions.InvalidRequestException 136 | SSO.Client.exceptions.UnauthorizedException 137 | SSO.Client.exceptions.TooManyRequestsException 138 | SSO.Client.exceptions.ResourceNotFoundException 139 | 140 | 141 | :return: { 142 | 'roleCredentials': { 143 | 'accessKeyId': 'string', 144 | 'secretAccessKey': 'string', 145 | 'sessionToken': 'string', 146 | 'expiration': 123 147 | } 148 | } 149 | 150 | 151 | :returns: 152 | SSO.Client.exceptions.InvalidRequestException 153 | SSO.Client.exceptions.UnauthorizedException 154 | SSO.Client.exceptions.TooManyRequestsException 155 | SSO.Client.exceptions.ResourceNotFoundException 156 | 157 | """ 158 | pass 159 | 160 | def get_waiter(waiter_name=None): 161 | """ 162 | Returns an object that can wait for some condition. 163 | 164 | :type waiter_name: str 165 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 166 | 167 | :rtype: botocore.waiter.Waiter 168 | 169 | 170 | """ 171 | pass 172 | 173 | def list_account_roles(nextToken=None, maxResults=None, accessToken=None, accountId=None): 174 | """ 175 | Lists all roles that are assigned to the user for a given AWS account. 176 | See also: AWS API Documentation 177 | 178 | Exceptions 179 | 180 | :example: response = client.list_account_roles( 181 | nextToken='string', 182 | maxResults=123, 183 | accessToken='string', 184 | accountId='string' 185 | ) 186 | 187 | 188 | :type nextToken: string 189 | :param nextToken: The page token from the previous response output when you request subsequent pages. 190 | 191 | :type maxResults: integer 192 | :param maxResults: The number of items that clients can request per page. 193 | 194 | :type accessToken: string 195 | :param accessToken: [REQUIRED]\nThe token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide .\n 196 | 197 | :type accountId: string 198 | :param accountId: [REQUIRED]\nThe identifier for the AWS account that is assigned to the user.\n 199 | 200 | :rtype: dict 201 | 202 | ReturnsResponse Syntax 203 | { 204 | 'nextToken': 'string', 205 | 'roleList': [ 206 | { 207 | 'roleName': 'string', 208 | 'accountId': 'string' 209 | }, 210 | ] 211 | } 212 | 213 | 214 | Response Structure 215 | 216 | (dict) -- 217 | 218 | nextToken (string) -- 219 | The page token client that is used to retrieve the list of accounts. 220 | 221 | roleList (list) -- 222 | A paginated response with the list of roles and the next token if more results are available. 223 | 224 | (dict) -- 225 | Provides information about the role that is assigned to the user. 226 | 227 | roleName (string) -- 228 | The friendly name of the role that is assigned to the user. 229 | 230 | accountId (string) -- 231 | The identifier of the AWS account assigned to the user. 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | Exceptions 244 | 245 | SSO.Client.exceptions.InvalidRequestException 246 | SSO.Client.exceptions.UnauthorizedException 247 | SSO.Client.exceptions.TooManyRequestsException 248 | SSO.Client.exceptions.ResourceNotFoundException 249 | 250 | 251 | :return: { 252 | 'nextToken': 'string', 253 | 'roleList': [ 254 | { 255 | 'roleName': 'string', 256 | 'accountId': 'string' 257 | }, 258 | ] 259 | } 260 | 261 | 262 | :returns: 263 | SSO.Client.exceptions.InvalidRequestException 264 | SSO.Client.exceptions.UnauthorizedException 265 | SSO.Client.exceptions.TooManyRequestsException 266 | SSO.Client.exceptions.ResourceNotFoundException 267 | 268 | """ 269 | pass 270 | 271 | def list_accounts(nextToken=None, maxResults=None, accessToken=None): 272 | """ 273 | Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access in the AWS SSO User Guide . This operation returns a paginated response. 274 | See also: AWS API Documentation 275 | 276 | Exceptions 277 | 278 | :example: response = client.list_accounts( 279 | nextToken='string', 280 | maxResults=123, 281 | accessToken='string' 282 | ) 283 | 284 | 285 | :type nextToken: string 286 | :param nextToken: (Optional) When requesting subsequent pages, this is the page token from the previous response output. 287 | 288 | :type maxResults: integer 289 | :param maxResults: This is the number of items clients can request per page. 290 | 291 | :type accessToken: string 292 | :param accessToken: [REQUIRED]\nThe token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide .\n 293 | 294 | :rtype: dict 295 | 296 | ReturnsResponse Syntax 297 | { 298 | 'nextToken': 'string', 299 | 'accountList': [ 300 | { 301 | 'accountId': 'string', 302 | 'accountName': 'string', 303 | 'emailAddress': 'string' 304 | }, 305 | ] 306 | } 307 | 308 | 309 | Response Structure 310 | 311 | (dict) -- 312 | 313 | nextToken (string) -- 314 | The page token client that is used to retrieve the list of accounts. 315 | 316 | accountList (list) -- 317 | A paginated response with the list of account information and the next token if more results are available. 318 | 319 | (dict) -- 320 | Provides information about your AWS account. 321 | 322 | accountId (string) -- 323 | The identifier of the AWS account that is assigned to the user. 324 | 325 | accountName (string) -- 326 | The display name of the AWS account that is assigned to the user. 327 | 328 | emailAddress (string) -- 329 | The email address of the AWS account that is assigned to the user. 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | Exceptions 342 | 343 | SSO.Client.exceptions.InvalidRequestException 344 | SSO.Client.exceptions.UnauthorizedException 345 | SSO.Client.exceptions.TooManyRequestsException 346 | SSO.Client.exceptions.ResourceNotFoundException 347 | 348 | 349 | :return: { 350 | 'nextToken': 'string', 351 | 'accountList': [ 352 | { 353 | 'accountId': 'string', 354 | 'accountName': 'string', 355 | 'emailAddress': 'string' 356 | }, 357 | ] 358 | } 359 | 360 | 361 | :returns: 362 | SSO.Client.exceptions.InvalidRequestException 363 | SSO.Client.exceptions.UnauthorizedException 364 | SSO.Client.exceptions.TooManyRequestsException 365 | SSO.Client.exceptions.ResourceNotFoundException 366 | 367 | """ 368 | pass 369 | 370 | def logout(accessToken=None): 371 | """ 372 | Removes the client- and server-side session that is associated with the user. 373 | See also: AWS API Documentation 374 | 375 | Exceptions 376 | 377 | :example: response = client.logout( 378 | accessToken='string' 379 | ) 380 | 381 | 382 | :type accessToken: string 383 | :param accessToken: [REQUIRED]\nThe token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide .\n 384 | 385 | """ 386 | pass 387 | 388 | -------------------------------------------------------------------------------- /pyboto3/ssooidc.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def create_token(clientId=None, clientSecret=None, grantType=None, deviceCode=None, code=None, refreshToken=None, scope=None, redirectUri=None): 38 | """ 39 | Creates and returns an access token for the authorized client. The access token issued will be used to fetch short-term credentials for the assigned roles in the AWS account. 40 | See also: AWS API Documentation 41 | 42 | Exceptions 43 | 44 | :example: response = client.create_token( 45 | clientId='string', 46 | clientSecret='string', 47 | grantType='string', 48 | deviceCode='string', 49 | code='string', 50 | refreshToken='string', 51 | scope=[ 52 | 'string', 53 | ], 54 | redirectUri='string' 55 | ) 56 | 57 | 58 | :type clientId: string 59 | :param clientId: [REQUIRED]\nThe unique identifier string for each client. This value should come from the persisted result of the RegisterClient API.\n 60 | 61 | :type clientSecret: string 62 | :param clientSecret: [REQUIRED]\nA secret string generated for the client. This value should come from the persisted result of the RegisterClient API.\n 63 | 64 | :type grantType: string 65 | :param grantType: [REQUIRED]\nSupports grant types for authorization code, refresh token, and device code request.\n 66 | 67 | :type deviceCode: string 68 | :param deviceCode: [REQUIRED]\nUsed only when calling this API for the device code grant type. This short-term code is used to identify this authentication attempt. This should come from an in-memory reference to the result of the StartDeviceAuthorization API.\n 69 | 70 | :type code: string 71 | :param code: The authorization code received from the authorization service. This parameter is required to perform an authorization grant request to get access to a token. 72 | 73 | :type refreshToken: string 74 | :param refreshToken: The token used to obtain an access token in the event that the access token is invalid or expired. This token is not issued by the service. 75 | 76 | :type scope: list 77 | :param scope: The list of scopes that is defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.\n\n(string) --\n\n 78 | 79 | :type redirectUri: string 80 | :param redirectUri: The location of the application that will receive the authorization code. Users authorize the service to send the request to this location. 81 | 82 | :rtype: dict 83 | 84 | ReturnsResponse Syntax 85 | { 86 | 'accessToken': 'string', 87 | 'tokenType': 'string', 88 | 'expiresIn': 123, 89 | 'refreshToken': 'string', 90 | 'idToken': 'string' 91 | } 92 | 93 | 94 | Response Structure 95 | 96 | (dict) -- 97 | 98 | accessToken (string) -- 99 | An opaque token to access AWS SSO resources assigned to a user. 100 | 101 | tokenType (string) -- 102 | Used to notify the client that the returned token is an access token. The supported type is BearerToken . 103 | 104 | expiresIn (integer) -- 105 | Indicates the time in seconds when an access token will expire. 106 | 107 | refreshToken (string) -- 108 | A token that, if present, can be used to refresh a previously issued access token that might have expired. 109 | 110 | idToken (string) -- 111 | The identifier of the user that associated with the access token, if present. 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | Exceptions 120 | 121 | SSOOIDC.Client.exceptions.InvalidRequestException 122 | SSOOIDC.Client.exceptions.InvalidClientException 123 | SSOOIDC.Client.exceptions.InvalidGrantException 124 | SSOOIDC.Client.exceptions.UnauthorizedClientException 125 | SSOOIDC.Client.exceptions.UnsupportedGrantTypeException 126 | SSOOIDC.Client.exceptions.InvalidScopeException 127 | SSOOIDC.Client.exceptions.AuthorizationPendingException 128 | SSOOIDC.Client.exceptions.SlowDownException 129 | SSOOIDC.Client.exceptions.AccessDeniedException 130 | SSOOIDC.Client.exceptions.ExpiredTokenException 131 | SSOOIDC.Client.exceptions.InternalServerException 132 | 133 | 134 | :return: { 135 | 'accessToken': 'string', 136 | 'tokenType': 'string', 137 | 'expiresIn': 123, 138 | 'refreshToken': 'string', 139 | 'idToken': 'string' 140 | } 141 | 142 | 143 | :returns: 144 | SSOOIDC.Client.exceptions.InvalidRequestException 145 | SSOOIDC.Client.exceptions.InvalidClientException 146 | SSOOIDC.Client.exceptions.InvalidGrantException 147 | SSOOIDC.Client.exceptions.UnauthorizedClientException 148 | SSOOIDC.Client.exceptions.UnsupportedGrantTypeException 149 | SSOOIDC.Client.exceptions.InvalidScopeException 150 | SSOOIDC.Client.exceptions.AuthorizationPendingException 151 | SSOOIDC.Client.exceptions.SlowDownException 152 | SSOOIDC.Client.exceptions.AccessDeniedException 153 | SSOOIDC.Client.exceptions.ExpiredTokenException 154 | SSOOIDC.Client.exceptions.InternalServerException 155 | 156 | """ 157 | pass 158 | 159 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 160 | """ 161 | Generate a presigned url given a client, its method, and arguments 162 | 163 | :type ClientMethod: string 164 | :param ClientMethod: The client method to presign for 165 | 166 | :type Params: dict 167 | :param Params: The parameters normally passed to\nClientMethod. 168 | 169 | :type ExpiresIn: int 170 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 171 | 172 | :type HttpMethod: string 173 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 174 | 175 | """ 176 | pass 177 | 178 | def get_paginator(operation_name=None): 179 | """ 180 | Create a paginator for an operation. 181 | 182 | :type operation_name: string 183 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 184 | 185 | :rtype: L{botocore.paginate.Paginator} 186 | ReturnsA paginator object. 187 | 188 | 189 | """ 190 | pass 191 | 192 | def get_waiter(waiter_name=None): 193 | """ 194 | Returns an object that can wait for some condition. 195 | 196 | :type waiter_name: str 197 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 198 | 199 | :rtype: botocore.waiter.Waiter 200 | 201 | 202 | """ 203 | pass 204 | 205 | def register_client(clientName=None, clientType=None, scopes=None): 206 | """ 207 | Registers a client with AWS SSO. This allows clients to initiate device authorization. The output should be persisted for reuse through many authentication requests. 208 | See also: AWS API Documentation 209 | 210 | Exceptions 211 | 212 | :example: response = client.register_client( 213 | clientName='string', 214 | clientType='string', 215 | scopes=[ 216 | 'string', 217 | ] 218 | ) 219 | 220 | 221 | :type clientName: string 222 | :param clientName: [REQUIRED]\nThe friendly name of the client.\n 223 | 224 | :type clientType: string 225 | :param clientType: [REQUIRED]\nThe type of client. The service supports only public as a client type. Anything other than public will be rejected by the service.\n 226 | 227 | :type scopes: list 228 | :param scopes: The list of scopes that are defined by the client. Upon authorization, this list is used to restrict permissions when granting an access token.\n\n(string) --\n\n 229 | 230 | :rtype: dict 231 | 232 | ReturnsResponse Syntax 233 | { 234 | 'clientId': 'string', 235 | 'clientSecret': 'string', 236 | 'clientIdIssuedAt': 123, 237 | 'clientSecretExpiresAt': 123, 238 | 'authorizationEndpoint': 'string', 239 | 'tokenEndpoint': 'string' 240 | } 241 | 242 | 243 | Response Structure 244 | 245 | (dict) -- 246 | 247 | clientId (string) -- 248 | The unique identifier string for each client. This client uses this identifier to get authenticated by the service in subsequent calls. 249 | 250 | clientSecret (string) -- 251 | A secret string generated for the client. The client will use this string to get authenticated by the service in subsequent calls. 252 | 253 | clientIdIssuedAt (integer) -- 254 | Indicates the time at which the clientId and clientSecret were issued. 255 | 256 | clientSecretExpiresAt (integer) -- 257 | Indicates the time at which the clientId and clientSecret will become invalid. 258 | 259 | authorizationEndpoint (string) -- 260 | The endpoint where the client can request authorization. 261 | 262 | tokenEndpoint (string) -- 263 | The endpoint where the client can get an access token. 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | Exceptions 272 | 273 | SSOOIDC.Client.exceptions.InvalidRequestException 274 | SSOOIDC.Client.exceptions.InvalidScopeException 275 | SSOOIDC.Client.exceptions.InvalidClientMetadataException 276 | SSOOIDC.Client.exceptions.InternalServerException 277 | 278 | 279 | :return: { 280 | 'clientId': 'string', 281 | 'clientSecret': 'string', 282 | 'clientIdIssuedAt': 123, 283 | 'clientSecretExpiresAt': 123, 284 | 'authorizationEndpoint': 'string', 285 | 'tokenEndpoint': 'string' 286 | } 287 | 288 | 289 | :returns: 290 | SSOOIDC.Client.exceptions.InvalidRequestException 291 | SSOOIDC.Client.exceptions.InvalidScopeException 292 | SSOOIDC.Client.exceptions.InvalidClientMetadataException 293 | SSOOIDC.Client.exceptions.InternalServerException 294 | 295 | """ 296 | pass 297 | 298 | def start_device_authorization(clientId=None, clientSecret=None, startUrl=None): 299 | """ 300 | Initiates device authorization by requesting a pair of verification codes from the authorization service. 301 | See also: AWS API Documentation 302 | 303 | Exceptions 304 | 305 | :example: response = client.start_device_authorization( 306 | clientId='string', 307 | clientSecret='string', 308 | startUrl='string' 309 | ) 310 | 311 | 312 | :type clientId: string 313 | :param clientId: [REQUIRED]\nThe unique identifier string for the client that is registered with AWS SSO. This value should come from the persisted result of the RegisterClient API operation.\n 314 | 315 | :type clientSecret: string 316 | :param clientSecret: [REQUIRED]\nA secret string that is generated for the client. This value should come from the persisted result of the RegisterClient API operation.\n 317 | 318 | :type startUrl: string 319 | :param startUrl: [REQUIRED]\nThe URL for the AWS SSO user portal. For more information, see Using the User Portal in the AWS Single Sign-On User Guide .\n 320 | 321 | :rtype: dict 322 | 323 | ReturnsResponse Syntax 324 | { 325 | 'deviceCode': 'string', 326 | 'userCode': 'string', 327 | 'verificationUri': 'string', 328 | 'verificationUriComplete': 'string', 329 | 'expiresIn': 123, 330 | 'interval': 123 331 | } 332 | 333 | 334 | Response Structure 335 | 336 | (dict) -- 337 | 338 | deviceCode (string) -- 339 | The short-lived code that is used by the device when polling for a session token. 340 | 341 | userCode (string) -- 342 | A one-time user verification code. This is needed to authorize an in-use device. 343 | 344 | verificationUri (string) -- 345 | The URI of the verification page that takes the userCode to authorize the device. 346 | 347 | verificationUriComplete (string) -- 348 | An alternate URL that the client can use to automatically launch a browser. This process skips the manual step in which the user visits the verification page and enters their code. 349 | 350 | expiresIn (integer) -- 351 | Indicates the number of seconds in which the verification code will become invalid. 352 | 353 | interval (integer) -- 354 | Indicates the number of seconds the client must wait between attempts when polling for a session. 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | Exceptions 363 | 364 | SSOOIDC.Client.exceptions.InvalidRequestException 365 | SSOOIDC.Client.exceptions.InvalidClientException 366 | SSOOIDC.Client.exceptions.UnauthorizedClientException 367 | SSOOIDC.Client.exceptions.SlowDownException 368 | SSOOIDC.Client.exceptions.InternalServerException 369 | 370 | 371 | :return: { 372 | 'deviceCode': 'string', 373 | 'userCode': 'string', 374 | 'verificationUri': 'string', 375 | 'verificationUriComplete': 'string', 376 | 'expiresIn': 123, 377 | 'interval': 123 378 | } 379 | 380 | 381 | :returns: 382 | SSOOIDC.Client.exceptions.InvalidRequestException 383 | SSOOIDC.Client.exceptions.InvalidClientException 384 | SSOOIDC.Client.exceptions.UnauthorizedClientException 385 | SSOOIDC.Client.exceptions.SlowDownException 386 | SSOOIDC.Client.exceptions.InternalServerException 387 | 388 | """ 389 | pass 390 | 391 | -------------------------------------------------------------------------------- /pyboto3/workmailmessageflow.py: -------------------------------------------------------------------------------- 1 | ''' 2 | 3 | The MIT License (MIT) 4 | 5 | Copyright (c) 2016 WavyCloud 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | 25 | ''' 26 | 27 | def can_paginate(operation_name=None): 28 | """ 29 | Check if an operation can be paginated. 30 | 31 | :type operation_name: string 32 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 33 | 34 | """ 35 | pass 36 | 37 | def generate_presigned_url(ClientMethod=None, Params=None, ExpiresIn=None, HttpMethod=None): 38 | """ 39 | Generate a presigned url given a client, its method, and arguments 40 | 41 | :type ClientMethod: string 42 | :param ClientMethod: The client method to presign for 43 | 44 | :type Params: dict 45 | :param Params: The parameters normally passed to\nClientMethod. 46 | 47 | :type ExpiresIn: int 48 | :param ExpiresIn: The number of seconds the presigned url is valid\nfor. By default it expires in an hour (3600 seconds) 49 | 50 | :type HttpMethod: string 51 | :param HttpMethod: The http method to use on the generated url. By\ndefault, the http method is whatever is used in the method\'s model. 52 | 53 | """ 54 | pass 55 | 56 | def get_paginator(operation_name=None): 57 | """ 58 | Create a paginator for an operation. 59 | 60 | :type operation_name: string 61 | :param operation_name: The operation name. This is the same name\nas the method name on the client. For example, if the\nmethod name is create_foo, and you\'d normally invoke the\noperation as client.create_foo(**kwargs), if the\ncreate_foo operation can be paginated, you can use the\ncall client.get_paginator('create_foo'). 62 | 63 | :rtype: L{botocore.paginate.Paginator} 64 | ReturnsA paginator object. 65 | 66 | 67 | """ 68 | pass 69 | 70 | def get_raw_message_content(messageId=None): 71 | """ 72 | Retrieves the raw content of an in-transit email message, in MIME format. 73 | See also: AWS API Documentation 74 | 75 | Exceptions 76 | 77 | :example: response = client.get_raw_message_content( 78 | messageId='string' 79 | ) 80 | 81 | 82 | :type messageId: string 83 | :param messageId: [REQUIRED]\nThe identifier of the email message to retrieve.\n 84 | 85 | :rtype: dict 86 | ReturnsResponse Syntax{ 87 | 'messageContent': StreamingBody() 88 | } 89 | 90 | 91 | Response Structure 92 | 93 | (dict) -- 94 | messageContent (StreamingBody) --The raw content of the email message, in MIME format. 95 | 96 | 97 | 98 | 99 | 100 | 101 | Exceptions 102 | 103 | WorkMailMessageFlow.Client.exceptions.ResourceNotFoundException 104 | 105 | 106 | :return: { 107 | 'messageContent': StreamingBody() 108 | } 109 | 110 | 111 | """ 112 | pass 113 | 114 | def get_waiter(waiter_name=None): 115 | """ 116 | Returns an object that can wait for some condition. 117 | 118 | :type waiter_name: str 119 | :param waiter_name: The name of the waiter to get. See the waiters\nsection of the service docs for a list of available waiters. 120 | 121 | :rtype: botocore.waiter.Waiter 122 | 123 | 124 | """ 125 | pass 126 | 127 | -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | addopts = -s -vv -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4==4.5.0 2 | boto3==1.3.1 3 | botocore==1.4.93 4 | certifi==2020.4.5.1 5 | chardet==3.0.4 6 | docutils==0.16 7 | idna==2.9 8 | jmespath==0.10.0 9 | py==1.8.1 10 | pytest==2.9.2 11 | python-dateutil==2.8.1 12 | requests==2.23.0 13 | six==1.15.0 14 | urllib3==1.25.9 15 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | setup(name='pyboto3', 4 | version='1.13.18', 5 | packages=find_packages(), 6 | description='Pythonic Interface for AWS boto3 that gives you autocomplete on every service', 7 | author='WavyCloud', 8 | author_email='', 9 | url='https://github.com/wavycloud/pyboto3', 10 | py_modules=['pyboto3'], 11 | install_requires=[], 12 | license='MIT License', 13 | zip_safe=True, 14 | keywords='aws boto3 pythonic python', 15 | classifiers=[]) 16 | -------------------------------------------------------------------------------- /tests/test_generator.py: -------------------------------------------------------------------------------- 1 | from pyboto3 import interface_generator 2 | import json 3 | 4 | 5 | def test_get_services_dir(): 6 | assert interface_generator.get_services_dir() 7 | 8 | service_json_path_dict = dict(interface_generator.iter_services_json_paths()) 9 | for service_name, json_path in service_json_path_dict.iteritems(): 10 | print service_name, json_path 11 | 12 | apigateway_methods = {'can_paginate', 'create_api_key', 'create_authorizer', 'create_base_path_mapping', 13 | 'create_deployment', 14 | 'create_domain_name', 'create_model', 'create_resource', 'create_rest_api', 'create_stage', 15 | 'delete_api_key', 'delete_authorizer', 'delete_base_path_mapping', 16 | 'delete_client_certificate', 17 | 'delete_deployment', 'delete_domain_name', 'delete_integration', 18 | 'delete_integration_response', 19 | 'delete_method', 'delete_method_response', 'delete_model', 'delete_resource', 20 | 'delete_rest_api', 21 | 'delete_stage', 'flush_stage_authorizers_cache', 'flush_stage_cache', 22 | 'generate_client_certificate', 23 | 'generate_presigned_url', 'get_account', 'get_api_key', 'get_api_keys', 'get_authorizer', 24 | 'get_authorizers', 'get_base_path_mapping', 'get_base_path_mappings', 25 | 'get_client_certificate', 26 | 'get_client_certificates', 'get_deployment', 'get_deployments', 'get_domain_name', 27 | 'get_domain_names', 28 | 'get_export', 'get_integration', 'get_integration_response', 'get_method', 29 | 'get_method_response', 30 | 'get_model', 'get_model_template', 'get_models', 'get_paginator', 'get_resource', 31 | 'get_resources', 32 | 'get_rest_api', 'get_rest_apis', 'get_sdk', 'get_stage', 'get_stages', 'get_waiter', 33 | 'import_rest_api', 34 | 'put_integration', 'put_integration_response', 'put_method', 'put_method_response', 35 | 'put_rest_api', 36 | 'test_invoke_authorizer', 'test_invoke_method', 'update_account', 'update_api_key', 37 | 'update_authorizer', 38 | 'update_base_path_mapping', 'update_client_certificate', 'update_deployment', 39 | 'update_domain_name', 40 | 'update_integration', 'update_integration_response', 'update_method', 41 | 'update_method_response', 42 | 'update_model', 'update_resource', 'update_rest_api', 'update_stage'} 43 | 44 | apigateway_dict = json.load(open(service_json_path_dict.get('apigateway'))) 45 | assert set(interface_generator.iter_method_names(apigateway_dict)) == apigateway_methods 46 | 47 | s3_methods = {'abort_multipart_upload', 'can_paginate', 'complete_multipart_upload', 'copy_object', 48 | 'create_bucket', 49 | 'create_multipart_upload', 'delete_bucket', 'delete_bucket_cors', 'delete_bucket_lifecycle', 50 | 'delete_bucket_policy', 'delete_bucket_replication', 'delete_bucket_tagging', 51 | 'delete_bucket_website', 52 | 'delete_object', 'delete_objects', 'download_file', 'generate_presigned_post', 53 | 'generate_presigned_url', 'get_bucket_accelerate_configuration', 'get_bucket_acl', 54 | 'get_bucket_cors', 55 | 'get_bucket_lifecycle', 'get_bucket_lifecycle_configuration', 'get_bucket_location', 56 | 'get_bucket_logging', 'get_bucket_notification', 'get_bucket_notification_configuration', 57 | 'get_bucket_policy', 'get_bucket_replication', 'get_bucket_request_payment', 'get_bucket_tagging', 58 | 'get_bucket_versioning', 'get_bucket_website', 'get_object', 'get_object_acl', 59 | 'get_object_torrent', 60 | 'get_paginator', 'get_waiter', 'head_bucket', 'head_object', 'list_buckets', 61 | 'list_multipart_uploads', 62 | 'list_object_versions', 'list_objects', 'list_objects_v2', 'list_parts', 63 | 'put_bucket_accelerate_configuration', 'put_bucket_acl', 'put_bucket_cors', 64 | 'put_bucket_lifecycle', 65 | 'put_bucket_lifecycle_configuration', 'put_bucket_logging', 'put_bucket_notification', 66 | 'put_bucket_notification_configuration', 'put_bucket_policy', 'put_bucket_replication', 67 | 'put_bucket_request_payment', 'put_bucket_tagging', 'put_bucket_versioning', 'put_bucket_website', 68 | 'put_object', 'put_object_acl', 'restore_object', 'upload_file', 'upload_part', 69 | 'upload_part_copy'} 70 | s3_dict = json.load(open(service_json_path_dict.get('s3'))) 71 | assert set(interface_generator.iter_method_names(s3_dict)) == s3_methods 72 | -------------------------------------------------------------------------------- /tests/test_parser.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from bs4 import BeautifulSoup 4 | import requests 5 | 6 | from pyboto3 import boto3_interface_generator 7 | 8 | from pyboto3.boto3_interface_generator import iter_params, iter_methods, get_method_description, get_param_description, \ 9 | iter_code_lines, generate_all_services_code, iter_all_services, generate_service_code 10 | 11 | 12 | def test_iter_methods_api_gateway(): 13 | response = requests.get('https://boto3.readthedocs.io/en/latest/reference/services/apigateway.html') 14 | soup = BeautifulSoup(response._content, 'html.parser') 15 | methods = {'can_paginate', 'create_api_key', 'create_authorizer', 'create_base_path_mapping', 'create_deployment', 16 | 'create_domain_name', 'create_model', 'create_resource', 'create_rest_api', 'create_stage', 17 | 'delete_api_key', 'delete_authorizer', 'delete_base_path_mapping', 'delete_client_certificate', 18 | 'delete_deployment', 'delete_domain_name', 'delete_integration', 'delete_integration_response', 19 | 'delete_method', 'delete_method_response', 'delete_model', 'delete_resource', 'delete_rest_api', 20 | 'delete_stage', 'flush_stage_authorizers_cache', 'flush_stage_cache', 'generate_client_certificate', 21 | 'generate_presigned_url', 'get_account', 'get_api_key', 'get_api_keys', 'get_authorizer', 22 | 'get_authorizers', 'get_base_path_mapping', 'get_base_path_mappings', 'get_client_certificate', 23 | 'get_client_certificates', 'get_deployment', 'get_deployments', 'get_domain_name', 'get_domain_names', 24 | 'get_export', 'get_integration', 'get_integration_response', 'get_method', 'get_method_response', 25 | 'get_model', 'get_model_template', 'get_models', 'get_paginator', 'get_resource', 'get_resources', 26 | 'get_rest_api', 'get_rest_apis', 'get_sdk', 'get_stage', 'get_stages', 'get_waiter', 'import_rest_api', 27 | 'put_integration', 'put_integration_response', 'put_method', 'put_method_response', 'put_rest_api', 28 | 'test_invoke_authorizer', 'test_invoke_method', 'update_account', 'update_api_key', 'update_authorizer', 29 | 'update_base_path_mapping', 'update_client_certificate', 'update_deployment', 'update_domain_name', 30 | 'update_integration', 'update_integration_response', 'update_method', 'update_method_response', 31 | 'update_model', 'update_resource', 'update_rest_api', 'update_stage'} 32 | method_soup_dict = {name: html for name, html in iter_methods(soup.find(id='client'))} 33 | assert methods == set([str(x) for x in method_soup_dict.keys()]) 34 | 35 | can_paginate_params = [('operation_name', 'string')] 36 | assert can_paginate_params == list( 37 | (name, type) for name, type, desc in iter_params(method_soup_dict['can_paginate'])) 38 | create_api_key_params = [('name', 'string', 'The name of the ApiKey .'), 39 | ('description', 'string', 'The description of the ApiKey .'), 40 | ('enabled', 'boolean', 'Specifies whether the ApiKey can be used by callers.'), 41 | ('stageKeys', 'list', 'Specifies whether the ApiKey can be used by callers.' 42 | '\n(dict) --A reference to a unique stage identified in the format {restApiId}/{stage} .' 43 | '\nrestApiId (string) --A list of Stage resources that are associated with the ApiKey resource.' 44 | '\nstageName (string) --The stage name in the RestApi that the stage key references.\n\n\n')] 45 | assert create_api_key_params == list( 46 | (str(name), str(type), str(desc)) for name, type, desc in iter_params(method_soup_dict['create_api_key'])) 47 | assert [('restApiId', 'string'), ('resourceId', 'string')] == list( 48 | (name, type) for name, type, desc in iter_params(method_soup_dict['get_resource'])) 49 | 50 | for method, html in method_soup_dict.iteritems(): 51 | param_dict = {param: type for param, type, description in iter_params(html)} 52 | print method, param_dict.keys() 53 | 54 | 55 | def test_description(): 56 | response = requests.get('https://boto3.readthedocs.io/en/latest/reference/services/apigateway.html') 57 | soup = BeautifulSoup(response._content, 'html.parser') 58 | method_soup_dict = {name: html for name, html in iter_methods(soup.find(id='client'))} 59 | can_paginate_description = 'Check if an operation can be paginated.' 60 | assert can_paginate_description == get_method_description(method_soup_dict.get('can_paginate')) 61 | 62 | 63 | def test_signle_param_description(): 64 | soup = BeautifulSoup( 65 | """
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
""", 66 | 'html.parser') 67 | result = get_param_description(soup) 68 | print result 69 | assert result == """The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").""" 70 | 71 | 72 | def test_multiple_param_description(): 73 | soup = BeautifulSoup( 74 | """
""") 75 | result = get_param_description(soup) 76 | 77 | 78 | def test_cloudformation(): 79 | response = requests.get('https://boto3.readthedocs.io/en/latest/reference/services/cloudformation.html') 80 | soup = BeautifulSoup(response._content, 'html.parser') 81 | method_soup_dict = {name: html for name, html in iter_methods(soup.find(id='client'))} 82 | get_template_params = [('StackName', 'string')] 83 | assert get_template_params == list( 84 | (name, type) for name, type, desc in iter_params(method_soup_dict['get_template'])) 85 | 86 | 87 | def test_iter_methods_s3(): 88 | response = requests.get('https://boto3.readthedocs.io/en/latest/reference/services/s3.html') 89 | soup = BeautifulSoup(response._content, 'html.parser') 90 | s3_methods = {'abort_multipart_upload', 'can_paginate', 'complete_multipart_upload', 'copy_object', 'create_bucket', 91 | 'create_multipart_upload', 'delete_bucket', 'delete_bucket_cors', 'delete_bucket_lifecycle', 92 | 'delete_bucket_policy', 'delete_bucket_replication', 'delete_bucket_tagging', 'delete_bucket_website', 93 | 'delete_object', 'delete_objects', 'download_file', 'generate_presigned_post', 94 | 'generate_presigned_url', 'get_bucket_accelerate_configuration', 'get_bucket_acl', 'get_bucket_cors', 95 | 'get_bucket_lifecycle', 'get_bucket_lifecycle_configuration', 'get_bucket_location', 96 | 'get_bucket_logging', 'get_bucket_notification', 'get_bucket_notification_configuration', 97 | 'get_bucket_policy', 'get_bucket_replication', 'get_bucket_request_payment', 'get_bucket_tagging', 98 | 'get_bucket_versioning', 'get_bucket_website', 'get_object', 'get_object_acl', 'get_object_torrent', 99 | 'get_paginator', 'get_waiter', 'head_bucket', 'head_object', 'list_buckets', 'list_multipart_uploads', 100 | 'list_object_versions', 'list_objects', 'list_objects_v2', 'list_parts', 101 | 'put_bucket_accelerate_configuration', 'put_bucket_acl', 'put_bucket_cors', 'put_bucket_lifecycle', 102 | 'put_bucket_lifecycle_configuration', 'put_bucket_logging', 'put_bucket_notification', 103 | 'put_bucket_notification_configuration', 'put_bucket_policy', 'put_bucket_replication', 104 | 'put_bucket_request_payment', 'put_bucket_tagging', 'put_bucket_versioning', 'put_bucket_website', 105 | 'put_object', 'put_object_acl', 'restore_object', 'upload_file', 'upload_part', 'upload_part_copy'} 106 | method_soup_dict = {name: html for name, html in iter_methods(soup.find(id='client'))} 107 | assert s3_methods == set([str(x) for x in method_soup_dict.keys()]) 108 | abort_multipart_upload_params = [('Bucket', 'string'), 109 | ('Key', 'string'), 110 | ('UploadId', 'string'), 111 | ('RequestPayer', 'string')] 112 | assert abort_multipart_upload_params == list( 113 | (name, type) for name, type, desc in iter_params(method_soup_dict['abort_multipart_upload'])) 114 | for method, html in method_soup_dict.iteritems(): 115 | param_dict = {param: type for param, type, description in iter_params(html)} 116 | # print method, param_dict.keys() 117 | 118 | for line in iter_code_lines(soup): 119 | print line 120 | 121 | 122 | def test_generate_code(): 123 | generate_all_services_code(os.path.join(os.path.dirname(__file__), '..', 'pyboto3')) 124 | 125 | 126 | def test_generate_rds_code(): 127 | generate_service_code('https://boto3.readthedocs.io/en/latest/reference/services/rds.html', 128 | os.path.join(os.path.dirname(__file__), '..', 'pyboto3', 'rds.py')) 129 | def test_generate_s3_code(): 130 | generate_service_code('https://boto3.readthedocs.io/en/latest/reference/services/s3.html', 131 | os.path.join(os.path.dirname(__file__), '..', 'pyboto3', 's3.py')) 132 | 133 | 134 | def test_get_services(): 135 | services = list(iter_all_services()) 136 | print services 137 | assert ('ACM', 'https://boto3.readthedocs.io/en/latest/reference/services/acm.html') in services 138 | --------------------------------------------------------------------------------