UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

105 lines 4.14 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.UploadBuffer = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS Storage Gateway upload buffer. * * > **NOTE:** The Storage Gateway API provides no method to remove an upload buffer disk. Destroying this resource does not perform any Storage Gateway actions. * * ## Example Usage * * ### Cached and VTL Gateway Type * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.storagegateway.getLocalDisk({ * diskNode: testAwsVolumeAttachment.deviceName, * gatewayArn: testAwsStoragegatewayGateway.arn, * }); * const testUploadBuffer = new aws.storagegateway.UploadBuffer("test", { * diskPath: test.then(test => test.diskPath), * gatewayArn: testAwsStoragegatewayGateway.arn, * }); * ``` * * ### Stored Gateway Type * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.storagegateway.getLocalDisk({ * diskNode: testAwsVolumeAttachment.deviceName, * gatewayArn: testAwsStoragegatewayGateway.arn, * }); * const example = new aws.storagegateway.UploadBuffer("example", { * diskId: exampleAwsStoragegatewayLocalDisk.id, * gatewayArn: exampleAwsStoragegatewayGateway.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_storagegateway_upload_buffer` using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (`:`). For example: * * ```sh * $ pulumi import aws:storagegateway/uploadBuffer:UploadBuffer example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0 * ``` */ class UploadBuffer extends pulumi.CustomResource { /** * Get an existing UploadBuffer 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 UploadBuffer(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of UploadBuffer. 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'] === UploadBuffer.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["diskId"] = state?.diskId; resourceInputs["diskPath"] = state?.diskPath; resourceInputs["gatewayArn"] = state?.gatewayArn; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.gatewayArn === undefined && !opts.urn) { throw new Error("Missing required property 'gatewayArn'"); } resourceInputs["diskId"] = args?.diskId; resourceInputs["diskPath"] = args?.diskPath; resourceInputs["gatewayArn"] = args?.gatewayArn; resourceInputs["region"] = args?.region; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(UploadBuffer.__pulumiType, name, resourceInputs, opts); } } exports.UploadBuffer = UploadBuffer; /** @internal */ UploadBuffer.__pulumiType = 'aws:storagegateway/uploadBuffer:UploadBuffer'; //# sourceMappingURL=uploadBuffer.js.map