@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
117 lines • 4.32 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.TransferAgentPool = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Represents an On-Premises Agent pool.
*
* To get more information about AgentPool, see:
*
* * [API documentation](https://cloud.google.com/storage-transfer/docs/reference/rest/v1/projects.agentPools)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/storage-transfer/docs/on-prem-agent-pools)
*
* ## Example Usage
*
* ### Agent Pool Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = gcp.storage.getTransferProjectServiceAccount({
* project: "my-project-name",
* });
* const pubsubEditorRole = new gcp.projects.IAMMember("pubsub_editor_role", {
* project: "my-project-name",
* role: "roles/pubsub.editor",
* member: _default.then(_default => `serviceAccount:${_default.email}`),
* });
* const example = new gcp.storage.TransferAgentPool("example", {
* name: "agent-pool-example",
* displayName: "Source A to destination Z",
* bandwidthLimit: {
* limitMbps: "120",
* },
* }, {
* dependsOn: [pubsubEditorRole],
* });
* ```
*
* ## Import
*
* AgentPool can be imported using any of these accepted formats:
*
* * `projects/{{project}}/agentPools/{{name}}`
*
* * `{{project}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, AgentPool can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default projects/{{project}}/agentPools/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{project}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:storage/transferAgentPool:TransferAgentPool default {{name}}
* ```
*/
class TransferAgentPool extends pulumi.CustomResource {
/**
* Get an existing TransferAgentPool 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 TransferAgentPool(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of TransferAgentPool. 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'] === TransferAgentPool.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["bandwidthLimit"] = state?.bandwidthLimit;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["state"] = state?.state;
}
else {
const args = argsOrState;
resourceInputs["bandwidthLimit"] = args?.bandwidthLimit;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["name"] = args?.name;
resourceInputs["project"] = args?.project;
resourceInputs["state"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TransferAgentPool.__pulumiType, name, resourceInputs, opts);
}
}
exports.TransferAgentPool = TransferAgentPool;
/** @internal */
TransferAgentPool.__pulumiType = 'gcp:storage/transferAgentPool:TransferAgentPool';
//# sourceMappingURL=transferAgentPool.js.map
;