boto3_apigateway¶
Connection module for Amazon APIGateway using boto3.¶
Renamed from
boto_apigatewaytoboto3_apigatewayand rewritten to use the boto3apigatewayclient APIs directly viasaltext.boto3.utils.boto3mod. The legacy boto2 code path (object-style access, retry loops) has been removed.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
- configuration:
This module accepts explicit API Gateway credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in a pillar or in the minion’s config file:
apigateway.keyid: GKTADJGHEIQSXMKKRBJ08H apigateway.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration:
apigateway.region: us-west-2
If a region is not specified, the default is us-east-1.
It’s also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:
myprofile: keyid: GKTADJGHEIQSXMKKRBJ08H key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs region: us-west-2
Added in version 1.0.0.
- saltext.boto3.modules.boto3_apigateway.__virtual__()[source]¶
Only load if boto3 is available. Minimum version is enforced via the project’s
pyproject.tomldependency declaration.
- saltext.boto3.modules.boto3_apigateway.describe_apis(name=None, description=None, region=None, key=None, keyid=None, profile=None)[source]¶
Returns all rest apis in the defined region. If optional parameter name is included, returns all rest apis matching the name in the defined region.
- name (str, optional):
The name of the REST API to filter by. If not provided, all APIs are returned.
- description (str, optional):
The description of the REST API to filter by. If not provided, all APIs are returned.
- region (str, optional):
The AWS region where the REST APIs are located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_apis salt myminion boto3_apigateway.describe_apis name='api name' salt myminion boto3_apigateway.describe_apis name='api name' description='desc str'
- saltext.boto3.modules.boto3_apigateway.api_exists(name, description=None, region=None, key=None, keyid=None, profile=None)[source]¶
Check to see if the given Rest API Name and optionally description exists.
- name (str):
The name of the REST API to check for existence.
- description (str, optional):
The description of the REST API to check for existence.
- region (str, optional):
The AWS region where the REST APIs are located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.api_exists name='myapi_name'
- saltext.boto3.modules.boto3_apigateway.create_api(name, description, cloneFrom=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create a new REST API Service with the given name
- name (str):
The name of the REST API to create.
- description (str):
The description of the REST API to create.
- cloneFrom (str, optional):
The ID of an existing REST API to clone. If not provided, a new API is created.
- region (str, optional):
The AWS region where the REST API is to be created.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api name='myapi_name' description='api_description'
- saltext.boto3.modules.boto3_apigateway.delete_api(name, description=None, region=None, key=None, keyid=None, profile=None)[source]¶
Delete all REST API Service with the given name and an optional API description
- name (str):
The name of the REST API to delete.
- description (str, optional):
The description of the REST API to delete.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api name='myapi_name' salt myminion boto3_apigateway.delete_api name='myapi_name' description='api description'
- saltext.boto3.modules.boto3_apigateway.describe_api_resources(restApiId, region=None, key=None, keyid=None, profile=None)[source]¶
Given rest api id, return all resources for this api.
- restApiId (str):
The ID of the REST API for which to describe resources.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_resources restApiId='myapi_id'
- saltext.boto3.modules.boto3_apigateway.describe_api_resource(restApiId, path, region=None, key=None, keyid=None, profile=None)[source]¶
Given rest api id, and an absolute resource path, returns the resource id for the given path.
- restApiId (str):
The ID of the REST API for which to describe the resource.
- path (str):
The absolute path of the resource to describe.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_resource restApiId='myapi_id' path='resource_path'
- saltext.boto3.modules.boto3_apigateway.create_api_resources(restApiId, path, region=None, key=None, keyid=None, profile=None)[source]¶
Given rest api id, and an absolute resource path, create all the resources and return all resources in the resourcepath, returns False on failure.
- restApiId (str):
The ID of the REST API for which to create the resources.
- path (str):
The absolute path of the resource to create.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_resources restApiId='myapi_id' path='resource_path'
- saltext.boto3.modules.boto3_apigateway.delete_api_resources(restApiId, path, region=None, key=None, keyid=None, profile=None)[source]¶
Given restApiId and an absolute resource path, delete the resources starting from the absolute resource path. If resourcepath is the root resource ‘/’, the function will return False. Returns False on failure.
- restApiId (str):
The ID of the REST API for which to delete the resources.
- path (str):
The absolute path of the resource to delete.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_resources restApiId='myapi_id' path='resource_path'
- saltext.boto3.modules.boto3_apigateway.describe_api_resource_method(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None)[source]¶
Given rest api id, resource path, and http method (must be one of DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT), return the method for the api/resource path if defined. Return False if method is not defined.
- restApiId (str):
The ID of the REST API for which to describe the resource method.
- resourcePath (str):
The absolute path of the resource for which to describe the method.
- httpMethod (str):
The HTTP method for the resource (must be one of DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT).
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_resource_method restApiId='myapi_id' resourcePath='resource_path' httpMethod='httpmethod'
- saltext.boto3.modules.boto3_apigateway.describe_api_key(apiKey, region=None, key=None, keyid=None, profile=None)[source]¶
Gets info about the given api key
- apiKey (str):
The ID of the API key to describe.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_key apiKey='apigw_api_key'
- saltext.boto3.modules.boto3_apigateway.describe_api_keys(region=None, key=None, keyid=None, profile=None)[source]¶
Gets information about the defined API Keys. Return list of apiKeys.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_keys
- saltext.boto3.modules.boto3_apigateway.create_api_key(name, description, enabled=True, stageKeys=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create an API key given name and description.
An optional enabled argument can be provided. If provided, the valid values are True|False. This argument defaults to True.
An optional stageKeys argument can be provided in the form of list of dictionary with ‘restApiId’ and ‘stageName’ as keys.
- name (str):
The name of the API key.
- description (str):
The description of the API key.
- enabled (bool, optional):
Whether the API key is enabled. Defaults to True.
- stageKeys (list of dict, optional):
A list of stage key dictionaries, each containing ‘restApiId’ and ‘stageName’.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_key name description salt myminion boto3_apigateway.create_api_key name description enabled=False salt myminion boto3_apigateway.create_api_key name description stageKeys='[{"restApiId": "id", "stageName": "stagename"}]'
- saltext.boto3.modules.boto3_apigateway.delete_api_key(apiKey, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes a given apiKey
- apiKey (str):
The ID of the API key to delete.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_key apikeystring
- saltext.boto3.modules.boto3_apigateway.update_api_key_description(apiKey, description, region=None, key=None, keyid=None, profile=None)[source]¶
update the given apiKey with the given description.
- apiKey (str):
The ID of the API key to update.
- description (str):
The new description for the API key.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.update_api_key_description api_key description
- saltext.boto3.modules.boto3_apigateway.enable_api_key(apiKey, region=None, key=None, keyid=None, profile=None)[source]¶
enable the given apiKey.
- apiKey (str):
The ID of the API key to enable.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.enable_api_key api_key region=us-west-2 key=mysecretkey keyid=myaccesskeyid profile=myprofile
- saltext.boto3.modules.boto3_apigateway.disable_api_key(apiKey, region=None, key=None, keyid=None, profile=None)[source]¶
disable the given apiKey.
- apiKey (str):
The ID of the API key to disable.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.disable_api_key api_key region=us-west-2 key=mysecretkey keyid=myaccesskeyid profile=myprofile
- saltext.boto3.modules.boto3_apigateway.associate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None)[source]¶
associate the given stagekeyslist to the given apiKey.
- apiKey (str):
The ID of the API key to associate the stage keys with.
- stagekeyslist (list):
A list of stage keys to associate with the API key.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.associate_stagekeys_api_key api_key '["restapi id/stage name", ...]' region=us-west-2 key=mysecretkey keyid=myaccesskeyid profile=myprofile
- saltext.boto3.modules.boto3_apigateway.disassociate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None)[source]¶
disassociate the given stagekeyslist to the given apiKey.
- apiKey (str):
The ID of the API key to disassociate the stage keys from.
- stagekeyslist (list):
A list of stage keys to disassociate from the API key.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.disassociate_stagekeys_api_key api_key '["restapi id/stage name", ...]' region=us-west-2 key=mysecretkey keyid=myaccesskeyid profile=myprofile
- saltext.boto3.modules.boto3_apigateway.describe_api_deployments(restApiId, region=None, key=None, keyid=None, profile=None)[source]¶
Gets information about the defined API Deployments. Return list of api deployments.
- restApiId (str):
The ID of the REST API for which to describe deployments.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_deployments restApiId
- saltext.boto3.modules.boto3_apigateway.describe_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None)[source]¶
Get API deployment for a given restApiId and deploymentId.
- restApiId (str):
The ID of the REST API for which to describe the deployment.
- deploymentId (str):
The ID of the deployment to describe.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_deployment restApiId deploymentId
- saltext.boto3.modules.boto3_apigateway.activate_api_deployment(restApiId, stageName, deploymentId, region=None, key=None, keyid=None, profile=None)[source]¶
Activates previously deployed deployment for a given stage.
- restApiId (str):
The ID of the REST API for which to activate the deployment.
- stageName (str):
The name of the stage to activate the deployment for.
- deploymentId (str):
The ID of the deployment to activate.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.activate_api_deployment restApiId stageName deploymentId
- saltext.boto3.modules.boto3_apigateway.create_api_deployment(restApiId, stageName, stageDescription='', description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates a new API deployment.
- restApiId (str):
The ID of the REST API for which to create the deployment.
- stageName (str):
The name of the stage to create the deployment for.
- stageDescription (str, optional):
The description of the stage.
- description (str, optional):
The description of the deployment.
- cacheClusterEnabled (bool, optional):
Whether the cache cluster is enabled for the stage.
- cacheClusterSize (str, optional):
The size of the cache cluster for the stage.
- variables (dict, optional):
The stage variables to set for the stage.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_deployment restApiId stageName stageDescription='' description='' cacheClusterEnabled=True|False cacheClusterSize=0.5 variables='{"name": "value"}'
- saltext.boto3.modules.boto3_apigateway.delete_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes API deployment for a given restApiId and deploymentID
- restApiId (str):
The ID of the REST API.
- deploymentId (str):
The ID of the deployment to delete.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_deployment restApiId deploymentId
- saltext.boto3.modules.boto3_apigateway.overwrite_api_stage_variables(restApiId, stageName, variables, region=None, key=None, keyid=None, profile=None)[source]¶
Overwrite the stage variables for the given restApiId and stage name with the given variables, variables must be in the form of a dictionary. Overwrite will always remove all the existing stage variables associated with the given restApiId and stage name, follow by the adding of all the variables specified in the variables dictionary
- restApiId (str):
The ID of the REST API.
- stageName (str):
The name of the stage.
- variables (dict):
The stage variables to set, in the form of a dictionary.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.overwrite_api_stage_variables restApiId stageName variables='{"name": "value"}'
- saltext.boto3.modules.boto3_apigateway.describe_api_stage(restApiId, stageName, region=None, key=None, keyid=None, profile=None)[source]¶
Get API stage for a given apiID and stage name
- restApiId (str):
The ID of the REST API.
- stageName (str):
The name of the stage.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_stage restApiId stageName
- saltext.boto3.modules.boto3_apigateway.describe_api_stages(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None)[source]¶
Get all API stages for a given apiID and deploymentID
- restApiId (str):
The ID of the REST API.
- deploymentId (str):
The ID of the deployment.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_stages restApiId deploymentId
- saltext.boto3.modules.boto3_apigateway.create_api_stage(restApiId, stageName, deploymentId, description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates a new API stage for a given restApiId and deploymentId.
- restApiId (str):
The ID of the REST API.
- stageName (str):
The name of the stage.
- deploymentId (str):
The ID of the deployment.
- description (str, optional):
The description of the stage.
- cacheClusterEnabled (bool, optional):
Whether the cache cluster is enabled.
- cacheClusterSize (str, optional):
The size of the cache cluster.
- variables (dict, optional):
The stage variables.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_stage restApiId stagename deploymentId description='' cacheClusterEnabled=True|False cacheClusterSize='0.5' variables='{"name": "value"}'
- saltext.boto3.modules.boto3_apigateway.delete_api_stage(restApiId, stageName, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes stage identified by stageName from API identified by restApiId
- restApiId (str):
The ID of the REST API.
- stageName (str):
The name of the stage.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_stage restApiId stageName
- saltext.boto3.modules.boto3_apigateway.flush_api_stage_cache(restApiId, stageName, region=None, key=None, keyid=None, profile=None)[source]¶
Flushes cache for the stage identified by stageName from API identified by restApiId
- restApiId (str):
The ID of the REST API.
- stageName (str):
The name of the stage.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.flush_api_stage_cache restApiId stageName
- saltext.boto3.modules.boto3_apigateway.create_api_method(restApiId, resourcePath, httpMethod, authorizationType, apiKeyRequired=False, requestParameters=None, requestModels=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates API method for a resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- authorizationType (str):
The authorization type for the API method.
- apiKeyRequired (bool, optional):
Whether an API key is required for the method.
- requestParameters (dict, optional):
The request parameters for the method.
- requestModels (dict, optional):
The request models for the method.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_method restApiId resourcePath, httpMethod, authorizationType, apiKeyRequired=False, requestParameters='{"name", "value"}', requestModels='{"content-type", "value"}'
- saltext.boto3.modules.boto3_apigateway.describe_api_method(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None)[source]¶
Get API method for a resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_method restApiId resourcePath httpMethod
- saltext.boto3.modules.boto3_apigateway.delete_api_method(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None)[source]¶
Delete API method for a resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_method restApiId resourcePath httpMethod
- saltext.boto3.modules.boto3_apigateway.create_api_method_response(restApiId, resourcePath, httpMethod, statusCode, responseParameters=None, responseModels=None, region=None, key=None, keyid=None, profile=None)[source]¶
Create API method response for a method on a given resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- statusCode (str):
The status code for the method response.
- responseParameters (dict, optional):
The response parameters for the method response.
- responseModels (dict, optional):
The response models for the method response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_method_response restApiId resourcePath httpMethod statusCode responseParameters='{"name", "True|False"}' responseModels='{"content-type", "model"}'
- saltext.boto3.modules.boto3_apigateway.delete_api_method_response(restApiId, resourcePath, httpMethod, statusCode, region=None, key=None, keyid=None, profile=None)[source]¶
Delete API method response for a resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- statusCode (str):
The status code for the method response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_method_response restApiId resourcePath httpMethod statusCode
- saltext.boto3.modules.boto3_apigateway.describe_api_method_response(restApiId, resourcePath, httpMethod, statusCode, region=None, key=None, keyid=None, profile=None)[source]¶
Get API method response for a resource in the given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method for the API method.
- statusCode (str):
The status code for the method response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_method_response restApiId resourcePath httpMethod statusCode
- saltext.boto3.modules.boto3_apigateway.describe_api_models(restApiId, region=None, key=None, keyid=None, profile=None)[source]¶
Get all models for a given API
- restApiId (str):
The ID of the REST API.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_models restApiId
- saltext.boto3.modules.boto3_apigateway.describe_api_model(restApiId, modelName, flatten=True, region=None, key=None, keyid=None, profile=None)[source]¶
Get a model by name for a given API
- restApiId (str):
The ID of the REST API.
- modelName (str):
The name of the model to retrieve.
- flatten (bool, optional):
Whether to flatten the model structure. Defaults to True.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_model restApiId modelName [True]
- saltext.boto3.modules.boto3_apigateway.api_model_exists(restApiId, modelName, region=None, key=None, keyid=None, profile=None)[source]¶
Check to see if the given modelName exists in the given restApiId
- restApiId (str):
The ID of the REST API.
- modelName (str):
The name of the model to check for existence.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.api_model_exists restApiId modelName
- saltext.boto3.modules.boto3_apigateway.update_api_model_schema(restApiId, modelName, schema, region=None, key=None, keyid=None, profile=None)[source]¶
update the schema (in python dictionary format) for the given model in the given restApiId
- restApiId (str):
The ID of the REST API.
- modelName (str):
The name of the model to update.
- schema (dict or str):
The new schema for the model. Can be a Python dictionary or a JSON string.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.update_api_model_schema restApiId modelName schema
- saltext.boto3.modules.boto3_apigateway.delete_api_model(restApiId, modelName, region=None, key=None, keyid=None, profile=None)[source]¶
Delete a model identified by name in a given API
- restApiId (str):
The ID of the REST API.
- modelName (str):
The name of the model to delete.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_model restApiId modelName
- saltext.boto3.modules.boto3_apigateway.create_api_model(restApiId, modelName, modelDescription, schema, contentType='application/json', region=None, key=None, keyid=None, profile=None)[source]¶
Create a new model in a given API with a given schema, currently only contentType supported is ‘application/json’
- restApiId (str):
The ID of the REST API.
- modelName (str):
The name of the model to create.
- modelDescription (str):
A description of the model.
- schema (dict or str):
The schema for the model. Can be a Python dictionary or a JSON string.
- contentType (str, optional):
The content type for the model schema. Default is ‘application/json’.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_model restApiId modelName modelDescription '<schema>' 'content-type'
- saltext.boto3.modules.boto3_apigateway.describe_api_integration(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None)[source]¶
Get an integration for a given method in a given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_integration restApiId resourcePath httpMethod
- saltext.boto3.modules.boto3_apigateway.describe_api_integration_response(restApiId, resourcePath, httpMethod, statusCode, region=None, key=None, keyid=None, profile=None)[source]¶
Get an integration response for a given method in a given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- statusCode (str):
The status code of the integration response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_api_integration_response restApiId resourcePath httpMethod statusCode
- saltext.boto3.modules.boto3_apigateway.delete_api_integration(restApiId, resourcePath, httpMethod, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes an integration for a given method in a given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_integration restApiId resourcePath httpMethod
- saltext.boto3.modules.boto3_apigateway.delete_api_integration_response(restApiId, resourcePath, httpMethod, statusCode, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes an integration response for a given method in a given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- statusCode (str):
The status code of the integration response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_api_integration_response restApiId resourcePath httpMethod statusCode
- saltext.boto3.modules.boto3_apigateway.create_api_integration(restApiId, resourcePath, httpMethod, integrationType, integrationHttpMethod, uri, credentials, requestParameters=None, requestTemplates=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates an integration for a given method in a given API. If integrationType is MOCK, uri and credential parameters will be ignored.
uri is in the form of (substitute APIGATEWAY_REGION and LAMBDA_FUNC_ARN) “arn:aws:apigateway:APIGATEWAY_REGION:lambda:path/2015-03-31/functions/LAMBDA_FUNC_ARN/invocations”
credentials is in the form of an iam role name or role arn.
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- integrationType (str):
The type of the integration (e.g., MOCK, AWS, HTTP, HTTP_PROXY, AWS_PROXY).
- integrationHttpMethod (str):
The HTTP method used for the integration request.
- uri (str):
The URI of the integration endpoint.
- credentials (str):
The IAM role name or ARN used for the integration.
- requestParameters (dict, optional):
The request parameters for the integration.
- requestTemplates (dict, optional):
The request templates for the integration.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_integration restApiId resourcePath httpMethod integrationType integrationHttpMethod uri credentials ['{}' ['{}']]
- saltext.boto3.modules.boto3_apigateway.create_api_integration_response(restApiId, resourcePath, httpMethod, statusCode, selectionPattern, responseParameters=None, responseTemplates=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates an integration response for a given method in a given API
- restApiId (str):
The ID of the REST API.
- resourcePath (str):
The path of the resource.
- httpMethod (str):
The HTTP method of the integration.
- statusCode (str):
The status code of the integration response.
- selectionPattern (str):
The selection pattern for the integration response.
- responseParameters (dict, optional):
The response parameters for the integration response.
- responseTemplates (dict, optional):
The response templates for the integration response.
- region (str, optional):
The AWS region where the REST API is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.create_api_integration_response restApiId resourcePath httpMethod statusCode selectionPattern ['{}' ['{}']]
- saltext.boto3.modules.boto3_apigateway.describe_usage_plans(name=None, plan_id=None, region=None, key=None, keyid=None, profile=None)[source]¶
Returns a list of existing usage plans, optionally filtered to match a given plan name
- name (str, optional):
The name of the usage plan to filter by.
- plan_id (str, optional):
The ID of the usage plan to filter by.
- region (str, optional):
The AWS region where the usage plans are located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.describe_usage_plans salt myminion boto3_apigateway.describe_usage_plans name='usage plan name' salt myminion boto3_apigateway.describe_usage_plans plan_id='usage plan id'
- saltext.boto3.modules.boto3_apigateway.create_usage_plan(name, description=None, throttle=None, quota=None, region=None, key=None, keyid=None, profile=None)[source]¶
Creates a new usage plan with throttling and quotas optionally applied
- name (str):
Name of the usage plan
- throttle (dict, optional):
A dictionary consisting of the following keys:
- rateLimit
requests per second at steady rate, float
- burstLimit
maximum number of requests per second, integer
- quota (dict, optional):
A dictionary consisting of the following keys:
- limit
number of allowed requests per specified quota period [required if quota parameter is present]
- offset
number of requests to be subtracted from limit at the beginning of the period [optional]
- region (str, optional):
The AWS region where the usage plan is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.]
CLI Example:
salt myminion boto3_apigateway.create_usage_plan name='usage plan name' throttle='{"rateLimit": 10.0, "burstLimit": 10}'
- saltext.boto3.modules.boto3_apigateway.update_usage_plan(plan_id, throttle=None, quota=None, region=None, key=None, keyid=None, profile=None)[source]¶
Updates an existing usage plan with throttling and quotas
- plan_id (str):
Id of the created usage plan
- throttle (dict, optional):
A dictionary consisting of the following keys:
- rateLimit
requests per second at steady rate, float
- burstLimit
maximum number of requests per second, integer
- quota
A dictionary consisting of the following keys:
- limit
number of allowed requests per specified quota period [required if quota parameter is present]
- offset
number of requests to be subtracted from limit at the beginning of the period [optional]
- period
quota period, must be one of DAY, WEEK, or MONTH. [required if quota parameter is present
CLI Example:
salt myminion boto3_apigateway.update_usage_plan plan_id='usage plan id' throttle='{"rateLimit": 10.0, "burstLimit": 10}'
- saltext.boto3.modules.boto3_apigateway.delete_usage_plan(plan_id, region=None, key=None, keyid=None, profile=None)[source]¶
Deletes usage plan identified by plan_id
- plan_id (str):
The ID of the usage plan to delete.
- region (str, optional):
The AWS region where the usage plan is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.delete_usage_plan plan_id='usage plan id'
- saltext.boto3.modules.boto3_apigateway.attach_usage_plan_to_apis(plan_id, apis, region=None, key=None, keyid=None, profile=None)[source]¶
Attaches given usage plan to each of the apis provided in a list of apiId and stage values
- plan_id (str):
The ID of the usage plan to attach the APIs to.
- apis (list):
A list of dictionaries, where each dictionary contains the following:
- apiId (str):
A string, which is the id of the created API in AWS ApiGateway
- stage (str):
A string, which is the stage that the created API is deployed to.
- region (str, optional):
The AWS region where the usage plan is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.attach_usage_plan_to_apis plan_id='usage plan id' apis='[{"apiId": "some id 1", "stage": "some stage 1"}]'
- saltext.boto3.modules.boto3_apigateway.detach_usage_plan_from_apis(plan_id, apis, region=None, key=None, keyid=None, profile=None)[source]¶
Detaches given usage plan from each of the apis provided in a list of apiId and stage values
- plan_id (str):
The ID of the usage plan to detach the APIs from.
- apis (list):
A list of dictionaries, where each dictionary contains the following:
- apiId (str):
A string, which is the id of the created API in AWS ApiGateway
- stage (str):
A string, which is the stage that the created API is deployed to.
- region (str, optional):
The AWS region where the usage plan is located.
- key (str, optional):
The AWS secret access key.
- keyid (str, optional):
The AWS access key ID.
- profile (str, optional):
The profile to use for AWS credentials.
CLI Example:
salt myminion boto3_apigateway.detach_usage_plan_to_apis plan_id='usage plan id' apis='[{"apiId": "some id 1", "stage": "some stage 1"}]'