2019/12/04 - AmazonApiGatewayV2 - 4 new 22 updated api methods
Changes Amazon API Gateway now supports HTTP APIs (beta), enabling customers to quickly build high performance RESTful APIs that are up to 71% cheaper than REST APIs also available from API Gateway. HTTP APIs are optimized for building APIs that proxy to AWS Lambda functions or HTTP backends, making them ideal for serverless workloads. Using HTTP APIs, you can secure your APIs using OIDC and OAuth 2 out of box, quickly build web applications using a simple CORS experience, and get started immediately with automatic deployment and simple create workflows.
Deletes a CORS configuration.
See also: AWS API Documentation
Request Syntax
client.delete_cors_configuration( ApiId='string' )
string
[REQUIRED]
The API identifier.
None
Deletes the RouteSettings for a stage.
See also: AWS API Documentation
Request Syntax
client.delete_route_settings( ApiId='string', RouteKey='string', StageName='string' )
string
[REQUIRED]
The API identifier.
string
[REQUIRED]
The route key.
string
[REQUIRED]
The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.
None
Imports an API.
See also: AWS API Documentation
Request Syntax
client.import_api( Basepath='string', Body='string', FailOnWarnings=True|False )
string
Represents the base path of the imported API. Supported only for HTTP APIs.
string
[REQUIRED]
The OpenAPI definition. Supported only for HTTP APIs.
boolean
Specifies whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.
dict
Response Syntax
{ 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
Puts an Api resource.
See also: AWS API Documentation
Request Syntax
client.reimport_api( ApiId='string', Basepath='string', Body='string', FailOnWarnings=True|False )
string
[REQUIRED]
The API identifier.
string
Represents the base path of the imported API. Supported only for HTTP APIs.
string
[REQUIRED]
The OpenAPI definition. Supported only for HTTP APIs.
boolean
Specifies whether to rollback the API creation (true) or not (false) when a warning is encountered. The default value is false.
dict
Response Syntax
{ 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
{'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'CredentialsArn': 'string', 'ProtocolType': ['HTTP'], 'RouteKey': 'string', 'Target': 'string'}Response
{'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'ImportInfo': ['string'], 'ProtocolType': ['HTTP']}
Creates an Api resource.
See also: AWS API Documentation
Request Syntax
client.create_api( ApiKeySelectionExpression='string', CorsConfiguration={ 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, CredentialsArn='string', Description='string', DisableSchemaValidation=True|False, Name='string', ProtocolType='WEBSOCKET'|'HTTP', RouteKey='string', RouteSelectionExpression='string', Tags={ 'string': 'string' }, Target='string', Version='string' )
string
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
dict
A CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
string
This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. Supported only for HTTP APIs.
string
The description of the API.
boolean
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
string
[REQUIRED]
The name of the API.
string
[REQUIRED]
The API protocol.
string
This property is part of quick create. If you don't specify a routeKey, a default route of $default is created. The $default route acts as a catch-all for any request made to your API, for a particular stage. The $default route key can't be modified. You can add routes after creating the API, and you can update the route keys of additional routes. Supported only for HTTP APIs.
string
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
dict
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].
string
This property is part of quick create. Quick create produces an API with an integration, a default catch-all route, and a default stage which is configured to automatically deploy changes. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. Supported only for HTTP APIs.
string
A version identifier for the API.
dict
Response Syntax
{ 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
{'AuthorizerType': ['JWT'], 'JwtConfiguration': {'Audience': ['string'], 'Issuer': 'string'}}
Creates an Authorizer for an API.
See also: AWS API Documentation
Request Syntax
client.create_authorizer( ApiId='string', AuthorizerCredentialsArn='string', AuthorizerResultTtlInSeconds=123, AuthorizerType='REQUEST'|'JWT', AuthorizerUri='string', IdentitySource=[ 'string', ], IdentityValidationExpression='string', JwtConfiguration={ 'Audience': [ 'string', ], 'Issuer': 'string' }, Name='string' )
string
[REQUIRED]
The API identifier.
string
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.
integer
Authorizer caching is not currently supported. Don't specify this value for authorizers.
string
[REQUIRED]
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
string
The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
list
[REQUIRED]
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT )from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
string
This parameter is not used.
dict
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
string
[REQUIRED]
The name of the authorizer.
dict
Response Syntax
{ 'AuthorizerCredentialsArn': 'string', 'AuthorizerId': 'string', 'AuthorizerResultTtlInSeconds': 123, 'AuthorizerType': 'REQUEST'|'JWT', 'AuthorizerUri': 'string', 'IdentitySource': [ 'string', ], 'IdentityValidationExpression': 'string', 'JwtConfiguration': { 'Audience': [ 'string', ], 'Issuer': 'string' }, 'Name': 'string' }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
AuthorizerCredentialsArn (string) --
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.
AuthorizerId (string) --
The authorizer identifier.
AuthorizerResultTtlInSeconds (integer) --
Authorizer caching is not currently supported. Don't specify this value for authorizers.
AuthorizerType (string) --
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
AuthorizerUri (string) --
The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
IdentitySource (list) --
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
IdentityValidationExpression (string) --
The validation expression does not apply to the REQUEST authorizer.
JwtConfiguration (dict) --
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
Name (string) --
The name of the authorizer.
{'AutoDeployed': 'boolean'}
Creates a Deployment for an API.
See also: AWS API Documentation
Request Syntax
client.create_deployment( ApiId='string', Description='string', StageName='string' )
string
[REQUIRED]
The API identifier.
string
The description for the deployment resource.
string
The name of the Stage resource for the Deployment resource to create.
dict
Response Syntax
{ 'AutoDeployed': True|False, 'CreatedDate': datetime(2015, 1, 1), 'DeploymentId': 'string', 'DeploymentStatus': 'PENDING'|'FAILED'|'DEPLOYED', 'DeploymentStatusMessage': 'string', 'Description': 'string' }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
AutoDeployed (boolean) --
Specifies whether a deployment was automatically released.
CreatedDate (datetime) --
The date and time when the Deployment resource was created.
DeploymentId (string) --
The identifier for the deployment.
DeploymentStatus (string) --
The status of the deployment: PENDING, FAILED, or SUCCEEDED.
DeploymentStatusMessage (string) --
May contain additional feedback on the status of an API deployment.
Description (string) --
The description for the deployment.
{'PayloadFormatVersion': 'string'}
Creates an Integration.
See also: AWS API Documentation
Request Syntax
client.create_integration( ApiId='string', ConnectionId='string', ConnectionType='INTERNET'|'VPC_LINK', ContentHandlingStrategy='CONVERT_TO_BINARY'|'CONVERT_TO_TEXT', CredentialsArn='string', Description='string', IntegrationMethod='string', IntegrationType='AWS'|'HTTP'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', IntegrationUri='string', PassthroughBehavior='WHEN_NO_MATCH'|'NEVER'|'WHEN_NO_TEMPLATES', PayloadFormatVersion='string', RequestParameters={ 'string': 'string' }, RequestTemplates={ 'string': 'string' }, TemplateSelectionExpression='string', TimeoutInMillis=123 )
string
[REQUIRED]
The API identifier.
string
The connection ID.
string
The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
string
Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
string
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
string
The description of the integration.
string
Specifies the integration's HTTP method type.
string
[REQUIRED]
The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
string
For a Lambda proxy integration, this is the URI of the Lambda function.
string
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
string
Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.
dict
A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name}, where {location}is querystring, path, or header; and {name}must be a valid and unique method request parameter name. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-512].
dict
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-32768].
string
The template selection expression for the integration.
integer
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.
dict
Response Syntax
{ 'ApiGatewayManaged': True|False, 'ConnectionId': 'string', 'ConnectionType': 'INTERNET'|'VPC_LINK', 'ContentHandlingStrategy': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT', 'CredentialsArn': 'string', 'Description': 'string', 'IntegrationId': 'string', 'IntegrationMethod': 'string', 'IntegrationResponseSelectionExpression': 'string', 'IntegrationType': 'AWS'|'HTTP'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', 'IntegrationUri': 'string', 'PassthroughBehavior': 'WHEN_NO_MATCH'|'NEVER'|'WHEN_NO_TEMPLATES', 'PayloadFormatVersion': 'string', 'RequestParameters': { 'string': 'string' }, 'RequestTemplates': { 'string': 'string' }, 'TemplateSelectionExpression': 'string', 'TimeoutInMillis': 123 }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
ApiGatewayManaged (boolean) --
Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.
ConnectionId (string) --
The connection ID.
ConnectionType (string) --
The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
ContentHandlingStrategy (string) --
Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
CredentialsArn (string) --
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description (string) --
Represents the description of an integration.
IntegrationId (string) --
Represents the identifier of an integration.
IntegrationMethod (string) --
Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression (string) --
The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions .
IntegrationType (string) --
The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
IntegrationUri (string) --
For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior (string) --
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
PayloadFormatVersion (string) --
Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.
RequestParameters (dict) --
A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name}, where {location}is querystring, path, or header; and {name}must be a valid and unique method request parameter name. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-512].
RequestTemplates (dict) --
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-32768].
TemplateSelectionExpression (string) --
The template selection expression for the integration. Supported only for WebSocket APIs.
TimeoutInMillis (integer) --
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.
{'AuthorizationType': ['JWT']}
Creates a Route for an API.
See also: AWS API Documentation
Request Syntax
client.create_route( ApiId='string', ApiKeyRequired=True|False, AuthorizationScopes=[ 'string', ], AuthorizationType='NONE'|'AWS_IAM'|'CUSTOM'|'JWT', AuthorizerId='string', ModelSelectionExpression='string', OperationName='string', RequestModels={ 'string': 'string' }, RequestParameters={ 'string': { 'Required': True|False } }, RouteKey='string', RouteResponseSelectionExpression='string', Target='string' )
string
[REQUIRED]
The API identifier.
boolean
Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
list
The authorization scopes supported by this route.
(string) --
A string with a length between [1-64].
string
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.
string
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
string
The model selection expression for the route. Supported only for WebSocket APIs.
string
The operation name for the route.
dict
The request models for the route. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-128].
dict
The request parameters for the route. Supported only for WebSocket APIs.
(string) --
(dict) --
Validation constraints imposed on parameters of a request (path, query string, headers).
Required (boolean) --
Whether or not the parameter is required.
string
[REQUIRED]
The route key for the route.
string
The route response selection expression for the route. Supported only for WebSocket APIs.
string
The target for the route.
dict
Response Syntax
{ 'ApiGatewayManaged': True|False, 'ApiKeyRequired': True|False, 'AuthorizationScopes': [ 'string', ], 'AuthorizationType': 'NONE'|'AWS_IAM'|'CUSTOM'|'JWT', 'AuthorizerId': 'string', 'ModelSelectionExpression': 'string', 'OperationName': 'string', 'RequestModels': { 'string': 'string' }, 'RequestParameters': { 'string': { 'Required': True|False } }, 'RouteId': 'string', 'RouteKey': 'string', 'RouteResponseSelectionExpression': 'string', 'Target': 'string' }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
ApiGatewayManaged (boolean) --
Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.
ApiKeyRequired (boolean) --
Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
AuthorizationScopes (list) --
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
(string) --
A string with a length between [1-64].
AuthorizationType (string) --
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.
AuthorizerId (string) --
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression (string) --
The model selection expression for the route. Supported only for WebSocket APIs.
OperationName (string) --
The operation name for the route.
RequestModels (dict) --
The request models for the route. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-128].
RequestParameters (dict) --
The request parameters for the route. Supported only for WebSocket APIs.
(string) --
(dict) --
Validation constraints imposed on parameters of a request (path, query string, headers).
Required (boolean) --
Whether or not the parameter is required.
RouteId (string) --
The route ID.
RouteKey (string) --
The route key for the route.
RouteResponseSelectionExpression (string) --
The route response selection expression for the route. Supported only for WebSocket APIs.
Target (string) --
The target for the route.
{'AutoDeploy': 'boolean'}Response
{'ApiGatewayManaged': 'boolean', 'AutoDeploy': 'boolean', 'LastDeploymentStatusMessage': 'string'}
Creates a Stage for an API.
See also: AWS API Documentation
Request Syntax
client.create_stage( AccessLogSettings={ 'DestinationArn': 'string', 'Format': 'string' }, ApiId='string', AutoDeploy=True|False, ClientCertificateId='string', DefaultRouteSettings={ 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, DeploymentId='string', Description='string', RouteSettings={ 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, StageName='string', StageVariables={ 'string': 'string' }, Tags={ 'string': 'string' } )
dict
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
string
[REQUIRED]
The API identifier.
boolean
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
string
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
dict
The default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
string
The deployment identifier of the API stage.
string
The description for the API stage.
dict
Route settings for the stage, by routeKey.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
string
[REQUIRED]
The name of the stage.
dict
A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
dict
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].
dict
Response Syntax
{ 'AccessLogSettings': { 'DestinationArn': 'string', 'Format': 'string' }, 'ApiGatewayManaged': True|False, 'AutoDeploy': True|False, 'ClientCertificateId': 'string', 'CreatedDate': datetime(2015, 1, 1), 'DefaultRouteSettings': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, 'DeploymentId': 'string', 'Description': 'string', 'LastDeploymentStatusMessage': 'string', 'LastUpdatedDate': datetime(2015, 1, 1), 'RouteSettings': { 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, 'StageName': 'string', 'StageVariables': { 'string': 'string' }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
The request has succeeded and has resulted in the creation of a resource.
AccessLogSettings (dict) --
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiGatewayManaged (boolean) --
Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.
AutoDeploy (boolean) --
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
ClientCertificateId (string) --
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
CreatedDate (datetime) --
The timestamp when the stage was created.
DefaultRouteSettings (dict) --
Default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
DeploymentId (string) --
The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.
Description (string) --
The description of the stage.
LastDeploymentStatusMessage (string) --
Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.
LastUpdatedDate (datetime) --
The timestamp when the stage was last updated.
RouteSettings (dict) --
Route settings for the stage, by routeKey.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
StageName (string) --
The name of the stage.
StageVariables (dict) --
A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
Tags (dict) --
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].
{'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'ImportInfo': ['string'], 'ProtocolType': ['HTTP']}
Gets an Api resource.
See also: AWS API Documentation
Request Syntax
client.get_api( ApiId='string' )
string
[REQUIRED]
The API identifier.
dict
Response Syntax
{ 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }
Response Structure
(dict) --
Success
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
{'Items': {'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'ImportInfo': ['string'], 'ProtocolType': ['HTTP']}}
Gets a collection of Api resources.
See also: AWS API Documentation
Request Syntax
client.get_apis( MaxResults='string', NextToken='string' )
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
Represents an API.
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'AuthorizerType': ['JWT'], 'JwtConfiguration': {'Audience': ['string'], 'Issuer': 'string'}}
Gets an Authorizer.
See also: AWS API Documentation
Request Syntax
client.get_authorizer( ApiId='string', AuthorizerId='string' )
string
[REQUIRED]
The API identifier.
string
[REQUIRED]
The authorizer identifier.
dict
Response Syntax
{ 'AuthorizerCredentialsArn': 'string', 'AuthorizerId': 'string', 'AuthorizerResultTtlInSeconds': 123, 'AuthorizerType': 'REQUEST'|'JWT', 'AuthorizerUri': 'string', 'IdentitySource': [ 'string', ], 'IdentityValidationExpression': 'string', 'JwtConfiguration': { 'Audience': [ 'string', ], 'Issuer': 'string' }, 'Name': 'string' }
Response Structure
(dict) --
Success
AuthorizerCredentialsArn (string) --
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.
AuthorizerId (string) --
The authorizer identifier.
AuthorizerResultTtlInSeconds (integer) --
Authorizer caching is not currently supported. Don't specify this value for authorizers.
AuthorizerType (string) --
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
AuthorizerUri (string) --
The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
IdentitySource (list) --
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
IdentityValidationExpression (string) --
The validation expression does not apply to the REQUEST authorizer.
JwtConfiguration (dict) --
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
Name (string) --
The name of the authorizer.
{'Items': {'AuthorizerType': ['JWT'], 'JwtConfiguration': {'Audience': ['string'], 'Issuer': 'string'}}}
Gets the Authorizers for an API.
See also: AWS API Documentation
Request Syntax
client.get_authorizers( ApiId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED]
The API identifier.
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'AuthorizerCredentialsArn': 'string', 'AuthorizerId': 'string', 'AuthorizerResultTtlInSeconds': 123, 'AuthorizerType': 'REQUEST'|'JWT', 'AuthorizerUri': 'string', 'IdentitySource': [ 'string', ], 'IdentityValidationExpression': 'string', 'JwtConfiguration': { 'Audience': [ 'string', ], 'Issuer': 'string' }, 'Name': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
Represents an authorizer.
AuthorizerCredentialsArn (string) --
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.
AuthorizerId (string) --
The authorizer identifier.
AuthorizerResultTtlInSeconds (integer) --
Authorizer caching is not currently supported. Don't specify this value for authorizers.
AuthorizerType (string) --
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
AuthorizerUri (string) --
The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
IdentitySource (list) --
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
IdentityValidationExpression (string) --
The validation expression does not apply to the REQUEST authorizer.
JwtConfiguration (dict) --
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
Name (string) --
The name of the authorizer.
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'AutoDeployed': 'boolean'}
Gets a Deployment.
See also: AWS API Documentation
Request Syntax
client.get_deployment( ApiId='string', DeploymentId='string' )
string
[REQUIRED]
The API identifier.
string
[REQUIRED]
The deployment ID.
dict
Response Syntax
{ 'AutoDeployed': True|False, 'CreatedDate': datetime(2015, 1, 1), 'DeploymentId': 'string', 'DeploymentStatus': 'PENDING'|'FAILED'|'DEPLOYED', 'DeploymentStatusMessage': 'string', 'Description': 'string' }
Response Structure
(dict) --
Success
AutoDeployed (boolean) --
Specifies whether a deployment was automatically released.
CreatedDate (datetime) --
The date and time when the Deployment resource was created.
DeploymentId (string) --
The identifier for the deployment.
DeploymentStatus (string) --
The status of the deployment: PENDING, FAILED, or SUCCEEDED.
DeploymentStatusMessage (string) --
May contain additional feedback on the status of an API deployment.
Description (string) --
The description for the deployment.
{'Items': {'AutoDeployed': 'boolean'}}
Gets the Deployments for an API.
See also: AWS API Documentation
Request Syntax
client.get_deployments( ApiId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED]
The API identifier.
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'AutoDeployed': True|False, 'CreatedDate': datetime(2015, 1, 1), 'DeploymentId': 'string', 'DeploymentStatus': 'PENDING'|'FAILED'|'DEPLOYED', 'DeploymentStatusMessage': 'string', 'Description': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
An immutable representation of an API that can be called by users. A Deployment must be associated with a Stage for it to be callable over the internet.
AutoDeployed (boolean) --
Specifies whether a deployment was automatically released.
CreatedDate (datetime) --
The date and time when the Deployment resource was created.
DeploymentId (string) --
The identifier for the deployment.
DeploymentStatus (string) --
The status of the deployment: PENDING, FAILED, or SUCCEEDED.
DeploymentStatusMessage (string) --
May contain additional feedback on the status of an API deployment.
Description (string) --
The description for the deployment.
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'Items': {'ApiGatewayManaged': 'boolean', 'PayloadFormatVersion': 'string'}}
Gets the Integrations for an API.
See also: AWS API Documentation
Request Syntax
client.get_integrations( ApiId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED]
The API identifier.
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'ApiGatewayManaged': True|False, 'ConnectionId': 'string', 'ConnectionType': 'INTERNET'|'VPC_LINK', 'ContentHandlingStrategy': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT', 'CredentialsArn': 'string', 'Description': 'string', 'IntegrationId': 'string', 'IntegrationMethod': 'string', 'IntegrationResponseSelectionExpression': 'string', 'IntegrationType': 'AWS'|'HTTP'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', 'IntegrationUri': 'string', 'PassthroughBehavior': 'WHEN_NO_MATCH'|'NEVER'|'WHEN_NO_TEMPLATES', 'PayloadFormatVersion': 'string', 'RequestParameters': { 'string': 'string' }, 'RequestTemplates': { 'string': 'string' }, 'TemplateSelectionExpression': 'string', 'TimeoutInMillis': 123 }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
Represents an integration.
ApiGatewayManaged (boolean) --
Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.
ConnectionId (string) --
The connection ID.
ConnectionType (string) --
The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
ContentHandlingStrategy (string) --
Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
CredentialsArn (string) --
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description (string) --
Represents the description of an integration.
IntegrationId (string) --
Represents the identifier of an integration.
IntegrationMethod (string) --
Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression (string) --
The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions .
IntegrationType (string) --
The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
IntegrationUri (string) --
For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior (string) --
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
PayloadFormatVersion (string) --
Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.
RequestParameters (dict) --
A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name}, where {location}is querystring, path, or header; and {name}must be a valid and unique method request parameter name. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-512].
RequestTemplates (dict) --
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-32768].
TemplateSelectionExpression (string) --
The template selection expression for the integration. Supported only for WebSocket APIs.
TimeoutInMillis (integer) --
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'Items': {'ApiGatewayManaged': 'boolean', 'AuthorizationType': ['JWT']}}
Gets the Routes for an API.
See also: AWS API Documentation
Request Syntax
client.get_routes( ApiId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED]
The API identifier.
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'ApiGatewayManaged': True|False, 'ApiKeyRequired': True|False, 'AuthorizationScopes': [ 'string', ], 'AuthorizationType': 'NONE'|'AWS_IAM'|'CUSTOM'|'JWT', 'AuthorizerId': 'string', 'ModelSelectionExpression': 'string', 'OperationName': 'string', 'RequestModels': { 'string': 'string' }, 'RequestParameters': { 'string': { 'Required': True|False } }, 'RouteId': 'string', 'RouteKey': 'string', 'RouteResponseSelectionExpression': 'string', 'Target': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
Represents a route.
ApiGatewayManaged (boolean) --
Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.
ApiKeyRequired (boolean) --
Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
AuthorizationScopes (list) --
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
(string) --
A string with a length between [1-64].
AuthorizationType (string) --
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.
AuthorizerId (string) --
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression (string) --
The model selection expression for the route. Supported only for WebSocket APIs.
OperationName (string) --
The operation name for the route.
RequestModels (dict) --
The request models for the route. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-128].
RequestParameters (dict) --
The request parameters for the route. Supported only for WebSocket APIs.
(string) --
(dict) --
Validation constraints imposed on parameters of a request (path, query string, headers).
Required (boolean) --
Whether or not the parameter is required.
RouteId (string) --
The route ID.
RouteKey (string) --
The route key for the route.
RouteResponseSelectionExpression (string) --
The route response selection expression for the route. Supported only for WebSocket APIs.
Target (string) --
The target for the route.
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'ApiGatewayManaged': 'boolean', 'AutoDeploy': 'boolean', 'LastDeploymentStatusMessage': 'string'}
Gets a Stage.
See also: AWS API Documentation
Request Syntax
client.get_stage( ApiId='string', StageName='string' )
string
[REQUIRED]
The API identifier.
string
[REQUIRED]
The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.
dict
Response Syntax
{ 'AccessLogSettings': { 'DestinationArn': 'string', 'Format': 'string' }, 'ApiGatewayManaged': True|False, 'AutoDeploy': True|False, 'ClientCertificateId': 'string', 'CreatedDate': datetime(2015, 1, 1), 'DefaultRouteSettings': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, 'DeploymentId': 'string', 'Description': 'string', 'LastDeploymentStatusMessage': 'string', 'LastUpdatedDate': datetime(2015, 1, 1), 'RouteSettings': { 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, 'StageName': 'string', 'StageVariables': { 'string': 'string' }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
Success
AccessLogSettings (dict) --
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiGatewayManaged (boolean) --
Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.
AutoDeploy (boolean) --
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
ClientCertificateId (string) --
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
CreatedDate (datetime) --
The timestamp when the stage was created.
DefaultRouteSettings (dict) --
Default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
DeploymentId (string) --
The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.
Description (string) --
The description of the stage.
LastDeploymentStatusMessage (string) --
Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.
LastUpdatedDate (datetime) --
The timestamp when the stage was last updated.
RouteSettings (dict) --
Route settings for the stage, by routeKey.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
StageName (string) --
The name of the stage.
StageVariables (dict) --
A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
Tags (dict) --
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].
{'Items': {'ApiGatewayManaged': 'boolean', 'AutoDeploy': 'boolean', 'LastDeploymentStatusMessage': 'string'}}
Gets the Stages for an API.
See also: AWS API Documentation
Request Syntax
client.get_stages( ApiId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED]
The API identifier.
string
The maximum number of elements to be returned for this resource.
string
The next page of elements from this collection. Not valid for the last element of the collection.
dict
Response Syntax
{ 'Items': [ { 'AccessLogSettings': { 'DestinationArn': 'string', 'Format': 'string' }, 'ApiGatewayManaged': True|False, 'AutoDeploy': True|False, 'ClientCertificateId': 'string', 'CreatedDate': datetime(2015, 1, 1), 'DefaultRouteSettings': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, 'DeploymentId': 'string', 'Description': 'string', 'LastDeploymentStatusMessage': 'string', 'LastUpdatedDate': datetime(2015, 1, 1), 'RouteSettings': { 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, 'StageName': 'string', 'StageVariables': { 'string': 'string' }, 'Tags': { 'string': 'string' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Success
Items (list) --
The elements from this collection.
(dict) --
Represents an API stage.
AccessLogSettings (dict) --
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiGatewayManaged (boolean) --
Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.
AutoDeploy (boolean) --
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
ClientCertificateId (string) --
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
CreatedDate (datetime) --
The timestamp when the stage was created.
DefaultRouteSettings (dict) --
Default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
DeploymentId (string) --
The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.
Description (string) --
The description of the stage.
LastDeploymentStatusMessage (string) --
Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.
LastUpdatedDate (datetime) --
The timestamp when the stage was last updated.
RouteSettings (dict) --
Route settings for the stage, by routeKey.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
StageName (string) --
The name of the stage.
StageVariables (dict) --
A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
Tags (dict) --
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].
NextToken (string) --
The next page of elements from this collection. Not valid for the last element of the collection.
{'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'CredentialsArn': 'string', 'RouteKey': 'string', 'Target': 'string'}Response
{'CorsConfiguration': {'AllowCredentials': 'boolean', 'AllowHeaders': ['string'], 'AllowMethods': ['string'], 'AllowOrigins': ['string'], 'ExposeHeaders': ['string'], 'MaxAge': 'integer'}, 'ImportInfo': ['string'], 'ProtocolType': ['HTTP']}
Updates an Api resource.
See also: AWS API Documentation
Request Syntax
client.update_api( ApiId='string', ApiKeySelectionExpression='string', CorsConfiguration={ 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, CredentialsArn='string', Description='string', DisableSchemaValidation=True|False, Name='string', RouteKey='string', RouteSelectionExpression='string', Target='string', Version='string' )
string
[REQUIRED]
The API identifier.
string
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
dict
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
string
This property is part of quick create. It specifies the credentials required for the integration, if any. For a Lambda integration, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null. Currently, this property is not used for HTTP integrations. If provided, this value replaces the credentials associated with the quick create integration. Supported only for HTTP APIs.
string
The description of the API.
boolean
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
string
The name of the API.
string
This property is part of quick create. If not specified, the route created using quick create is kept. Otherwise, this value replaces the route key of the quick create route. Additional routes may still be added after the API is updated. Supported only for HTTP APIs.
string
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
string
This property is part of quick create. For HTTP integrations, specify a fully qualified URL. For Lambda integrations, specify a function ARN. The type of the integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided updates the integration URI and integration type. You can update a quick-created target, but you can't remove it from an API. Supported only for HTTP APIs.
string
A version identifier for the API.
dict
Response Syntax
{ 'ApiEndpoint': 'string', 'ApiId': 'string', 'ApiKeySelectionExpression': 'string', 'CorsConfiguration': { 'AllowCredentials': True|False, 'AllowHeaders': [ 'string', ], 'AllowMethods': [ 'string', ], 'AllowOrigins': [ 'string', ], 'ExposeHeaders': [ 'string', ], 'MaxAge': 123 }, 'CreatedDate': datetime(2015, 1, 1), 'Description': 'string', 'DisableSchemaValidation': True|False, 'ImportInfo': [ 'string', ], 'Name': 'string', 'ProtocolType': 'WEBSOCKET'|'HTTP', 'RouteSelectionExpression': 'string', 'Tags': { 'string': 'string' }, 'Version': 'string', 'Warnings': [ 'string', ] }
Response Structure
(dict) --
Success
ApiEndpoint (string) --
The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. The stage name is typically appended to this URI to form a complete path to a deployed API stage.
ApiId (string) --
The API ID.
ApiKeySelectionExpression (string) --
An API key selection expression. Supported only for WebSocket APIs. See API Key Selection Expressions .
CorsConfiguration (dict) --
A CORS configuration. Supported only for HTTP APIs.
AllowCredentials (boolean) --
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
AllowHeaders (list) --
Represents a collection of allowed headers. Supported only for HTTP APIs.
(string) --
AllowMethods (list) --
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
(string) --
A string with a length between [1-64].
AllowOrigins (list) --
Represents a collection of allowed origins. Supported only for HTTP APIs.
(string) --
ExposeHeaders (list) --
Represents a collection of exposed headers. Supported only for HTTP APIs.
(string) --
MaxAge (integer) --
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
CreatedDate (datetime) --
The timestamp when the API was created.
Description (string) --
The description of the API.
DisableSchemaValidation (boolean) --
Avoid validating models when creating a deployment. Supported only for WebSocket APIs.
ImportInfo (list) --
The validation information during API import. This may include particular properties of your OpenAPI definition which are ignored during import. Supported only for HTTP APIs.
(string) --
Name (string) --
The name of the API.
ProtocolType (string) --
The API protocol.
RouteSelectionExpression (string) --
The route selection expression for the API. For HTTP APIs, the routeSelectionExpression must be ${request.method} ${request.path}. If not provided, this will be the default for HTTP APIs. This property is required for WebSocket APIs.
Tags (dict) --
A collection of tags associated with the API.
(string) --
(string) --
A string with a length between [0-1600].
Version (string) --
A version identifier for the API.
Warnings (list) --
The warning messages reported when failonwarnings is turned on during API import.
(string) --
{'AuthorizerType': ['JWT'], 'JwtConfiguration': {'Audience': ['string'], 'Issuer': 'string'}}
Updates an Authorizer.
See also: AWS API Documentation
Request Syntax
client.update_authorizer( ApiId='string', AuthorizerCredentialsArn='string', AuthorizerId='string', AuthorizerResultTtlInSeconds=123, AuthorizerType='REQUEST'|'JWT', AuthorizerUri='string', IdentitySource=[ 'string', ], IdentityValidationExpression='string', JwtConfiguration={ 'Audience': [ 'string', ], 'Issuer': 'string' }, Name='string' )
string
[REQUIRED]
The API identifier.
string
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null.
string
[REQUIRED]
The authorizer identifier.
integer
Authorizer caching is not currently supported. Don't specify this value for authorizers.
string
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
string
The authorizer's Uniform Resource Identifier (URI). For REQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
list
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
string
This parameter is not used.
dict
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
string
The name of the authorizer.
dict
Response Syntax
{ 'AuthorizerCredentialsArn': 'string', 'AuthorizerId': 'string', 'AuthorizerResultTtlInSeconds': 123, 'AuthorizerType': 'REQUEST'|'JWT', 'AuthorizerUri': 'string', 'IdentitySource': [ 'string', ], 'IdentityValidationExpression': 'string', 'JwtConfiguration': { 'Audience': [ 'string', ], 'Issuer': 'string' }, 'Name': 'string' }
Response Structure
(dict) --
Success
AuthorizerCredentialsArn (string) --
Specifies the required credentials as an IAM role for API Gateway to invoke the authorizer. To specify an IAM role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To use resource-based permissions on the Lambda function, specify null. Supported only for REQUEST authorizers.
AuthorizerId (string) --
The authorizer identifier.
AuthorizerResultTtlInSeconds (integer) --
Authorizer caching is not currently supported. Don't specify this value for authorizers.
AuthorizerType (string) --
The authorizer type. For WebSocket APIs, specify REQUEST for a Lambda function using incoming request parameters. For HTTP APIs, specify JWT to use JSON Web Tokens.
AuthorizerUri (string) --
The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api}, where {region} is the same as the region hosting the Lambda function, path indicates that the remaining substring in the URI should be treated as the path to the resource, including the initial /. For Lambda functions, this is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. Supported only for REQUEST authorizers.
IdentitySource (list) --
The identity source for which authorization is requested.
For a REQUEST authorizer, this is optional. The value is a set of one or more mapping expressions of the specified request parameters. Currently, the identity source can be headers, query string parameters, stage variables, and context parameters. For example, if an Auth header and a Name query string parameter are defined as identity sources, this value is route.request.header.Auth, route.request.querystring.Name. These parameters will be used to perform runtime validation for Lambda-based authorizers by verifying all of the identity-related request parameters are present in the request, not null, and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function. Otherwise, it returns a 401 Unauthorized response without calling the Lambda function.
For JWT, a single entry that specifies where to extract the JSON Web Token (JWT) from inbound requests. Currently only header-based and query parameter-based selections are supported, for example "$request.header.Authorization".
(string) --
IdentityValidationExpression (string) --
The validation expression does not apply to the REQUEST authorizer.
JwtConfiguration (dict) --
Represents the configuration of a JWT authorizer. Required for the JWT authorizer type. Supported only for HTTP APIs.
Audience (list) --
A list of the intended recipients of the JWT. A valid JWT must provide an aud that matches at least one entry in this list. See RFC 7519 . Supported only for HTTP APIs.
(string) --
Issuer (string) --
The base domain of the identity provider that issues JSON Web Tokens. For example, an Amazon Cognito user pool has the following format: https://cognito-idp.{region}.amazonaws.com/{userPoolId}. Required for the JWT authorizer type. Supported only for HTTP APIs.
Name (string) --
The name of the authorizer.
{'AutoDeployed': 'boolean'}
Updates a Deployment.
See also: AWS API Documentation
Request Syntax
client.update_deployment( ApiId='string', DeploymentId='string', Description='string' )
string
[REQUIRED]
The API identifier.
string
[REQUIRED]
The deployment ID.
string
The description for the deployment resource.
dict
Response Syntax
{ 'AutoDeployed': True|False, 'CreatedDate': datetime(2015, 1, 1), 'DeploymentId': 'string', 'DeploymentStatus': 'PENDING'|'FAILED'|'DEPLOYED', 'DeploymentStatusMessage': 'string', 'Description': 'string' }
Response Structure
(dict) --
Success
AutoDeployed (boolean) --
Specifies whether a deployment was automatically released.
CreatedDate (datetime) --
The date and time when the Deployment resource was created.
DeploymentId (string) --
The identifier for the deployment.
DeploymentStatus (string) --
The status of the deployment: PENDING, FAILED, or SUCCEEDED.
DeploymentStatusMessage (string) --
May contain additional feedback on the status of an API deployment.
Description (string) --
The description for the deployment.
{'PayloadFormatVersion': 'string'}
Updates an Integration.
See also: AWS API Documentation
Request Syntax
client.update_integration( ApiId='string', ConnectionId='string', ConnectionType='INTERNET'|'VPC_LINK', ContentHandlingStrategy='CONVERT_TO_BINARY'|'CONVERT_TO_TEXT', CredentialsArn='string', Description='string', IntegrationId='string', IntegrationMethod='string', IntegrationType='AWS'|'HTTP'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', IntegrationUri='string', PassthroughBehavior='WHEN_NO_MATCH'|'NEVER'|'WHEN_NO_TEMPLATES', PayloadFormatVersion='string', RequestParameters={ 'string': 'string' }, RequestTemplates={ 'string': 'string' }, TemplateSelectionExpression='string', TimeoutInMillis=123 )
string
[REQUIRED]
The API identifier.
string
The connection ID.
string
The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
string
Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
string
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
string
The description of the integration
string
[REQUIRED]
The integration ID.
string
Specifies the integration's HTTP method type.
string
The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
string
For a Lambda proxy integration, this is the URI of the Lambda function.
string
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
string
Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.
dict
A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name}, where {location}is querystring, path, or header; and {name}must be a valid and unique method request parameter name. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-512].
dict
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-32768].
string
The template selection expression for the integration.
integer
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.
dict
Response Syntax
{ 'ApiGatewayManaged': True|False, 'ConnectionId': 'string', 'ConnectionType': 'INTERNET'|'VPC_LINK', 'ContentHandlingStrategy': 'CONVERT_TO_BINARY'|'CONVERT_TO_TEXT', 'CredentialsArn': 'string', 'Description': 'string', 'IntegrationId': 'string', 'IntegrationMethod': 'string', 'IntegrationResponseSelectionExpression': 'string', 'IntegrationType': 'AWS'|'HTTP'|'MOCK'|'HTTP_PROXY'|'AWS_PROXY', 'IntegrationUri': 'string', 'PassthroughBehavior': 'WHEN_NO_MATCH'|'NEVER'|'WHEN_NO_TEMPLATES', 'PayloadFormatVersion': 'string', 'RequestParameters': { 'string': 'string' }, 'RequestTemplates': { 'string': 'string' }, 'TemplateSelectionExpression': 'string', 'TimeoutInMillis': 123 }
Response Structure
(dict) --
Success
ApiGatewayManaged (boolean) --
Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it.
ConnectionId (string) --
The connection ID.
ConnectionType (string) --
The type of the network connection to the integration endpoint. Currently the only valid value is INTERNET, for connections through the public routable internet.
ContentHandlingStrategy (string) --
Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors:
CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string to the corresponding binary blob.
CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded string.
If this property is not defined, the response payload will be passed through from the integration response to the route response or method response without modification.
CredentialsArn (string) --
Specifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam:::user/. To use resource-based permissions on supported AWS services, specify null.
Description (string) --
Represents the description of an integration.
IntegrationId (string) --
Represents the identifier of an integration.
IntegrationMethod (string) --
Specifies the integration's HTTP method type.
IntegrationResponseSelectionExpression (string) --
The integration response selection expression for the integration. Supported only for WebSocket APIs. See Integration Response Selection Expressions .
IntegrationType (string) --
The integration type of an integration. One of the following:
AWS: for integrating the route or method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration. Supported only for WebSocket APIs.
AWS_PROXY: for integrating the route or method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as Lambda proxy integration.
HTTP: for integrating the route or method request with an HTTP endpoint. This integration is also referred to as the HTTP custom integration. Supported only for WebSocket APIs.
HTTP_PROXY: for integrating route or method request with an HTTP endpoint, with the client request passed through as-is. This is also referred to as HTTP proxy integration.
MOCK: for integrating the route or method request with API Gateway as a "loopback" endpoint without invoking any backend. Supported only for WebSocket APIs.
IntegrationUri (string) --
For a Lambda proxy integration, this is the URI of the Lambda function.
PassthroughBehavior (string) --
Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
WHEN_NO_MATCH passes the request body for unmapped content types through to the integration backend without transformation.
NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type response.
WHEN_NO_TEMPLATES allows pass-through when the integration has no content types mapped to templates. However, if there is at least one content type defined, unmapped content types will be rejected with the same HTTP 415 Unsupported Media Type response.
PayloadFormatVersion (string) --
Specifies the format of the payload sent to an integration. Required for HTTP APIs. Currently, the only supported value is 1.0.
RequestParameters (dict) --
A key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name}, where {location}is querystring, path, or header; and {name}must be a valid and unique method request parameter name. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-512].
RequestTemplates (dict) --
Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-32768].
TemplateSelectionExpression (string) --
The template selection expression for the integration. Supported only for WebSocket APIs.
TimeoutInMillis (integer) --
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds or 29 seconds for WebSocket APIs. The default value is 5,000 milliseconds, or 5 seconds for HTTP APIs.
{'AuthorizationType': ['JWT']}
Updates a Route.
See also: AWS API Documentation
Request Syntax
client.update_route( ApiId='string', ApiKeyRequired=True|False, AuthorizationScopes=[ 'string', ], AuthorizationType='NONE'|'AWS_IAM'|'CUSTOM'|'JWT', AuthorizerId='string', ModelSelectionExpression='string', OperationName='string', RequestModels={ 'string': 'string' }, RequestParameters={ 'string': { 'Required': True|False } }, RouteId='string', RouteKey='string', RouteResponseSelectionExpression='string', Target='string' )
string
[REQUIRED]
The API identifier.
boolean
Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
list
The authorization scopes supported by this route.
(string) --
A string with a length between [1-64].
string
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.
string
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
string
The model selection expression for the route. Supported only for WebSocket APIs.
string
The operation name for the route.
dict
The request models for the route. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-128].
dict
The request parameters for the route. Supported only for WebSocket APIs.
(string) --
(dict) --
Validation constraints imposed on parameters of a request (path, query string, headers).
Required (boolean) --
Whether or not the parameter is required.
string
[REQUIRED]
The route ID.
string
The route key for the route.
string
The route response selection expression for the route. Supported only for WebSocket APIs.
string
The target for the route.
dict
Response Syntax
{ 'ApiGatewayManaged': True|False, 'ApiKeyRequired': True|False, 'AuthorizationScopes': [ 'string', ], 'AuthorizationType': 'NONE'|'AWS_IAM'|'CUSTOM'|'JWT', 'AuthorizerId': 'string', 'ModelSelectionExpression': 'string', 'OperationName': 'string', 'RequestModels': { 'string': 'string' }, 'RequestParameters': { 'string': { 'Required': True|False } }, 'RouteId': 'string', 'RouteKey': 'string', 'RouteResponseSelectionExpression': 'string', 'Target': 'string' }
Response Structure
(dict) --
Success
ApiGatewayManaged (boolean) --
Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.
ApiKeyRequired (boolean) --
Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
AuthorizationScopes (list) --
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
(string) --
A string with a length between [1-64].
AuthorizationType (string) --
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, or JWT for using JSON Web Tokens.
AuthorizerId (string) --
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
ModelSelectionExpression (string) --
The model selection expression for the route. Supported only for WebSocket APIs.
OperationName (string) --
The operation name for the route.
RequestModels (dict) --
The request models for the route. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [1-128].
RequestParameters (dict) --
The request parameters for the route. Supported only for WebSocket APIs.
(string) --
(dict) --
Validation constraints imposed on parameters of a request (path, query string, headers).
Required (boolean) --
Whether or not the parameter is required.
RouteId (string) --
The route ID.
RouteKey (string) --
The route key for the route.
RouteResponseSelectionExpression (string) --
The route response selection expression for the route. Supported only for WebSocket APIs.
Target (string) --
The target for the route.
{'AutoDeploy': 'boolean'}Response
{'ApiGatewayManaged': 'boolean', 'AutoDeploy': 'boolean', 'LastDeploymentStatusMessage': 'string'}
Updates a Stage.
See also: AWS API Documentation
Request Syntax
client.update_stage( AccessLogSettings={ 'DestinationArn': 'string', 'Format': 'string' }, ApiId='string', AutoDeploy=True|False, ClientCertificateId='string', DefaultRouteSettings={ 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, DeploymentId='string', Description='string', RouteSettings={ 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, StageName='string', StageVariables={ 'string': 'string' } )
dict
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
string
[REQUIRED]
The API identifier.
boolean
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
string
The identifier of a client certificate for a Stage.
dict
The default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
string
The deployment identifier for the API stage. Can't be updated if autoDeploy is enabled.
string
The description for the API stage.
dict
Route settings for the stage.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
string
[REQUIRED]
The stage name. Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.
dict
A map that defines the stage variables for a Stage. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
dict
Response Syntax
{ 'AccessLogSettings': { 'DestinationArn': 'string', 'Format': 'string' }, 'ApiGatewayManaged': True|False, 'AutoDeploy': True|False, 'ClientCertificateId': 'string', 'CreatedDate': datetime(2015, 1, 1), 'DefaultRouteSettings': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 }, 'DeploymentId': 'string', 'Description': 'string', 'LastDeploymentStatusMessage': 'string', 'LastUpdatedDate': datetime(2015, 1, 1), 'RouteSettings': { 'string': { 'DataTraceEnabled': True|False, 'DetailedMetricsEnabled': True|False, 'LoggingLevel': 'ERROR'|'INFO'|'false', 'ThrottlingBurstLimit': 123, 'ThrottlingRateLimit': 123.0 } }, 'StageName': 'string', 'StageVariables': { 'string': 'string' }, 'Tags': { 'string': 'string' } }
Response Structure
(dict) --
Success
AccessLogSettings (dict) --
Settings for logging access in this stage.
DestinationArn (string) --
The ARN of the CloudWatch Logs log group to receive access logs.
Format (string) --
A single line format of the access logs of data, as specified by selected $context variables. The format must include at least $context.requestId.
ApiGatewayManaged (boolean) --
Specifies whether a stage is managed by API Gateway. If you created an API using quick create, the $default stage is managed by API Gateway. You can't modify the $default stage.
AutoDeploy (boolean) --
Specifies whether updates to an API automatically trigger a new deployment. The default value is false.
ClientCertificateId (string) --
The identifier of a client certificate for a Stage. Supported only for WebSocket APIs.
CreatedDate (datetime) --
The timestamp when the stage was created.
DefaultRouteSettings (dict) --
Default route settings for the stage.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
DeploymentId (string) --
The identifier of the Deployment that the Stage is associated with. Can't be updated if autoDeploy is enabled.
Description (string) --
The description of the stage.
LastDeploymentStatusMessage (string) --
Describes the status of the last deployment of a stage. Supported only for stages with autoDeploy enabled.
LastUpdatedDate (datetime) --
The timestamp when the stage was last updated.
RouteSettings (dict) --
Route settings for the stage, by routeKey.
(string) --
(dict) --
Represents a collection of route settings.
DataTraceEnabled (boolean) --
Specifies whether (true) or not (false) data trace logging is enabled for this route. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
DetailedMetricsEnabled (boolean) --
Specifies whether detailed metrics are enabled.
LoggingLevel (string) --
Specifies the logging level for this route: INFO, ERROR, or OFF. This property affects the log entries pushed to Amazon CloudWatch Logs. Supported only for WebSocket APIs.
ThrottlingBurstLimit (integer) --
Specifies the throttling burst limit. Supported only for WebSocket APIs.
ThrottlingRateLimit (float) --
Specifies the throttling rate limit. Supported only for WebSocket APIs.
StageName (string) --
The name of the stage.
StageVariables (dict) --
A map that defines the stage variables for a stage resource. Variable names can have alphanumeric and underscore characters, and the values must match [A-Za-z0-9-._~:/?#&=,]+. Supported only for WebSocket APIs.
(string) --
(string) --
A string with a length between [0-2048].
Tags (dict) --
The collection of tags. Each tag element is associated with a given resource.
(string) --
(string) --
A string with a length between [0-1600].