@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.126Z") @Stability(value=Stable) public interface CfnMethodProps extends software.amazon.jsii.JsiiSerializable
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()
.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)
.type("type")
.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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnMethodProps.Builder
A builder for
CfnMethodProps |
static class |
CfnMethodProps.Jsii$Proxy
An implementation for
CfnMethodProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnMethodProps.Builder |
builder() |
default Object |
getApiKeyRequired()
Indicates whether the method requires clients to submit a valid API key.
|
default List<String> |
getAuthorizationScopes()
A list of authorization scopes configured on the method.
|
default String |
getAuthorizationType()
The method's authorization type.
|
default String |
getAuthorizerId()
The identifier of the [authorizer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html) to use on this method.
|
String |
getHttpMethod()
The HTTP method that clients use to call this method.
|
default Object |
getIntegration()
The backend system that the method calls when it receives a request.
|
default Object |
getMethodResponses()
The responses that can be sent to the client who calls the method.
|
default String |
getOperationName()
A friendly operation name for the method.
|
default Object |
getRequestModels()
The resources that are used for the request's content type.
|
default Object |
getRequestParameters()
The request parameters that API Gateway accepts.
|
default String |
getRequestValidatorId()
The ID of the associated request validator.
|
String |
getResourceId()
The ID of an API Gateway [resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html) .
|
String |
getRestApiId()
The ID of the [RestApi](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html) resource in which API Gateway creates the method.
|
@Stability(value=Stable) @NotNull String getHttpMethod()
@Stability(value=Stable) @NotNull String getResourceId()
@Stability(value=Stable) @NotNull String getRestApiId()
@Stability(value=Stable) @Nullable default Object getApiKeyRequired()
@Stability(value=Stable) @Nullable default List<String> getAuthorizationScopes()
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 match 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.
@Stability(value=Stable) @Nullable default String getAuthorizationType()
This parameter is required. For valid values, see Method in the API Gateway API Reference .
If you specify the
AuthorizerIdproperty, specifyCUSTOMorCOGNITO_USER_POOLSfor this property.
@Stability(value=Stable) @Nullable default String getAuthorizerId()
@Stability(value=Stable) @Nullable default Object getIntegration()
@Stability(value=Stable) @Nullable default Object getMethodResponses()
@Stability(value=Stable) @Nullable default String getOperationName()
For example, you can assign the OperationName of ListPets for the GET /pets method.
@Stability(value=Stable) @Nullable default Object getRequestModels()
Specify request models as key-value pairs (string-to-string mapping), with a content type as the key and a Model resource name as the value. To use the same model regardless of the content type, specify $default as the key.
@Stability(value=Stable) @Nullable default Object getRequestParameters()
Specify request parameters as key-value pairs (string-to-Boolean mapping), with a source as the key and a Boolean as the value. The Boolean specifies whether a parameter is required. A source must match the format method.request. *location* . *name* , where the location is querystring, path, or header, and name is a valid, unique parameter name.
@Stability(value=Stable) @Nullable default String getRequestValidatorId()
@Stability(value=Stable) static CfnMethodProps.Builder builder()
CfnMethodProps.Builder of CfnMethodPropsCopyright © 2022. All rights reserved.