Bases: object
Properties for defining a CfnMethod
.
http_method (str
) â The methodâs HTTP verb.
resource_id (str
) â The Resource identifier for the MethodResponse resource.
rest_api_id (str
) â The string identifier of the associated RestApi.
api_key_required (Union
[bool
, IResolvable
, None
]) â A boolean flag specifying whether a valid ApiKey is required to invoke this method.
authorization_scopes (Optional
[Sequence
[str
]]) â A list of authorization scopes configured on the method. The scopes are used with a COGNITO_USER_POOLS
authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
authorization_type (Optional
[str
]) â The methodâs authorization type. This parameter is required. For valid values, see Method in the API Gateway API Reference . .. epigraph:: If you specify the AuthorizerId
property, specify CUSTOM
or COGNITO_USER_POOLS
for this property.
authorizer_id (Optional
[str
]) â The identifier of an authorizer to use on this method. The methodâs authorization type must be CUSTOM
or COGNITO_USER_POOLS
.
integration (Union
[IResolvable
, IntegrationProperty
, Dict
[str
, Any
], None
]) â Represents an HTTP
, HTTP_PROXY
, AWS
, AWS_PROXY
, or Mock integration.
method_responses (Union
[IResolvable
, Sequence
[Union
[IResolvable
, MethodResponseProperty
, Dict
[str
, Any
]]], None
]) â Gets a method response associated with a given HTTP status code.
operation_name (Optional
[str
]) â A human-friendly operation identifier for the method. For example, you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
request_models (Union
[IResolvable
, Mapping
[str
, str
], None
]) â A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
request_parameters (Union
[IResolvable
, Mapping
[str
, Union
[bool
, IResolvable
]], None
]) â A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A key is a method request parameter name matching the pattern of method.request.{location}.{name}
, where location
is querystring
, path
, or header
and name
is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( true
) or optional ( false
). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.
request_validator_id (Optional
[str
]) â The identifier of a RequestValidator for request validation.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_apigateway as apigateway cfn_method_props = apigateway.CfnMethodProps( http_method="httpMethod", resource_id="resourceId", rest_api_id="restApiId", # the properties below are optional api_key_required=False, authorization_scopes=["authorizationScopes"], authorization_type="authorizationType", authorizer_id="authorizerId", integration=apigateway.CfnMethod.IntegrationProperty( cache_key_parameters=["cacheKeyParameters"], cache_namespace="cacheNamespace", connection_id="connectionId", connection_type="connectionType", content_handling="contentHandling", credentials="credentials", integration_http_method="integrationHttpMethod", integration_responses=[apigateway.CfnMethod.IntegrationResponseProperty( status_code="statusCode", # the properties below are optional content_handling="contentHandling", response_parameters={ "response_parameters_key": "responseParameters" }, response_templates={ "response_templates_key": "responseTemplates" }, selection_pattern="selectionPattern" )], passthrough_behavior="passthroughBehavior", request_parameters={ "request_parameters_key": "requestParameters" }, request_templates={ "request_templates_key": "requestTemplates" }, timeout_in_millis=123, type="type", uri="uri" ), method_responses=[apigateway.CfnMethod.MethodResponseProperty( status_code="statusCode", # the properties below are optional response_models={ "response_models_key": "responseModels" }, response_parameters={ "response_parameters_key": False } )], operation_name="operationName", request_models={ "request_models_key": "requestModels" }, request_parameters={ "request_parameters_key": False }, request_validator_id="requestValidatorId" )
Attributes
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
A list of authorization scopes configured on the method.
The scopes are used with a COGNITO_USER_POOLS
authorizer to authorize the method invocation. The authorization works by matching the method scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any method scopes matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the method scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
The methodâs authorization type.
This parameter is required. For valid values, see Method in the API Gateway API Reference . .. epigraph:
If you specify the ``AuthorizerId`` property, specify ``CUSTOM`` or ``COGNITO_USER_POOLS`` for this property.
The identifier of an authorizer to use on this method.
The methodâs authorization type must be CUSTOM
or COGNITO_USER_POOLS
.
The methodâs HTTP verb.
Represents an HTTP
, HTTP_PROXY
, AWS
, AWS_PROXY
, or Mock integration.
Gets a method response associated with a given HTTP status code.
A human-friendly operation identifier for the method.
For example, you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as the mapping key).
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
A key is a method request parameter name matching the pattern of method.request.{location}.{name}
, where location
is querystring
, path
, or header
and name
is a valid and unique parameter name. The value associated with the key is a Boolean flag indicating whether the parameter is required ( true
) or optional ( false
). The method request parameter names defined here are available in Integration to be mapped to integration request parameters or templates.
The identifier of a RequestValidator for request validation.
The Resource identifier for the MethodResponse resource.
The string identifier of the associated RestApi.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4