@Stability(value=Stable) public static final class CfnMethodProps.Builder extends Object implements software.amazon.jsii.Builder<CfnMethodProps>
CfnMethodProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Stable) public CfnMethodProps.Builder httpMethod(String httpMethod)
CfnMethodProps.getHttpMethod()httpMethod - The HTTP method that clients use to call this method. This parameter is required.this@Stability(value=Stable) public CfnMethodProps.Builder resourceId(String resourceId)
CfnMethodProps.getResourceId()resourceId - The ID of an API Gateway [resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-resource.html) . For root resource methods, specify the `RestApi` root resource ID, such as `{ "Fn::GetAtt": ["MyRestApi", "RootResourceId"] }` . This parameter is required.this@Stability(value=Stable) public CfnMethodProps.Builder restApiId(String restApiId)
CfnMethodProps.getRestApiId()restApiId - 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. This parameter is required.this@Stability(value=Stable) public CfnMethodProps.Builder apiKeyRequired(Boolean apiKeyRequired)
CfnMethodProps.getApiKeyRequired()apiKeyRequired - Indicates whether the method requires clients to submit a valid API key.this@Stability(value=Stable) public CfnMethodProps.Builder apiKeyRequired(IResolvable apiKeyRequired)
CfnMethodProps.getApiKeyRequired()apiKeyRequired - Indicates whether the method requires clients to submit a valid API key.this@Stability(value=Stable) public CfnMethodProps.Builder authorizationScopes(List<String> authorizationScopes)
CfnMethodProps.getAuthorizationScopes()authorizationScopes - 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 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.this@Stability(value=Stable) public CfnMethodProps.Builder authorizationType(String authorizationType)
CfnMethodProps.getAuthorizationType()authorizationType - The method's authorization type.
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.
this@Stability(value=Stable) public CfnMethodProps.Builder authorizerId(String authorizerId)
CfnMethodProps.getAuthorizerId()authorizerId - The identifier of the [authorizer](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-authorizer.html) to use on this method. If you specify this property, specify `CUSTOM` or `COGNITO_USER_POOLS` for the `AuthorizationType` property.this@Stability(value=Stable) public CfnMethodProps.Builder integration(CfnMethod.IntegrationProperty integration)
CfnMethodProps.getIntegration()integration - The backend system that the method calls when it receives a request.this@Stability(value=Stable) public CfnMethodProps.Builder integration(IResolvable integration)
CfnMethodProps.getIntegration()integration - The backend system that the method calls when it receives a request.this@Stability(value=Stable) public CfnMethodProps.Builder methodResponses(IResolvable methodResponses)
CfnMethodProps.getMethodResponses()methodResponses - The responses that can be sent to the client who calls the method.this@Stability(value=Stable) public CfnMethodProps.Builder methodResponses(List<? extends Object> methodResponses)
CfnMethodProps.getMethodResponses()methodResponses - The responses that can be sent to the client who calls the method.this@Stability(value=Stable) public CfnMethodProps.Builder operationName(String operationName)
CfnMethodProps.getOperationName()operationName - A friendly operation name for the method.
For example, you can assign the OperationName of ListPets for the GET /pets method.this@Stability(value=Stable) public CfnMethodProps.Builder requestModels(IResolvable requestModels)
CfnMethodProps.getRequestModels()requestModels - The resources that are used for the request's content type.
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.this@Stability(value=Stable) public CfnMethodProps.Builder requestModels(Map<String,String> requestModels)
CfnMethodProps.getRequestModels()requestModels - The resources that are used for the request's content type.
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.this@Stability(value=Stable) public CfnMethodProps.Builder requestParameters(IResolvable requestParameters)
CfnMethodProps.getRequestParameters()requestParameters - The request parameters that API Gateway accepts.
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.this@Stability(value=Stable) public CfnMethodProps.Builder requestParameters(Map<String,? extends Object> requestParameters)
CfnMethodProps.getRequestParameters()requestParameters - The request parameters that API Gateway accepts.
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.this@Stability(value=Stable) public CfnMethodProps.Builder requestValidatorId(String requestValidatorId)
CfnMethodProps.getRequestValidatorId()requestValidatorId - The ID of the associated request validator.this@Stability(value=Stable) public CfnMethodProps build()
build in interface software.amazon.jsii.Builder<CfnMethodProps>CfnMethodPropsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.