UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

119 lines 6.65 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.CacheCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource type definition for AWS::ElastiCache::CacheCluster */ class CacheCluster extends pulumi.CustomResource { /** * Get an existing CacheCluster resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new CacheCluster(name, undefined, { ...opts, id: id }); } /** * Returns true if the given object is an instance of CacheCluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === CacheCluster.__pulumiType; } /** * Create a CacheCluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if (args?.cacheNodeType === undefined && !opts.urn) { throw new Error("Missing required property 'cacheNodeType'"); } if (args?.engine === undefined && !opts.urn) { throw new Error("Missing required property 'engine'"); } if (args?.numCacheNodes === undefined && !opts.urn) { throw new Error("Missing required property 'numCacheNodes'"); } resourceInputs["autoMinorVersionUpgrade"] = args?.autoMinorVersionUpgrade; resourceInputs["azMode"] = args?.azMode; resourceInputs["cacheNodeType"] = args?.cacheNodeType; resourceInputs["cacheParameterGroupName"] = args?.cacheParameterGroupName; resourceInputs["cacheSecurityGroupNames"] = args?.cacheSecurityGroupNames; resourceInputs["cacheSubnetGroupName"] = args?.cacheSubnetGroupName; resourceInputs["clusterName"] = args?.clusterName; resourceInputs["engine"] = args?.engine; resourceInputs["engineVersion"] = args?.engineVersion; resourceInputs["ipDiscovery"] = args?.ipDiscovery; resourceInputs["logDeliveryConfigurations"] = args?.logDeliveryConfigurations; resourceInputs["networkType"] = args?.networkType; resourceInputs["notificationTopicArn"] = args?.notificationTopicArn; resourceInputs["numCacheNodes"] = args?.numCacheNodes; resourceInputs["port"] = args?.port; resourceInputs["preferredAvailabilityZone"] = args?.preferredAvailabilityZone; resourceInputs["preferredAvailabilityZones"] = args?.preferredAvailabilityZones; resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow; resourceInputs["snapshotArns"] = args?.snapshotArns; resourceInputs["snapshotName"] = args?.snapshotName; resourceInputs["snapshotRetentionLimit"] = args?.snapshotRetentionLimit; resourceInputs["snapshotWindow"] = args?.snapshotWindow; resourceInputs["tags"] = args?.tags; resourceInputs["transitEncryptionEnabled"] = args?.transitEncryptionEnabled; resourceInputs["vpcSecurityGroupIds"] = args?.vpcSecurityGroupIds; resourceInputs["configurationEndpoint"] = undefined /*out*/; resourceInputs["redisEndpoint"] = undefined /*out*/; } else { resourceInputs["autoMinorVersionUpgrade"] = undefined /*out*/; resourceInputs["azMode"] = undefined /*out*/; resourceInputs["cacheNodeType"] = undefined /*out*/; resourceInputs["cacheParameterGroupName"] = undefined /*out*/; resourceInputs["cacheSecurityGroupNames"] = undefined /*out*/; resourceInputs["cacheSubnetGroupName"] = undefined /*out*/; resourceInputs["clusterName"] = undefined /*out*/; resourceInputs["configurationEndpoint"] = undefined /*out*/; resourceInputs["engine"] = undefined /*out*/; resourceInputs["engineVersion"] = undefined /*out*/; resourceInputs["ipDiscovery"] = undefined /*out*/; resourceInputs["logDeliveryConfigurations"] = undefined /*out*/; resourceInputs["networkType"] = undefined /*out*/; resourceInputs["notificationTopicArn"] = undefined /*out*/; resourceInputs["numCacheNodes"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["preferredAvailabilityZone"] = undefined /*out*/; resourceInputs["preferredAvailabilityZones"] = undefined /*out*/; resourceInputs["preferredMaintenanceWindow"] = undefined /*out*/; resourceInputs["redisEndpoint"] = undefined /*out*/; resourceInputs["snapshotArns"] = undefined /*out*/; resourceInputs["snapshotName"] = undefined /*out*/; resourceInputs["snapshotRetentionLimit"] = undefined /*out*/; resourceInputs["snapshotWindow"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["transitEncryptionEnabled"] = undefined /*out*/; resourceInputs["vpcSecurityGroupIds"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["cacheSubnetGroupName", "clusterName", "engine", "networkType", "port", "snapshotArns[*]", "snapshotName"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(CacheCluster.__pulumiType, name, resourceInputs, opts); } } exports.CacheCluster = CacheCluster; /** @internal */ CacheCluster.__pulumiType = 'aws-native:elasticache:CacheCluster'; //# sourceMappingURL=cacheCluster.js.map