CfnMethodProps

class aws_cdk.aws_apigateway.CfnMethodProps(*, api_key_required=None, authorization_scopes=None, authorization_type=None, authorizer_id=None, http_method, integration=None, method_responses=None, operation_name=None, request_models=None, request_parameters=None, request_validator_id=None, resource_id, rest_api_id)

Bases: object

Properties for defining a AWS::ApiGateway::Method.

Parameters
  • api_key_required (Union[bool, IResolvable, None]) – AWS::ApiGateway::Method.ApiKeyRequired.

  • authorization_scopes (Optional[Sequence[str]]) – AWS::ApiGateway::Method.AuthorizationScopes.

  • authorization_type (Optional[str]) – AWS::ApiGateway::Method.AuthorizationType.

  • authorizer_id (Optional[str]) – AWS::ApiGateway::Method.AuthorizerId.

  • http_method (str) – AWS::ApiGateway::Method.HttpMethod.

  • integration (Union[IResolvable, IntegrationProperty, None]) – AWS::ApiGateway::Method.Integration.

  • method_responses (Union[IResolvable, Sequence[Union[IResolvable, MethodResponseProperty]], None]) – AWS::ApiGateway::Method.MethodResponses.

  • operation_name (Optional[str]) – AWS::ApiGateway::Method.OperationName.

  • request_models (Union[IResolvable, Mapping[str, str], None]) – AWS::ApiGateway::Method.RequestModels.

  • request_parameters (Union[IResolvable, Mapping[str, Union[bool, IResolvable]], None]) – AWS::ApiGateway::Method.RequestParameters.

  • request_validator_id (Optional[str]) – AWS::ApiGateway::Method.RequestValidatorId.

  • resource_id (str) – AWS::ApiGateway::Method.ResourceId.

  • rest_api_id (str) – AWS::ApiGateway::Method.RestApiId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html

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

api_key_required

AWS::ApiGateway::Method.ApiKeyRequired.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-apikeyrequired

Return type

Union[bool, IResolvable, None]

authorization_scopes

AWS::ApiGateway::Method.AuthorizationScopes.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationscopes

Return type

Optional[List[str]]

authorization_type

AWS::ApiGateway::Method.AuthorizationType.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationtype

Return type

Optional[str]

authorizer_id

AWS::ApiGateway::Method.AuthorizerId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizerid

Return type

Optional[str]

http_method

AWS::ApiGateway::Method.HttpMethod.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-httpmethod

Return type

str

integration

AWS::ApiGateway::Method.Integration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-integration

Return type

Union[IResolvable, IntegrationProperty, None]

method_responses

AWS::ApiGateway::Method.MethodResponses.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-methodresponses

Return type

Union[IResolvable, List[Union[IResolvable, MethodResponseProperty]], None]

operation_name

AWS::ApiGateway::Method.OperationName.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-operationname

Return type

Optional[str]

request_models

AWS::ApiGateway::Method.RequestModels.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestmodels

Return type

Union[IResolvable, Mapping[str, str], None]

request_parameters

AWS::ApiGateway::Method.RequestParameters.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestparameters

Return type

Union[IResolvable, Mapping[str, Union[bool, IResolvable]], None]

request_validator_id

AWS::ApiGateway::Method.RequestValidatorId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-requestvalidatorid

Return type

Optional[str]

resource_id

AWS::ApiGateway::Method.ResourceId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-resourceid

Return type

str

rest_api_id

AWS::ApiGateway::Method.RestApiId.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-restapiid

Return type

str