Interface CfnMethodProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnMethodProps.Jsii$Proxy
CfnMethod
.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apigateway.*; CfnMethodProps cfnMethodProps = CfnMethodProps.builder() .httpMethod("httpMethod") .resourceId("resourceId") .restApiId("restApiId") // the properties below are optional .apiKeyRequired(false) .authorizationScopes(List.of("authorizationScopes")) .authorizationType("authorizationType") .authorizerId("authorizerId") .integration(IntegrationProperty.builder() .type("type") // the properties below are optional .cacheKeyParameters(List.of("cacheKeyParameters")) .cacheNamespace("cacheNamespace") .connectionId("connectionId") .connectionType("connectionType") .contentHandling("contentHandling") .credentials("credentials") .integrationHttpMethod("integrationHttpMethod") .integrationResponses(List.of(IntegrationResponseProperty.builder() .statusCode("statusCode") // the properties below are optional .contentHandling("contentHandling") .responseParameters(Map.of( "responseParametersKey", "responseParameters")) .responseTemplates(Map.of( "responseTemplatesKey", "responseTemplates")) .selectionPattern("selectionPattern") .build())) .passthroughBehavior("passthroughBehavior") .requestParameters(Map.of( "requestParametersKey", "requestParameters")) .requestTemplates(Map.of( "requestTemplatesKey", "requestTemplates")) .timeoutInMillis(123) .uri("uri") .build()) .methodResponses(List.of(MethodResponseProperty.builder() .statusCode("statusCode") // the properties below are optional .responseModels(Map.of( "responseModelsKey", "responseModels")) .responseParameters(Map.of( "responseParametersKey", false)) .build())) .operationName("operationName") .requestModels(Map.of( "requestModelsKey", "requestModels")) .requestParameters(Map.of( "requestParametersKey", false)) .requestValidatorId("requestValidatorId") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnMethodProps
static final class
An implementation forCfnMethodProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic CfnMethodProps.Builder
builder()
default Object
A boolean flag specifying whether a valid ApiKey is required to invoke this method.A list of authorization scopes configured on the method.default String
The method's authorization type.default String
The identifier of an authorizer to use on this method.The method's HTTP verb.default Object
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration.default Object
Gets a method response associated with a given HTTP status code.default String
A human-friendly operation identifier for the method.default Object
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).default Object
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.default String
The identifier of a RequestValidator for request validation.The Resource identifier for the MethodResponse resource.The string identifier of the associated RestApi.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHttpMethod
The method's HTTP verb.- See Also:
-
getResourceId
The Resource identifier for the MethodResponse resource.- See Also:
-
getRestApiId
The string identifier of the associated RestApi.- See Also:
-
getApiKeyRequired
A boolean flag specifying whether a valid ApiKey is required to invoke this method.- See Also:
-
getAuthorizationScopes
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.- See Also:
-
getAuthorizationType
The method's authorization type.This parameter is required. For valid values, see Method in the API Gateway API Reference .
If you specify the
AuthorizerId
property, specifyCUSTOM
orCOGNITO_USER_POOLS
for this property.- See Also:
-
getAuthorizerId
The identifier of an authorizer to use on this method.The method's authorization type must be
CUSTOM
orCOGNITO_USER_POOLS
.- See Also:
-
getIntegration
Represents anHTTP
,HTTP_PROXY
,AWS
,AWS_PROXY
, or Mock integration.- See Also:
-
getMethodResponses
Gets a method response associated with a given HTTP status code.- See Also:
-
getOperationName
A human-friendly operation identifier for the method.For example, you can assign the
operationName
ofListPets
for theGET /pets
method in thePetStore
example.- See Also:
-
getRequestModels
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).- See Also:
-
getRequestParameters
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}
, wherelocation
isquerystring
,path
, orheader
andname
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.- See Also:
-
getRequestValidatorId
The identifier of a RequestValidator for request validation.- See Also:
-
builder
- Returns:
- a
CfnMethodProps.Builder
ofCfnMethodProps
-