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

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

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@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.Deprecated
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
 * @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,
    @Deprecated(
        message = """
  The `policy` block has been superseded by the resource `azure.apimanagement.Policy` and will be
      removed in v4.0 of the AzureRM Provider
  """,
    )
    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("oyeqcodebjnmfobj")
    public suspend fun additionalLocations(`value`: Output>) {
        this.additionalLocations = value
    }

    @JvmName("qquowhserhqcjlkm")
    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("cqsbtovjjkqstscu")
    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("kgwansscudwrikya")
    public suspend fun certificates(`value`: Output>) {
        this.certificates = value
    }

    @JvmName("ipoqjkyoflsrkdkn")
    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("mrymdfrgdfjqsdol")
    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("wmgbbuvqbdgntwyl")
    public suspend fun clientCertificateEnabled(`value`: Output) {
        this.clientCertificateEnabled = value
    }

    /**
     * @param value A `delegation` block as defined below.
     */
    @JvmName("anoidvyqglxdyima")
    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("bcbfloneqgoowthd")
    public suspend fun gatewayDisabled(`value`: Output) {
        this.gatewayDisabled = value
    }

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

    /**
     * @param value An `identity` block as defined below.
     */
    @JvmName("vopwmnqsjdvmkbst")
    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("nbvykxyxibsednco")
    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("ryhronbcgudxhkam")
    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("njhguqmearbhsbsv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The `policy` block has been superseded by the resource `azure.apimanagement.Policy` and will be
      removed in v4.0 of the AzureRM Provider
  """,
    )
    @JvmName("wrbwftlysyngfacm")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value A `protocols` block as defined below.
     */
    @JvmName("bdosguukdvhhxubs")
    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("mygxgfirjtwmykkq")
    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("rnslvrvneyjjckts")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

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

    /**
     * @param value The name of publisher/company.
     */
    @JvmName("rsvveujjmhohqsea")
    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("jvsqwnpxvwxwaptg")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

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

    /**
     * @param value A `sign_up` block as defined below.
     */
    @JvmName("rnedxlaevqlqbggy")
    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("fpufdsmxfnayvyui")
    public suspend fun skuName(`value`: Output) {
        this.skuName = value
    }

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

    /**
     * @param value A `tenant_access` block as defined below.
     */
    @JvmName("upnhhhtsmptbocvw")
    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("wrxhbeypogdwyihs")
    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("kuqcqxtaaxhxxmup")
    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("endqfwmsxaakbvxd")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("nlaegchuypwshlrc")
    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("nncxuefjqscrbupe")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value One or more `additional_location` blocks as defined below.
     */
    @JvmName("rscxxhfcmdfsdfsu")
    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("pxkmbhjcoftjqjxd")
    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("liikktuuongjiqvs")
    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("ownjuvpcynispvaj")
    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("qqlwhbqpspwvrthd")
    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("pxpjkjoxbcafubcv")
    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("thakjfaiqorjitfg")
    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("lgtlpjiganrjitqk")
    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("ghtmtbcccvarrynp")
    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("koiofjrycwyewbit")
    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("evhntyjwcnfxtkbn")
    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("itsalhtdoaayuosu")
    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("dwgksnqxtddqxayf")
    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("mlaimubbicjhlvtk")
    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("vhrjulnwjhcmhnrc")
    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("ulprewrhxwylmmjv")
    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("axjlbuokktjtoram")
    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("ueyuscniowisvvtf")
    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("shjgootjmqomvdkn")
    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("nmoitveklngcnsir")
    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("dmpxxntrmoflsknd")
    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("sbgcknjbfscgmmng")
    public suspend fun notificationSenderEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationSenderEmail = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  The `policy` block has been superseded by the resource `azure.apimanagement.Policy` and will be
      removed in v4.0 of the AzureRM Provider
  """,
    )
    @JvmName("mcluvhwrgfvplmsd")
    public suspend fun policy(`value`: ServicePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param argument
     */
    @Deprecated(
        message = """
  The `policy` block has been superseded by the resource `azure.apimanagement.Policy` and will be
      removed in v4.0 of the AzureRM Provider
  """,
    )
    @JvmName("euodwgpdaqualaqs")
    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("qnrstqfdplgvuljt")
    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("tywaruvnqkwqsvvd")
    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("yubyggbybsnjlotc")
    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("otskagomlvdbakle")
    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("xntquvnnirfdhani")
    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("jcnvguoqaxcaxgsv")
    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("ljqeigulpwjyqoud")
    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("aqlciowafwlkjthu")
    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("jchyupiviijeetqa")
    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("acskvrfegbvkppnp")
    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("phwlqxigvnoptuye")
    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("bmklunbxmdtcanmg")
    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("rdrgnoeftksrmjtq")
    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("wsjobwtdjqngjjat")
    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("mqyukrmlnxhpjuur")
    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("ftsahustkfmtnyom")
    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("anggslyistmtbbai")
    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("swfjyrrgpjsceiaj")
    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("fssuyjsnbuvmmpvy")
    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("dcyfowomojafljyh")
    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("pevyfjndarldoulb")
    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("bvwnprmnyynqlpvo")
    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("goxsuobfkjkppcpp")
    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