UNPKG

@pulumi/gcp

Version:

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

122 lines 5.76 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.AuthorizedOrgsDesc = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * An authorized organizations description describes a list of organizations * (1) that have been authorized to use certain asset (for example, device) data * owned by different organizations at the enforcement points, or (2) with certain * asset (for example, device) have been authorized to access the resources in * another organization at the enforcement points. * * To get more information about AuthorizedOrgsDesc, see: * * * [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.authorizedOrgsDescs) * * How-to Guides * * [gcloud docs](https://cloud.google.com/beyondcorp-enterprise/docs/cross-org-authorization) * * > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource, * you must specify a `billingProject` and set `userProjectOverride` to true * in the provider configuration. Otherwise the ACM API will return a 403 error. * Your account must have the `serviceusage.services.use` permission on the * `billingProject` you defined. * * ## Example Usage * * ### Access Context Manager Authorized Orgs Desc Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const test_access = new gcp.accesscontextmanager.AccessPolicy("test-access", { * parent: "organizations/", * title: "my policy", * }); * const authorized_orgs_desc = new gcp.accesscontextmanager.AuthorizedOrgsDesc("authorized-orgs-desc", { * parent: pulumi.interpolate`accessPolicies/${test_access.name}`, * name: pulumi.interpolate`accessPolicies/${test_access.name}/authorizedOrgsDescs/fakeDescName`, * authorizationType: "AUTHORIZATION_TYPE_TRUST", * assetType: "ASSET_TYPE_CREDENTIAL_STRENGTH", * authorizationDirection: "AUTHORIZATION_DIRECTION_TO", * orgs: [ * "organizations/12345", * "organizations/98765", * ], * }); * ``` * * ## Import * * AuthorizedOrgsDesc can be imported using any of these accepted formats: * * * `{{name}}` * * When using the `pulumi import` command, AuthorizedOrgsDesc can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:accesscontextmanager/authorizedOrgsDesc:AuthorizedOrgsDesc default {{name}} * ``` */ class AuthorizedOrgsDesc extends pulumi.CustomResource { /** * Get an existing AuthorizedOrgsDesc 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 AuthorizedOrgsDesc(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AuthorizedOrgsDesc. 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'] === AuthorizedOrgsDesc.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["assetType"] = state ? state.assetType : undefined; resourceInputs["authorizationDirection"] = state ? state.authorizationDirection : undefined; resourceInputs["authorizationType"] = state ? state.authorizationType : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["orgs"] = state ? state.orgs : undefined; resourceInputs["parent"] = state ? state.parent : undefined; resourceInputs["updateTime"] = state ? state.updateTime : undefined; } else { const args = argsOrState; if ((!args || args.parent === undefined) && !opts.urn) { throw new Error("Missing required property 'parent'"); } resourceInputs["assetType"] = args ? args.assetType : undefined; resourceInputs["authorizationDirection"] = args ? args.authorizationDirection : undefined; resourceInputs["authorizationType"] = args ? args.authorizationType : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["orgs"] = args ? args.orgs : undefined; resourceInputs["parent"] = args ? args.parent : undefined; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AuthorizedOrgsDesc.__pulumiType, name, resourceInputs, opts); } } exports.AuthorizedOrgsDesc = AuthorizedOrgsDesc; /** @internal */ AuthorizedOrgsDesc.__pulumiType = 'gcp:accesscontextmanager/authorizedOrgsDesc:AuthorizedOrgsDesc'; //# sourceMappingURL=authorizedOrgsDesc.js.map