@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
84 lines • 3.51 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.WorkingStorage = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an AWS Storage Gateway working storage.
*
* > **NOTE:** The Storage Gateway API provides no method to remove a working storage disk. Destroying this resource does not perform any Storage Gateway actions.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.storagegateway.WorkingStorage("example", {
* diskId: exampleAwsStoragegatewayLocalDisk.id,
* gatewayArn: exampleAwsStoragegatewayGateway.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_storagegateway_working_storage` using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (`:`). For example:
*
* ```sh
* $ pulumi import aws:storagegateway/workingStorage:WorkingStorage example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0
* ```
*/
class WorkingStorage extends pulumi.CustomResource {
/**
* Get an existing WorkingStorage 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 WorkingStorage(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of WorkingStorage. 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'] === WorkingStorage.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["diskId"] = state?.diskId;
resourceInputs["gatewayArn"] = state?.gatewayArn;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.diskId === undefined && !opts.urn) {
throw new Error("Missing required property 'diskId'");
}
if (args?.gatewayArn === undefined && !opts.urn) {
throw new Error("Missing required property 'gatewayArn'");
}
resourceInputs["diskId"] = args?.diskId;
resourceInputs["gatewayArn"] = args?.gatewayArn;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(WorkingStorage.__pulumiType, name, resourceInputs, opts);
}
}
exports.WorkingStorage = WorkingStorage;
/** @internal */
WorkingStorage.__pulumiType = 'aws:storagegateway/workingStorage:WorkingStorage';
//# sourceMappingURL=workingStorage.js.map