UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

112 lines 4.69 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.MountServiceAttachment = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage vepfs mount service attachment * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const fooVpc = new volcengine.vpc.Vpc("fooVpc", { * vpcName: "acc-test-vpc", * cidrBlock: "172.16.0.0/16", * }); * const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", { * subnetName: "acc-test-subnet", * cidrBlock: "172.16.0.0/24", * zoneId: "cn-beijing-a", * vpcId: fooVpc.id, * }); * const fooFileSystem = new volcengine.vepfs.FileSystem("fooFileSystem", { * fileSystemName: "acc-test-file-system", * subnetId: fooSubnet.id, * storeType: "Advance_100", * description: "tf-test", * capacity: 12, * project: "default", * enableRestripe: false, * tags: [{ * key: "k1", * value: "v1", * }], * }); * const fooMountService = new volcengine.vepfs.MountService("fooMountService", { * mountServiceName: "acc-test-mount-service", * subnetId: fooSubnet.id, * nodeType: "ecs.g1ie.large", * project: "default", * }); * const fooMountServiceAttachment = new volcengine.vepfs.MountServiceAttachment("fooMountServiceAttachment", { * mountServiceId: fooMountService.id, * fileSystemId: fooFileSystem.id, * }); * ``` * * ## Import * * VepfsMountServiceAttachment can be imported using the mount_service_id:file_system_id, e.g. * * ```sh * $ pulumi import volcengine:vepfs/mountServiceAttachment:MountServiceAttachment default mount_service_id:file_system_id * ``` */ class MountServiceAttachment extends pulumi.CustomResource { /** * Get an existing MountServiceAttachment 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 MountServiceAttachment(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MountServiceAttachment. 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'] === MountServiceAttachment.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["attachStatus"] = state ? state.attachStatus : undefined; resourceInputs["customerPath"] = state ? state.customerPath : undefined; resourceInputs["fileSystemId"] = state ? state.fileSystemId : undefined; resourceInputs["mountServiceId"] = state ? state.mountServiceId : undefined; } else { const args = argsOrState; if ((!args || args.fileSystemId === undefined) && !opts.urn) { throw new Error("Missing required property 'fileSystemId'"); } if ((!args || args.mountServiceId === undefined) && !opts.urn) { throw new Error("Missing required property 'mountServiceId'"); } resourceInputs["customerPath"] = args ? args.customerPath : undefined; resourceInputs["fileSystemId"] = args ? args.fileSystemId : undefined; resourceInputs["mountServiceId"] = args ? args.mountServiceId : undefined; resourceInputs["attachStatus"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MountServiceAttachment.__pulumiType, name, resourceInputs, opts); } } exports.MountServiceAttachment = MountServiceAttachment; /** @internal */ MountServiceAttachment.__pulumiType = 'volcengine:vepfs/mountServiceAttachment:MountServiceAttachment'; //# sourceMappingURL=mountServiceAttachment.js.map