/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace APIGateway { namespace Model { /** *

Request to add a method to an existing Resource resource.

See * Also:

AWS * API Reference

*/ class PutMethodRequest : public APIGatewayRequest { public: AWS_APIGATEWAY_API PutMethodRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutMethod"; } AWS_APIGATEWAY_API Aws::String SerializePayload() const override; /** *

The string identifier of the associated RestApi.

*/ inline const Aws::String& GetRestApiId() const{ return m_restApiId; } /** *

The string identifier of the associated RestApi.

*/ inline bool RestApiIdHasBeenSet() const { return m_restApiIdHasBeenSet; } /** *

The string identifier of the associated RestApi.

*/ inline void SetRestApiId(const Aws::String& value) { m_restApiIdHasBeenSet = true; m_restApiId = value; } /** *

The string identifier of the associated RestApi.

*/ inline void SetRestApiId(Aws::String&& value) { m_restApiIdHasBeenSet = true; m_restApiId = std::move(value); } /** *

The string identifier of the associated RestApi.

*/ inline void SetRestApiId(const char* value) { m_restApiIdHasBeenSet = true; m_restApiId.assign(value); } /** *

The string identifier of the associated RestApi.

*/ inline PutMethodRequest& WithRestApiId(const Aws::String& value) { SetRestApiId(value); return *this;} /** *

The string identifier of the associated RestApi.

*/ inline PutMethodRequest& WithRestApiId(Aws::String&& value) { SetRestApiId(std::move(value)); return *this;} /** *

The string identifier of the associated RestApi.

*/ inline PutMethodRequest& WithRestApiId(const char* value) { SetRestApiId(value); return *this;} /** *

The Resource identifier for the new Method resource.

*/ inline const Aws::String& GetResourceId() const{ return m_resourceId; } /** *

The Resource identifier for the new Method resource.

*/ inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } /** *

The Resource identifier for the new Method resource.

*/ inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } /** *

The Resource identifier for the new Method resource.

*/ inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } /** *

The Resource identifier for the new Method resource.

*/ inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } /** *

The Resource identifier for the new Method resource.

*/ inline PutMethodRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} /** *

The Resource identifier for the new Method resource.

*/ inline PutMethodRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} /** *

The Resource identifier for the new Method resource.

*/ inline PutMethodRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;} /** *

Specifies the method request's HTTP method type.

*/ inline const Aws::String& GetHttpMethod() const{ return m_httpMethod; } /** *

Specifies the method request's HTTP method type.

*/ inline bool HttpMethodHasBeenSet() const { return m_httpMethodHasBeenSet; } /** *

Specifies the method request's HTTP method type.

*/ inline void SetHttpMethod(const Aws::String& value) { m_httpMethodHasBeenSet = true; m_httpMethod = value; } /** *

Specifies the method request's HTTP method type.

*/ inline void SetHttpMethod(Aws::String&& value) { m_httpMethodHasBeenSet = true; m_httpMethod = std::move(value); } /** *

Specifies the method request's HTTP method type.

*/ inline void SetHttpMethod(const char* value) { m_httpMethodHasBeenSet = true; m_httpMethod.assign(value); } /** *

Specifies the method request's HTTP method type.

*/ inline PutMethodRequest& WithHttpMethod(const Aws::String& value) { SetHttpMethod(value); return *this;} /** *

Specifies the method request's HTTP method type.

*/ inline PutMethodRequest& WithHttpMethod(Aws::String&& value) { SetHttpMethod(std::move(value)); return *this;} /** *

Specifies the method request's HTTP method type.

*/ inline PutMethodRequest& WithHttpMethod(const char* value) { SetHttpMethod(value); return *this;} /** *

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.

*/ inline const Aws::String& GetAuthorizationType() const{ return m_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.

*/ inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; } /** *

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.

*/ inline void SetAuthorizationType(const Aws::String& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = value; } /** *

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.

*/ inline void SetAuthorizationType(Aws::String&& value) { m_authorizationTypeHasBeenSet = true; m_authorizationType = std::move(value); } /** *

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.

*/ inline void SetAuthorizationType(const char* value) { m_authorizationTypeHasBeenSet = true; m_authorizationType.assign(value); } /** *

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.

*/ inline PutMethodRequest& WithAuthorizationType(const Aws::String& value) { SetAuthorizationType(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithAuthorizationType(Aws::String&& value) { SetAuthorizationType(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& WithAuthorizationType(const char* value) { SetAuthorizationType(value); return *this;} /** *

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.

*/ inline const Aws::String& GetAuthorizerId() const{ return m_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.

*/ inline bool AuthorizerIdHasBeenSet() const { return m_authorizerIdHasBeenSet; } /** *

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.

*/ inline void SetAuthorizerId(const Aws::String& value) { m_authorizerIdHasBeenSet = true; m_authorizerId = value; } /** *

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.

*/ inline void SetAuthorizerId(Aws::String&& value) { m_authorizerIdHasBeenSet = true; m_authorizerId = std::move(value); } /** *

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.

*/ inline void SetAuthorizerId(const char* value) { m_authorizerIdHasBeenSet = true; m_authorizerId.assign(value); } /** *

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.

*/ inline PutMethodRequest& WithAuthorizerId(const Aws::String& value) { SetAuthorizerId(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithAuthorizerId(Aws::String&& value) { SetAuthorizerId(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& WithAuthorizerId(const char* value) { SetAuthorizerId(value); return *this;} /** *

Specifies whether the method required a valid ApiKey.

*/ inline bool GetApiKeyRequired() const{ return m_apiKeyRequired; } /** *

Specifies whether the method required a valid ApiKey.

*/ inline bool ApiKeyRequiredHasBeenSet() const { return m_apiKeyRequiredHasBeenSet; } /** *

Specifies whether the method required a valid ApiKey.

*/ inline void SetApiKeyRequired(bool value) { m_apiKeyRequiredHasBeenSet = true; m_apiKeyRequired = value; } /** *

Specifies whether the method required a valid ApiKey.

*/ inline PutMethodRequest& WithApiKeyRequired(bool value) { SetApiKeyRequired(value); return *this;} /** *

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.

*/ inline const Aws::String& GetOperationName() const{ return m_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.

*/ inline bool OperationNameHasBeenSet() const { return m_operationNameHasBeenSet; } /** *

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.

*/ inline void SetOperationName(const Aws::String& value) { m_operationNameHasBeenSet = true; m_operationName = value; } /** *

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.

*/ inline void SetOperationName(Aws::String&& value) { m_operationNameHasBeenSet = true; m_operationName = std::move(value); } /** *

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.

*/ inline void SetOperationName(const char* value) { m_operationNameHasBeenSet = true; m_operationName.assign(value); } /** *

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.

*/ inline PutMethodRequest& WithOperationName(const Aws::String& value) { SetOperationName(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithOperationName(Aws::String&& value) { SetOperationName(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& WithOperationName(const char* value) { SetOperationName(value); return *this;} /** *

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.

*/ inline const Aws::Map& GetRequestParameters() const{ return m_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.

*/ inline bool RequestParametersHasBeenSet() const { return m_requestParametersHasBeenSet; } /** *

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.

*/ inline void SetRequestParameters(const Aws::Map& value) { m_requestParametersHasBeenSet = true; m_requestParameters = value; } /** *

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.

*/ inline void SetRequestParameters(Aws::Map&& value) { m_requestParametersHasBeenSet = true; m_requestParameters = std::move(value); } /** *

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.

*/ inline PutMethodRequest& WithRequestParameters(const Aws::Map& value) { SetRequestParameters(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithRequestParameters(Aws::Map&& value) { SetRequestParameters(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& AddRequestParameters(const Aws::String& key, bool value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestParameters(Aws::String&& key, bool value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(std::move(key), value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestParameters(const char* key, bool value) { m_requestParametersHasBeenSet = true; m_requestParameters.emplace(key, value); return *this; } /** *

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.

*/ inline const Aws::Map& GetRequestModels() const{ return m_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.

*/ inline bool RequestModelsHasBeenSet() const { return m_requestModelsHasBeenSet; } /** *

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.

*/ inline void SetRequestModels(const Aws::Map& value) { m_requestModelsHasBeenSet = true; m_requestModels = value; } /** *

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.

*/ inline void SetRequestModels(Aws::Map&& value) { m_requestModelsHasBeenSet = true; m_requestModels = std::move(value); } /** *

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.

*/ inline PutMethodRequest& WithRequestModels(const Aws::Map& value) { SetRequestModels(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithRequestModels(Aws::Map&& value) { SetRequestModels(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& AddRequestModels(const Aws::String& key, const Aws::String& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(Aws::String&& key, const Aws::String& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(const Aws::String& key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, std::move(value)); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(Aws::String&& key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), std::move(value)); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(const char* key, Aws::String&& value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, std::move(value)); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(Aws::String&& key, const char* value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(std::move(key), value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddRequestModels(const char* key, const char* value) { m_requestModelsHasBeenSet = true; m_requestModels.emplace(key, value); return *this; } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline const Aws::String& GetRequestValidatorId() const{ return m_requestValidatorId; } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline bool RequestValidatorIdHasBeenSet() const { return m_requestValidatorIdHasBeenSet; } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline void SetRequestValidatorId(const Aws::String& value) { m_requestValidatorIdHasBeenSet = true; m_requestValidatorId = value; } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline void SetRequestValidatorId(Aws::String&& value) { m_requestValidatorIdHasBeenSet = true; m_requestValidatorId = std::move(value); } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline void SetRequestValidatorId(const char* value) { m_requestValidatorIdHasBeenSet = true; m_requestValidatorId.assign(value); } /** *

The identifier of a RequestValidator for validating the method request.

*/ inline PutMethodRequest& WithRequestValidatorId(const Aws::String& value) { SetRequestValidatorId(value); return *this;} /** *

The identifier of a RequestValidator for validating the method request.

*/ inline PutMethodRequest& WithRequestValidatorId(Aws::String&& value) { SetRequestValidatorId(std::move(value)); return *this;} /** *

The identifier of a RequestValidator for validating the method request.

*/ inline PutMethodRequest& WithRequestValidatorId(const char* value) { SetRequestValidatorId(value); return *this;} /** *

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.

*/ inline const Aws::Vector& GetAuthorizationScopes() const{ return m_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.

*/ inline bool AuthorizationScopesHasBeenSet() const { return m_authorizationScopesHasBeenSet; } /** *

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.

*/ inline void SetAuthorizationScopes(const Aws::Vector& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes = value; } /** *

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.

*/ inline void SetAuthorizationScopes(Aws::Vector&& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes = std::move(value); } /** *

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.

*/ inline PutMethodRequest& WithAuthorizationScopes(const Aws::Vector& value) { SetAuthorizationScopes(value); return *this;} /** *

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.

*/ inline PutMethodRequest& WithAuthorizationScopes(Aws::Vector&& value) { SetAuthorizationScopes(std::move(value)); return *this;} /** *

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.

*/ inline PutMethodRequest& AddAuthorizationScopes(const Aws::String& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(value); return *this; } /** *

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.

*/ inline PutMethodRequest& AddAuthorizationScopes(Aws::String&& value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(std::move(value)); return *this; } /** *

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.

*/ inline PutMethodRequest& AddAuthorizationScopes(const char* value) { m_authorizationScopesHasBeenSet = true; m_authorizationScopes.push_back(value); return *this; } private: Aws::String m_restApiId; bool m_restApiIdHasBeenSet = false; Aws::String m_resourceId; bool m_resourceIdHasBeenSet = false; Aws::String m_httpMethod; bool m_httpMethodHasBeenSet = false; Aws::String m_authorizationType; bool m_authorizationTypeHasBeenSet = false; Aws::String m_authorizerId; bool m_authorizerIdHasBeenSet = false; bool m_apiKeyRequired; bool m_apiKeyRequiredHasBeenSet = false; Aws::String m_operationName; bool m_operationNameHasBeenSet = false; Aws::Map m_requestParameters; bool m_requestParametersHasBeenSet = false; Aws::Map m_requestModels; bool m_requestModelsHasBeenSet = false; Aws::String m_requestValidatorId; bool m_requestValidatorIdHasBeenSet = false; Aws::Vector m_authorizationScopes; bool m_authorizationScopesHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws