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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.relay.kotlin
import com.pulumi.azurenative.relay.kotlin.outputs.SystemDataResponse
import com.pulumi.azurenative.relay.kotlin.outputs.SystemDataResponse.Companion.toKotlin
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [HybridConnection].
*/
@PulumiTagMarker
public class HybridConnectionResourceBuilder internal constructor() {
public var name: String? = null
public var args: HybridConnectionArgs = HybridConnectionArgs()
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 HybridConnectionArgsBuilder.() -> Unit) {
val builder = HybridConnectionArgsBuilder()
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(): HybridConnection {
val builtJavaResource = com.pulumi.azurenative.relay.HybridConnection(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return HybridConnection(builtJavaResource)
}
}
/**
* Description of hybrid connection resource.
* Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2017-04-01.
* ## Example Usage
* ### RelayHybridConnectionCreate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var hybridConnection = new AzureNative.Relay.HybridConnection("hybridConnection", new()
* {
* HybridConnectionName = "example-Relay-Hybrid-01",
* NamespaceName = "example-RelayNamespace-01",
* RequiresClientAuthorization = true,
* ResourceGroupName = "resourcegroup",
* });
* });
* ```
* ```go
* package main
* import (
* relay "github.com/pulumi/pulumi-azure-native-sdk/relay/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := relay.NewHybridConnection(ctx, "hybridConnection", &relay.HybridConnectionArgs{
* HybridConnectionName: pulumi.String("example-Relay-Hybrid-01"),
* NamespaceName: pulumi.String("example-RelayNamespace-01"),
* RequiresClientAuthorization: pulumi.Bool(true),
* ResourceGroupName: pulumi.String("resourcegroup"),
* })
* 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.relay.HybridConnection;
* import com.pulumi.azurenative.relay.HybridConnectionArgs;
* 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 hybridConnection = new HybridConnection("hybridConnection", HybridConnectionArgs.builder()
* .hybridConnectionName("example-Relay-Hybrid-01")
* .namespaceName("example-RelayNamespace-01")
* .requiresClientAuthorization(true)
* .resourceGroupName("resourcegroup")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:relay:HybridConnection example-Relay-Hybrid-01 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}
* ```
*/
public class HybridConnection internal constructor(
override val javaResource: com.pulumi.azurenative.relay.HybridConnection,
) : KotlinCustomResource(javaResource, HybridConnectionMapper) {
/**
* The time the hybrid connection was created.
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* The number of listeners for this hybrid connection. Note that min : 1 and max:25 are supported.
*/
public val listenerCount: Output
get() = javaResource.listenerCount().applyValue({ args0 -> args0 })
/**
* The geo-location where the resource lives
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Returns true if client authorization is needed for this hybrid connection; otherwise, false.
*/
public val requiresClientAuthorization: Output?
get() = javaResource.requiresClientAuthorization().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The system meta data relating to this resource.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
/**
* The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* The time the namespace was updated.
*/
public val updatedAt: Output
get() = javaResource.updatedAt().applyValue({ args0 -> args0 })
/**
* The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
*/
public val userMetadata: Output?
get() = javaResource.userMetadata().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object HybridConnectionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.relay.HybridConnection::class == javaResource::class
override fun map(javaResource: Resource): HybridConnection = HybridConnection(
javaResource as
com.pulumi.azurenative.relay.HybridConnection,
)
}
/**
* @see [HybridConnection].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [HybridConnection].
*/
public suspend fun hybridConnection(
name: String,
block: suspend HybridConnectionResourceBuilder.() -> Unit,
): HybridConnection {
val builder = HybridConnectionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [HybridConnection].
* @param name The _unique_ name of the resulting resource.
*/
public fun hybridConnection(name: String): HybridConnection {
val builder = HybridConnectionResourceBuilder()
builder.name(name)
return builder.build()
}