com.amazonaws.services.appsync.model.CreateApiCacheRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appsync Show documentation
/*
* Copyright 2019-2024 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 com.amazonaws.services.appsync.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input of a CreateApiCache
operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateApiCacheRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The GraphQL API ID.
*
*/
private String apiId;
/**
*
* TTL in seconds for cache entries.
*
*
* Valid values are 1–3,600 seconds.
*
*/
private Long ttl;
/**
*
* Transit encryption flag when connecting to cache. You cannot update this setting after creation.
*
*/
private Boolean transitEncryptionEnabled;
/**
*
* At-rest encryption flag for cache. You cannot update this setting after creation.
*
*/
private Boolean atRestEncryptionEnabled;
/**
*
* Caching behavior.
*
*
* -
*
* FULL_REQUEST_CACHING: All requests are fully cached.
*
*
* -
*
* PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.
*
*
*
*/
private String 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.
*
*
*
*/
private String 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
.
*
*/
private String healthMetricsConfig;
/**
*
* The GraphQL API ID.
*
*
* @param apiId
* The GraphQL API ID.
*/
public void setApiId(String apiId) {
this.apiId = apiId;
}
/**
*
* The GraphQL API ID.
*
*
* @return The GraphQL API ID.
*/
public String getApiId() {
return this.apiId;
}
/**
*
* 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.
*/
public CreateApiCacheRequest withApiId(String apiId) {
setApiId(apiId);
return this;
}
/**
*
* 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.
*/
public void setTtl(Long ttl) {
this.ttl = ttl;
}
/**
*
* 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 Long getTtl() {
return this.ttl;
}
/**
*
* 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.
*/
public CreateApiCacheRequest withTtl(Long ttl) {
setTtl(ttl);
return this;
}
/**
*
* 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.
*/
public void setTransitEncryptionEnabled(Boolean transitEncryptionEnabled) {
this.transitEncryptionEnabled = transitEncryptionEnabled;
}
/**
*
* 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 Boolean getTransitEncryptionEnabled() {
return this.transitEncryptionEnabled;
}
/**
*
* 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.
*/
public CreateApiCacheRequest withTransitEncryptionEnabled(Boolean transitEncryptionEnabled) {
setTransitEncryptionEnabled(transitEncryptionEnabled);
return this;
}
/**
*
* 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 Boolean isTransitEncryptionEnabled() {
return this.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.
*/
public void setAtRestEncryptionEnabled(Boolean atRestEncryptionEnabled) {
this.atRestEncryptionEnabled = atRestEncryptionEnabled;
}
/**
*
* 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 Boolean getAtRestEncryptionEnabled() {
return this.atRestEncryptionEnabled;
}
/**
*
* 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.
*/
public CreateApiCacheRequest withAtRestEncryptionEnabled(Boolean atRestEncryptionEnabled) {
setAtRestEncryptionEnabled(atRestEncryptionEnabled);
return this;
}
/**
*
* 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 Boolean isAtRestEncryptionEnabled() {
return this.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
*/
public void setApiCachingBehavior(String apiCachingBehavior) {
this.apiCachingBehavior = apiCachingBehavior;
}
/**
*
* Caching behavior.
*
*
* -
*
* FULL_REQUEST_CACHING: All requests are fully cached.
*
*
* -
*
* PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.
*
*
*
*
* @return Caching behavior.
*
* -
*
* FULL_REQUEST_CACHING: All requests are fully cached.
*
*
* -
*
* PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.
*
*
* @see ApiCachingBehavior
*/
public String getApiCachingBehavior() {
return this.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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiCachingBehavior
*/
public CreateApiCacheRequest withApiCachingBehavior(String apiCachingBehavior) {
setApiCachingBehavior(apiCachingBehavior);
return this;
}
/**
*
* 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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiCachingBehavior
*/
public CreateApiCacheRequest withApiCachingBehavior(ApiCachingBehavior apiCachingBehavior) {
this.apiCachingBehavior = apiCachingBehavior.toString();
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.
*
*
*
*
* @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
*/
public void setType(String type) {
this.type = 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.
*
*
*
*
* @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 String getType() {
return this.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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiCacheType
*/
public CreateApiCacheRequest withType(String type) {
setType(type);
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.
*
*
*
*
* @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.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiCacheType
*/
public CreateApiCacheRequest withType(ApiCacheType type) {
this.type = type.toString();
return this;
}
/**
*
* 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
*/
public void setHealthMetricsConfig(String healthMetricsConfig) {
this.healthMetricsConfig = 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
.
*
*
* @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 String getHealthMetricsConfig() {
return this.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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CacheHealthMetricsConfig
*/
public CreateApiCacheRequest withHealthMetricsConfig(String healthMetricsConfig) {
setHealthMetricsConfig(healthMetricsConfig);
return this;
}
/**
*
* 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
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CacheHealthMetricsConfig
*/
public CreateApiCacheRequest withHealthMetricsConfig(CacheHealthMetricsConfig healthMetricsConfig) {
this.healthMetricsConfig = healthMetricsConfig.toString();
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getApiId() != null)
sb.append("ApiId: ").append(getApiId()).append(",");
if (getTtl() != null)
sb.append("Ttl: ").append(getTtl()).append(",");
if (getTransitEncryptionEnabled() != null)
sb.append("TransitEncryptionEnabled: ").append(getTransitEncryptionEnabled()).append(",");
if (getAtRestEncryptionEnabled() != null)
sb.append("AtRestEncryptionEnabled: ").append(getAtRestEncryptionEnabled()).append(",");
if (getApiCachingBehavior() != null)
sb.append("ApiCachingBehavior: ").append(getApiCachingBehavior()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getHealthMetricsConfig() != null)
sb.append("HealthMetricsConfig: ").append(getHealthMetricsConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateApiCacheRequest == false)
return false;
CreateApiCacheRequest other = (CreateApiCacheRequest) obj;
if (other.getApiId() == null ^ this.getApiId() == null)
return false;
if (other.getApiId() != null && other.getApiId().equals(this.getApiId()) == false)
return false;
if (other.getTtl() == null ^ this.getTtl() == null)
return false;
if (other.getTtl() != null && other.getTtl().equals(this.getTtl()) == false)
return false;
if (other.getTransitEncryptionEnabled() == null ^ this.getTransitEncryptionEnabled() == null)
return false;
if (other.getTransitEncryptionEnabled() != null && other.getTransitEncryptionEnabled().equals(this.getTransitEncryptionEnabled()) == false)
return false;
if (other.getAtRestEncryptionEnabled() == null ^ this.getAtRestEncryptionEnabled() == null)
return false;
if (other.getAtRestEncryptionEnabled() != null && other.getAtRestEncryptionEnabled().equals(this.getAtRestEncryptionEnabled()) == false)
return false;
if (other.getApiCachingBehavior() == null ^ this.getApiCachingBehavior() == null)
return false;
if (other.getApiCachingBehavior() != null && other.getApiCachingBehavior().equals(this.getApiCachingBehavior()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getHealthMetricsConfig() == null ^ this.getHealthMetricsConfig() == null)
return false;
if (other.getHealthMetricsConfig() != null && other.getHealthMetricsConfig().equals(this.getHealthMetricsConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApiId() == null) ? 0 : getApiId().hashCode());
hashCode = prime * hashCode + ((getTtl() == null) ? 0 : getTtl().hashCode());
hashCode = prime * hashCode + ((getTransitEncryptionEnabled() == null) ? 0 : getTransitEncryptionEnabled().hashCode());
hashCode = prime * hashCode + ((getAtRestEncryptionEnabled() == null) ? 0 : getAtRestEncryptionEnabled().hashCode());
hashCode = prime * hashCode + ((getApiCachingBehavior() == null) ? 0 : getApiCachingBehavior().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getHealthMetricsConfig() == null) ? 0 : getHealthMetricsConfig().hashCode());
return hashCode;
}
@Override
public CreateApiCacheRequest clone() {
return (CreateApiCacheRequest) super.clone();
}
}