Api Gateway¶
Client¶
AsyncAPIGatewayClient
¶
Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
Config | None
|
Optional configuration for the client. Here you can set things like the endpoint for HTTP services or auth credentials. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. These can be used to set defaults, for example. |
None
|
Operations¶
create_api_keycreate_authorizercreate_base_path_mappingcreate_deploymentcreate_documentation_partcreate_documentation_versioncreate_domain_namecreate_domain_name_access_associationcreate_modelcreate_request_validatorcreate_resourcecreate_rest_apicreate_stagecreate_usage_plancreate_usage_plan_keycreate_vpc_linkdelete_api_keydelete_authorizerdelete_base_path_mappingdelete_client_certificatedelete_deploymentdelete_documentation_partdelete_documentation_versiondelete_domain_namedelete_domain_name_access_associationdelete_gateway_responsedelete_integrationdelete_integration_responsedelete_methoddelete_method_responsedelete_modeldelete_request_validatordelete_resourcedelete_rest_apidelete_stagedelete_usage_plandelete_usage_plan_keydelete_vpc_linkflush_stage_authorizers_cacheflush_stage_cachegenerate_client_certificateget_accountget_api_keyget_api_keysget_authorizerget_authorizersget_base_path_mappingget_base_path_mappingsget_client_certificateget_client_certificatesget_deploymentget_deploymentsget_documentation_partget_documentation_partsget_documentation_versionget_documentation_versionsget_domain_nameget_domain_name_access_associationsget_domain_namesget_exportget_gateway_responseget_gateway_responsesget_integrationget_integration_responseget_methodget_method_responseget_modelget_model_templateget_modelsget_request_validatorget_request_validatorsget_resourceget_resourcesget_rest_apiget_rest_apisget_sdkget_sdk_typeget_sdk_typesget_stageget_stagesget_tagsget_usageget_usage_planget_usage_plan_keyget_usage_plan_keysget_usage_plansget_vpc_linkget_vpc_linksimport_api_keysimport_documentation_partsimport_rest_apiput_gateway_responseput_integrationput_integration_responseput_methodput_method_responseput_rest_apireject_domain_name_access_associationtag_resourcetest_invoke_authorizertest_invoke_methoduntag_resourceupdate_accountupdate_api_keyupdate_authorizerupdate_base_path_mappingupdate_client_certificateupdate_deploymentupdate_documentation_partupdate_documentation_versionupdate_domain_nameupdate_gateway_responseupdate_integrationupdate_integration_responseupdate_methodupdate_method_responseupdate_modelupdate_request_validatorupdate_resourceupdate_rest_apiupdate_stageupdate_usageupdate_usage_planupdate_vpc_link
Configuration¶
Config
dataclass
¶
Config(*, auth_scheme_resolver: HTTPAuthSchemeResolver | None = None, auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] | None = None, aws_access_key_id: str | None = None, aws_credentials_identity_resolver: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] | None = None, aws_secret_access_key: str | None = None, aws_session_token: str | None = None, endpoint_resolver: EndpointResolver | None = None, endpoint_uri: str | URI | None = None, http_request_config: HTTPRequestConfiguration | None = None, interceptors: list[_ServiceInterceptor] | None = None, protocol: ClientProtocol[Any, Any] | None = None, region: str | None = None, retry_strategy: RetryStrategy | RetryStrategyOptions | None = None, sdk_ua_app_id: str | None = None, transport: ClientTransport[Any, Any] | None = None, user_agent_extra: str | None = None)
Configuration for API Gateway.
Attributes¶
auth_scheme_resolver
instance-attribute
¶
auth_scheme_resolver: HTTPAuthSchemeResolver = auth_scheme_resolver or HTTPAuthSchemeResolver()
An auth scheme resolver that determines the auth scheme for each operation.
auth_schemes
instance-attribute
¶
auth_schemes: dict[ShapeID, AuthScheme[Any, Any, Any, Any]] = auth_schemes or {ShapeID('aws.auth#sigv4'): SigV4AuthScheme(service='apigateway')}
A map of auth scheme ids to auth schemes.
aws_access_key_id
instance-attribute
¶
aws_access_key_id: str | None = aws_access_key_id
The identifier for a secret access key.
aws_credentials_identity_resolver
instance-attribute
¶
aws_credentials_identity_resolver: IdentityResolver[AWSCredentialsIdentity, AWSIdentityProperties] | None = aws_credentials_identity_resolver
Resolves AWS Credentials. Required for operations that use Sigv4 Auth.
aws_secret_access_key
instance-attribute
¶
aws_secret_access_key: str | None = aws_secret_access_key
A secret access key that can be used to sign requests.
aws_session_token
instance-attribute
¶
aws_session_token: str | None = aws_session_token
An access key ID that identifies temporary security credentials.
endpoint_resolver
instance-attribute
¶
endpoint_resolver: EndpointResolver = endpoint_resolver or StandardRegionalEndpointsResolver(endpoint_prefix='apigateway')
The endpoint resolver used to resolve the final endpoint per-operation based on the configuration.
endpoint_uri
instance-attribute
¶
endpoint_uri: str | URI | None = endpoint_uri
A static URI to route requests to.
http_request_config
instance-attribute
¶
http_request_config: HTTPRequestConfiguration | None = http_request_config
Configuration for individual HTTP requests.
interceptors
instance-attribute
¶
interceptors: list[_ServiceInterceptor] = interceptors or []
The list of interceptors, which are hooks that are called during the execution of a request.
protocol
instance-attribute
¶
protocol: ClientProtocol[Any, Any] | None = protocol or RestJsonClientProtocol(_SCHEMA_BACKPLANE_CONTROL_SERVICE)
The protocol to serialize and deserialize requests with.
region
instance-attribute
¶
region: str | None = region
The AWS region to connect to. The configured region is used to determine the service endpoint.
retry_strategy
instance-attribute
¶
retry_strategy: RetryStrategy | RetryStrategyOptions | None = retry_strategy
The retry strategy or options for configuring retry behavior. Can be either a configured RetryStrategy or RetryStrategyOptions to create one.
sdk_ua_app_id
instance-attribute
¶
sdk_ua_app_id: str | None = sdk_ua_app_id
A unique and opaque application ID that is appended to the User-Agent header.
transport
instance-attribute
¶
transport: ClientTransport[Any, Any] | None = transport or AIOHTTPClient()
The transport to use to send requests (e.g. an HTTP client).
user_agent_extra
instance-attribute
¶
user_agent_extra: str | None = user_agent_extra
Additional suffix to be added to the User-Agent header.
Methods:¶
set_auth_scheme
¶
set_auth_scheme(scheme: AuthScheme[Any, Any, Any, Any]) -> None
Sets the implementation of an auth scheme.
Using this method ensures the correct key is used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
AuthScheme[Any, Any, Any, Any]
|
The auth scheme to add. |
required |
Plugin
module-attribute
¶
Plugin: TypeAlias = Callable[[Config], None]
A callable that allows customizing the config object on each request.
Structures¶
AccessLogSettingsApiKeyApiStageAuthorizerBasePathMappingCanarySettingsClientCertificateDeploymentDeploymentCanarySettingsDocumentationPartDocumentationPartLocationDocumentationVersionDomainNameDomainNameAccessAssociationEndpointConfigurationGatewayResponseIntegrationIntegrationResponseMethodMethodResponseMethodSettingMethodSnapshotModelMutualTlsAuthenticationMutualTlsAuthenticationInputPatchOperationQuotaSettingsRequestValidatorResourceRestApiSdkConfigurationPropertySdkTypeStageStageKeyThrottleSettingsTlsConfigUsagePlanUsagePlanKeyVpcLink
Errors¶
BadRequestExceptionConflictExceptionLimitExceededExceptionNotFoundExceptionServiceErrorServiceUnavailableExceptionTooManyRequestsExceptionUnauthorizedException
Enums¶
AccessAssociationSourceTypeApiKeySourceTypeApiKeysFormatApiStatusAuthorizerTypeCacheClusterSizeCacheClusterStatusConnectionTypeContentHandlingStrategyDocumentationPartTypeDomainNameStatusEndpointAccessModeEndpointTypeGatewayResponseTypeIntegrationTypeIpAddressTypeLocationStatusTypeOpPutModeQuotaPeriodTypeResourceOwnerResponseTransferModeRoutingModeSecurityPolicyUnauthorizedCacheControlHeaderStrategyVpcLinkStatus