Class RedisInstanceConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.redis_instance.RedisInstanceConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<RedisInstanceConfig>
- Enclosing interface:
- RedisInstanceConfig
@Stability(Stable) public static final class RedisInstanceConfig.Builder extends Object implements software.amazon.jsii.Builder<RedisInstanceConfig>
A builder forRedisInstanceConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
memorySizeGb
@Stability(Stable) public RedisInstanceConfig.Builder memorySizeGb(Number memorySizeGb)
Sets the value ofRedisInstanceConfig.getMemorySizeGb()- Parameters:
memorySizeGb- Redis memory size in GiB. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#memory_size_gb RedisInstance#memory_size_gb}- Returns:
this
-
name
@Stability(Stable) public RedisInstanceConfig.Builder name(String name)
Sets the value ofRedisInstanceConfig.getName()- Parameters:
name- The ID of the instance or a fully qualified identifier for the instance. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#name RedisInstance#name}- Returns:
this
-
alternativeLocationId
@Stability(Stable) public RedisInstanceConfig.Builder alternativeLocationId(String alternativeLocationId)
Sets the value ofRedisInstanceConfig.getAlternativeLocationId()- Parameters:
alternativeLocationId- Only applicable to STANDARD_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#alternative_location_id RedisInstance#alternative_location_id}- Returns:
this
-
authEnabled
@Stability(Stable) public RedisInstanceConfig.Builder authEnabled(Boolean authEnabled)
Sets the value ofRedisInstanceConfig.getAuthEnabled()- Parameters:
authEnabled- Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#auth_enabled RedisInstance#auth_enabled}- Returns:
this
-
authEnabled
@Stability(Stable) public RedisInstanceConfig.Builder authEnabled(com.hashicorp.cdktf.IResolvable authEnabled)
Sets the value ofRedisInstanceConfig.getAuthEnabled()- Parameters:
authEnabled- Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#auth_enabled RedisInstance#auth_enabled}- Returns:
this
-
authorizedNetwork
@Stability(Stable) public RedisInstanceConfig.Builder authorizedNetwork(String authorizedNetwork)
Sets the value ofRedisInstanceConfig.getAuthorizedNetwork()- Parameters:
authorizedNetwork- The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#authorized_network RedisInstance#authorized_network}- Returns:
this
-
connectMode
@Stability(Stable) public RedisInstanceConfig.Builder connectMode(String connectMode)
Sets the value ofRedisInstanceConfig.getConnectMode()- Parameters:
connectMode- The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#connect_mode RedisInstance#connect_mode}- Returns:
this
-
customerManagedKey
@Stability(Stable) public RedisInstanceConfig.Builder customerManagedKey(String customerManagedKey)
Sets the value ofRedisInstanceConfig.getCustomerManagedKey()- Parameters:
customerManagedKey- Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis instance. If this is provided, CMEK is enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#customer_managed_key RedisInstance#customer_managed_key}- Returns:
this
-
displayName
@Stability(Stable) public RedisInstanceConfig.Builder displayName(String displayName)
Sets the value ofRedisInstanceConfig.getDisplayName()- Parameters:
displayName- An arbitrary and optional user-provided name for the instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#display_name RedisInstance#display_name}- Returns:
this
-
id
@Stability(Stable) public RedisInstanceConfig.Builder id(String id)
Sets the value ofRedisInstanceConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#id RedisInstance#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
labels
@Stability(Stable) public RedisInstanceConfig.Builder labels(Map<String,String> labels)
Sets the value ofRedisInstanceConfig.getLabels()- Parameters:
labels- Resource labels to represent user provided metadata. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#labels RedisInstance#labels}- Returns:
this
-
locationId
@Stability(Stable) public RedisInstanceConfig.Builder locationId(String locationId)
Sets the value ofRedisInstanceConfig.getLocationId()- Parameters:
locationId- The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#location_id RedisInstance#location_id}- Returns:
this
-
maintenancePolicy
@Stability(Stable) public RedisInstanceConfig.Builder maintenancePolicy(RedisInstanceMaintenancePolicy maintenancePolicy)
Sets the value ofRedisInstanceConfig.getMaintenancePolicy()- Parameters:
maintenancePolicy- maintenance_policy block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#maintenance_policy RedisInstance#maintenance_policy}- Returns:
this
-
maintenanceVersion
@Stability(Stable) public RedisInstanceConfig.Builder maintenanceVersion(String maintenanceVersion)
Sets the value ofRedisInstanceConfig.getMaintenanceVersion()- Parameters:
maintenanceVersion- The self service update maintenance version. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#maintenance_version RedisInstance#maintenance_version}- Returns:
this
-
persistenceConfig
@Stability(Stable) public RedisInstanceConfig.Builder persistenceConfig(RedisInstancePersistenceConfig persistenceConfig)
Sets the value ofRedisInstanceConfig.getPersistenceConfig()- Parameters:
persistenceConfig- persistence_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#persistence_config RedisInstance#persistence_config}- Returns:
this
-
project
@Stability(Stable) public RedisInstanceConfig.Builder project(String project)
Sets the value ofRedisInstanceConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#project RedisInstance#project}.- Returns:
this
-
readReplicasMode
@Stability(Stable) public RedisInstanceConfig.Builder readReplicasMode(String readReplicasMode)
Sets the value ofRedisInstanceConfig.getReadReplicasMode()- Parameters:
readReplicasMode- Optional. Read replica mode. Can only be specified when trying to create the instance. If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. * READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the instance cannot scale up or down the number of replicas. * READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#read_replicas_mode RedisInstance#read_replicas_mode}- Returns:
this
-
redisConfigs
@Stability(Stable) public RedisInstanceConfig.Builder redisConfigs(Map<String,String> redisConfigs)
Sets the value ofRedisInstanceConfig.getRedisConfigs()- Parameters:
redisConfigs- Redis configuration parameters, according to http://redis.io/topics/config. Please check Memorystore documentation for the list of supported parameters: https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#redis_configs RedisInstance#redis_configs}- Returns:
this
-
redisVersion
@Stability(Stable) public RedisInstanceConfig.Builder redisVersion(String redisVersion)
Sets the value ofRedisInstanceConfig.getRedisVersion()- Parameters:
redisVersion- The version of Redis software. If not provided, latest supported version will be used. Please check the API documentation linked at the top for the latest valid values. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#redis_version RedisInstance#redis_version}- Returns:
this
-
region
@Stability(Stable) public RedisInstanceConfig.Builder region(String region)
Sets the value ofRedisInstanceConfig.getRegion()- Parameters:
region- The name of the Redis region of the instance. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#region RedisInstance#region}- Returns:
this
-
replicaCount
@Stability(Stable) public RedisInstanceConfig.Builder replicaCount(Number replicaCount)
Sets the value ofRedisInstanceConfig.getReplicaCount()- Parameters:
replicaCount- Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#replica_count RedisInstance#replica_count}- Returns:
this
-
reservedIpRange
@Stability(Stable) public RedisInstanceConfig.Builder reservedIpRange(String reservedIpRange)
Sets the value ofRedisInstanceConfig.getReservedIpRange()- Parameters:
reservedIpRange- The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#reserved_ip_range RedisInstance#reserved_ip_range}- Returns:
this
-
secondaryIpRange
@Stability(Stable) public RedisInstanceConfig.Builder secondaryIpRange(String secondaryIpRange)
Sets the value ofRedisInstanceConfig.getSecondaryIpRange()- Parameters:
secondaryIpRange- Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or "auto". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#secondary_ip_range RedisInstance#secondary_ip_range}- Returns:
this
-
tier
@Stability(Stable) public RedisInstanceConfig.Builder tier(String tier)
Sets the value ofRedisInstanceConfig.getTier()- Parameters:
tier- The service tier of the instance. Must be one of these values:. * BASIC: standalone instance * STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#tier RedisInstance#tier}- Returns:
this
-
timeouts
@Stability(Stable) public RedisInstanceConfig.Builder timeouts(RedisInstanceTimeouts timeouts)
Sets the value ofRedisInstanceConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#timeouts RedisInstance#timeouts}- Returns:
this
-
transitEncryptionMode
@Stability(Stable) public RedisInstanceConfig.Builder transitEncryptionMode(String transitEncryptionMode)
Sets the value ofRedisInstanceConfig.getTransitEncryptionMode()- Parameters:
transitEncryptionMode- The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. * SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/redis_instance#transit_encryption_mode RedisInstance#transit_encryption_mode}- Returns:
this
-
connection
@Stability(Experimental) public RedisInstanceConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public RedisInstanceConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public RedisInstanceConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public RedisInstanceConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public RedisInstanceConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public RedisInstanceConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public RedisInstanceConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public RedisInstanceConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public RedisInstanceConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public RedisInstanceConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<RedisInstanceConfig>- Returns:
- a new instance of
RedisInstanceConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-