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

com.pulumi.aws.elasticache.ServerlessCacheArgs 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.aws.elasticache;

import com.pulumi.aws.elasticache.inputs.ServerlessCacheCacheUsageLimitsArgs;
import com.pulumi.aws.elasticache.inputs.ServerlessCacheTimeoutsArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 ServerlessCacheArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerlessCacheArgs Empty = new ServerlessCacheArgs();

    /**
     * Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See `cache_usage_limits` Block for details.
     * 
     */
    @Import(name="cacheUsageLimits")
    private @Nullable Output cacheUsageLimits;

    /**
     * @return Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See `cache_usage_limits` Block for details.
     * 
     */
    public Optional> cacheUsageLimits() {
        return Optional.ofNullable(this.cacheUsageLimits);
    }

    /**
     * The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
     * 
     */
    @Import(name="dailySnapshotTime")
    private @Nullable Output dailySnapshotTime;

    /**
     * @return The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
     * 
     */
    public Optional> dailySnapshotTime() {
        return Optional.ofNullable(this.dailySnapshotTime);
    }

    /**
     * User-provided description for the serverless cache. The default is NULL.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return User-provided description for the serverless cache. The default is NULL.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
     * 
     */
    @Import(name="engine", required=true)
    private Output engine;

    /**
     * @return Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
     * 
     */
    public Output engine() {
        return this.engine;
    }

    /**
     * ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
     * 
     */
    @Import(name="kmsKeyId")
    private @Nullable Output kmsKeyId;

    /**
     * @return ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
     * 
     */
    public Optional> kmsKeyId() {
        return Optional.ofNullable(this.kmsKeyId);
    }

    /**
     * The version of the cache engine that will be used to create the serverless cache.
     * See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
     * 
     */
    @Import(name="majorEngineVersion")
    private @Nullable Output majorEngineVersion;

    /**
     * @return The version of the cache engine that will be used to create the serverless cache.
     * See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
     * 
     */
    public Optional> majorEngineVersion() {
        return Optional.ofNullable(this.majorEngineVersion);
    }

    /**
     * The Cluster name which serves as a unique identifier to the serverless cache
     * 
     * The following arguments are optional:
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The Cluster name which serves as a unique identifier to the serverless cache
     * 
     * The following arguments are optional:
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
     * 
     */
    @Import(name="securityGroupIds")
    private @Nullable Output> securityGroupIds;

    /**
     * @return A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
     * 
     */
    public Optional>> securityGroupIds() {
        return Optional.ofNullable(this.securityGroupIds);
    }

    /**
     * The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
     * 
     */
    @Import(name="snapshotArnsToRestores")
    private @Nullable Output> snapshotArnsToRestores;

    /**
     * @return The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
     * 
     */
    public Optional>> snapshotArnsToRestores() {
        return Optional.ofNullable(this.snapshotArnsToRestores);
    }

    /**
     * The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
     * 
     */
    @Import(name="snapshotRetentionLimit")
    private @Nullable Output snapshotRetentionLimit;

    /**
     * @return The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
     * 
     */
    public Optional> snapshotRetentionLimit() {
        return Optional.ofNullable(this.snapshotRetentionLimit);
    }

    /**
     * A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
     * 
     */
    @Import(name="subnetIds")
    private @Nullable Output> subnetIds;

    /**
     * @return A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
     * 
     */
    public Optional>> subnetIds() {
        return Optional.ofNullable(this.subnetIds);
    }

    /**
     * Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

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

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

    /**
     * The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
     * 
     */
    @Import(name="userGroupId")
    private @Nullable Output userGroupId;

    /**
     * @return The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
     * 
     */
    public Optional> userGroupId() {
        return Optional.ofNullable(this.userGroupId);
    }

    private ServerlessCacheArgs() {}

    private ServerlessCacheArgs(ServerlessCacheArgs $) {
        this.cacheUsageLimits = $.cacheUsageLimits;
        this.dailySnapshotTime = $.dailySnapshotTime;
        this.description = $.description;
        this.engine = $.engine;
        this.kmsKeyId = $.kmsKeyId;
        this.majorEngineVersion = $.majorEngineVersion;
        this.name = $.name;
        this.securityGroupIds = $.securityGroupIds;
        this.snapshotArnsToRestores = $.snapshotArnsToRestores;
        this.snapshotRetentionLimit = $.snapshotRetentionLimit;
        this.subnetIds = $.subnetIds;
        this.tags = $.tags;
        this.timeouts = $.timeouts;
        this.userGroupId = $.userGroupId;
    }

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

    public static final class Builder {
        private ServerlessCacheArgs $;

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

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

        /**
         * @param cacheUsageLimits Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See `cache_usage_limits` Block for details.
         * 
         * @return builder
         * 
         */
        public Builder cacheUsageLimits(@Nullable Output cacheUsageLimits) {
            $.cacheUsageLimits = cacheUsageLimits;
            return this;
        }

        /**
         * @param cacheUsageLimits Sets the cache usage limits for storage and ElastiCache Processing Units for the cache. See `cache_usage_limits` Block for details.
         * 
         * @return builder
         * 
         */
        public Builder cacheUsageLimits(ServerlessCacheCacheUsageLimitsArgs cacheUsageLimits) {
            return cacheUsageLimits(Output.of(cacheUsageLimits));
        }

        /**
         * @param dailySnapshotTime The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder dailySnapshotTime(@Nullable Output dailySnapshotTime) {
            $.dailySnapshotTime = dailySnapshotTime;
            return this;
        }

        /**
         * @param dailySnapshotTime The daily time that snapshots will be created from the new serverless cache. Only supported for engine type `"redis"`. Defaults to `0`.
         * 
         * @return builder
         * 
         */
        public Builder dailySnapshotTime(String dailySnapshotTime) {
            return dailySnapshotTime(Output.of(dailySnapshotTime));
        }

        /**
         * @param description User-provided description for the serverless cache. The default is NULL.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description User-provided description for the serverless cache. The default is NULL.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param engine Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
         * 
         * @return builder
         * 
         */
        public Builder engine(Output engine) {
            $.engine = engine;
            return this;
        }

        /**
         * @param engine Name of the cache engine to be used for this cache cluster. Valid values are `memcached` or `redis`.
         * 
         * @return builder
         * 
         */
        public Builder engine(String engine) {
            return engine(Output.of(engine));
        }

        /**
         * @param kmsKeyId ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyId(@Nullable Output kmsKeyId) {
            $.kmsKeyId = kmsKeyId;
            return this;
        }

        /**
         * @param kmsKeyId ARN of the customer managed key for encrypting the data at rest. If no KMS key is provided, a default service key is used.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyId(String kmsKeyId) {
            return kmsKeyId(Output.of(kmsKeyId));
        }

        /**
         * @param majorEngineVersion The version of the cache engine that will be used to create the serverless cache.
         * See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
         * 
         * @return builder
         * 
         */
        public Builder majorEngineVersion(@Nullable Output majorEngineVersion) {
            $.majorEngineVersion = majorEngineVersion;
            return this;
        }

        /**
         * @param majorEngineVersion The version of the cache engine that will be used to create the serverless cache.
         * See [Describe Cache Engine Versions](https://docs.aws.amazon.com/cli/latest/reference/elasticache/describe-cache-engine-versions.html) in the AWS Documentation for supported versions.
         * 
         * @return builder
         * 
         */
        public Builder majorEngineVersion(String majorEngineVersion) {
            return majorEngineVersion(Output.of(majorEngineVersion));
        }

        /**
         * @param name The Cluster name which serves as a unique identifier to the serverless cache
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The Cluster name which serves as a unique identifier to the serverless cache
         * 
         * The following arguments are optional:
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param securityGroupIds A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupIds(@Nullable Output> securityGroupIds) {
            $.securityGroupIds = securityGroupIds;
            return this;
        }

        /**
         * @param securityGroupIds A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupIds(List securityGroupIds) {
            return securityGroupIds(Output.of(securityGroupIds));
        }

        /**
         * @param securityGroupIds A list of the one or more VPC security groups to be associated with the serverless cache. The security group will authorize traffic access for the VPC end-point (private-link). If no other information is given this will be the VPC’s Default Security Group that is associated with the cluster VPC end-point.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupIds(String... securityGroupIds) {
            return securityGroupIds(List.of(securityGroupIds));
        }

        /**
         * @param snapshotArnsToRestores The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
         * 
         * @return builder
         * 
         */
        public Builder snapshotArnsToRestores(@Nullable Output> snapshotArnsToRestores) {
            $.snapshotArnsToRestores = snapshotArnsToRestores;
            return this;
        }

        /**
         * @param snapshotArnsToRestores The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
         * 
         * @return builder
         * 
         */
        public Builder snapshotArnsToRestores(List snapshotArnsToRestores) {
            return snapshotArnsToRestores(Output.of(snapshotArnsToRestores));
        }

        /**
         * @param snapshotArnsToRestores The list of ARN(s) of the snapshot that the new serverless cache will be created from. Available for Redis only.
         * 
         * @return builder
         * 
         */
        public Builder snapshotArnsToRestores(String... snapshotArnsToRestores) {
            return snapshotArnsToRestores(List.of(snapshotArnsToRestores));
        }

        /**
         * @param snapshotRetentionLimit The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
         * 
         * @return builder
         * 
         */
        public Builder snapshotRetentionLimit(@Nullable Output snapshotRetentionLimit) {
            $.snapshotRetentionLimit = snapshotRetentionLimit;
            return this;
        }

        /**
         * @param snapshotRetentionLimit The number of snapshots that will be retained for the serverless cache that is being created. As new snapshots beyond this limit are added, the oldest snapshots will be deleted on a rolling basis. Available for Redis only.
         * 
         * @return builder
         * 
         */
        public Builder snapshotRetentionLimit(Integer snapshotRetentionLimit) {
            return snapshotRetentionLimit(Output.of(snapshotRetentionLimit));
        }

        /**
         * @param subnetIds A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
         * 
         * @return builder
         * 
         */
        public Builder subnetIds(@Nullable Output> subnetIds) {
            $.subnetIds = subnetIds;
            return this;
        }

        /**
         * @param subnetIds A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
         * 
         * @return builder
         * 
         */
        public Builder subnetIds(List subnetIds) {
            return subnetIds(Output.of(subnetIds));
        }

        /**
         * @param subnetIds A list of the identifiers of the subnets where the VPC endpoint for the serverless cache will be deployed. All the subnetIds must belong to the same VPC.
         * 
         * @return builder
         * 
         */
        public Builder subnetIds(String... subnetIds) {
            return subnetIds(List.of(subnetIds));
        }

        /**
         * @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

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

        public Builder timeouts(ServerlessCacheTimeoutsArgs timeouts) {
            return timeouts(Output.of(timeouts));
        }

        /**
         * @param userGroupId The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
         * 
         * @return builder
         * 
         */
        public Builder userGroupId(@Nullable Output userGroupId) {
            $.userGroupId = userGroupId;
            return this;
        }

        /**
         * @param userGroupId The identifier of the UserGroup to be associated with the serverless cache. Available for Redis only. Default is NULL.
         * 
         * @return builder
         * 
         */
        public Builder userGroupId(String userGroupId) {
            return userGroupId(Output.of(userGroupId));
        }

        public ServerlessCacheArgs build() {
            if ($.engine == null) {
                throw new MissingRequiredPropertyException("ServerlessCacheArgs", "engine");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy