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

com.pulumi.googlenative.redis.v1beta1.InstanceArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.googlenative.redis.v1beta1;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.googlenative.redis.v1beta1.enums.InstanceConnectMode;
import com.pulumi.googlenative.redis.v1beta1.enums.InstanceReadReplicasMode;
import com.pulumi.googlenative.redis.v1beta1.enums.InstanceSuspensionReasonsItem;
import com.pulumi.googlenative.redis.v1beta1.enums.InstanceTier;
import com.pulumi.googlenative.redis.v1beta1.enums.InstanceTransitEncryptionMode;
import com.pulumi.googlenative.redis.v1beta1.inputs.MaintenancePolicyArgs;
import com.pulumi.googlenative.redis.v1beta1.inputs.PersistenceConfigArgs;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class InstanceArgs extends com.pulumi.resources.ResourceArgs {

    public static final InstanceArgs Empty = new InstanceArgs();

    /**
     * Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
     * 
     */
    @Import(name="alternativeLocationId")
    private @Nullable Output alternativeLocationId;

    /**
     * @return Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
     * 
     */
    public Optional> alternativeLocationId() {
        return Optional.ofNullable(this.alternativeLocationId);
    }

    /**
     * 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.
     * 
     */
    @Import(name="authEnabled")
    private @Nullable Output authEnabled;

    /**
     * @return 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.
     * 
     */
    public Optional> authEnabled() {
        return Optional.ofNullable(this.authEnabled);
    }

    /**
     * Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
     * 
     */
    @Import(name="authorizedNetwork")
    private @Nullable Output authorizedNetwork;

    /**
     * @return Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
     * 
     */
    public Optional> authorizedNetwork() {
        return Optional.ofNullable(this.authorizedNetwork);
    }

    /**
     * Optional. The available maintenance versions that an instance could update to.
     * 
     */
    @Import(name="availableMaintenanceVersions")
    private @Nullable Output> availableMaintenanceVersions;

    /**
     * @return Optional. The available maintenance versions that an instance could update to.
     * 
     */
    public Optional>> availableMaintenanceVersions() {
        return Optional.ofNullable(this.availableMaintenanceVersions);
    }

    /**
     * Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
     */
    @Import(name="connectMode")
    private @Nullable Output connectMode;

    /**
     * @return Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
     */
    public Optional> connectMode() {
        return Optional.ofNullable(this.connectMode);
    }

    /**
     * Optional. The KMS key reference that the customer provides when trying to create the instance.
     * 
     */
    @Import(name="customerManagedKey")
    private @Nullable Output customerManagedKey;

    /**
     * @return Optional. The KMS key reference that the customer provides when trying to create the instance.
     * 
     */
    public Optional> customerManagedKey() {
        return Optional.ofNullable(this.customerManagedKey);
    }

    /**
     * An arbitrary and optional user-provided name for the instance.
     * 
     */
    @Import(name="displayName")
    private @Nullable Output displayName;

    /**
     * @return An arbitrary and optional user-provided name for the instance.
     * 
     */
    public Optional> displayName() {
        return Optional.ofNullable(this.displayName);
    }

    /**
     * Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
     * 
     */
    @Import(name="instanceId", required=true)
    private Output instanceId;

    /**
     * @return Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
     * 
     */
    public Output instanceId() {
        return this.instanceId;
    }

    /**
     * Resource labels to represent user provided metadata
     * 
     */
    @Import(name="labels")
    private @Nullable Output> labels;

    /**
     * @return Resource labels to represent user provided metadata
     * 
     */
    public Optional>> labels() {
        return Optional.ofNullable(this.labels);
    }

    /**
     * Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
     * 
     */
    @Import(name="maintenancePolicy")
    private @Nullable Output maintenancePolicy;

    /**
     * @return Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
     * 
     */
    public Optional> maintenancePolicy() {
        return Optional.ofNullable(this.maintenancePolicy);
    }

    /**
     * Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
     * 
     */
    @Import(name="maintenanceVersion")
    private @Nullable Output maintenanceVersion;

    /**
     * @return Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
     * 
     */
    public Optional> maintenanceVersion() {
        return Optional.ofNullable(this.maintenanceVersion);
    }

    /**
     * Redis memory size in GiB.
     * 
     */
    @Import(name="memorySizeGb", required=true)
    private Output memorySizeGb;

    /**
     * @return Redis memory size in GiB.
     * 
     */
    public Output memorySizeGb() {
        return this.memorySizeGb;
    }

    /**
     * Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Optional. Persistence configuration parameters
     * 
     */
    @Import(name="persistenceConfig")
    private @Nullable Output persistenceConfig;

    /**
     * @return Optional. Persistence configuration parameters
     * 
     */
    public Optional> persistenceConfig() {
        return Optional.ofNullable(this.persistenceConfig);
    }

    @Import(name="project")
    private @Nullable Output project;

    public Optional> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
     */
    @Import(name="readReplicasMode")
    private @Nullable Output readReplicasMode;

    /**
     * @return Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
     */
    public Optional> readReplicasMode() {
        return Optional.ofNullable(this.readReplicasMode);
    }

    /**
     * Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
     * 
     */
    @Import(name="redisConfigs")
    private @Nullable Output> redisConfigs;

    /**
     * @return Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
     * 
     */
    public Optional>> redisConfigs() {
        return Optional.ofNullable(this.redisConfigs);
    }

    /**
     * Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
     * 
     */
    @Import(name="redisVersion")
    private @Nullable Output redisVersion;

    /**
     * @return Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
     * 
     */
    public Optional> redisVersion() {
        return Optional.ofNullable(this.redisVersion);
    }

    /**
     * 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.
     * 
     */
    @Import(name="replicaCount")
    private @Nullable Output replicaCount;

    /**
     * @return 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.
     * 
     */
    public Optional> replicaCount() {
        return Optional.ofNullable(this.replicaCount);
    }

    /**
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
     * 
     */
    @Import(name="reservedIpRange")
    private @Nullable Output reservedIpRange;

    /**
     * @return Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
     * 
     */
    public Optional> reservedIpRange() {
        return Optional.ofNullable(this.reservedIpRange);
    }

    /**
     * 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".
     * 
     */
    @Import(name="secondaryIpRange")
    private @Nullable Output secondaryIpRange;

    /**
     * @return 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".
     * 
     */
    public Optional> secondaryIpRange() {
        return Optional.ofNullable(this.secondaryIpRange);
    }

    /**
     * Optional. reasons that causes instance in "SUSPENDED" state.
     * 
     */
    @Import(name="suspensionReasons")
    private @Nullable Output> suspensionReasons;

    /**
     * @return Optional. reasons that causes instance in "SUSPENDED" state.
     * 
     */
    public Optional>> suspensionReasons() {
        return Optional.ofNullable(this.suspensionReasons);
    }

    /**
     * The service tier of the instance.
     * 
     */
    @Import(name="tier", required=true)
    private Output tier;

    /**
     * @return The service tier of the instance.
     * 
     */
    public Output tier() {
        return this.tier;
    }

    /**
     * Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
     * 
     */
    @Import(name="transitEncryptionMode")
    private @Nullable Output transitEncryptionMode;

    /**
     * @return Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
     * 
     */
    public Optional> transitEncryptionMode() {
        return Optional.ofNullable(this.transitEncryptionMode);
    }

    private InstanceArgs() {}

    private InstanceArgs(InstanceArgs $) {
        this.alternativeLocationId = $.alternativeLocationId;
        this.authEnabled = $.authEnabled;
        this.authorizedNetwork = $.authorizedNetwork;
        this.availableMaintenanceVersions = $.availableMaintenanceVersions;
        this.connectMode = $.connectMode;
        this.customerManagedKey = $.customerManagedKey;
        this.displayName = $.displayName;
        this.instanceId = $.instanceId;
        this.labels = $.labels;
        this.location = $.location;
        this.maintenancePolicy = $.maintenancePolicy;
        this.maintenanceVersion = $.maintenanceVersion;
        this.memorySizeGb = $.memorySizeGb;
        this.name = $.name;
        this.persistenceConfig = $.persistenceConfig;
        this.project = $.project;
        this.readReplicasMode = $.readReplicasMode;
        this.redisConfigs = $.redisConfigs;
        this.redisVersion = $.redisVersion;
        this.replicaCount = $.replicaCount;
        this.reservedIpRange = $.reservedIpRange;
        this.secondaryIpRange = $.secondaryIpRange;
        this.suspensionReasons = $.suspensionReasons;
        this.tier = $.tier;
        this.transitEncryptionMode = $.transitEncryptionMode;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(InstanceArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private InstanceArgs $;

        public Builder() {
            $ = new InstanceArgs();
        }

        public Builder(InstanceArgs defaults) {
            $ = new InstanceArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param alternativeLocationId Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
         * 
         * @return builder
         * 
         */
        public Builder alternativeLocationId(@Nullable Output alternativeLocationId) {
            $.alternativeLocationId = alternativeLocationId;
            return this;
        }

        /**
         * @param alternativeLocationId Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.
         * 
         * @return builder
         * 
         */
        public Builder alternativeLocationId(String alternativeLocationId) {
            return alternativeLocationId(Output.of(alternativeLocationId));
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder authEnabled(@Nullable Output authEnabled) {
            $.authEnabled = authEnabled;
            return this;
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder authEnabled(Boolean authEnabled) {
            return authEnabled(Output.of(authEnabled));
        }

        /**
         * @param authorizedNetwork Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
         * 
         * @return builder
         * 
         */
        public Builder authorizedNetwork(@Nullable Output authorizedNetwork) {
            $.authorizedNetwork = authorizedNetwork;
            return this;
        }

        /**
         * @param authorizedNetwork Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.
         * 
         * @return builder
         * 
         */
        public Builder authorizedNetwork(String authorizedNetwork) {
            return authorizedNetwork(Output.of(authorizedNetwork));
        }

        /**
         * @param availableMaintenanceVersions Optional. The available maintenance versions that an instance could update to.
         * 
         * @return builder
         * 
         */
        public Builder availableMaintenanceVersions(@Nullable Output> availableMaintenanceVersions) {
            $.availableMaintenanceVersions = availableMaintenanceVersions;
            return this;
        }

        /**
         * @param availableMaintenanceVersions Optional. The available maintenance versions that an instance could update to.
         * 
         * @return builder
         * 
         */
        public Builder availableMaintenanceVersions(List availableMaintenanceVersions) {
            return availableMaintenanceVersions(Output.of(availableMaintenanceVersions));
        }

        /**
         * @param availableMaintenanceVersions Optional. The available maintenance versions that an instance could update to.
         * 
         * @return builder
         * 
         */
        public Builder availableMaintenanceVersions(String... availableMaintenanceVersions) {
            return availableMaintenanceVersions(List.of(availableMaintenanceVersions));
        }

        /**
         * @param connectMode Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
         * 
         * @return builder
         * 
         */
        public Builder connectMode(@Nullable Output connectMode) {
            $.connectMode = connectMode;
            return this;
        }

        /**
         * @param connectMode Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.
         * 
         * @return builder
         * 
         */
        public Builder connectMode(InstanceConnectMode connectMode) {
            return connectMode(Output.of(connectMode));
        }

        /**
         * @param customerManagedKey Optional. The KMS key reference that the customer provides when trying to create the instance.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(@Nullable Output customerManagedKey) {
            $.customerManagedKey = customerManagedKey;
            return this;
        }

        /**
         * @param customerManagedKey Optional. The KMS key reference that the customer provides when trying to create the instance.
         * 
         * @return builder
         * 
         */
        public Builder customerManagedKey(String customerManagedKey) {
            return customerManagedKey(Output.of(customerManagedKey));
        }

        /**
         * @param displayName An arbitrary and optional user-provided name for the instance.
         * 
         * @return builder
         * 
         */
        public Builder displayName(@Nullable Output displayName) {
            $.displayName = displayName;
            return this;
        }

        /**
         * @param displayName An arbitrary and optional user-provided name for the instance.
         * 
         * @return builder
         * 
         */
        public Builder displayName(String displayName) {
            return displayName(Output.of(displayName));
        }

        /**
         * @param instanceId Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
         * 
         * @return builder
         * 
         */
        public Builder instanceId(Output instanceId) {
            $.instanceId = instanceId;
            return this;
        }

        /**
         * @param instanceId Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location
         * 
         * @return builder
         * 
         */
        public Builder instanceId(String instanceId) {
            return instanceId(Output.of(instanceId));
        }

        /**
         * @param labels Resource labels to represent user provided metadata
         * 
         * @return builder
         * 
         */
        public Builder labels(@Nullable Output> labels) {
            $.labels = labels;
            return this;
        }

        /**
         * @param labels Resource labels to represent user provided metadata
         * 
         * @return builder
         * 
         */
        public Builder labels(Map labels) {
            return labels(Output.of(labels));
        }

        /**
         * @param location Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param maintenancePolicy Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
         * 
         * @return builder
         * 
         */
        public Builder maintenancePolicy(@Nullable Output maintenancePolicy) {
            $.maintenancePolicy = maintenancePolicy;
            return this;
        }

        /**
         * @param maintenancePolicy Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time.
         * 
         * @return builder
         * 
         */
        public Builder maintenancePolicy(MaintenancePolicyArgs maintenancePolicy) {
            return maintenancePolicy(Output.of(maintenancePolicy));
        }

        /**
         * @param maintenanceVersion Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
         * 
         * @return builder
         * 
         */
        public Builder maintenanceVersion(@Nullable Output maintenanceVersion) {
            $.maintenanceVersion = maintenanceVersion;
            return this;
        }

        /**
         * @param maintenanceVersion Optional. The self service update maintenance version. The version is date based such as "20210712_00_00".
         * 
         * @return builder
         * 
         */
        public Builder maintenanceVersion(String maintenanceVersion) {
            return maintenanceVersion(Output.of(maintenanceVersion));
        }

        /**
         * @param memorySizeGb Redis memory size in GiB.
         * 
         * @return builder
         * 
         */
        public Builder memorySizeGb(Output memorySizeGb) {
            $.memorySizeGb = memorySizeGb;
            return this;
        }

        /**
         * @param memorySizeGb Redis memory size in GiB.
         * 
         * @return builder
         * 
         */
        public Builder memorySizeGb(Integer memorySizeGb) {
            return memorySizeGb(Output.of(memorySizeGb));
        }

        /**
         * @param name Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param persistenceConfig Optional. Persistence configuration parameters
         * 
         * @return builder
         * 
         */
        public Builder persistenceConfig(@Nullable Output persistenceConfig) {
            $.persistenceConfig = persistenceConfig;
            return this;
        }

        /**
         * @param persistenceConfig Optional. Persistence configuration parameters
         * 
         * @return builder
         * 
         */
        public Builder persistenceConfig(PersistenceConfigArgs persistenceConfig) {
            return persistenceConfig(Output.of(persistenceConfig));
        }

        public Builder project(@Nullable Output project) {
            $.project = project;
            return this;
        }

        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param readReplicasMode Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
         * 
         * @return builder
         * 
         */
        public Builder readReplicasMode(@Nullable Output readReplicasMode) {
            $.readReplicasMode = readReplicasMode;
            return this;
        }

        /**
         * @param readReplicasMode Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
         * 
         * @return builder
         * 
         */
        public Builder readReplicasMode(InstanceReadReplicasMode readReplicasMode) {
            return readReplicasMode(Output.of(readReplicasMode));
        }

        /**
         * @param redisConfigs Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
         * 
         * @return builder
         * 
         */
        public Builder redisConfigs(@Nullable Output> redisConfigs) {
            $.redisConfigs = redisConfigs;
            return this;
        }

        /**
         * @param redisConfigs Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries
         * 
         * @return builder
         * 
         */
        public Builder redisConfigs(Map redisConfigs) {
            return redisConfigs(Output.of(redisConfigs));
        }

        /**
         * @param redisVersion Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
         * 
         * @return builder
         * 
         */
        public Builder redisVersion(@Nullable Output redisVersion) {
            $.redisVersion = redisVersion;
            return this;
        }

        /**
         * @param redisVersion Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
         * 
         * @return builder
         * 
         */
        public Builder redisVersion(String redisVersion) {
            return redisVersion(Output.of(redisVersion));
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder replicaCount(@Nullable Output replicaCount) {
            $.replicaCount = replicaCount;
            return this;
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder replicaCount(Integer replicaCount) {
            return replicaCount(Output.of(replicaCount));
        }

        /**
         * @param reservedIpRange Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
         * 
         * @return builder
         * 
         */
        public Builder reservedIpRange(@Nullable Output reservedIpRange) {
            $.reservedIpRange = reservedIpRange;
            return this;
        }

        /**
         * @param reservedIpRange Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.
         * 
         * @return builder
         * 
         */
        public Builder reservedIpRange(String reservedIpRange) {
            return reservedIpRange(Output.of(reservedIpRange));
        }

        /**
         * @param 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".
         * 
         * @return builder
         * 
         */
        public Builder secondaryIpRange(@Nullable Output secondaryIpRange) {
            $.secondaryIpRange = secondaryIpRange;
            return this;
        }

        /**
         * @param 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".
         * 
         * @return builder
         * 
         */
        public Builder secondaryIpRange(String secondaryIpRange) {
            return secondaryIpRange(Output.of(secondaryIpRange));
        }

        /**
         * @param suspensionReasons Optional. reasons that causes instance in "SUSPENDED" state.
         * 
         * @return builder
         * 
         */
        public Builder suspensionReasons(@Nullable Output> suspensionReasons) {
            $.suspensionReasons = suspensionReasons;
            return this;
        }

        /**
         * @param suspensionReasons Optional. reasons that causes instance in "SUSPENDED" state.
         * 
         * @return builder
         * 
         */
        public Builder suspensionReasons(List suspensionReasons) {
            return suspensionReasons(Output.of(suspensionReasons));
        }

        /**
         * @param suspensionReasons Optional. reasons that causes instance in "SUSPENDED" state.
         * 
         * @return builder
         * 
         */
        public Builder suspensionReasons(InstanceSuspensionReasonsItem... suspensionReasons) {
            return suspensionReasons(List.of(suspensionReasons));
        }

        /**
         * @param tier The service tier of the instance.
         * 
         * @return builder
         * 
         */
        public Builder tier(Output tier) {
            $.tier = tier;
            return this;
        }

        /**
         * @param tier The service tier of the instance.
         * 
         * @return builder
         * 
         */
        public Builder tier(InstanceTier tier) {
            return tier(Output.of(tier));
        }

        /**
         * @param transitEncryptionMode Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
         * 
         * @return builder
         * 
         */
        public Builder transitEncryptionMode(@Nullable Output transitEncryptionMode) {
            $.transitEncryptionMode = transitEncryptionMode;
            return this;
        }

        /**
         * @param transitEncryptionMode Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.
         * 
         * @return builder
         * 
         */
        public Builder transitEncryptionMode(InstanceTransitEncryptionMode transitEncryptionMode) {
            return transitEncryptionMode(Output.of(transitEncryptionMode));
        }

        public InstanceArgs build() {
            $.instanceId = Objects.requireNonNull($.instanceId, "expected parameter 'instanceId' to be non-null");
            $.memorySizeGb = Objects.requireNonNull($.memorySizeGb, "expected parameter 'memorySizeGb' to be non-null");
            $.tier = Objects.requireNonNull($.tier, "expected parameter 'tier' to be non-null");
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy