/** * 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 AppSync { namespace Model { /** *

Represents the input of a CreateApiCache * operation.

See Also:

AWS * API Reference

*/ class CreateApiCacheRequest : public AppSyncRequest { public: AWS_APPSYNC_API CreateApiCacheRequest(); // 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 "CreateApiCache"; } AWS_APPSYNC_API Aws::String SerializePayload() const override; /** *

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

The GraphQL API ID.

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

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline long long GetTtl() const{ return m_ttl; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline void SetTtl(long long value) { m_ttlHasBeenSet = true; m_ttl = value; } /** *

TTL in seconds for cache entries.

Valid values are 1–3,600 * seconds.

*/ inline CreateApiCacheRequest& WithTtl(long long value) { SetTtl(value); return *this;} /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline bool GetTransitEncryptionEnabled() const{ return m_transitEncryptionEnabled; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline bool TransitEncryptionEnabledHasBeenSet() const { return m_transitEncryptionEnabledHasBeenSet; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline void SetTransitEncryptionEnabled(bool value) { m_transitEncryptionEnabledHasBeenSet = true; m_transitEncryptionEnabled = value; } /** *

Transit encryption flag when connecting to cache. You cannot update this * setting after creation.

*/ inline CreateApiCacheRequest& WithTransitEncryptionEnabled(bool value) { SetTransitEncryptionEnabled(value); return *this;} /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline bool GetAtRestEncryptionEnabled() const{ return m_atRestEncryptionEnabled; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline bool AtRestEncryptionEnabledHasBeenSet() const { return m_atRestEncryptionEnabledHasBeenSet; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline void SetAtRestEncryptionEnabled(bool value) { m_atRestEncryptionEnabledHasBeenSet = true; m_atRestEncryptionEnabled = value; } /** *

At-rest encryption flag for cache. You cannot update this setting after * creation.

*/ inline CreateApiCacheRequest& WithAtRestEncryptionEnabled(bool value) { SetAtRestEncryptionEnabled(value); return *this;} /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline const ApiCachingBehavior& GetApiCachingBehavior() const{ return m_apiCachingBehavior; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline bool ApiCachingBehaviorHasBeenSet() const { return m_apiCachingBehaviorHasBeenSet; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline void SetApiCachingBehavior(const ApiCachingBehavior& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = value; } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline void SetApiCachingBehavior(ApiCachingBehavior&& value) { m_apiCachingBehaviorHasBeenSet = true; m_apiCachingBehavior = std::move(value); } /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline CreateApiCacheRequest& WithApiCachingBehavior(const ApiCachingBehavior& value) { SetApiCachingBehavior(value); return *this;} /** *

Caching behavior.

  • FULL_REQUEST_CACHING: All requests * are fully cached.

  • PER_RESOLVER_CACHING: Individual * resolvers that you specify are cached.

*/ inline CreateApiCacheRequest& WithApiCachingBehavior(ApiCachingBehavior&& value) { SetApiCachingBehavior(std::move(value)); return *this;} /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline const ApiCacheType& GetType() const{ return m_type; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline void SetType(const ApiCacheType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline void SetType(ApiCacheType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline CreateApiCacheRequest& WithType(const ApiCacheType& value) { SetType(value); return *this;} /** *

The cache instance type. Valid values are

  • * SMALL

  • MEDIUM

  • * LARGE

  • XLARGE

  • * LARGE_2X

  • LARGE_4X

  • *

    LARGE_8X (not available in all regions)

  • * LARGE_12X

Historically, instance types were * identified by an EC2-style value. As of July 2020, this is deprecated, and the * generic identifiers above should be used.

The following legacy instance * types are available, but their use is discouraged:

  • * T2_SMALL: A t2.small instance type.

  • T2_MEDIUM: * A t2.medium instance type.

  • R4_LARGE: A r4.large * instance type.

  • R4_XLARGE: A r4.xlarge instance * type.

  • R4_2XLARGE: A r4.2xlarge instance type.

    *
  • R4_4XLARGE: A r4.4xlarge instance type.

  • * R4_8XLARGE: A r4.8xlarge instance type.

*/ inline CreateApiCacheRequest& WithType(ApiCacheType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_apiId; bool m_apiIdHasBeenSet = false; long long m_ttl; bool m_ttlHasBeenSet = false; bool m_transitEncryptionEnabled; bool m_transitEncryptionEnabledHasBeenSet = false; bool m_atRestEncryptionEnabled; bool m_atRestEncryptionEnabledHasBeenSet = false; ApiCachingBehavior m_apiCachingBehavior; bool m_apiCachingBehaviorHasBeenSet = false; ApiCacheType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws