All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.keyvault.kotlin.PrivateEndpointConnection.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.keyvault.kotlin
import com.pulumi.azurenative.keyvault.kotlin.outputs.PrivateEndpointResponse
import com.pulumi.azurenative.keyvault.kotlin.outputs.PrivateLinkServiceConnectionStateResponse
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
import kotlin.collections.Map
import com.pulumi.azurenative.keyvault.kotlin.outputs.PrivateEndpointResponse.Companion.toKotlin as privateEndpointResponseToKotlin
import com.pulumi.azurenative.keyvault.kotlin.outputs.PrivateLinkServiceConnectionStateResponse.Companion.toKotlin as privateLinkServiceConnectionStateResponseToKotlin
/**
* Builder for [PrivateEndpointConnection].
*/
@PulumiTagMarker
public class PrivateEndpointConnectionResourceBuilder internal constructor() {
public var name: String? = null
public var args: PrivateEndpointConnectionArgs = PrivateEndpointConnectionArgs()
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 PrivateEndpointConnectionArgsBuilder.() -> Unit) {
val builder = PrivateEndpointConnectionArgsBuilder()
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(): PrivateEndpointConnection {
val builtJavaResource =
com.pulumi.azurenative.keyvault.PrivateEndpointConnection(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PrivateEndpointConnection(builtJavaResource)
}
}
/**
* Private endpoint connection resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2019-09-01.
* Other available API versions: 2023-07-01, 2024-04-01-preview.
* ## Example Usage
* ### KeyVaultPutPrivateEndpointConnection
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var privateEndpointConnection = new AzureNative.KeyVault.PrivateEndpointConnection("privateEndpointConnection", new()
* {
* PrivateEndpointConnectionName = "sample-pec",
* PrivateLinkServiceConnectionState = new AzureNative.KeyVault.Inputs.PrivateLinkServiceConnectionStateArgs
* {
* Description = "My name is Joe and I'm approving this.",
* Status = AzureNative.KeyVault.PrivateEndpointServiceConnectionStatus.Approved,
* },
* ResourceGroupName = "sample-group",
* VaultName = "sample-vault",
* });
* });
* ```
* ```go
* package main
* import (
* keyvault "github.com/pulumi/pulumi-azure-native-sdk/keyvault/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := keyvault.NewPrivateEndpointConnection(ctx, "privateEndpointConnection", &keyvault.PrivateEndpointConnectionArgs{
* PrivateEndpointConnectionName: pulumi.String("sample-pec"),
* PrivateLinkServiceConnectionState: &keyvault.PrivateLinkServiceConnectionStateArgs{
* Description: pulumi.String("My name is Joe and I'm approving this."),
* Status: pulumi.String(keyvault.PrivateEndpointServiceConnectionStatusApproved),
* },
* ResourceGroupName: pulumi.String("sample-group"),
* VaultName: pulumi.String("sample-vault"),
* })
* 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.azurenative.keyvault.PrivateEndpointConnection;
* import com.pulumi.azurenative.keyvault.PrivateEndpointConnectionArgs;
* import com.pulumi.azurenative.keyvault.inputs.PrivateLinkServiceConnectionStateArgs;
* 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 privateEndpointConnection = new PrivateEndpointConnection("privateEndpointConnection", PrivateEndpointConnectionArgs.builder()
* .privateEndpointConnectionName("sample-pec")
* .privateLinkServiceConnectionState(PrivateLinkServiceConnectionStateArgs.builder()
* .description("My name is Joe and I'm approving this.")
* .status("Approved")
* .build())
* .resourceGroupName("sample-group")
* .vaultName("sample-vault")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:keyvault:PrivateEndpointConnection sample-pec /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}
* ```
*/
public class PrivateEndpointConnection internal constructor(
override val javaResource: com.pulumi.azurenative.keyvault.PrivateEndpointConnection,
) : KotlinCustomResource(javaResource, PrivateEndpointConnectionMapper) {
/**
* Modified whenever there is a change in the state of private endpoint connection.
*/
public val etag: Output?
get() = javaResource.etag().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Azure location of the key vault resource.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Name of the key vault resource.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Properties of the private endpoint object.
*/
public val privateEndpoint: Output?
get() = javaResource.privateEndpoint().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> privateEndpointResponseToKotlin(args0) })
}).orElse(null)
})
/**
* Approval state of the private link connection.
*/
public val privateLinkServiceConnectionState: Output?
get() = javaResource.privateLinkServiceConnectionState().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
privateLinkServiceConnectionStateResponseToKotlin(args0)
})
}).orElse(null)
})
/**
* Provisioning state of the private endpoint connection.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* Tags assigned to the key vault resource.
*/
public val tags: Output>
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
})
/**
* Resource type of the key vault resource.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object PrivateEndpointConnectionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.keyvault.PrivateEndpointConnection::class == javaResource::class
override fun map(javaResource: Resource): PrivateEndpointConnection =
PrivateEndpointConnection(
javaResource as
com.pulumi.azurenative.keyvault.PrivateEndpointConnection,
)
}
/**
* @see [PrivateEndpointConnection].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [PrivateEndpointConnection].
*/
public suspend fun privateEndpointConnection(
name: String,
block: suspend PrivateEndpointConnectionResourceBuilder.() -> Unit,
): PrivateEndpointConnection {
val builder = PrivateEndpointConnectionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [PrivateEndpointConnection].
* @param name The _unique_ name of the resulting resource.
*/
public fun privateEndpointConnection(name: String): PrivateEndpointConnection {
val builder = PrivateEndpointConnectionResourceBuilder()
builder.name(name)
return builder.build()
}