UNPKG

@pulumi/gcp

Version:

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

118 lines 5.46 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.AzureClient = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * AzureClient resources hold client authentication information needed by the Anthos Multi-Cloud API to manage Azure resources on your Azure subscription.When an AzureCluster is created, an AzureClient resource needs to be provided and all operations on Azure resources associated to that cluster will authenticate to Azure services using the given client.AzureClient resources are immutable and cannot be modified upon creation.Each AzureClient resource is bound to a single Azure Active Directory Application and tenant. * * For more information, see: * * [Multicloud overview](https://cloud.google.com/kubernetes-engine/multi-cloud/docs) * ## Example Usage * * ### Basic_azure_client * A basic example of a containerazure azure client * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const primary = new gcp.container.AzureClient("primary", { * applicationId: "12345678-1234-1234-1234-123456789111", * location: "us-west1", * name: "client-name", * tenantId: "12345678-1234-1234-1234-123456789111", * project: "my-project-name", * }); * ``` * * ## Import * * Client can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/azureClients/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, Client can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:container/azureClient:AzureClient default projects/{{project}}/locations/{{location}}/azureClients/{{name}} * ``` * * ```sh * $ pulumi import gcp:container/azureClient:AzureClient default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:container/azureClient:AzureClient default {{location}}/{{name}} * ``` */ class AzureClient extends pulumi.CustomResource { /** * Get an existing AzureClient 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 AzureClient(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AzureClient. 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'] === AzureClient.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationId"] = state ? state.applicationId : undefined; resourceInputs["certificate"] = state ? state.certificate : undefined; resourceInputs["createTime"] = state ? state.createTime : undefined; resourceInputs["location"] = state ? state.location : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["tenantId"] = state ? state.tenantId : undefined; resourceInputs["uid"] = state ? state.uid : undefined; } else { const args = argsOrState; if ((!args || args.applicationId === undefined) && !opts.urn) { throw new Error("Missing required property 'applicationId'"); } if ((!args || args.location === undefined) && !opts.urn) { throw new Error("Missing required property 'location'"); } if ((!args || args.tenantId === undefined) && !opts.urn) { throw new Error("Missing required property 'tenantId'"); } resourceInputs["applicationId"] = args ? args.applicationId : undefined; resourceInputs["location"] = args ? args.location : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["tenantId"] = args ? args.tenantId : undefined; resourceInputs["certificate"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["uid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AzureClient.__pulumiType, name, resourceInputs, opts); } } exports.AzureClient = AzureClient; /** @internal */ AzureClient.__pulumiType = 'gcp:container/azureClient:AzureClient'; //# sourceMappingURL=azureClient.js.map