UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

106 lines 5.17 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.RegionBackendServiceIamBinding = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Import * * For all import syntaxes, the "resource in question" can take any of the following forms: * * * projects/{{project}}/regions/{{region}}/backendServices/{{name}} * * * {{project}}/{{region}}/{{name}} * * * {{region}}/{{name}} * * * {{name}} * * Any variables not passed in the import command will be taken from the provider configuration. * * Compute Engine regionbackendservice IAM resources can be imported using the resource identifiers, role, and member. * * IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g. * * ```sh * $ pulumi import gcp:compute/regionBackendServiceIamBinding:RegionBackendServiceIamBinding editor "projects/{{project}}/regions/{{region}}/backendServices/{{region_backend_service}} roles/compute.admin user:jane@example.com" * ``` * * IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g. * * ```sh * $ pulumi import gcp:compute/regionBackendServiceIamBinding:RegionBackendServiceIamBinding editor "projects/{{project}}/regions/{{region}}/backendServices/{{region_backend_service}} roles/compute.admin" * ``` * * IAM policy imports use the identifier of the resource in question, e.g. * * ```sh * $ pulumi import gcp:compute/regionBackendServiceIamBinding:RegionBackendServiceIamBinding editor projects/{{project}}/regions/{{region}}/backendServices/{{region_backend_service}} * ``` * * -> **Custom Roles** If you're importing a IAM resource with a custom role, make sure to use the * * full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`. */ class RegionBackendServiceIamBinding extends pulumi.CustomResource { /** * Get an existing RegionBackendServiceIamBinding 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 RegionBackendServiceIamBinding(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of RegionBackendServiceIamBinding. 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'] === RegionBackendServiceIamBinding.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["condition"] = state ? state.condition : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["members"] = state ? state.members : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["role"] = state ? state.role : undefined; } else { const args = argsOrState; if ((!args || args.members === undefined) && !opts.urn) { throw new Error("Missing required property 'members'"); } if ((!args || args.role === undefined) && !opts.urn) { throw new Error("Missing required property 'role'"); } resourceInputs["condition"] = args ? args.condition : undefined; resourceInputs["members"] = args ? args.members : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["role"] = args ? args.role : undefined; resourceInputs["etag"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(RegionBackendServiceIamBinding.__pulumiType, name, resourceInputs, opts); } } exports.RegionBackendServiceIamBinding = RegionBackendServiceIamBinding; /** @internal */ RegionBackendServiceIamBinding.__pulumiType = 'gcp:compute/regionBackendServiceIamBinding:RegionBackendServiceIamBinding'; //# sourceMappingURL=regionBackendServiceIamBinding.js.map