@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
84 lines • 3.47 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.AvailabilityZoneGroup = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an EC2 Availability Zone Group, such as updating its opt-in status.
*
* > **NOTE:** This is an advanced resource. The provider will automatically assume management of the EC2 Availability Zone Group without import and perform no actions on removal from configuration.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ec2.AvailabilityZoneGroup("example", {
* groupName: "us-west-2-lax-1",
* optInStatus: "opted-in",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import EC2 Availability Zone Groups using the group name. For example:
*
* ```sh
* $ pulumi import aws:ec2/availabilityZoneGroup:AvailabilityZoneGroup example us-west-2-lax-1
* ```
*/
class AvailabilityZoneGroup extends pulumi.CustomResource {
/**
* Get an existing AvailabilityZoneGroup 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, id, state, opts) {
return new AvailabilityZoneGroup(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of AvailabilityZoneGroup. 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'] === AvailabilityZoneGroup.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["groupName"] = state?.groupName;
resourceInputs["optInStatus"] = state?.optInStatus;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.groupName === undefined && !opts.urn) {
throw new Error("Missing required property 'groupName'");
}
if (args?.optInStatus === undefined && !opts.urn) {
throw new Error("Missing required property 'optInStatus'");
}
resourceInputs["groupName"] = args?.groupName;
resourceInputs["optInStatus"] = args?.optInStatus;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(AvailabilityZoneGroup.__pulumiType, name, resourceInputs, opts);
}
}
exports.AvailabilityZoneGroup = AvailabilityZoneGroup;
/** @internal */
AvailabilityZoneGroup.__pulumiType = 'aws:ec2/availabilityZoneGroup:AvailabilityZoneGroup';
//# sourceMappingURL=availabilityZoneGroup.js.map