All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.appsync.model.CreateApiCacheRequest Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.appsync.model;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Represents the input of a CreateApiCache operation. *

*/ @Generated("software.amazon.awssdk:codegen") public final class CreateApiCacheRequest extends AppSyncRequest implements ToCopyableBuilder { private static final SdkField API_ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("apiId") .getter(getter(CreateApiCacheRequest::apiId)).setter(setter(Builder::apiId)) .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("apiId").build()).build(); private static final SdkField TTL_FIELD = SdkField. builder(MarshallingType.LONG).memberName("ttl") .getter(getter(CreateApiCacheRequest::ttl)).setter(setter(Builder::ttl)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ttl").build()).build(); private static final SdkField TRANSIT_ENCRYPTION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("transitEncryptionEnabled").getter(getter(CreateApiCacheRequest::transitEncryptionEnabled)) .setter(setter(Builder::transitEncryptionEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("transitEncryptionEnabled").build()) .build(); private static final SdkField AT_REST_ENCRYPTION_ENABLED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("atRestEncryptionEnabled").getter(getter(CreateApiCacheRequest::atRestEncryptionEnabled)) .setter(setter(Builder::atRestEncryptionEnabled)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("atRestEncryptionEnabled").build()) .build(); private static final SdkField API_CACHING_BEHAVIOR_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("apiCachingBehavior").getter(getter(CreateApiCacheRequest::apiCachingBehaviorAsString)) .setter(setter(Builder::apiCachingBehavior)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("apiCachingBehavior").build()) .build(); private static final SdkField TYPE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("type") .getter(getter(CreateApiCacheRequest::typeAsString)).setter(setter(Builder::type)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("type").build()).build(); private static final SdkField HEALTH_METRICS_CONFIG_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("healthMetricsConfig").getter(getter(CreateApiCacheRequest::healthMetricsConfigAsString)) .setter(setter(Builder::healthMetricsConfig)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("healthMetricsConfig").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(API_ID_FIELD, TTL_FIELD, TRANSIT_ENCRYPTION_ENABLED_FIELD, AT_REST_ENCRYPTION_ENABLED_FIELD, API_CACHING_BEHAVIOR_FIELD, TYPE_FIELD, HEALTH_METRICS_CONFIG_FIELD)); private final String apiId; private final Long ttl; private final Boolean transitEncryptionEnabled; private final Boolean atRestEncryptionEnabled; private final String apiCachingBehavior; private final String type; private final String healthMetricsConfig; private CreateApiCacheRequest(BuilderImpl builder) { super(builder); this.apiId = builder.apiId; this.ttl = builder.ttl; this.transitEncryptionEnabled = builder.transitEncryptionEnabled; this.atRestEncryptionEnabled = builder.atRestEncryptionEnabled; this.apiCachingBehavior = builder.apiCachingBehavior; this.type = builder.type; this.healthMetricsConfig = builder.healthMetricsConfig; } /** *

* The GraphQL API ID. *

* * @return The GraphQL API ID. */ public final String apiId() { return apiId; } /** *

* TTL in seconds for cache entries. *

*

* Valid values are 1–3,600 seconds. *

* * @return TTL in seconds for cache entries.

*

* Valid values are 1–3,600 seconds. */ public final Long ttl() { return ttl; } /** *

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

* * @return Transit encryption flag when connecting to cache. You cannot update this setting after creation. */ public final Boolean transitEncryptionEnabled() { return transitEncryptionEnabled; } /** *

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

* * @return At-rest encryption flag for cache. You cannot update this setting after creation. */ public final Boolean atRestEncryptionEnabled() { return atRestEncryptionEnabled; } /** *

* Caching behavior. *

*
    *
  • *

    * FULL_REQUEST_CACHING: All requests are fully cached. *

    *
  • *
  • *

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

    *
  • *
*

* If the service returns an enum value that is not available in the current SDK version, * {@link #apiCachingBehavior} will return {@link ApiCachingBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #apiCachingBehaviorAsString}. *

* * @return Caching behavior.

*
    *
  • *

    * FULL_REQUEST_CACHING: All requests are fully cached. *

    *
  • *
  • *

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

    *
  • * @see ApiCachingBehavior */ public final ApiCachingBehavior apiCachingBehavior() { return ApiCachingBehavior.fromValue(apiCachingBehavior); } /** *

    * Caching behavior. *

    *
      *
    • *

      * FULL_REQUEST_CACHING: All requests are fully cached. *

      *
    • *
    • *

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

      *
    • *
    *

    * If the service returns an enum value that is not available in the current SDK version, * {@link #apiCachingBehavior} will return {@link ApiCachingBehavior#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #apiCachingBehaviorAsString}. *

    * * @return Caching behavior.

    *
      *
    • *

      * FULL_REQUEST_CACHING: All requests are fully cached. *

      *
    • *
    • *

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

      *
    • * @see ApiCachingBehavior */ public final String apiCachingBehaviorAsString() { return apiCachingBehavior; } /** *

      * 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. *

        *
      • *
      *

      * If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link ApiCacheType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

      * * @return 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. *

        *
      • * @see ApiCacheType */ public final ApiCacheType type() { return ApiCacheType.fromValue(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. *

          *
        • *
        *

        * If the service returns an enum value that is not available in the current SDK version, {@link #type} will return * {@link ApiCacheType#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #typeAsString}. *

        * * @return 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. *

          *
        • * @see ApiCacheType */ public final String typeAsString() { return type; } /** *

          * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include: *

          *
            *
          • *

            * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated * bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

            *
          • *
          • *

            * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

            *
          • *
          *

          * Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED. *

          *

          * If the service returns an enum value that is not available in the current SDK version, * {@link #healthMetricsConfig} will return {@link CacheHealthMetricsConfig#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #healthMetricsConfigAsString}. *

          * * @return Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

          *
            *
          • *

            * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

            *
          • *
          • *

            * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

            *
          • *
          *

          * Metrics will be recorded by API ID. You can set the value to ENABLED or * DISABLED. * @see CacheHealthMetricsConfig */ public final CacheHealthMetricsConfig healthMetricsConfig() { return CacheHealthMetricsConfig.fromValue(healthMetricsConfig); } /** *

          * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include: *

          *
            *
          • *

            * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the aggregated * bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

            *
          • *
          • *

            * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

            *
          • *
          *

          * Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED. *

          *

          * If the service returns an enum value that is not available in the current SDK version, * {@link #healthMetricsConfig} will return {@link CacheHealthMetricsConfig#UNKNOWN_TO_SDK_VERSION}. The raw value * returned by the service is available from {@link #healthMetricsConfigAsString}. *

          * * @return Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

          *
            *
          • *

            * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

            *
          • *
          • *

            * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

            *
          • *
          *

          * Metrics will be recorded by API ID. You can set the value to ENABLED or * DISABLED. * @see CacheHealthMetricsConfig */ public final String healthMetricsConfigAsString() { return healthMetricsConfig; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(apiId()); hashCode = 31 * hashCode + Objects.hashCode(ttl()); hashCode = 31 * hashCode + Objects.hashCode(transitEncryptionEnabled()); hashCode = 31 * hashCode + Objects.hashCode(atRestEncryptionEnabled()); hashCode = 31 * hashCode + Objects.hashCode(apiCachingBehaviorAsString()); hashCode = 31 * hashCode + Objects.hashCode(typeAsString()); hashCode = 31 * hashCode + Objects.hashCode(healthMetricsConfigAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateApiCacheRequest)) { return false; } CreateApiCacheRequest other = (CreateApiCacheRequest) obj; return Objects.equals(apiId(), other.apiId()) && Objects.equals(ttl(), other.ttl()) && Objects.equals(transitEncryptionEnabled(), other.transitEncryptionEnabled()) && Objects.equals(atRestEncryptionEnabled(), other.atRestEncryptionEnabled()) && Objects.equals(apiCachingBehaviorAsString(), other.apiCachingBehaviorAsString()) && Objects.equals(typeAsString(), other.typeAsString()) && Objects.equals(healthMetricsConfigAsString(), other.healthMetricsConfigAsString()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("CreateApiCacheRequest").add("ApiId", apiId()).add("Ttl", ttl()) .add("TransitEncryptionEnabled", transitEncryptionEnabled()) .add("AtRestEncryptionEnabled", atRestEncryptionEnabled()) .add("ApiCachingBehavior", apiCachingBehaviorAsString()).add("Type", typeAsString()) .add("HealthMetricsConfig", healthMetricsConfigAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "apiId": return Optional.ofNullable(clazz.cast(apiId())); case "ttl": return Optional.ofNullable(clazz.cast(ttl())); case "transitEncryptionEnabled": return Optional.ofNullable(clazz.cast(transitEncryptionEnabled())); case "atRestEncryptionEnabled": return Optional.ofNullable(clazz.cast(atRestEncryptionEnabled())); case "apiCachingBehavior": return Optional.ofNullable(clazz.cast(apiCachingBehaviorAsString())); case "type": return Optional.ofNullable(clazz.cast(typeAsString())); case "healthMetricsConfig": return Optional.ofNullable(clazz.cast(healthMetricsConfigAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateApiCacheRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends AppSyncRequest.Builder, SdkPojo, CopyableBuilder { /** *

          * The GraphQL API ID. *

          * * @param apiId * The GraphQL API ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder apiId(String apiId); /** *

          * TTL in seconds for cache entries. *

          *

          * Valid values are 1–3,600 seconds. *

          * * @param ttl * TTL in seconds for cache entries.

          *

          * Valid values are 1–3,600 seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ttl(Long ttl); /** *

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

          * * @param transitEncryptionEnabled * Transit encryption flag when connecting to cache. You cannot update this setting after creation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder transitEncryptionEnabled(Boolean transitEncryptionEnabled); /** *

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

          * * @param atRestEncryptionEnabled * At-rest encryption flag for cache. You cannot update this setting after creation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder atRestEncryptionEnabled(Boolean atRestEncryptionEnabled); /** *

          * Caching behavior. *

          *
            *
          • *

            * FULL_REQUEST_CACHING: All requests are fully cached. *

            *
          • *
          • *

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

            *
          • *
          * * @param apiCachingBehavior * Caching behavior.

          *
            *
          • *

            * FULL_REQUEST_CACHING: All requests are fully cached. *

            *
          • *
          • *

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

            *
          • * @see ApiCachingBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see ApiCachingBehavior */ Builder apiCachingBehavior(String apiCachingBehavior); /** *

            * Caching behavior. *

            *
              *
            • *

              * FULL_REQUEST_CACHING: All requests are fully cached. *

              *
            • *
            • *

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

              *
            • *
            * * @param apiCachingBehavior * Caching behavior.

            *
              *
            • *

              * FULL_REQUEST_CACHING: All requests are fully cached. *

              *
            • *
            • *

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

              *
            • * @see ApiCachingBehavior * @return Returns a reference to this object so that method calls can be chained together. * @see ApiCachingBehavior */ Builder apiCachingBehavior(ApiCachingBehavior apiCachingBehavior); /** *

              * 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. *

                *
              • *
              * * @param 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. *

                *
              • * @see ApiCacheType * @return Returns a reference to this object so that method calls can be chained together. * @see ApiCacheType */ Builder type(String 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. *

                  *
                • *
                * * @param 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. *

                  *
                • * @see ApiCacheType * @return Returns a reference to this object so that method calls can be chained together. * @see ApiCacheType */ Builder type(ApiCacheType type); /** *

                  * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include: *

                  *
                    *
                  • *

                    * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  • *

                    * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  *

                  * Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED. *

                  * * @param healthMetricsConfig * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

                  *
                    *
                  • *

                    * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  • *

                    * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful * for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  *

                  * Metrics will be recorded by API ID. You can set the value to ENABLED or * DISABLED. * @see CacheHealthMetricsConfig * @return Returns a reference to this object so that method calls can be chained together. * @see CacheHealthMetricsConfig */ Builder healthMetricsConfig(String healthMetricsConfig); /** *

                  * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include: *

                  *
                    *
                  • *

                    * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  • *

                    * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful for * diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  *

                  * Metrics will be recorded by API ID. You can set the value to ENABLED or DISABLED. *

                  * * @param healthMetricsConfig * Controls how cache health metrics will be emitted to CloudWatch. Cache health metrics include:

                  *
                    *
                  • *

                    * NetworkBandwidthOutAllowanceExceeded: The network packets dropped because the throughput exceeded the * aggregated bandwidth limit. This is useful for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  • *

                    * EngineCPUUtilization: The CPU utilization (percentage) allocated to the Redis process. This is useful * for diagnosing bottlenecks in a cache configuration. *

                    *
                  • *
                  *

                  * Metrics will be recorded by API ID. You can set the value to ENABLED or * DISABLED. * @see CacheHealthMetricsConfig * @return Returns a reference to this object so that method calls can be chained together. * @see CacheHealthMetricsConfig */ Builder healthMetricsConfig(CacheHealthMetricsConfig healthMetricsConfig); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends AppSyncRequest.BuilderImpl implements Builder { private String apiId; private Long ttl; private Boolean transitEncryptionEnabled; private Boolean atRestEncryptionEnabled; private String apiCachingBehavior; private String type; private String healthMetricsConfig; private BuilderImpl() { } private BuilderImpl(CreateApiCacheRequest model) { super(model); apiId(model.apiId); ttl(model.ttl); transitEncryptionEnabled(model.transitEncryptionEnabled); atRestEncryptionEnabled(model.atRestEncryptionEnabled); apiCachingBehavior(model.apiCachingBehavior); type(model.type); healthMetricsConfig(model.healthMetricsConfig); } public final String getApiId() { return apiId; } public final void setApiId(String apiId) { this.apiId = apiId; } @Override public final Builder apiId(String apiId) { this.apiId = apiId; return this; } public final Long getTtl() { return ttl; } public final void setTtl(Long ttl) { this.ttl = ttl; } @Override public final Builder ttl(Long ttl) { this.ttl = ttl; return this; } public final Boolean getTransitEncryptionEnabled() { return transitEncryptionEnabled; } public final void setTransitEncryptionEnabled(Boolean transitEncryptionEnabled) { this.transitEncryptionEnabled = transitEncryptionEnabled; } @Override public final Builder transitEncryptionEnabled(Boolean transitEncryptionEnabled) { this.transitEncryptionEnabled = transitEncryptionEnabled; return this; } public final Boolean getAtRestEncryptionEnabled() { return atRestEncryptionEnabled; } public final void setAtRestEncryptionEnabled(Boolean atRestEncryptionEnabled) { this.atRestEncryptionEnabled = atRestEncryptionEnabled; } @Override public final Builder atRestEncryptionEnabled(Boolean atRestEncryptionEnabled) { this.atRestEncryptionEnabled = atRestEncryptionEnabled; return this; } public final String getApiCachingBehavior() { return apiCachingBehavior; } public final void setApiCachingBehavior(String apiCachingBehavior) { this.apiCachingBehavior = apiCachingBehavior; } @Override public final Builder apiCachingBehavior(String apiCachingBehavior) { this.apiCachingBehavior = apiCachingBehavior; return this; } @Override public final Builder apiCachingBehavior(ApiCachingBehavior apiCachingBehavior) { this.apiCachingBehavior(apiCachingBehavior == null ? null : apiCachingBehavior.toString()); return this; } public final String getType() { return type; } public final void setType(String type) { this.type = type; } @Override public final Builder type(String type) { this.type = type; return this; } @Override public final Builder type(ApiCacheType type) { this.type(type == null ? null : type.toString()); return this; } public final String getHealthMetricsConfig() { return healthMetricsConfig; } public final void setHealthMetricsConfig(String healthMetricsConfig) { this.healthMetricsConfig = healthMetricsConfig; } @Override public final Builder healthMetricsConfig(String healthMetricsConfig) { this.healthMetricsConfig = healthMetricsConfig; return this; } @Override public final Builder healthMetricsConfig(CacheHealthMetricsConfig healthMetricsConfig) { this.healthMetricsConfig(healthMetricsConfig == null ? null : healthMetricsConfig.toString()); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateApiCacheRequest build() { return new CreateApiCacheRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy