All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.apimanagement.kotlin.ServiceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.apimanagement.kotlin

import com.pulumi.azure.apimanagement.ServiceArgs.builder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceAdditionalLocationArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceAdditionalLocationArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceCertificateArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceCertificateArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceDelegationArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceDelegationArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceHostnameConfigurationArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceHostnameConfigurationArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceIdentityArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceIdentityArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServicePolicyArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServicePolicyArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceProtocolsArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceProtocolsArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSecurityArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSecurityArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSignInArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSignInArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSignUpArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceSignUpArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceTenantAccessArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceTenantAccessArgsBuilder
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceVirtualNetworkConfigurationArgs
import com.pulumi.azure.apimanagement.kotlin.inputs.ServiceVirtualNetworkConfigurationArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleService = new azure.apimanagement.Service("example", {
 *     name: "example-apim",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     publisherName: "My Company",
 *     publisherEmail: "[email protected]",
 *     skuName: "Developer_1",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_service = azure.apimanagement.Service("example",
 *     name="example-apim",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     publisher_name="My Company",
 *     publisher_email="[email protected]",
 *     sku_name="Developer_1")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleService = new Azure.ApiManagement.Service("example", new()
 *     {
 *         Name = "example-apim",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         PublisherName = "My Company",
 *         PublisherEmail = "[email protected]",
 *         SkuName = "Developer_1",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = apimanagement.NewService(ctx, "example", &apimanagement.ServiceArgs{
 * 			Name:              pulumi.String("example-apim"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			PublisherName:     pulumi.String("My Company"),
 * 			PublisherEmail:    pulumi.String("[email protected]"),
 * 			SkuName:           pulumi.String("Developer_1"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.apimanagement.Service;
 * import com.pulumi.azure.apimanagement.ServiceArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleService = new Service("exampleService", ServiceArgs.builder()
 *             .name("example-apim")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .publisherName("My Company")
 *             .publisherEmail("[email protected]")
 *             .skuName("Developer_1")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleService:
 *     type: azure:apimanagement:Service
 *     name: example
 *     properties:
 *       name: example-apim
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       publisherName: My Company
 *       publisherEmail: [email protected]
 *       skuName: Developer_1
 * ```
 * 
 * ## Import
 * API Management Services can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:apimanagement/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1
 * ```
 * @property additionalLocations One or more `additional_location` blocks as defined below.
 * @property certificates One or more `certificate` blocks (up to 10) as defined below.
 * @property clientCertificateEnabled Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
 * @property delegation A `delegation` block as defined below.
 * @property gatewayDisabled Disable the gateway in main region? This is only supported when `additional_location` is set.
 * @property hostnameConfiguration A `hostname_configuration` block as defined below.
 * @property identity An `identity` block as defined below.
 * @property location The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
 * @property minApiVersion The version which the control plane API calls to API Management service are limited with version equal to or newer than.
 * @property name The name of the API Management Service. Changing this forces a new resource to be created.
 * @property notificationSenderEmail Email address from which the notification will be sent.
 * @property policy A `policy` block as defined below.
 * @property protocols A `protocols` block as defined below.
 * @property publicIpAddressId ID of a standard SKU IPv4 Public IP.
 * > **NOTE:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
 * @property publicNetworkAccessEnabled Is public access to the service allowed? Defaults to `true`.
 * > **NOTE:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
 * @property publisherEmail The email of publisher/company.
 * @property publisherName The name of publisher/company.
 * @property resourceGroupName The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
 * @property security A `security` block as defined below.
 * @property signIn A `sign_in` block as defined below.
 * @property signUp A `sign_up` block as defined below.
 * @property skuName `sku_name` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `Standard` and `Premium`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
 * > **NOTE:** Premium SKU's are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
 * > **NOTE:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
 * @property tags A mapping of tags assigned to the resource.
 * @property tenantAccess A `tenant_access` block as defined below.
 * @property virtualNetworkConfiguration A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`.
 * @property virtualNetworkType The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
 * > **NOTE:** Please ensure that in the subnet, inbound port 3443 is open when `virtual_network_type` is `Internal` or `External`. And please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
 * @property zones Specifies a list of Availability Zones in which this API Management service should be located.
 * > **NOTE:** Availability zones are only supported in the Premium tier.
 */
public data class ServiceArgs(
    public val additionalLocations: Output>? = null,
    public val certificates: Output>? = null,
    public val clientCertificateEnabled: Output? = null,
    public val delegation: Output? = null,
    public val gatewayDisabled: Output? = null,
    public val hostnameConfiguration: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val minApiVersion: Output? = null,
    public val name: Output? = null,
    public val notificationSenderEmail: Output? = null,
    public val policy: Output? = null,
    public val protocols: Output? = null,
    public val publicIpAddressId: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val publisherEmail: Output? = null,
    public val publisherName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val security: Output? = null,
    public val signIn: Output? = null,
    public val signUp: Output? = null,
    public val skuName: Output? = null,
    public val tags: Output>? = null,
    public val tenantAccess: Output? = null,
    public val virtualNetworkConfiguration: Output? = null,
    public val virtualNetworkType: Output? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.ServiceArgs =
        com.pulumi.azure.apimanagement.ServiceArgs.builder()
            .additionalLocations(
                additionalLocations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .certificates(
                certificates?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .clientCertificateEnabled(clientCertificateEnabled?.applyValue({ args0 -> args0 }))
            .delegation(delegation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .gatewayDisabled(gatewayDisabled?.applyValue({ args0 -> args0 }))
            .hostnameConfiguration(
                hostnameConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .minApiVersion(minApiVersion?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .notificationSenderEmail(notificationSenderEmail?.applyValue({ args0 -> args0 }))
            .policy(policy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .protocols(protocols?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .publicIpAddressId(publicIpAddressId?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .publisherEmail(publisherEmail?.applyValue({ args0 -> args0 }))
            .publisherName(publisherName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .security(security?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .signIn(signIn?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .signUp(signUp?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .skuName(skuName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tenantAccess(tenantAccess?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .virtualNetworkConfiguration(
                virtualNetworkConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .virtualNetworkType(virtualNetworkType?.applyValue({ args0 -> args0 }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ServiceArgs].
 */
@PulumiTagMarker
public class ServiceArgsBuilder internal constructor() {
    private var additionalLocations: Output>? = null

    private var certificates: Output>? = null

    private var clientCertificateEnabled: Output? = null

    private var delegation: Output? = null

    private var gatewayDisabled: Output? = null

    private var hostnameConfiguration: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var minApiVersion: Output? = null

    private var name: Output? = null

    private var notificationSenderEmail: Output? = null

    private var policy: Output? = null

    private var protocols: Output? = null

    private var publicIpAddressId: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var publisherEmail: Output? = null

    private var publisherName: Output? = null

    private var resourceGroupName: Output? = null

    private var security: Output? = null

    private var signIn: Output? = null

    private var signUp: Output? = null

    private var skuName: Output? = null

    private var tags: Output>? = null

    private var tenantAccess: Output? = null

    private var virtualNetworkConfiguration: Output? = null

    private var virtualNetworkType: Output? = null

    private var zones: Output>? = null

    /**
     * @param value One or more `additional_location` blocks as defined below.
     */
    @JvmName("elrrcimegywxlhjo")
    public suspend fun additionalLocations(`value`: Output>) {
        this.additionalLocations = value
    }

    @JvmName("xdehutdrkhvyhocf")
    public suspend fun additionalLocations(vararg values: Output) {
        this.additionalLocations = Output.all(values.asList())
    }

    /**
     * @param values One or more `additional_location` blocks as defined below.
     */
    @JvmName("yhdxbovanbqedjbj")
    public suspend fun additionalLocations(values: List>) {
        this.additionalLocations = Output.all(values)
    }

    /**
     * @param value One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("olqmcsniviilkcck")
    public suspend fun certificates(`value`: Output>) {
        this.certificates = value
    }

    @JvmName("slnydtofgyjhxvrt")
    public suspend fun certificates(vararg values: Output) {
        this.certificates = Output.all(values.asList())
    }

    /**
     * @param values One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("odymkbpuyngudqmi")
    public suspend fun certificates(values: List>) {
        this.certificates = Output.all(values)
    }

    /**
     * @param value Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
     */
    @JvmName("dmyahnqvvelytimy")
    public suspend fun clientCertificateEnabled(`value`: Output) {
        this.clientCertificateEnabled = value
    }

    /**
     * @param value A `delegation` block as defined below.
     */
    @JvmName("emcyfwkvmykuddum")
    public suspend fun delegation(`value`: Output) {
        this.delegation = value
    }

    /**
     * @param value Disable the gateway in main region? This is only supported when `additional_location` is set.
     */
    @JvmName("ssoxxvtuenjwfnaj")
    public suspend fun gatewayDisabled(`value`: Output) {
        this.gatewayDisabled = value
    }

    /**
     * @param value A `hostname_configuration` block as defined below.
     */
    @JvmName("eesivmxcoausoauq")
    public suspend fun hostnameConfiguration(`value`: Output) {
        this.hostnameConfiguration = value
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("qthxmnupxvisrine")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("qodsovurqiahmubr")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The version which the control plane API calls to API Management service are limited with version equal to or newer than.
     */
    @JvmName("sppkrwtntsyurtww")
    public suspend fun minApiVersion(`value`: Output) {
        this.minApiVersion = value
    }

    /**
     * @param value The name of the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("cbghvltxyyqdavej")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Email address from which the notification will be sent.
     */
    @JvmName("dkhqryprfchsyxfw")
    public suspend fun notificationSenderEmail(`value`: Output) {
        this.notificationSenderEmail = value
    }

    /**
     * @param value A `policy` block as defined below.
     */
    @JvmName("gwmfpkexprlfdggk")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value A `protocols` block as defined below.
     */
    @JvmName("smtlhmaoxhpqxjav")
    public suspend fun protocols(`value`: Output) {
        this.protocols = value
    }

    /**
     * @param value ID of a standard SKU IPv4 Public IP.
     * > **NOTE:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
     */
    @JvmName("jmbwddigkohditlg")
    public suspend fun publicIpAddressId(`value`: Output) {
        this.publicIpAddressId = value
    }

    /**
     * @param value Is public access to the service allowed? Defaults to `true`.
     * > **NOTE:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
     */
    @JvmName("ptnxcbprbmyafcof")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The email of publisher/company.
     */
    @JvmName("eoylfddpngtnttnq")
    public suspend fun publisherEmail(`value`: Output) {
        this.publisherEmail = value
    }

    /**
     * @param value The name of publisher/company.
     */
    @JvmName("mhbcqoxplcygfngq")
    public suspend fun publisherName(`value`: Output) {
        this.publisherName = value
    }

    /**
     * @param value The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
     */
    @JvmName("moooxwuxrllnokpx")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A `security` block as defined below.
     */
    @JvmName("utbhdkolilpquspy")
    public suspend fun security(`value`: Output) {
        this.security = value
    }

    /**
     * @param value A `sign_in` block as defined below.
     */
    @JvmName("ngudttsftlyupmyu")
    public suspend fun signIn(`value`: Output) {
        this.signIn = value
    }

    /**
     * @param value A `sign_up` block as defined below.
     */
    @JvmName("ycgevyticcuqwoii")
    public suspend fun signUp(`value`: Output) {
        this.signUp = value
    }

    /**
     * @param value `sku_name` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `Standard` and `Premium`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
     * > **NOTE:** Premium SKU's are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
     * > **NOTE:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
     */
    @JvmName("lavcogjmfkhyftjy")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

    /**
     * @param value A mapping of tags assigned to the resource.
     */
    @JvmName("csbbrvgwbpghsdeb")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `tenant_access` block as defined below.
     */
    @JvmName("ecetwkwikxlhgcpa")
    public suspend fun tenantAccess(`value`: Output) {
        this.tenantAccess = value
    }

    /**
     * @param value A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`.
     */
    @JvmName("tbrponkeueclomgi")
    public suspend
    fun virtualNetworkConfiguration(`value`: Output) {
        this.virtualNetworkConfiguration = value
    }

    /**
     * @param value The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
     * > **NOTE:** Please ensure that in the subnet, inbound port 3443 is open when `virtual_network_type` is `Internal` or `External`. And please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
     */
    @JvmName("nheuvyphkguuvdco")
    public suspend fun virtualNetworkType(`value`: Output) {
        this.virtualNetworkType = value
    }

    /**
     * @param value Specifies a list of Availability Zones in which this API Management service should be located.
     * > **NOTE:** Availability zones are only supported in the Premium tier.
     */
    @JvmName("dcnrhtjldvktfeio")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("xxekguhfsjqpdmov")
    public suspend fun zones(vararg values: Output) {
        this.zones = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of Availability Zones in which this API Management service should be located.
     * > **NOTE:** Availability zones are only supported in the Premium tier.
     */
    @JvmName("yrnexqlmwkvchfsi")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value One or more `additional_location` blocks as defined below.
     */
    @JvmName("qiqytxqoajeanuyy")
    public suspend fun additionalLocations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalLocations = mapped
    }

    /**
     * @param argument One or more `additional_location` blocks as defined below.
     */
    @JvmName("synjnjvtfdjjurto")
    public suspend
    fun additionalLocations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceAdditionalLocationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalLocations = mapped
    }

    /**
     * @param argument One or more `additional_location` blocks as defined below.
     */
    @JvmName("gbecpqlcoaghbtro")
    public suspend fun additionalLocations(
        vararg
        argument: suspend ServiceAdditionalLocationArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            ServiceAdditionalLocationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalLocations = mapped
    }

    /**
     * @param argument One or more `additional_location` blocks as defined below.
     */
    @JvmName("lhkooylcifbtnjws")
    public suspend
    fun additionalLocations(argument: suspend ServiceAdditionalLocationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceAdditionalLocationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.additionalLocations = mapped
    }

    /**
     * @param values One or more `additional_location` blocks as defined below.
     */
    @JvmName("hiwjqfubdxfrddjw")
    public suspend fun additionalLocations(vararg values: ServiceAdditionalLocationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalLocations = mapped
    }

    /**
     * @param value One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("euklbhqewnfyckfm")
    public suspend fun certificates(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.certificates = mapped
    }

    /**
     * @param argument One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("nupinntqpguupkbm")
    public suspend
    fun certificates(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceCertificateArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.certificates = mapped
    }

    /**
     * @param argument One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("kvitewocaabyluxj")
    public suspend fun certificates(
        vararg
        argument: suspend ServiceCertificateArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            ServiceCertificateArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.certificates = mapped
    }

    /**
     * @param argument One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("grbtxjpjumjohkss")
    public suspend fun certificates(argument: suspend ServiceCertificateArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ServiceCertificateArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.certificates = mapped
    }

    /**
     * @param values One or more `certificate` blocks (up to 10) as defined below.
     */
    @JvmName("shnkwnwvigkfbgmm")
    public suspend fun certificates(vararg values: ServiceCertificateArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.certificates = mapped
    }

    /**
     * @param value Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`.
     */
    @JvmName("drrswrgxipdklefb")
    public suspend fun clientCertificateEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientCertificateEnabled = mapped
    }

    /**
     * @param value A `delegation` block as defined below.
     */
    @JvmName("rwdbgiciadxdrkvh")
    public suspend fun delegation(`value`: ServiceDelegationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.delegation = mapped
    }

    /**
     * @param argument A `delegation` block as defined below.
     */
    @JvmName("dqeqvriemsmerepl")
    public suspend fun delegation(argument: suspend ServiceDelegationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceDelegationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.delegation = mapped
    }

    /**
     * @param value Disable the gateway in main region? This is only supported when `additional_location` is set.
     */
    @JvmName("amvokkkrwnxhthkc")
    public suspend fun gatewayDisabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gatewayDisabled = mapped
    }

    /**
     * @param value A `hostname_configuration` block as defined below.
     */
    @JvmName("rxrbsuneklwxoxoc")
    public suspend fun hostnameConfiguration(`value`: ServiceHostnameConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostnameConfiguration = mapped
    }

    /**
     * @param argument A `hostname_configuration` block as defined below.
     */
    @JvmName("hmbgoejoevdqofkp")
    public suspend
    fun hostnameConfiguration(argument: suspend ServiceHostnameConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceHostnameConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.hostnameConfiguration = mapped
    }

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("whmbjqtaesptcttn")
    public suspend fun identity(`value`: ServiceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument An `identity` block as defined below.
     */
    @JvmName("xehouxsfrcwcabjm")
    public suspend fun identity(argument: suspend ServiceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The Azure location where the API Management Service exists. Changing this forces a new resource to be created.
     */
    @JvmName("ibfreeqsvpwkbddu")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The version which the control plane API calls to API Management service are limited with version equal to or newer than.
     */
    @JvmName("ofopoyqkddlexqtn")
    public suspend fun minApiVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minApiVersion = mapped
    }

    /**
     * @param value The name of the API Management Service. Changing this forces a new resource to be created.
     */
    @JvmName("meqhourlbklgciue")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Email address from which the notification will be sent.
     */
    @JvmName("vxeidppnrhvowtaf")
    public suspend fun notificationSenderEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationSenderEmail = mapped
    }

    /**
     * @param value A `policy` block as defined below.
     */
    @JvmName("brytamkalvclbmft")
    public suspend fun policy(`value`: ServicePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param argument A `policy` block as defined below.
     */
    @JvmName("dmjgpakykoeiwcof")
    public suspend fun policy(argument: suspend ServicePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = ServicePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.policy = mapped
    }

    /**
     * @param value A `protocols` block as defined below.
     */
    @JvmName("vifjcqjiyprnpguh")
    public suspend fun protocols(`value`: ServiceProtocolsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param argument A `protocols` block as defined below.
     */
    @JvmName("vnmutequkpbklhrw")
    public suspend fun protocols(argument: suspend ServiceProtocolsArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceProtocolsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.protocols = mapped
    }

    /**
     * @param value ID of a standard SKU IPv4 Public IP.
     * > **NOTE:** Custom public IPs are only supported on the `Premium` and `Developer` tiers when deployed in a virtual network.
     */
    @JvmName("jhjdquajcyuccuum")
    public suspend fun publicIpAddressId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicIpAddressId = mapped
    }

    /**
     * @param value Is public access to the service allowed? Defaults to `true`.
     * > **NOTE:** This option is applicable only to the Management plane, not the API gateway or Developer portal. It is required to be `true` on the creation.
     */
    @JvmName("bmiwpddeinvcrouw")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The email of publisher/company.
     */
    @JvmName("imlungjatjigkvvu")
    public suspend fun publisherEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publisherEmail = mapped
    }

    /**
     * @param value The name of publisher/company.
     */
    @JvmName("fuxgyylccekrxgsu")
    public suspend fun publisherName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publisherName = mapped
    }

    /**
     * @param value The name of the Resource Group in which the API Management Service should be exist. Changing this forces a new resource to be created.
     */
    @JvmName("huaesmlteieywqve")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A `security` block as defined below.
     */
    @JvmName("qjlurctikoofmhoq")
    public suspend fun security(`value`: ServiceSecurityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.security = mapped
    }

    /**
     * @param argument A `security` block as defined below.
     */
    @JvmName("rboihkxpvuaktkbn")
    public suspend fun security(argument: suspend ServiceSecurityArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceSecurityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.security = mapped
    }

    /**
     * @param value A `sign_in` block as defined below.
     */
    @JvmName("xmfesqwmhurmlikt")
    public suspend fun signIn(`value`: ServiceSignInArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signIn = mapped
    }

    /**
     * @param argument A `sign_in` block as defined below.
     */
    @JvmName("lqeqklcoumcgcdfl")
    public suspend fun signIn(argument: suspend ServiceSignInArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceSignInArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.signIn = mapped
    }

    /**
     * @param value A `sign_up` block as defined below.
     */
    @JvmName("itgvokaggostpjvn")
    public suspend fun signUp(`value`: ServiceSignUpArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.signUp = mapped
    }

    /**
     * @param argument A `sign_up` block as defined below.
     */
    @JvmName("vhpvsjsleqqvmojd")
    public suspend fun signUp(argument: suspend ServiceSignUpArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceSignUpArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.signUp = mapped
    }

    /**
     * @param value `sku_name` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `Standard` and `Premium`. The second part is the `capacity` (e.g. the number of deployed units of the `sku`), which must be a positive `integer` (e.g. `Developer_1`).
     * > **NOTE:** Premium SKU's are limited to a default maximum of 12 (i.e. `Premium_12`), this can, however, be increased via support request.
     * > **NOTE:** Consumption SKU capacity should be 0 (e.g. `Consumption_0`) as this tier includes automatic scaling.
     */
    @JvmName("thfuhilhkdrctiou")
    public suspend fun skuName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skuName = mapped
    }

    /**
     * @param value A mapping of tags assigned to the resource.
     */
    @JvmName("mpekqgokvwydigfj")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags assigned to the resource.
     */
    @JvmName("mdaotjwpxtqxfyqm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `tenant_access` block as defined below.
     */
    @JvmName("kqwxfvgdcdxdkmvo")
    public suspend fun tenantAccess(`value`: ServiceTenantAccessArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tenantAccess = mapped
    }

    /**
     * @param argument A `tenant_access` block as defined below.
     */
    @JvmName("fqtygofxhwrrindq")
    public suspend fun tenantAccess(argument: suspend ServiceTenantAccessArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTenantAccessArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.tenantAccess = mapped
    }

    /**
     * @param value A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`.
     */
    @JvmName("ybxybxvicyiuahbm")
    public suspend fun virtualNetworkConfiguration(`value`: ServiceVirtualNetworkConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkConfiguration = mapped
    }

    /**
     * @param argument A `virtual_network_configuration` block as defined below. Required when `virtual_network_type` is `External` or `Internal`.
     */
    @JvmName("rlthjdjuvejsjtmm")
    public suspend
    fun virtualNetworkConfiguration(argument: suspend ServiceVirtualNetworkConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceVirtualNetworkConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.virtualNetworkConfiguration = mapped
    }

    /**
     * @param value The type of virtual network you want to use, valid values include: `None`, `External`, `Internal`. Defaults to `None`.
     * > **NOTE:** Please ensure that in the subnet, inbound port 3443 is open when `virtual_network_type` is `Internal` or `External`. And please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference).
     */
    @JvmName("ermqtquxwnbwoyvi")
    public suspend fun virtualNetworkType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkType = mapped
    }

    /**
     * @param value Specifies a list of Availability Zones in which this API Management service should be located.
     * > **NOTE:** Availability zones are only supported in the Premium tier.
     */
    @JvmName("mlbfdhiwqbthaxxh")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values Specifies a list of Availability Zones in which this API Management service should be located.
     * > **NOTE:** Availability zones are only supported in the Premium tier.
     */
    @JvmName("jxqijuooabfawuwe")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): ServiceArgs = ServiceArgs(
        additionalLocations = additionalLocations,
        certificates = certificates,
        clientCertificateEnabled = clientCertificateEnabled,
        delegation = delegation,
        gatewayDisabled = gatewayDisabled,
        hostnameConfiguration = hostnameConfiguration,
        identity = identity,
        location = location,
        minApiVersion = minApiVersion,
        name = name,
        notificationSenderEmail = notificationSenderEmail,
        policy = policy,
        protocols = protocols,
        publicIpAddressId = publicIpAddressId,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        publisherEmail = publisherEmail,
        publisherName = publisherName,
        resourceGroupName = resourceGroupName,
        security = security,
        signIn = signIn,
        signUp = signUp,
        skuName = skuName,
        tags = tags,
        tenantAccess = tenantAccess,
        virtualNetworkConfiguration = virtualNetworkConfiguration,
        virtualNetworkType = virtualNetworkType,
        zones = zones,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy