com.pulumi.gcp.container.kotlin.AzureClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.container.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AzureClient].
*/
@PulumiTagMarker
public class AzureClientResourceBuilder internal constructor() {
public var name: String? = null
public var args: AzureClientArgs = AzureClientArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AzureClientArgsBuilder.() -> Unit) {
val builder = AzureClientArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AzureClient {
val builtJavaResource = com.pulumi.gcp.container.AzureClient(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AzureClient(builtJavaResource)
}
}
/**
* 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/anthos/clusters/docs/multi-cloud)
* ## 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",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* primary = gcp.container.AzureClient("primary",
* application_id="12345678-1234-1234-1234-123456789111",
* location="us-west1",
* name="client-name",
* tenant_id="12345678-1234-1234-1234-123456789111",
* project="my-project-name")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var primary = new Gcp.Container.AzureClient("primary", new()
* {
* ApplicationId = "12345678-1234-1234-1234-123456789111",
* Location = "us-west1",
* Name = "client-name",
* TenantId = "12345678-1234-1234-1234-123456789111",
* Project = "my-project-name",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := container.NewAzureClient(ctx, "primary", &container.AzureClientArgs{
* ApplicationId: pulumi.String("12345678-1234-1234-1234-123456789111"),
* Location: pulumi.String("us-west1"),
* Name: pulumi.String("client-name"),
* TenantId: pulumi.String("12345678-1234-1234-1234-123456789111"),
* Project: pulumi.String("my-project-name"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.gcp.container.AzureClient;
* import com.pulumi.gcp.container.AzureClientArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var primary = new AzureClient("primary", AzureClientArgs.builder()
* .applicationId("12345678-1234-1234-1234-123456789111")
* .location("us-west1")
* .name("client-name")
* .tenantId("12345678-1234-1234-1234-123456789111")
* .project("my-project-name")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* primary:
* type: gcp:container:AzureClient
* properties:
* 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}}
* ```
*/
public class AzureClient internal constructor(
override val javaResource: com.pulumi.gcp.container.AzureClient,
) : KotlinCustomResource(javaResource, AzureClientMapper) {
/**
* The Azure Active Directory Application ID.
*/
public val applicationId: Output
get() = javaResource.applicationId().applyValue({ args0 -> args0 })
/**
* Output only. The PEM encoded x509 certificate.
*/
public val certificate: Output
get() = javaResource.certificate().applyValue({ args0 -> args0 })
/**
* Output only. The time at which this resource was created.
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* The location for the resource
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of this resource.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The project for the resource
*/
public val project: Output
get() = javaResource.project().applyValue({ args0 -> args0 })
/**
* The Azure Active Directory Tenant ID.
* - - -
*/
public val tenantId: Output
get() = javaResource.tenantId().applyValue({ args0 -> args0 })
/**
* Output only. A globally unique identifier for the client.
*/
public val uid: Output
get() = javaResource.uid().applyValue({ args0 -> args0 })
}
public object AzureClientMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.gcp.container.AzureClient::class == javaResource::class
override fun map(javaResource: Resource): AzureClient = AzureClient(
javaResource as
com.pulumi.gcp.container.AzureClient,
)
}
/**
* @see [AzureClient].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AzureClient].
*/
public suspend fun azureClient(name: String, block: suspend AzureClientResourceBuilder.() -> Unit): AzureClient {
val builder = AzureClientResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AzureClient].
* @param name The _unique_ name of the resulting resource.
*/
public fun azureClient(name: String): AzureClient {
val builder = AzureClientResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy