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)

103 lines 6.01 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.Database = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource Type definition for AWS::Lightsail::Database */ class Database extends pulumi.CustomResource { /** * Get an existing Database 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 Database(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Database. 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'] === Database.__pulumiType; } /** * Create a Database 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 || args.masterDatabaseName === undefined) && !opts.urn) { throw new Error("Missing required property 'masterDatabaseName'"); } if ((!args || args.masterUsername === undefined) && !opts.urn) { throw new Error("Missing required property 'masterUsername'"); } if ((!args || args.relationalDatabaseBlueprintId === undefined) && !opts.urn) { throw new Error("Missing required property 'relationalDatabaseBlueprintId'"); } if ((!args || args.relationalDatabaseBundleId === undefined) && !opts.urn) { throw new Error("Missing required property 'relationalDatabaseBundleId'"); } if ((!args || args.relationalDatabaseName === undefined) && !opts.urn) { throw new Error("Missing required property 'relationalDatabaseName'"); } resourceInputs["availabilityZone"] = args ? args.availabilityZone : undefined; resourceInputs["backupRetention"] = args ? args.backupRetention : undefined; resourceInputs["caCertificateIdentifier"] = args ? args.caCertificateIdentifier : undefined; resourceInputs["masterDatabaseName"] = args ? args.masterDatabaseName : undefined; resourceInputs["masterUserPassword"] = args ? args.masterUserPassword : undefined; resourceInputs["masterUsername"] = args ? args.masterUsername : undefined; resourceInputs["preferredBackupWindow"] = args ? args.preferredBackupWindow : undefined; resourceInputs["preferredMaintenanceWindow"] = args ? args.preferredMaintenanceWindow : undefined; resourceInputs["publiclyAccessible"] = args ? args.publiclyAccessible : undefined; resourceInputs["relationalDatabaseBlueprintId"] = args ? args.relationalDatabaseBlueprintId : undefined; resourceInputs["relationalDatabaseBundleId"] = args ? args.relationalDatabaseBundleId : undefined; resourceInputs["relationalDatabaseName"] = args ? args.relationalDatabaseName : undefined; resourceInputs["relationalDatabaseParameters"] = args ? args.relationalDatabaseParameters : undefined; resourceInputs["rotateMasterUserPassword"] = args ? args.rotateMasterUserPassword : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["databaseArn"] = undefined /*out*/; } else { resourceInputs["availabilityZone"] = undefined /*out*/; resourceInputs["backupRetention"] = undefined /*out*/; resourceInputs["caCertificateIdentifier"] = undefined /*out*/; resourceInputs["databaseArn"] = undefined /*out*/; resourceInputs["masterDatabaseName"] = undefined /*out*/; resourceInputs["masterUserPassword"] = undefined /*out*/; resourceInputs["masterUsername"] = undefined /*out*/; resourceInputs["preferredBackupWindow"] = undefined /*out*/; resourceInputs["preferredMaintenanceWindow"] = undefined /*out*/; resourceInputs["publiclyAccessible"] = undefined /*out*/; resourceInputs["relationalDatabaseBlueprintId"] = undefined /*out*/; resourceInputs["relationalDatabaseBundleId"] = undefined /*out*/; resourceInputs["relationalDatabaseName"] = undefined /*out*/; resourceInputs["relationalDatabaseParameters"] = undefined /*out*/; resourceInputs["rotateMasterUserPassword"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["availabilityZone", "masterDatabaseName", "masterUsername", "relationalDatabaseBlueprintId", "relationalDatabaseBundleId", "relationalDatabaseName"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Database.__pulumiType, name, resourceInputs, opts); } } exports.Database = Database; /** @internal */ Database.__pulumiType = 'aws-native:lightsail:Database'; //# sourceMappingURL=database.js.map