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

Updates an Api.

See Also:

AWS * API Reference

*/ class AWS_APIGATEWAYV2_API UpdateApiRequest : public ApiGatewayV2Request { public: UpdateApiRequest(); // 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 "UpdateApi"; } Aws::String SerializePayload() const override; /** *

The API identifier.

*/ inline const Aws::String& GetApiId() const{ return m_apiId; } /** *

The API identifier.

*/ inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; } /** *

The API identifier.

*/ inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; } /** *

The API identifier.

*/ inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); } /** *

The API identifier.

*/ inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); } /** *

The API identifier.

*/ inline UpdateApiRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;} /** *

The API identifier.

*/ inline UpdateApiRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;} /** *

The API identifier.

*/ inline UpdateApiRequest& WithApiId(const char* value) { SetApiId(value); return *this;} /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline const Aws::String& GetApiKeySelectionExpression() const{ return m_apiKeySelectionExpression; } /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline bool ApiKeySelectionExpressionHasBeenSet() const { return m_apiKeySelectionExpressionHasBeenSet; } /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline void SetApiKeySelectionExpression(const Aws::String& value) { m_apiKeySelectionExpressionHasBeenSet = true; m_apiKeySelectionExpression = value; } /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline void SetApiKeySelectionExpression(Aws::String&& value) { m_apiKeySelectionExpressionHasBeenSet = true; m_apiKeySelectionExpression = std::move(value); } /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline void SetApiKeySelectionExpression(const char* value) { m_apiKeySelectionExpressionHasBeenSet = true; m_apiKeySelectionExpression.assign(value); } /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline UpdateApiRequest& WithApiKeySelectionExpression(const Aws::String& value) { SetApiKeySelectionExpression(value); return *this;} /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline UpdateApiRequest& WithApiKeySelectionExpression(Aws::String&& value) { SetApiKeySelectionExpression(std::move(value)); return *this;} /** *

An API key selection expression. Supported only for WebSocket APIs. See API * Key Selection Expressions.

*/ inline UpdateApiRequest& WithApiKeySelectionExpression(const char* value) { SetApiKeySelectionExpression(value); return *this;} /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline const Cors& GetCorsConfiguration() const{ return m_corsConfiguration; } /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline bool CorsConfigurationHasBeenSet() const { return m_corsConfigurationHasBeenSet; } /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline void SetCorsConfiguration(const Cors& value) { m_corsConfigurationHasBeenSet = true; m_corsConfiguration = value; } /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline void SetCorsConfiguration(Cors&& value) { m_corsConfigurationHasBeenSet = true; m_corsConfiguration = std::move(value); } /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithCorsConfiguration(const Cors& value) { SetCorsConfiguration(value); return *this;} /** *

A CORS configuration. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithCorsConfiguration(Cors&& value) { SetCorsConfiguration(std::move(value)); return *this;} /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline const Aws::String& GetCredentialsArn() const{ return m_credentialsArn; } /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline bool CredentialsArnHasBeenSet() const { return m_credentialsArnHasBeenSet; } /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline void SetCredentialsArn(const Aws::String& value) { m_credentialsArnHasBeenSet = true; m_credentialsArn = value; } /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline void SetCredentialsArn(Aws::String&& value) { m_credentialsArnHasBeenSet = true; m_credentialsArn = std::move(value); } /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline void SetCredentialsArn(const char* value) { m_credentialsArnHasBeenSet = true; m_credentialsArn.assign(value); } /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithCredentialsArn(const Aws::String& value) { SetCredentialsArn(value); return *this;} /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithCredentialsArn(Aws::String&& value) { SetCredentialsArn(std::move(value)); return *this;} /** *

This property is part of quick create. It specifies the credentials required * for the integration, if any. For a Lambda integration, three options are * available. To specify an IAM Role for API Gateway to assume, use the role's * Amazon Resource Name (ARN). To require that the caller's identity be passed * through from the request, specify arn:aws:iam::*:user/ *. To use resource-based * permissions on supported AWS services, specify null. Currently, this property is * not used for HTTP integrations. If provided, this value replaces the credentials * associated with the quick create integration. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithCredentialsArn(const char* value) { SetCredentialsArn(value); return *this;} /** *

The description of the API.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the API.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the API.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the API.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the API.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the API.

*/ inline UpdateApiRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the API.

*/ inline UpdateApiRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the API.

*/ inline UpdateApiRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Avoid validating models when creating a deployment. Supported only for * WebSocket APIs.

*/ inline bool GetDisableSchemaValidation() const{ return m_disableSchemaValidation; } /** *

Avoid validating models when creating a deployment. Supported only for * WebSocket APIs.

*/ inline bool DisableSchemaValidationHasBeenSet() const { return m_disableSchemaValidationHasBeenSet; } /** *

Avoid validating models when creating a deployment. Supported only for * WebSocket APIs.

*/ inline void SetDisableSchemaValidation(bool value) { m_disableSchemaValidationHasBeenSet = true; m_disableSchemaValidation = value; } /** *

Avoid validating models when creating a deployment. Supported only for * WebSocket APIs.

*/ inline UpdateApiRequest& WithDisableSchemaValidation(bool value) { SetDisableSchemaValidation(value); return *this;} /** *

The name of the API.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the API.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the API.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the API.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the API.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the API.

*/ inline UpdateApiRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the API.

*/ inline UpdateApiRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the API.

*/ inline UpdateApiRequest& WithName(const char* value) { SetName(value); return *this;} /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline const Aws::String& GetRouteKey() const{ return m_routeKey; } /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline bool RouteKeyHasBeenSet() const { return m_routeKeyHasBeenSet; } /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline void SetRouteKey(const Aws::String& value) { m_routeKeyHasBeenSet = true; m_routeKey = value; } /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline void SetRouteKey(Aws::String&& value) { m_routeKeyHasBeenSet = true; m_routeKey = std::move(value); } /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline void SetRouteKey(const char* value) { m_routeKeyHasBeenSet = true; m_routeKey.assign(value); } /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithRouteKey(const Aws::String& value) { SetRouteKey(value); return *this;} /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithRouteKey(Aws::String&& value) { SetRouteKey(std::move(value)); return *this;} /** *

This property is part of quick create. If not specified, the route created * using quick create is kept. Otherwise, this value replaces the route key of the * quick create route. Additional routes may still be added after the API is * updated. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithRouteKey(const char* value) { SetRouteKey(value); return *this;} /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline const Aws::String& GetRouteSelectionExpression() const{ return m_routeSelectionExpression; } /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline bool RouteSelectionExpressionHasBeenSet() const { return m_routeSelectionExpressionHasBeenSet; } /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline void SetRouteSelectionExpression(const Aws::String& value) { m_routeSelectionExpressionHasBeenSet = true; m_routeSelectionExpression = value; } /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline void SetRouteSelectionExpression(Aws::String&& value) { m_routeSelectionExpressionHasBeenSet = true; m_routeSelectionExpression = std::move(value); } /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline void SetRouteSelectionExpression(const char* value) { m_routeSelectionExpressionHasBeenSet = true; m_routeSelectionExpression.assign(value); } /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline UpdateApiRequest& WithRouteSelectionExpression(const Aws::String& value) { SetRouteSelectionExpression(value); return *this;} /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline UpdateApiRequest& WithRouteSelectionExpression(Aws::String&& value) { SetRouteSelectionExpression(std::move(value)); return *this;} /** *

The route selection expression for the API. For HTTP APIs, the * routeSelectionExpression must be ${request.method} ${request.path}. If not * provided, this will be the default for HTTP APIs. This property is required for * WebSocket APIs.

*/ inline UpdateApiRequest& WithRouteSelectionExpression(const char* value) { SetRouteSelectionExpression(value); return *this;} /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline const Aws::String& GetTarget() const{ return m_target; } /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline void SetTarget(const Aws::String& value) { m_targetHasBeenSet = true; m_target = value; } /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline void SetTarget(Aws::String&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline void SetTarget(const char* value) { m_targetHasBeenSet = true; m_target.assign(value); } /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithTarget(const Aws::String& value) { SetTarget(value); return *this;} /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithTarget(Aws::String&& value) { SetTarget(std::move(value)); return *this;} /** *

This property is part of quick create. For HTTP integrations, specify a fully * qualified URL. For Lambda integrations, specify a function ARN. The type of the * integration will be HTTP_PROXY or AWS_PROXY, respectively. The value provided * updates the integration URI and integration type. You can update a quick-created * target, but you can't remove it from an API. Supported only for HTTP APIs.

*/ inline UpdateApiRequest& WithTarget(const char* value) { SetTarget(value); return *this;} /** *

A version identifier for the API.

*/ inline const Aws::String& GetVersion() const{ return m_version; } /** *

A version identifier for the API.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

A version identifier for the API.

*/ inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } /** *

A version identifier for the API.

*/ inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } /** *

A version identifier for the API.

*/ inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } /** *

A version identifier for the API.

*/ inline UpdateApiRequest& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} /** *

A version identifier for the API.

*/ inline UpdateApiRequest& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} /** *

A version identifier for the API.

*/ inline UpdateApiRequest& WithVersion(const char* value) { SetVersion(value); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet; Aws::String m_apiKeySelectionExpression; bool m_apiKeySelectionExpressionHasBeenSet; Cors m_corsConfiguration; bool m_corsConfigurationHasBeenSet; Aws::String m_credentialsArn; bool m_credentialsArnHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; bool m_disableSchemaValidation; bool m_disableSchemaValidationHasBeenSet; Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_routeKey; bool m_routeKeyHasBeenSet; Aws::String m_routeSelectionExpression; bool m_routeSelectionExpressionHasBeenSet; Aws::String m_target; bool m_targetHasBeenSet; Aws::String m_version; bool m_versionHasBeenSet; }; } // namespace Model } // namespace ApiGatewayV2 } // namespace Aws