@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 • 7.67 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, { ...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?.instanceProfileArn === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceProfileArn'");
}
if (args?.instanceType === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceType'");
}
if (args?.serviceRoleArn === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceRoleArn'");
}
resourceInputs["associatePublicIpAddress"] = args?.associatePublicIpAddress;
resourceInputs["backupId"] = args?.backupId;
resourceInputs["backupRetentionCount"] = args?.backupRetentionCount;
resourceInputs["customCertificate"] = args?.customCertificate;
resourceInputs["customDomain"] = args?.customDomain;
resourceInputs["customPrivateKey"] = args?.customPrivateKey;
resourceInputs["disableAutomatedBackup"] = args?.disableAutomatedBackup;
resourceInputs["engine"] = args?.engine;
resourceInputs["engineAttributes"] = args?.engineAttributes;
resourceInputs["engineModel"] = args?.engineModel;
resourceInputs["engineVersion"] = args?.engineVersion;
resourceInputs["instanceProfileArn"] = args?.instanceProfileArn;
resourceInputs["instanceType"] = args?.instanceType;
resourceInputs["keyPair"] = args?.keyPair;
resourceInputs["preferredBackupWindow"] = args?.preferredBackupWindow;
resourceInputs["preferredMaintenanceWindow"] = args?.preferredMaintenanceWindow;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["serverName"] = args?.serverName;
resourceInputs["serviceRoleArn"] = args?.serviceRoleArn;
resourceInputs["subnetIds"] = args?.subnetIds;
resourceInputs["tags"] = args?.tags;
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