CfnMethodMixinProps
- class aws_cdk.mixins_preview.aws_apigateway.mixins.CfnMethodMixinProps(*, api_key_required=None, authorization_scopes=None, authorization_type=None, authorizer_id=None, http_method=None, integration=None, method_responses=None, operation_name=None, request_models=None, request_parameters=None, request_validator_id=None, resource_id=None, rest_api_id=None)
Bases:
objectProperties for CfnMethodPropsMixin.
- Parameters:
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 aCOGNITO_USER_POOLSauthorizer 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 theAuthorizerIdproperty, specifyCUSTOMorCOGNITO_USER_POOLSfor this property.authorizer_id (
Optional[str]) – The identifier of an authorizer to use on this method. The method’s authorization type must beCUSTOMorCOGNITO_USER_POOLS.http_method (
Optional[str]) – The method’s HTTP verb.integration (
Union[IResolvable,IntegrationProperty,Dict[str,Any],None]) – Represents anHTTP,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 theoperationNameofListPetsfor theGET /petsmethod in thePetStoreexample.request_models (
Union[Mapping[str,str],IResolvable,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 ofmethod.request.{location}.{name}, wherelocationisquerystring,path, orheaderandnameis 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.resource_id (
Optional[str]) – The Resource identifier for the MethodResponse resource.rest_api_id (
Optional[str]) – The string identifier of the associated RestApi.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_apigateway import mixins as apigateway_mixins cfn_method_mixin_props = apigateway_mixins.CfnMethodMixinProps( api_key_required=False, authorization_scopes=["authorizationScopes"], authorization_type="authorizationType", authorizer_id="authorizerId", http_method="httpMethod", integration=apigateway_mixins.CfnMethodPropsMixin.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_mixins.CfnMethodPropsMixin.IntegrationResponseProperty( content_handling="contentHandling", response_parameters={ "response_parameters_key": "responseParameters" }, response_templates={ "response_templates_key": "responseTemplates" }, selection_pattern="selectionPattern", status_code="statusCode" )], integration_target="integrationTarget", passthrough_behavior="passthroughBehavior", request_parameters={ "request_parameters_key": "requestParameters" }, request_templates={ "request_templates_key": "requestTemplates" }, response_transfer_mode="responseTransferMode", timeout_in_millis=123, type="type", uri="uri" ), method_responses=[apigateway_mixins.CfnMethodPropsMixin.MethodResponseProperty( response_models={ "response_models_key": "responseModels" }, response_parameters={ "response_parameters_key": False }, status_code="statusCode" )], operation_name="operationName", request_models={ "request_models_key": "requestModels" }, request_parameters={ "request_parameters_key": False }, request_validator_id="requestValidatorId", resource_id="resourceId", rest_api_id="restApiId" )
Attributes
- api_key_required
A boolean flag specifying whether a valid ApiKey is required to invoke this method.
- authorization_scopes
A list of authorization scopes configured on the method.
The scopes are used with a
COGNITO_USER_POOLSauthorizer 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
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
The identifier of an authorizer to use on this method.
The method’s authorization type must be
CUSTOMorCOGNITO_USER_POOLS.
- http_method
The method’s HTTP verb.
- integration
Represents an
HTTP,HTTP_PROXY,AWS,AWS_PROXY, or Mock integration.
- method_responses
Gets a method response associated with a given HTTP status code.
- operation_name
A human-friendly operation identifier for the method.
For example, you can assign the
operationNameofListPetsfor theGET /petsmethod in thePetStoreexample.
- request_models
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
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}, wherelocationisquerystring,path, orheaderandnameis 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
The identifier of a RequestValidator for request validation.
- resource_id
The Resource identifier for the MethodResponse resource.
- rest_api_id
The string identifier of the associated RestApi.