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.customproviders.kotlin.CustomResourceProviderArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.customproviders.kotlin
import com.pulumi.azurenative.customproviders.CustomResourceProviderArgs.builder
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPActionRouteDefinitionArgs
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPActionRouteDefinitionArgsBuilder
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPResourceTypeRouteDefinitionArgs
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPResourceTypeRouteDefinitionArgsBuilder
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPValidationsArgs
import com.pulumi.azurenative.customproviders.kotlin.inputs.CustomRPValidationsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A manifest file that defines the custom resource provider resources.
* Azure REST API version: 2018-09-01-preview. Prior API version in Azure Native 1.x: 2018-09-01-preview.
* ## Example Usage
* ### Create or update the custom resource provider
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var customResourceProvider = new AzureNative.CustomProviders.CustomResourceProvider("customResourceProvider", new()
* {
* Actions = new[]
* {
* new AzureNative.CustomProviders.Inputs.CustomRPActionRouteDefinitionArgs
* {
* Endpoint = "https://mytestendpoint/",
* Name = "TestAction",
* RoutingType = AzureNative.CustomProviders.ActionRouting.Proxy,
* },
* },
* Location = "eastus",
* ResourceGroupName = "testRG",
* ResourceProviderName = "newrp",
* ResourceTypes = new[]
* {
* new AzureNative.CustomProviders.Inputs.CustomRPResourceTypeRouteDefinitionArgs
* {
* Endpoint = "https://mytestendpoint2/",
* Name = "TestResource",
* RoutingType = AzureNative.CustomProviders.ResourceTypeRouting.Proxy_Cache,
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* customproviders "github.com/pulumi/pulumi-azure-native-sdk/customproviders/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := customproviders.NewCustomResourceProvider(ctx, "customResourceProvider", &customproviders.CustomResourceProviderArgs{
* Actions: customproviders.CustomRPActionRouteDefinitionArray{
* &customproviders.CustomRPActionRouteDefinitionArgs{
* Endpoint: pulumi.String("https://mytestendpoint/"),
* Name: pulumi.String("TestAction"),
* RoutingType: pulumi.String(customproviders.ActionRoutingProxy),
* },
* },
* Location: pulumi.String("eastus"),
* ResourceGroupName: pulumi.String("testRG"),
* ResourceProviderName: pulumi.String("newrp"),
* ResourceTypes: customproviders.CustomRPResourceTypeRouteDefinitionArray{
* &customproviders.CustomRPResourceTypeRouteDefinitionArgs{
* Endpoint: pulumi.String("https://mytestendpoint2/"),
* Name: pulumi.String("TestResource"),
* RoutingType: pulumi.String(customproviders.ResourceTypeRouting_Proxy_Cache),
* },
* },
* })
* 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.customproviders.CustomResourceProvider;
* import com.pulumi.azurenative.customproviders.CustomResourceProviderArgs;
* import com.pulumi.azurenative.customproviders.inputs.CustomRPActionRouteDefinitionArgs;
* import com.pulumi.azurenative.customproviders.inputs.CustomRPResourceTypeRouteDefinitionArgs;
* 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 customResourceProvider = new CustomResourceProvider("customResourceProvider", CustomResourceProviderArgs.builder()
* .actions(CustomRPActionRouteDefinitionArgs.builder()
* .endpoint("https://mytestendpoint/")
* .name("TestAction")
* .routingType("Proxy")
* .build())
* .location("eastus")
* .resourceGroupName("testRG")
* .resourceProviderName("newrp")
* .resourceTypes(CustomRPResourceTypeRouteDefinitionArgs.builder()
* .endpoint("https://mytestendpoint2/")
* .name("TestResource")
* .routingType("Proxy,Cache")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:customproviders:CustomResourceProvider newrp /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders/resourceProviders/{resourceProviderName}
* ```
* @property actions A list of actions that the custom resource provider implements.
* @property location Resource location
* @property resourceGroupName The name of the resource group.
* @property resourceProviderName The name of the resource provider.
* @property resourceTypes A list of resource types that the custom resource provider implements.
* @property tags Resource tags
* @property validations A list of validations to run on the custom resource provider's requests.
*/
public data class CustomResourceProviderArgs(
public val actions: Output>? = null,
public val location: Output? = null,
public val resourceGroupName: Output? = null,
public val resourceProviderName: Output? = null,
public val resourceTypes: Output>? = null,
public val tags: Output>? = null,
public val validations: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.customproviders.CustomResourceProviderArgs =
com.pulumi.azurenative.customproviders.CustomResourceProviderArgs.builder()
.actions(
actions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.resourceProviderName(resourceProviderName?.applyValue({ args0 -> args0 }))
.resourceTypes(
resourceTypes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.validations(
validations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [CustomResourceProviderArgs].
*/
@PulumiTagMarker
public class CustomResourceProviderArgsBuilder internal constructor() {
private var actions: Output>? = null
private var location: Output? = null
private var resourceGroupName: Output? = null
private var resourceProviderName: Output? = null
private var resourceTypes: Output>? = null
private var tags: Output>? = null
private var validations: Output>? = null
/**
* @param value A list of actions that the custom resource provider implements.
*/
@JvmName("yicbcqtuwlwesccl")
public suspend fun actions(`value`: Output>) {
this.actions = value
}
@JvmName("opeyfusejmdtxkhk")
public suspend fun actions(vararg values: Output) {
this.actions = Output.all(values.asList())
}
/**
* @param values A list of actions that the custom resource provider implements.
*/
@JvmName("qlqrfdkcfrnpedss")
public suspend fun actions(values: List>) {
this.actions = Output.all(values)
}
/**
* @param value Resource location
*/
@JvmName("sbvqbqhdphtjdfkj")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("ktrsxiuqhcmslnqq")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the resource provider.
*/
@JvmName("aoywhywvpwqwtwij")
public suspend fun resourceProviderName(`value`: Output) {
this.resourceProviderName = value
}
/**
* @param value A list of resource types that the custom resource provider implements.
*/
@JvmName("omaeuoyxhhqypykq")
public suspend fun resourceTypes(`value`: Output>) {
this.resourceTypes = value
}
@JvmName("cwibgbimfoluogqg")
public suspend fun resourceTypes(vararg values: Output) {
this.resourceTypes = Output.all(values.asList())
}
/**
* @param values A list of resource types that the custom resource provider implements.
*/
@JvmName("kjyajoileaiudulp")
public suspend fun resourceTypes(values: List>) {
this.resourceTypes = Output.all(values)
}
/**
* @param value Resource tags
*/
@JvmName("qqqegljaaynauxps")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value A list of validations to run on the custom resource provider's requests.
*/
@JvmName("vhdtwqvehpjnbvas")
public suspend fun validations(`value`: Output>) {
this.validations = value
}
@JvmName("scskijkosxtejsxp")
public suspend fun validations(vararg values: Output) {
this.validations = Output.all(values.asList())
}
/**
* @param values A list of validations to run on the custom resource provider's requests.
*/
@JvmName("narcwunbbjmijknv")
public suspend fun validations(values: List>) {
this.validations = Output.all(values)
}
/**
* @param value A list of actions that the custom resource provider implements.
*/
@JvmName("eqxwnyywphwycwek")
public suspend fun actions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.actions = mapped
}
/**
* @param argument A list of actions that the custom resource provider implements.
*/
@JvmName("kinceccokrfvmnvx")
public suspend fun actions(argument: List Unit>) {
val toBeMapped = argument.toList().map {
CustomRPActionRouteDefinitionArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.actions = mapped
}
/**
* @param argument A list of actions that the custom resource provider implements.
*/
@JvmName("npdqqcaffacbmeic")
public suspend fun actions(vararg argument: suspend CustomRPActionRouteDefinitionArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
CustomRPActionRouteDefinitionArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.actions = mapped
}
/**
* @param argument A list of actions that the custom resource provider implements.
*/
@JvmName("aipafbrnkrlbipoc")
public suspend fun actions(argument: suspend CustomRPActionRouteDefinitionArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
CustomRPActionRouteDefinitionArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.actions = mapped
}
/**
* @param values A list of actions that the custom resource provider implements.
*/
@JvmName("pstoaljiphaarvpb")
public suspend fun actions(vararg values: CustomRPActionRouteDefinitionArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.actions = mapped
}
/**
* @param value Resource location
*/
@JvmName("wajtqsgtgroswpbr")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("ovfgdaonfdjxheqf")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the resource provider.
*/
@JvmName("wffwftpjsumylroh")
public suspend fun resourceProviderName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceProviderName = mapped
}
/**
* @param value A list of resource types that the custom resource provider implements.
*/
@JvmName("mekwclssklxadkpm")
public suspend fun resourceTypes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceTypes = mapped
}
/**
* @param argument A list of resource types that the custom resource provider implements.
*/
@JvmName("kdyowtntvnygikhq")
public suspend fun resourceTypes(argument: List Unit>) {
val toBeMapped = argument.toList().map {
CustomRPResourceTypeRouteDefinitionArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.resourceTypes = mapped
}
/**
* @param argument A list of resource types that the custom resource provider implements.
*/
@JvmName("vkjajvnghnhyqtrj")
public suspend fun resourceTypes(vararg argument: suspend CustomRPResourceTypeRouteDefinitionArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
CustomRPResourceTypeRouteDefinitionArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.resourceTypes = mapped
}
/**
* @param argument A list of resource types that the custom resource provider implements.
*/
@JvmName("yqmgxxmpuupvqpgg")
public suspend fun resourceTypes(argument: suspend CustomRPResourceTypeRouteDefinitionArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
CustomRPResourceTypeRouteDefinitionArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.resourceTypes = mapped
}
/**
* @param values A list of resource types that the custom resource provider implements.
*/
@JvmName("isqqsevvgfffyere")
public suspend fun resourceTypes(vararg values: CustomRPResourceTypeRouteDefinitionArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceTypes = mapped
}
/**
* @param value Resource tags
*/
@JvmName("dhrytaoagcftcohq")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags
*/
@JvmName("kslpqcnkjsguwegv")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value A list of validations to run on the custom resource provider's requests.
*/
@JvmName("nwbpewqjsqcxwoit")
public suspend fun validations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.validations = mapped
}
/**
* @param argument A list of validations to run on the custom resource provider's requests.
*/
@JvmName("uqiylxjekbjytnnp")
public suspend fun validations(argument: List Unit>) {
val toBeMapped = argument.toList().map {
CustomRPValidationsArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.validations = mapped
}
/**
* @param argument A list of validations to run on the custom resource provider's requests.
*/
@JvmName("eoqitadkkrfwnkqc")
public suspend fun validations(vararg argument: suspend CustomRPValidationsArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
CustomRPValidationsArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.validations = mapped
}
/**
* @param argument A list of validations to run on the custom resource provider's requests.
*/
@JvmName("vevcatkeradedxnt")
public suspend fun validations(argument: suspend CustomRPValidationsArgsBuilder.() -> Unit) {
val toBeMapped = listOf(CustomRPValidationsArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.validations = mapped
}
/**
* @param values A list of validations to run on the custom resource provider's requests.
*/
@JvmName("fdrocuumnmcqorvh")
public suspend fun validations(vararg values: CustomRPValidationsArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.validations = mapped
}
internal fun build(): CustomResourceProviderArgs = CustomResourceProviderArgs(
actions = actions,
location = location,
resourceGroupName = resourceGroupName,
resourceProviderName = resourceProviderName,
resourceTypes = resourceTypes,
tags = tags,
validations = validations,
)
}