@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)
162 lines • 8.11 kB
JavaScript
;
// *** 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.Server = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource Type definition for AWS::OpsWorksCM::Server
*
* ## Example Usage
* ### Example
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws_native from "@pulumi/aws-native";
*
* const config = new pulumi.Config();
* const pivotalKey = config.require("pivotalKey");
* const password = config.require("password");
* const myChefServer = new aws_native.opsworkscm.Server("myChefServer", {
* backupRetentionCount: 12,
* customCertificate: "-----BEGIN CERTIFICATE----- EXAMPLEqEXAMPLE== -----END CERTIFICATE-----",
* customDomain: "https://aws.my-company.com",
* customPrivateKey: "-----BEGIN RSA PRIVATE KEY----- EXAMPLEqEXAMPLE= -----END RSA PRIVATE KEY-----",
* disableAutomatedBackup: false,
* engine: "ChefAutomate",
* engineVersion: "2",
* engineAttributes: [
* {
* name: "CHEF_AUTOMATE_PIVOTAL_KEY",
* value: pivotalKey,
* },
* {
* name: "CHEF_AUTOMATE_ADMIN_PASSWORD",
* value: password,
* },
* ],
* engineModel: "Single",
* instanceProfileArn: "INSTANCE-PROFILE-ARN",
* instanceType: "r5.xlarge",
* preferredBackupWindow: "08:00",
* preferredMaintenanceWindow: "Fri:08:00",
* serviceRoleArn: "SERVICE-ROLE-ARN",
* tags: [
* {
* key: "Stage",
* value: "Production",
* },
* {
* key: "Name",
* value: "test-owcm-server",
* },
* ],
* });
* export const endpoint = myChefServer.endpoint;
*
* ```
*/
class Server extends pulumi.CustomResource {
/**
* Get an existing Server 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 Server(name, undefined, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Server. 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'] === Server.__pulumiType;
}
/**
* Create a Server 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.instanceProfileArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceProfileArn'");
}
if ((!args || args.instanceType === undefined) && !opts.urn) {
throw new Error("Missing required property 'instanceType'");
}
if ((!args || args.serviceRoleArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'serviceRoleArn'");
}
resourceInputs["associatePublicIpAddress"] = args ? args.associatePublicIpAddress : undefined;
resourceInputs["backupId"] = args ? args.backupId : undefined;
resourceInputs["backupRetentionCount"] = args ? args.backupRetentionCount : undefined;
resourceInputs["customCertificate"] = args ? args.customCertificate : undefined;
resourceInputs["customDomain"] = args ? args.customDomain : undefined;
resourceInputs["customPrivateKey"] = args ? args.customPrivateKey : undefined;
resourceInputs["disableAutomatedBackup"] = args ? args.disableAutomatedBackup : undefined;
resourceInputs["engine"] = args ? args.engine : undefined;
resourceInputs["engineAttributes"] = args ? args.engineAttributes : undefined;
resourceInputs["engineModel"] = args ? args.engineModel : undefined;
resourceInputs["engineVersion"] = args ? args.engineVersion : undefined;
resourceInputs["instanceProfileArn"] = args ? args.instanceProfileArn : undefined;
resourceInputs["instanceType"] = args ? args.instanceType : undefined;
resourceInputs["keyPair"] = args ? args.keyPair : undefined;
resourceInputs["preferredBackupWindow"] = args ? args.preferredBackupWindow : undefined;
resourceInputs["preferredMaintenanceWindow"] = args ? args.preferredMaintenanceWindow : undefined;
resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined;
resourceInputs["serverName"] = args ? args.serverName : undefined;
resourceInputs["serviceRoleArn"] = args ? args.serviceRoleArn : undefined;
resourceInputs["subnetIds"] = args ? args.subnetIds : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["awsId"] = undefined /*out*/;
resourceInputs["endpoint"] = undefined /*out*/;
}
else {
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["associatePublicIpAddress"] = undefined /*out*/;
resourceInputs["awsId"] = undefined /*out*/;
resourceInputs["backupId"] = undefined /*out*/;
resourceInputs["backupRetentionCount"] = undefined /*out*/;
resourceInputs["customCertificate"] = undefined /*out*/;
resourceInputs["customDomain"] = undefined /*out*/;
resourceInputs["customPrivateKey"] = undefined /*out*/;
resourceInputs["disableAutomatedBackup"] = undefined /*out*/;
resourceInputs["endpoint"] = undefined /*out*/;
resourceInputs["engine"] = undefined /*out*/;
resourceInputs["engineAttributes"] = undefined /*out*/;
resourceInputs["engineModel"] = undefined /*out*/;
resourceInputs["engineVersion"] = undefined /*out*/;
resourceInputs["instanceProfileArn"] = undefined /*out*/;
resourceInputs["instanceType"] = undefined /*out*/;
resourceInputs["keyPair"] = undefined /*out*/;
resourceInputs["preferredBackupWindow"] = undefined /*out*/;
resourceInputs["preferredMaintenanceWindow"] = undefined /*out*/;
resourceInputs["securityGroupIds"] = undefined /*out*/;
resourceInputs["serverName"] = undefined /*out*/;
resourceInputs["serviceRoleArn"] = undefined /*out*/;
resourceInputs["subnetIds"] = undefined /*out*/;
resourceInputs["tags"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const replaceOnChanges = { replaceOnChanges: ["associatePublicIpAddress", "backupId", "customCertificate", "customDomain", "customPrivateKey", "engine", "engineModel", "engineVersion", "instanceProfileArn", "instanceType", "keyPair", "securityGroupIds[*]", "serverName", "serviceRoleArn", "subnetIds[*]"] };
opts = pulumi.mergeOptions(opts, replaceOnChanges);
super(Server.__pulumiType, name, resourceInputs, opts);
}
}
exports.Server = Server;
/** @internal */
Server.__pulumiType = 'aws-native:opsworkscm:Server';
//# sourceMappingURL=server.js.map