Class CfnMethodMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.apigateway.CfnMethodMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnMethodMixinProps>
- Enclosing interface:
CfnMethodMixinProps
@Stability(Stable)
public static final class CfnMethodMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnMethodMixinProps>
A builder for
CfnMethodMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKeyRequired(Boolean apiKeyRequired) Sets the value ofCfnMethodMixinProps.getApiKeyRequired()apiKeyRequired(IResolvable apiKeyRequired) Sets the value ofCfnMethodMixinProps.getApiKeyRequired()authorizationScopes(List<String> authorizationScopes) Sets the value ofCfnMethodMixinProps.getAuthorizationScopes()authorizationType(String authorizationType) Sets the value ofCfnMethodMixinProps.getAuthorizationType()authorizerId(String authorizerId) Sets the value ofCfnMethodMixinProps.getAuthorizerId()authorizerId(IAuthorizerRef authorizerId) Sets the value ofCfnMethodMixinProps.getAuthorizerId()build()Builds the configured instance.httpMethod(String httpMethod) Sets the value ofCfnMethodMixinProps.getHttpMethod()integration(CfnMethodPropsMixin.IntegrationProperty integration) Sets the value ofCfnMethodMixinProps.getIntegration()integration(IResolvable integration) Sets the value ofCfnMethodMixinProps.getIntegration()methodResponses(List<? extends Object> methodResponses) Sets the value ofCfnMethodMixinProps.getMethodResponses()methodResponses(IResolvable methodResponses) Sets the value ofCfnMethodMixinProps.getMethodResponses()operationName(String operationName) Sets the value ofCfnMethodMixinProps.getOperationName()requestModels(Map<String, String> requestModels) Sets the value ofCfnMethodMixinProps.getRequestModels()requestModels(IResolvable requestModels) Sets the value ofCfnMethodMixinProps.getRequestModels()requestParameters(Map<String, ? extends Object> requestParameters) Sets the value ofCfnMethodMixinProps.getRequestParameters()requestParameters(IResolvable requestParameters) Sets the value ofCfnMethodMixinProps.getRequestParameters()requestValidatorId(String requestValidatorId) Sets the value ofCfnMethodMixinProps.getRequestValidatorId()requestValidatorId(IRequestValidatorRef requestValidatorId) Sets the value ofCfnMethodMixinProps.getRequestValidatorId()resourceId(String resourceId) Sets the value ofCfnMethodMixinProps.getResourceId()resourceId(IResourceRef resourceId) Sets the value ofCfnMethodMixinProps.getResourceId()Sets the value ofCfnMethodMixinProps.getRestApiId()restApiId(IRestApiRef restApiId) Sets the value ofCfnMethodMixinProps.getRestApiId()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
apiKeyRequired
Sets the value ofCfnMethodMixinProps.getApiKeyRequired()- Parameters:
apiKeyRequired- A boolean flag specifying whether a valid ApiKey is required to invoke this method.- Returns:
this
-
apiKeyRequired
Sets the value ofCfnMethodMixinProps.getApiKeyRequired()- Parameters:
apiKeyRequired- A boolean flag specifying whether a valid ApiKey is required to invoke this method.- Returns:
this
-
authorizationScopes
@Stability(Stable) public CfnMethodMixinProps.Builder authorizationScopes(List<String> authorizationScopes) Sets the value ofCfnMethodMixinProps.getAuthorizationScopes()- Parameters:
authorizationScopes- 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.- Returns:
this
-
authorizationType
Sets the value ofCfnMethodMixinProps.getAuthorizationType()- Parameters:
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.- Returns:
this
-
authorizerId
Sets the value ofCfnMethodMixinProps.getAuthorizerId()- Parameters:
authorizerId- The identifier of an authorizer to use on this method. The method's authorization type must beCUSTOMorCOGNITO_USER_POOLS.- Returns:
this
-
authorizerId
Sets the value ofCfnMethodMixinProps.getAuthorizerId()- Parameters:
authorizerId- The identifier of an authorizer to use on this method. The method's authorization type must beCUSTOMorCOGNITO_USER_POOLS.- Returns:
this
-
httpMethod
Sets the value ofCfnMethodMixinProps.getHttpMethod()- Parameters:
httpMethod- The method's HTTP verb.- Returns:
this
-
integration
Sets the value ofCfnMethodMixinProps.getIntegration()- Parameters:
integration- Represents anHTTP,HTTP_PROXY,AWS,AWS_PROXY, or Mock integration.- Returns:
this
-
integration
@Stability(Stable) public CfnMethodMixinProps.Builder integration(CfnMethodPropsMixin.IntegrationProperty integration) Sets the value ofCfnMethodMixinProps.getIntegration()- Parameters:
integration- Represents anHTTP,HTTP_PROXY,AWS,AWS_PROXY, or Mock integration.- Returns:
this
-
methodResponses
Sets the value ofCfnMethodMixinProps.getMethodResponses()- Parameters:
methodResponses- Gets a method response associated with a given HTTP status code.- Returns:
this
-
methodResponses
@Stability(Stable) public CfnMethodMixinProps.Builder methodResponses(List<? extends Object> methodResponses) Sets the value ofCfnMethodMixinProps.getMethodResponses()- Parameters:
methodResponses- Gets a method response associated with a given HTTP status code.- Returns:
this
-
operationName
Sets the value ofCfnMethodMixinProps.getOperationName()- Parameters:
operationName- A human-friendly operation identifier for the method. For example, you can assign theoperationNameofListPetsfor theGET /petsmethod in thePetStoreexample.- Returns:
this
-
requestModels
@Stability(Stable) public CfnMethodMixinProps.Builder requestModels(Map<String, String> requestModels) Sets the value ofCfnMethodMixinProps.getRequestModels()- Parameters:
requestModels- 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).- Returns:
this
-
requestModels
Sets the value ofCfnMethodMixinProps.getRequestModels()- Parameters:
requestModels- 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).- Returns:
this
-
requestParameters
@Stability(Stable) public CfnMethodMixinProps.Builder requestParameters(IResolvable requestParameters) Sets the value ofCfnMethodMixinProps.getRequestParameters()- Parameters:
requestParameters- 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.- Returns:
this
-
requestParameters
@Stability(Stable) public CfnMethodMixinProps.Builder requestParameters(Map<String, ? extends Object> requestParameters) Sets the value ofCfnMethodMixinProps.getRequestParameters()- Parameters:
requestParameters- 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.- Returns:
this
-
requestValidatorId
Sets the value ofCfnMethodMixinProps.getRequestValidatorId()- Parameters:
requestValidatorId- The identifier of a RequestValidator for request validation.- Returns:
this
-
requestValidatorId
@Stability(Stable) public CfnMethodMixinProps.Builder requestValidatorId(IRequestValidatorRef requestValidatorId) Sets the value ofCfnMethodMixinProps.getRequestValidatorId()- Parameters:
requestValidatorId- The identifier of a RequestValidator for request validation.- Returns:
this
-
resourceId
Sets the value ofCfnMethodMixinProps.getResourceId()- Parameters:
resourceId- The Resource identifier for the MethodResponse resource.- Returns:
this
-
resourceId
Sets the value ofCfnMethodMixinProps.getResourceId()- Parameters:
resourceId- The Resource identifier for the MethodResponse resource.- Returns:
this
-
restApiId
Sets the value ofCfnMethodMixinProps.getRestApiId()- Parameters:
restApiId- The string identifier of the associated RestApi.- Returns:
this
-
restApiId
Sets the value ofCfnMethodMixinProps.getRestApiId()- Parameters:
restApiId- The string identifier of the associated RestApi.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnMethodMixinProps>- Returns:
- a new instance of
CfnMethodMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-