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.kusto.kotlin.PrivateEndpointConnection.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.kusto.kotlin
import com.pulumi.azurenative.kusto.kotlin.outputs.PrivateEndpointPropertyResponse
import com.pulumi.azurenative.kusto.kotlin.outputs.PrivateLinkServiceConnectionStatePropertyResponse
import com.pulumi.azurenative.kusto.kotlin.outputs.SystemDataResponse
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 com.pulumi.azurenative.kusto.kotlin.outputs.PrivateEndpointPropertyResponse.Companion.toKotlin as privateEndpointPropertyResponseToKotlin
import com.pulumi.azurenative.kusto.kotlin.outputs.PrivateLinkServiceConnectionStatePropertyResponse.Companion.toKotlin as privateLinkServiceConnectionStatePropertyResponseToKotlin
import com.pulumi.azurenative.kusto.kotlin.outputs.SystemDataResponse.Companion.toKotlin as systemDataResponseToKotlin
/**
* 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.kusto.PrivateEndpointConnection(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return PrivateEndpointConnection(builtJavaResource)
}
}
/**
* A private endpoint connection
* Azure REST API version: 2022-12-29. Prior API version in Azure Native 1.x: 2021-08-27.
* Other available API versions: 2023-05-02, 2023-08-15.
* ## Example Usage
* ### Approve or reject a private endpoint connection with a given name.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var privateEndpointConnection = new AzureNative.Kusto.PrivateEndpointConnection("privateEndpointConnection", new()
* {
* ClusterName = "kustoclusterrptest4",
* PrivateEndpointConnectionName = "privateEndpointTest",
* PrivateLinkServiceConnectionState = new AzureNative.Kusto.Inputs.PrivateLinkServiceConnectionStatePropertyArgs
* {
* Description = "Approved by [email protected] ",
* Status = "Approved",
* },
* ResourceGroupName = "kustorptest",
* });
* });
* ```
* ```go
* package main
* import (
* kusto "github.com/pulumi/pulumi-azure-native-sdk/kusto/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := kusto.NewPrivateEndpointConnection(ctx, "privateEndpointConnection", &kusto.PrivateEndpointConnectionArgs{
* ClusterName: pulumi.String("kustoclusterrptest4"),
* PrivateEndpointConnectionName: pulumi.String("privateEndpointTest"),
* PrivateLinkServiceConnectionState: &kusto.PrivateLinkServiceConnectionStatePropertyArgs{
* Description: pulumi.String("Approved by [email protected] "),
* Status: pulumi.String("Approved"),
* },
* ResourceGroupName: pulumi.String("kustorptest"),
* })
* 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.kusto.PrivateEndpointConnection;
* import com.pulumi.azurenative.kusto.PrivateEndpointConnectionArgs;
* import com.pulumi.azurenative.kusto.inputs.PrivateLinkServiceConnectionStatePropertyArgs;
* 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()
* .clusterName("kustoclusterrptest4")
* .privateEndpointConnectionName("privateEndpointTest")
* .privateLinkServiceConnectionState(PrivateLinkServiceConnectionStatePropertyArgs.builder()
* .description("Approved by [email protected] ")
* .status("Approved")
* .build())
* .resourceGroupName("kustorptest")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:kusto:PrivateEndpointConnection privateEndpointTest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}
* ```
*/
public class PrivateEndpointConnection internal constructor(
override val javaResource: com.pulumi.azurenative.kusto.PrivateEndpointConnection,
) : KotlinCustomResource(javaResource, PrivateEndpointConnectionMapper) {
/**
* Group id of the private endpoint.
*/
public val groupId: Output
get() = javaResource.groupId().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Private endpoint which the connection belongs to.
*/
public val privateEndpoint: Output
get() = javaResource.privateEndpoint().applyValue({ args0 ->
args0.let({ args0 ->
privateEndpointPropertyResponseToKotlin(args0)
})
})
/**
* Connection State of the Private Endpoint Connection.
*/
public val privateLinkServiceConnectionState:
Output
get() = javaResource.privateLinkServiceConnectionState().applyValue({ args0 ->
args0.let({ args0 -> privateLinkServiceConnectionStatePropertyResponseToKotlin(args0) })
})
/**
* Provisioning state of the private endpoint.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* Metadata pertaining to creation and last modification of the resource.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 ->
args0.let({ args0 ->
systemDataResponseToKotlin(args0)
})
})
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
}
public object PrivateEndpointConnectionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.kusto.PrivateEndpointConnection::class == javaResource::class
override fun map(javaResource: Resource): PrivateEndpointConnection =
PrivateEndpointConnection(
javaResource as
com.pulumi.azurenative.kusto.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()
}