@Generated(value="software.amazon.awssdk:codegen") public final class PutMethodRequest extends ApiGatewayRequest implements ToCopyableBuilder<PutMethodRequest.Builder,PutMethodRequest>
Request to add a method to an existing Resource resource.
Modifier and Type | Class and Description |
---|---|
static interface |
PutMethodRequest.Builder |
Modifier and Type | Method and Description |
---|---|
Boolean |
apiKeyRequired()
Specifies whether the method required a valid ApiKey.
|
List<String> |
authorizationScopes()
A list of authorization scopes configured on the method.
|
String |
authorizationType()
[Required] The method's authorization type.
|
String |
authorizerId()
Specifies the identifier of an Authorizer to use on this Method, if the type is CUSTOM or
COGNITO_USER_POOLS.
|
static PutMethodRequest.Builder |
builder() |
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
int |
hashCode() |
String |
httpMethod()
[Required] Specifies the method request's HTTP method type.
|
String |
operationName()
A human-friendly operation identifier for the method.
|
Map<String,String> |
requestModels()
Specifies the Model resources used for the request's content type.
|
Map<String,Boolean> |
requestParameters()
A key-value map defining required or optional method request parameters that can be accepted by API Gateway.
|
String |
requestValidatorId()
The identifier of a RequestValidator for validating the method request.
|
String |
resourceId()
|
String |
restApiId()
[Required] The string identifier of the associated RestApi.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends PutMethodRequest.Builder> |
serializableBuilderClass() |
PutMethodRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
overrideConfiguration
copy
public String restApiId()
[Required] The string identifier of the associated RestApi.
public String resourceId()
public String httpMethod()
[Required] Specifies the method request's HTTP method type.
public String authorizationType()
[Required] 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 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.
public Boolean apiKeyRequired()
Specifies whether the method required a valid ApiKey.
public 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 PetStore example.
operationName
of ListPets
for the GET /pets
method in PetStore example.public 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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
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 String requestValidatorId()
The identifier of a RequestValidator for validating the method request.
public List<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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
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.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<PutMethodRequest.Builder,PutMethodRequest>
toBuilder
in class ApiGatewayRequest
public static PutMethodRequest.Builder builder()
public static Class<? extends PutMethodRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.