@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PutMethodRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
Request to add a method to an existing Resource resource.
NOOP
Constructor and Description |
---|
PutMethodRequest() |
Modifier and Type | Method and Description |
---|---|
PutMethodRequest |
addRequestModelsEntry(String key,
String value)
Add a single RequestModels entry
|
PutMethodRequest |
addRequestParametersEntry(String key,
Boolean value)
Add a single RequestParameters entry
|
PutMethodRequest |
clearRequestModelsEntries()
Removes all the entries added into RequestModels.
|
PutMethodRequest |
clearRequestParametersEntries()
Removes all the entries added into RequestParameters.
|
PutMethodRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
Boolean |
getApiKeyRequired()
Specifies whether the method required a valid ApiKey.
|
List<String> |
getAuthorizationScopes()
A list of authorization scopes configured on the method.
|
String |
getAuthorizationType()
The method's authorization type.
|
String |
getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS.
|
String |
getHttpMethod()
Specifies the method request's HTTP method type.
|
String |
getOperationName()
A human-friendly operation identifier for the method.
|
Map<String,String> |
getRequestModels()
Specifies the Model resources used for the request's content type.
|
Map<String,Boolean> |
getRequestParameters()
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
|
String |
getRequestValidatorId()
The identifier of a RequestValidator for validating the method request.
|
String |
getResourceId()
The Resource identifier for the new Method resource.
|
String |
getRestApiId()
The string identifier of the associated RestApi.
|
int |
hashCode() |
Boolean |
isApiKeyRequired()
Specifies whether the method required a valid ApiKey.
|
void |
setApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method required a valid ApiKey.
|
void |
setAuthorizationScopes(Collection<String> authorizationScopes)
A list of authorization scopes configured on the method.
|
void |
setAuthorizationType(String authorizationType)
The method's authorization type.
|
void |
setAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS.
|
void |
setHttpMethod(String httpMethod)
Specifies the method request's HTTP method type.
|
void |
setOperationName(String operationName)
A human-friendly operation identifier for the method.
|
void |
setRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type.
|
void |
setRequestParameters(Map<String,Boolean> requestParameters)
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
|
void |
setRequestValidatorId(String requestValidatorId)
The identifier of a RequestValidator for validating the method request.
|
void |
setResourceId(String resourceId)
The Resource identifier for the new Method resource.
|
void |
setRestApiId(String restApiId)
The string identifier of the associated RestApi.
|
String |
toString()
Returns a string representation of this object.
|
PutMethodRequest |
withApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method required a valid ApiKey.
|
PutMethodRequest |
withAuthorizationScopes(Collection<String> authorizationScopes)
A list of authorization scopes configured on the method.
|
PutMethodRequest |
withAuthorizationScopes(String... authorizationScopes)
A list of authorization scopes configured on the method.
|
PutMethodRequest |
withAuthorizationType(String authorizationType)
The method's authorization type.
|
PutMethodRequest |
withAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS.
|
PutMethodRequest |
withHttpMethod(String httpMethod)
Specifies the method request's HTTP method type.
|
PutMethodRequest |
withOperationName(String operationName)
A human-friendly operation identifier for the method.
|
PutMethodRequest |
withRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type.
|
PutMethodRequest |
withRequestParameters(Map<String,Boolean> requestParameters)
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
|
PutMethodRequest |
withRequestValidatorId(String requestValidatorId)
The identifier of a RequestValidator for validating the method request.
|
PutMethodRequest |
withResourceId(String resourceId)
The Resource identifier for the new Method resource.
|
PutMethodRequest |
withRestApiId(String restApiId)
The string identifier of the associated RestApi.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setRestApiId(String restApiId)
The string identifier of the associated RestApi.
restApiId
- The string identifier of the associated RestApi.public String getRestApiId()
The string identifier of the associated RestApi.
public PutMethodRequest withRestApiId(String restApiId)
The string identifier of the associated RestApi.
restApiId
- The string identifier of the associated RestApi.public void setResourceId(String resourceId)
The Resource identifier for the new Method resource.
resourceId
- The Resource identifier for the new Method resource.public String getResourceId()
The Resource identifier for the new Method resource.
public PutMethodRequest withResourceId(String resourceId)
The Resource identifier for the new Method resource.
resourceId
- The Resource identifier for the new Method resource.public void setHttpMethod(String httpMethod)
Specifies the method request's HTTP method type.
httpMethod
- Specifies the method request's HTTP method type.public String getHttpMethod()
Specifies the method request's HTTP method type.
public PutMethodRequest withHttpMethod(String httpMethod)
Specifies the method request's HTTP method type.
httpMethod
- Specifies the method request's HTTP method type.public void setAuthorizationType(String authorizationType)
The method's authorization type. Valid values are NONE
for open access, AWS_IAM
for
using AWS IAM permissions, CUSTOM
for using a custom authorizer, or COGNITO_USER_POOLS
for using a Cognito user pool.
authorizationType
- The method's authorization type. Valid values are NONE
for open access, AWS_IAM
for using AWS IAM permissions, CUSTOM
for using a custom authorizer, or
COGNITO_USER_POOLS
for using a Cognito user pool.public String getAuthorizationType()
The method's authorization type. Valid values are NONE
for open access, AWS_IAM
for
using AWS IAM permissions, CUSTOM
for using a custom authorizer, or COGNITO_USER_POOLS
for using a Cognito user pool.
NONE
for open access, AWS_IAM
for using AWS IAM permissions, CUSTOM
for using a custom authorizer, or
COGNITO_USER_POOLS
for using a Cognito user pool.public PutMethodRequest withAuthorizationType(String authorizationType)
The method's authorization type. Valid values are NONE
for open access, AWS_IAM
for
using AWS IAM permissions, CUSTOM
for using a custom authorizer, or COGNITO_USER_POOLS
for using a Cognito user pool.
authorizationType
- The method's authorization type. Valid values are NONE
for open access, AWS_IAM
for using AWS IAM permissions, CUSTOM
for using a custom authorizer, or
COGNITO_USER_POOLS
for using a Cognito user pool.public void setAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.
authorizerId
- Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or
COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.public String getAuthorizerId()
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.
public PutMethodRequest withAuthorizerId(String authorizerId)
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.
authorizerId
- Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or
COGNITO_USER_POOLS. The authorizer identifier is generated by API Gateway when you created the authorizer.public void setApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method required a valid ApiKey.
apiKeyRequired
- Specifies whether the method required a valid ApiKey.public Boolean getApiKeyRequired()
Specifies whether the method required a valid ApiKey.
public PutMethodRequest withApiKeyRequired(Boolean apiKeyRequired)
Specifies whether the method required a valid ApiKey.
apiKeyRequired
- Specifies whether the method required a valid ApiKey.public Boolean isApiKeyRequired()
Specifies whether the method required a valid ApiKey.
public void setOperationName(String operationName)
A human-friendly operation identifier for the method. For example, you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
operationName
- A human-friendly operation identifier for the method. For example, you can assign the
operationName
of ListPets
for the GET /pets
method in the
PetStore
example.public String getOperationName()
A human-friendly operation identifier for the method. For example, you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
operationName
of ListPets
for the GET /pets
method in the
PetStore
example.public PutMethodRequest withOperationName(String operationName)
A human-friendly operation identifier for the method. For example, you can assign the operationName
of ListPets
for the GET /pets
method in the PetStore
example.
operationName
- A human-friendly operation identifier for the method. For example, you can assign the
operationName
of ListPets
for the GET /pets
method in the
PetStore
example.public Map<String,Boolean> getRequestParameters()
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A
key defines a method request parameter name matching the pattern of method.request.{location}.{name}
, where location
is querystring
, path
, or header
and
name
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 body-mapping templates.
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
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 body-mapping templates.public void setRequestParameters(Map<String,Boolean> requestParameters)
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A
key defines a method request parameter name matching the pattern of method.request.{location}.{name}
, where location
is querystring
, path
, or header
and
name
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 body-mapping templates.
requestParameters
- A key-value map defining required or optional method request parameters that can be accepted by API
Gateway. A key defines a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
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 body-mapping templates.public PutMethodRequest withRequestParameters(Map<String,Boolean> requestParameters)
A key-value map defining required or optional method request parameters that can be accepted by API Gateway. A
key defines a method request parameter name matching the pattern of method.request.{location}.{name}
, where location
is querystring
, path
, or header
and
name
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 body-mapping templates.
requestParameters
- A key-value map defining required or optional method request parameters that can be accepted by API
Gateway. A key defines a method request parameter name matching the pattern of
method.request.{location}.{name}
, where location
is querystring
,
path
, or header
and name
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 body-mapping templates.public PutMethodRequest addRequestParametersEntry(String key, Boolean value)
public PutMethodRequest clearRequestParametersEntries()
public Map<String,String> getRequestModels()
Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.
public void setRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.
requestModels
- Specifies the Model resources used for the request's content type. Request models are represented as a
key/value map, with a content type as the key and a Model name as the value.public PutMethodRequest withRequestModels(Map<String,String> requestModels)
Specifies the Model resources used for the request's content type. Request models are represented as a key/value map, with a content type as the key and a Model name as the value.
requestModels
- Specifies the Model resources used for the request's content type. Request models are represented as a
key/value map, with a content type as the key and a Model name as the value.public PutMethodRequest addRequestModelsEntry(String key, String value)
public PutMethodRequest clearRequestModelsEntries()
public void setRequestValidatorId(String requestValidatorId)
The identifier of a RequestValidator for validating the method request.
requestValidatorId
- The identifier of a RequestValidator for validating the method request.public String getRequestValidatorId()
The identifier of a RequestValidator for validating the method request.
public PutMethodRequest withRequestValidatorId(String requestValidatorId)
The identifier of a RequestValidator for validating the method request.
requestValidatorId
- The identifier of a RequestValidator for validating the method request.public List<String> 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.
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.public void setAuthorizationScopes(Collection<String> 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 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.
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 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.public PutMethodRequest withAuthorizationScopes(String... 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 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.
NOTE: This method appends the values to the existing list (if any). Use
setAuthorizationScopes(java.util.Collection)
or withAuthorizationScopes(java.util.Collection)
if you want to override the existing values.
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 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.public PutMethodRequest withAuthorizationScopes(Collection<String> 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 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.
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 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.public String toString()
toString
in class Object
Object.toString()
public PutMethodRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()