/** * 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 WAFV2 { namespace Model { /** */ class CreateAPIKeyRequest : public WAFV2Request { public: AWS_WAFV2_API CreateAPIKeyRequest(); // 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 "CreateAPIKey"; } AWS_WAFV2_API Aws::String SerializePayload() const override; AWS_WAFV2_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline const Scope& GetScope() const{ return m_scope; } /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline CreateAPIKeyRequest& WithScope(const Scope& value) { SetScope(value); return *this;} /** *

Specifies whether this is for an Amazon CloudFront distribution or for a * regional application. A regional application can be an Application Load Balancer * (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito * user pool, an App Runner service, or an Amazon Web Services Verified Access * instance.

To work with CloudFront, you must also specify the Region US * East (N. Virginia) as follows:

  • CLI - Specify the Region when * you use the CloudFront scope: --scope=CLOUDFRONT * --region=us-east-1.

  • API and SDKs - For all calls, use * the Region endpoint us-east-1.

*/ inline CreateAPIKeyRequest& WithScope(Scope&& value) { SetScope(std::move(value)); return *this;} /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline const Aws::Vector& GetTokenDomains() const{ return m_tokenDomains; } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline bool TokenDomainsHasBeenSet() const { return m_tokenDomainsHasBeenSet; } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline void SetTokenDomains(const Aws::Vector& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains = value; } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline void SetTokenDomains(Aws::Vector&& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains = std::move(value); } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline CreateAPIKeyRequest& WithTokenDomains(const Aws::Vector& value) { SetTokenDomains(value); return *this;} /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline CreateAPIKeyRequest& WithTokenDomains(Aws::Vector&& value) { SetTokenDomains(std::move(value)); return *this;} /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline CreateAPIKeyRequest& AddTokenDomains(const Aws::String& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains.push_back(value); return *this; } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline CreateAPIKeyRequest& AddTokenDomains(Aws::String&& value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains.push_back(std::move(value)); return *this; } /** *

The client application domains that you want to use this API key for.

*

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

*

Public suffixes aren't allowed. For example, you can't use * usa.gov or co.uk as token domains.

*/ inline CreateAPIKeyRequest& AddTokenDomains(const char* value) { m_tokenDomainsHasBeenSet = true; m_tokenDomains.push_back(value); return *this; } private: Scope m_scope; bool m_scopeHasBeenSet = false; Aws::Vector m_tokenDomains; bool m_tokenDomainsHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws