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.apimanagement.kotlin.ApiGatewayArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.azurenative.apimanagement.ApiGatewayArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.VirtualNetworkType
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiManagementGatewaySkuPropertiesArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.ApiManagementGatewaySkuPropertiesArgsBuilder
import com.pulumi.azurenative.apimanagement.kotlin.inputs.BackendConfigurationArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.BackendConfigurationArgsBuilder
import com.pulumi.core.Either
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.Map
import kotlin.jvm.JvmName
/**
* A single API Management gateway resource in List or Get response.
* Azure REST API version: 2023-09-01-preview.
* Other available API versions: 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateStandardGateway
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var apiGateway = new AzureNative.ApiManagement.ApiGateway("apiGateway", new()
* {
* Backend = new AzureNative.ApiManagement.Inputs.BackendConfigurationArgs
* {
* Subnet = new AzureNative.ApiManagement.Inputs.BackendSubnetConfigurationArgs
* {
* Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1",
* },
* },
* GatewayName = "apimGateway1",
* Location = "South Central US",
* ResourceGroupName = "rg1",
* Sku = new AzureNative.ApiManagement.Inputs.ApiManagementGatewaySkuPropertiesArgs
* {
* Capacity = 1,
* Name = AzureNative.ApiManagement.SkuType.Standard,
* },
* Tags =
* {
* { "Name", "Contoso" },
* { "Test", "User" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewApiGateway(ctx, "apiGateway", &apimanagement.ApiGatewayArgs{
* Backend: &apimanagement.BackendConfigurationArgs{
* Subnet: &apimanagement.BackendSubnetConfigurationArgs{
* Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"),
* },
* },
* GatewayName: pulumi.String("apimGateway1"),
* Location: pulumi.String("South Central US"),
* ResourceGroupName: pulumi.String("rg1"),
* Sku: &apimanagement.ApiManagementGatewaySkuPropertiesArgs{
* Capacity: pulumi.Int(1),
* Name: pulumi.String(apimanagement.SkuTypeStandard),
* },
* Tags: pulumi.StringMap{
* "Name": pulumi.String("Contoso"),
* "Test": pulumi.String("User"),
* },
* })
* 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.apimanagement.ApiGateway;
* import com.pulumi.azurenative.apimanagement.ApiGatewayArgs;
* import com.pulumi.azurenative.apimanagement.inputs.BackendConfigurationArgs;
* import com.pulumi.azurenative.apimanagement.inputs.BackendSubnetConfigurationArgs;
* import com.pulumi.azurenative.apimanagement.inputs.ApiManagementGatewaySkuPropertiesArgs;
* 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 apiGateway = new ApiGateway("apiGateway", ApiGatewayArgs.builder()
* .backend(BackendConfigurationArgs.builder()
* .subnet(BackendSubnetConfigurationArgs.builder()
* .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1")
* .build())
* .build())
* .gatewayName("apimGateway1")
* .location("South Central US")
* .resourceGroupName("rg1")
* .sku(ApiManagementGatewaySkuPropertiesArgs.builder()
* .capacity(1)
* .name("Standard")
* .build())
* .tags(Map.ofEntries(
* Map.entry("Name", "Contoso"),
* Map.entry("Test", "User")
* ))
* .build());
* }
* }
* ```
* ### ApiManagementCreateWorkspacePremiumGateway
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var apiGateway = new AzureNative.ApiManagement.ApiGateway("apiGateway", new()
* {
* Backend = new AzureNative.ApiManagement.Inputs.BackendConfigurationArgs
* {
* Subnet = new AzureNative.ApiManagement.Inputs.BackendSubnetConfigurationArgs
* {
* Id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1",
* },
* },
* GatewayName = "apimGateway1",
* Location = "South Central US",
* ResourceGroupName = "rg1",
* Sku = new AzureNative.ApiManagement.Inputs.ApiManagementGatewaySkuPropertiesArgs
* {
* Capacity = 1,
* Name = "WorkspaceGatewayPremium",
* },
* Tags =
* {
* { "Name", "Contoso" },
* { "Test", "User" },
* },
* VirtualNetworkType = AzureNative.ApiManagement.VirtualNetworkType.External,
* });
* });
* ```
* ```go
* package main
* import (
* apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apimanagement.NewApiGateway(ctx, "apiGateway", &apimanagement.ApiGatewayArgs{
* Backend: &apimanagement.BackendConfigurationArgs{
* Subnet: &apimanagement.BackendSubnetConfigurationArgs{
* Id: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"),
* },
* },
* GatewayName: pulumi.String("apimGateway1"),
* Location: pulumi.String("South Central US"),
* ResourceGroupName: pulumi.String("rg1"),
* Sku: &apimanagement.ApiManagementGatewaySkuPropertiesArgs{
* Capacity: pulumi.Int(1),
* Name: pulumi.String("WorkspaceGatewayPremium"),
* },
* Tags: pulumi.StringMap{
* "Name": pulumi.String("Contoso"),
* "Test": pulumi.String("User"),
* },
* VirtualNetworkType: pulumi.String(apimanagement.VirtualNetworkTypeExternal),
* })
* 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.apimanagement.ApiGateway;
* import com.pulumi.azurenative.apimanagement.ApiGatewayArgs;
* import com.pulumi.azurenative.apimanagement.inputs.BackendConfigurationArgs;
* import com.pulumi.azurenative.apimanagement.inputs.BackendSubnetConfigurationArgs;
* import com.pulumi.azurenative.apimanagement.inputs.ApiManagementGatewaySkuPropertiesArgs;
* 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 apiGateway = new ApiGateway("apiGateway", ApiGatewayArgs.builder()
* .backend(BackendConfigurationArgs.builder()
* .subnet(BackendSubnetConfigurationArgs.builder()
* .id("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1")
* .build())
* .build())
* .gatewayName("apimGateway1")
* .location("South Central US")
* .resourceGroupName("rg1")
* .sku(ApiManagementGatewaySkuPropertiesArgs.builder()
* .capacity(1)
* .name("WorkspaceGatewayPremium")
* .build())
* .tags(Map.ofEntries(
* Map.entry("Name", "Contoso"),
* Map.entry("Test", "User")
* ))
* .virtualNetworkType("External")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apimanagement:ApiGateway apimGateway1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}
* ```
* @property backend Information regarding how the gateway should integrate with backend systems.
* @property gatewayName The name of the API Management gateway.
* @property location Resource location.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property sku SKU properties of the API Management gateway.
* @property tags Resource tags.
* @property virtualNetworkType The type of VPN in which API Management gateway needs to be configured in.
*/
public data class ApiGatewayArgs(
public val backend: Output? = null,
public val gatewayName: Output? = null,
public val location: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
public val virtualNetworkType: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apimanagement.ApiGatewayArgs =
com.pulumi.azurenative.apimanagement.ApiGatewayArgs.builder()
.backend(backend?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.gatewayName(gatewayName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.virtualNetworkType(
virtualNetworkType?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
).build()
}
/**
* Builder for [ApiGatewayArgs].
*/
@PulumiTagMarker
public class ApiGatewayArgsBuilder internal constructor() {
private var backend: Output? = null
private var gatewayName: Output? = null
private var location: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
private var virtualNetworkType: Output>? = null
/**
* @param value Information regarding how the gateway should integrate with backend systems.
*/
@JvmName("yjninflnsgfoychx")
public suspend fun backend(`value`: Output) {
this.backend = value
}
/**
* @param value The name of the API Management gateway.
*/
@JvmName("jekvnmktxmgwbgjm")
public suspend fun gatewayName(`value`: Output) {
this.gatewayName = value
}
/**
* @param value Resource location.
*/
@JvmName("gxebfhbgcwybjoxt")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("lpuafiudsoadwbds")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value SKU properties of the API Management gateway.
*/
@JvmName("bruwcekasfjykyvp")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Resource tags.
*/
@JvmName("wndpdgjmhnsruhdh")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The type of VPN in which API Management gateway needs to be configured in.
*/
@JvmName("xkfdfcbgvddtmsrm")
public suspend fun virtualNetworkType(`value`: Output>) {
this.virtualNetworkType = value
}
/**
* @param value Information regarding how the gateway should integrate with backend systems.
*/
@JvmName("djeedncxdhjwdujk")
public suspend fun backend(`value`: BackendConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.backend = mapped
}
/**
* @param argument Information regarding how the gateway should integrate with backend systems.
*/
@JvmName("afykxpbxgldptloo")
public suspend fun backend(argument: suspend BackendConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = BackendConfigurationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.backend = mapped
}
/**
* @param value The name of the API Management gateway.
*/
@JvmName("hpsyxgqtpyejqjdy")
public suspend fun gatewayName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gatewayName = mapped
}
/**
* @param value Resource location.
*/
@JvmName("gwhjcejwxrearext")
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. The name is case insensitive.
*/
@JvmName("qsyyjxakybvyqdut")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value SKU properties of the API Management gateway.
*/
@JvmName("ijpvdvegohaimacs")
public suspend fun sku(`value`: ApiManagementGatewaySkuPropertiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument SKU properties of the API Management gateway.
*/
@JvmName("trqpdosumjosmmtm")
public suspend fun sku(argument: suspend ApiManagementGatewaySkuPropertiesArgsBuilder.() -> Unit) {
val toBeMapped = ApiManagementGatewaySkuPropertiesArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("jgsbfenxflukenyj")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("svlhoraimjdlnvjh")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The type of VPN in which API Management gateway needs to be configured in.
*/
@JvmName("mwhvmucmjutggiod")
public suspend fun virtualNetworkType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualNetworkType = mapped
}
/**
* @param value The type of VPN in which API Management gateway needs to be configured in.
*/
@JvmName("duviicffjmjigxqo")
public fun virtualNetworkType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.virtualNetworkType = mapped
}
/**
* @param value The type of VPN in which API Management gateway needs to be configured in.
*/
@JvmName("fchkowgaoqulqmql")
public fun virtualNetworkType(`value`: VirtualNetworkType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.virtualNetworkType = mapped
}
internal fun build(): ApiGatewayArgs = ApiGatewayArgs(
backend = backend,
gatewayName = gatewayName,
location = location,
resourceGroupName = resourceGroupName,
sku = sku,
tags = tags,
virtualNetworkType = virtualNetworkType,
)
}