import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Creates a Database within a specified Subscription in your Redis Enterprise Cloud Account. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as rediscloud from "@pulumi/rediscloud"; * import * as rediscloud from "@rediscloud/pulumi-rediscloud"; * * const card = rediscloud.getPaymentMethod({ * cardType: "Visa", * }); * const subscription_resource = new rediscloud.Subscription("subscription-resource", { * paymentMethod: "credit-card", * paymentMethodId: card.then(card => card.id), * memoryStorage: "ram", * cloudProvider: { * provider: data.rediscloud_cloud_account.account.provider_type, * regions: [{ * region: "eu-west-1", * multipleAvailabilityZones: true, * networkingDeploymentCidr: "10.0.0.0/24", * preferredAvailabilityZones: ["euw1-az1, euw1-az2, euw1-az3"], * }], * }, * creationPlan: { * memoryLimitInGb: 15, * quantity: 1, * replication: true, * throughputMeasurementBy: "operations-per-second", * throughputMeasurementValue: 20000, * modules: ["RedisJSON"], * }, * }); * // The primary database to provision * const database_resource = new rediscloud.SubscriptionDatabase("database-resource", { * subscriptionId: subscription_resource.id, * memoryLimitInGb: 15, * dataPersistence: "aof-every-write", * throughputMeasurementBy: "operations-per-second", * throughputMeasurementValue: 20000, * replication: true, * modules: [{ * name: "RedisJSON", * }], * alerts: [{ * name: "dataset-size", * value: 40, * }], * }, { * dependsOn: [subscription_resource], * }); * ``` * * ## Import * * `rediscloud_subscription_database` can be imported using the ID of the subscription and the ID of the database in the format {subscription ID}/{database ID}, e.g. * * ```sh * $ pulumi import rediscloud:index/subscriptionDatabase:SubscriptionDatabase database-resource 123456/12345678 * ``` */ export declare class SubscriptionDatabase extends pulumi.CustomResource { /** * Get an existing SubscriptionDatabase 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SubscriptionDatabaseState, opts?: pulumi.CustomResourceOptions): SubscriptionDatabase; /** * Returns true if the given object is an instance of SubscriptionDatabase. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SubscriptionDatabase; /** * A block defining Redis database alert, documented below, can be specified multiple times */ readonly alerts: pulumi.Output; /** * Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) * of the items stored in the database. Default: 1000 */ readonly averageItemSizeInBytes: pulumi.Output; /** * SSL certificate to authenticate user connections */ readonly clientSslCertificate: pulumi.Output; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'). Default: 'volatile-lru' */ readonly dataEviction: pulumi.Output; /** * Rate of database's storage data persistence (either: 'none', 'aof-every-1-second', 'aof-every-write', 'snapshot-every-1-hour', 'snapshot-every-6-hours' or 'snapshot-every-12-hours'). Default: ‘none’ */ readonly dataPersistence: pulumi.Output; /** * Identifier of the database created */ readonly dbId: pulumi.Output; /** * Use TLS for authentication. Default: ‘false’ */ readonly enableTls: pulumi.Output; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ readonly externalEndpointForOssClusterApi: pulumi.Output; /** * List of regular expression rules to shard the database by. See * [the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the * hashing policy. This cannot be set when `supportOssClusterApi` is set to true. */ readonly hashingPolicies: pulumi.Output; /** * Maximum memory usage for this specific database */ readonly memoryLimitInGb: pulumi.Output; /** * A list of modules objects, documented below. **Modifying this attribute will force creation of a new resource.** */ readonly modules: pulumi.Output; /** * A meaningful name to identify the database */ readonly name: pulumi.Output; /** * Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated */ readonly password: pulumi.Output; /** * Path that will be used to store database backup files. **Deprecated: Use `remoteBackup` block instead** * * @deprecated Use `remote_backup` block instead */ readonly periodicBackupPath: pulumi.Output; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ readonly port: pulumi.Output; /** * Private endpoint to access the database */ readonly privateEndpoint: pulumi.Output; /** * The protocol that will be used to access the database, (either ‘redis’ or ‘memcached’) Default: ‘redis’. **Modifying this attribute will force creation of a new resource.** */ readonly protocol: pulumi.Output; /** * Public endpoint to access the database */ readonly publicEndpoint: pulumi.Output; /** * Specifies the backup options for the database, documented below */ readonly remoteBackup: pulumi.Output; /** * Set of Redis database URIs, in the format `redis://user:password@host:port`, that this * database will be a replica of. If the URI provided is Redis Labs Cloud instance, only host and port should be provided. * Cannot be enabled when `supportOssClusterApi` is enabled. */ readonly replicaOfs: pulumi.Output; /** * Databases replication. Default: ‘true’ */ readonly replication: pulumi.Output; /** * List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: [‘192.168.10.0/32’, ‘192.168.12.0/24’]) */ readonly sourceIps: pulumi.Output; /** * The ID of the subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ readonly subscriptionId: pulumi.Output; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ readonly supportOssClusterApi: pulumi.Output; /** * Throughput measurement method, (either ‘number-of-shards’ or ‘operations-per-second’) */ readonly throughputMeasurementBy: pulumi.Output; /** * Throughput value (as applies to selected measurement method) */ readonly throughputMeasurementValue: pulumi.Output; /** * Create a SubscriptionDatabase 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: string, args: SubscriptionDatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SubscriptionDatabase resources. */ export interface SubscriptionDatabaseState { /** * A block defining Redis database alert, documented below, can be specified multiple times */ alerts?: pulumi.Input[]>; /** * Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) * of the items stored in the database. Default: 1000 */ averageItemSizeInBytes?: pulumi.Input; /** * SSL certificate to authenticate user connections */ clientSslCertificate?: pulumi.Input; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'). Default: 'volatile-lru' */ dataEviction?: pulumi.Input; /** * Rate of database's storage data persistence (either: 'none', 'aof-every-1-second', 'aof-every-write', 'snapshot-every-1-hour', 'snapshot-every-6-hours' or 'snapshot-every-12-hours'). Default: ‘none’ */ dataPersistence?: pulumi.Input; /** * Identifier of the database created */ dbId?: pulumi.Input; /** * Use TLS for authentication. Default: ‘false’ */ enableTls?: pulumi.Input; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ externalEndpointForOssClusterApi?: pulumi.Input; /** * List of regular expression rules to shard the database by. See * [the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the * hashing policy. This cannot be set when `supportOssClusterApi` is set to true. */ hashingPolicies?: pulumi.Input[]>; /** * Maximum memory usage for this specific database */ memoryLimitInGb?: pulumi.Input; /** * A list of modules objects, documented below. **Modifying this attribute will force creation of a new resource.** */ modules?: pulumi.Input[]>; /** * A meaningful name to identify the database */ name?: pulumi.Input; /** * Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated */ password?: pulumi.Input; /** * Path that will be used to store database backup files. **Deprecated: Use `remoteBackup` block instead** * * @deprecated Use `remote_backup` block instead */ periodicBackupPath?: pulumi.Input; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ port?: pulumi.Input; /** * Private endpoint to access the database */ privateEndpoint?: pulumi.Input; /** * The protocol that will be used to access the database, (either ‘redis’ or ‘memcached’) Default: ‘redis’. **Modifying this attribute will force creation of a new resource.** */ protocol?: pulumi.Input; /** * Public endpoint to access the database */ publicEndpoint?: pulumi.Input; /** * Specifies the backup options for the database, documented below */ remoteBackup?: pulumi.Input; /** * Set of Redis database URIs, in the format `redis://user:password@host:port`, that this * database will be a replica of. If the URI provided is Redis Labs Cloud instance, only host and port should be provided. * Cannot be enabled when `supportOssClusterApi` is enabled. */ replicaOfs?: pulumi.Input[]>; /** * Databases replication. Default: ‘true’ */ replication?: pulumi.Input; /** * List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: [‘192.168.10.0/32’, ‘192.168.12.0/24’]) */ sourceIps?: pulumi.Input[]>; /** * The ID of the subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ subscriptionId?: pulumi.Input; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ supportOssClusterApi?: pulumi.Input; /** * Throughput measurement method, (either ‘number-of-shards’ or ‘operations-per-second’) */ throughputMeasurementBy?: pulumi.Input; /** * Throughput value (as applies to selected measurement method) */ throughputMeasurementValue?: pulumi.Input; } /** * The set of arguments for constructing a SubscriptionDatabase resource. */ export interface SubscriptionDatabaseArgs { /** * A block defining Redis database alert, documented below, can be specified multiple times */ alerts?: pulumi.Input[]>; /** * Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) * of the items stored in the database. Default: 1000 */ averageItemSizeInBytes?: pulumi.Input; /** * SSL certificate to authenticate user connections */ clientSslCertificate?: pulumi.Input; /** * The data items eviction policy (either: 'allkeys-lru', 'allkeys-lfu', 'allkeys-random', 'volatile-lru', 'volatile-lfu', 'volatile-random', 'volatile-ttl' or 'noeviction'). Default: 'volatile-lru' */ dataEviction?: pulumi.Input; /** * Rate of database's storage data persistence (either: 'none', 'aof-every-1-second', 'aof-every-write', 'snapshot-every-1-hour', 'snapshot-every-6-hours' or 'snapshot-every-12-hours'). Default: ‘none’ */ dataPersistence?: pulumi.Input; /** * Use TLS for authentication. Default: ‘false’ */ enableTls?: pulumi.Input; /** * Should use the external endpoint for open-source (OSS) Cluster API. * Can only be enabled if OSS Cluster API support is enabled. Default: 'false' */ externalEndpointForOssClusterApi?: pulumi.Input; /** * List of regular expression rules to shard the database by. See * [the documentation on clustering](https://docs.redislabs.com/latest/rc/concepts/clustering/) for more information on the * hashing policy. This cannot be set when `supportOssClusterApi` is set to true. */ hashingPolicies?: pulumi.Input[]>; /** * Maximum memory usage for this specific database */ memoryLimitInGb: pulumi.Input; /** * A list of modules objects, documented below. **Modifying this attribute will force creation of a new resource.** */ modules?: pulumi.Input[]>; /** * A meaningful name to identify the database */ name?: pulumi.Input; /** * Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated */ password?: pulumi.Input; /** * Path that will be used to store database backup files. **Deprecated: Use `remoteBackup` block instead** * * @deprecated Use `remote_backup` block instead */ periodicBackupPath?: pulumi.Input; /** * TCP port on which the database is available - must be between 10000 and 19999. **Modifying this attribute will force creation of a new resource.** */ port?: pulumi.Input; /** * The protocol that will be used to access the database, (either ‘redis’ or ‘memcached’) Default: ‘redis’. **Modifying this attribute will force creation of a new resource.** */ protocol?: pulumi.Input; /** * Specifies the backup options for the database, documented below */ remoteBackup?: pulumi.Input; /** * Set of Redis database URIs, in the format `redis://user:password@host:port`, that this * database will be a replica of. If the URI provided is Redis Labs Cloud instance, only host and port should be provided. * Cannot be enabled when `supportOssClusterApi` is enabled. */ replicaOfs?: pulumi.Input[]>; /** * Databases replication. Default: ‘true’ */ replication?: pulumi.Input; /** * List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges (example: [‘192.168.10.0/32’, ‘192.168.12.0/24’]) */ sourceIps?: pulumi.Input[]>; /** * The ID of the subscription to create the database in. **Modifying this attribute will force creation of a new resource.** */ subscriptionId: pulumi.Input; /** * Support Redis open-source (OSS) Cluster API. Default: ‘false’ */ supportOssClusterApi?: pulumi.Input; /** * Throughput measurement method, (either ‘number-of-shards’ or ‘operations-per-second’) */ throughputMeasurementBy: pulumi.Input; /** * Throughput value (as applies to selected measurement method) */ throughputMeasurementValue: pulumi.Input; }