import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an API Management Service. * * ## Disclaimers * * > **Note:** When creating a new API Management resource in version 3.0 of the AzureRM Provider and later, please be aware that the AzureRM Provider will now clean up any sample APIs and Products created by the Azure API during the creation of the API Management resource. * * > **Note:** Version 2.77 and later of the Azure Provider include a Feature Toggle which will purge an API Management resource on destroy, rather than the default soft-delete. See the Features block documentation for more information on Feature Toggles within Terraform. * * > **Note:** It's possible to define Custom Domains both within the `azure.apimanagement.Service` resource via the `hostnameConfigurations` block and by using the `azure.apimanagement.CustomDomain` resource. However it's not possible to use both methods to manage Custom Domains within an API Management Service, since there'll be conflicts. * * ## 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: "company@exmaple.com", * skuName: "Developer_1", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ApiManagement` - 2024-05-01, 2022-08-01 * * ## 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 * ``` */ export declare class Service extends pulumi.CustomResource { /** * Get an existing Service resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ServiceState, opts?: pulumi.CustomResourceOptions): Service; /** * Returns true if the given object is an instance of Service. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Service; /** * One or more `additionalLocation` blocks as defined below. */ readonly additionalLocations: pulumi.Output; /** * One or more `certificate` blocks (up to 10) as defined below. */ readonly certificates: pulumi.Output; /** * Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`. */ readonly clientCertificateEnabled: pulumi.Output; /** * A `delegation` block as defined below. */ readonly delegation: pulumi.Output; /** * The URL for the Developer Portal associated with this API Management service. */ readonly developerPortalUrl: pulumi.Output; /** * Disable the gateway in main region? This is only supported when `additionalLocation` is set. */ readonly gatewayDisabled: pulumi.Output; /** * The URL of the Regional Gateway for the API Management Service in the specified region. */ readonly gatewayRegionalUrl: pulumi.Output; /** * The URL of the Gateway for the API Management Service. */ readonly gatewayUrl: pulumi.Output; /** * A `hostnameConfiguration` block as defined below. */ readonly hostnameConfiguration: pulumi.Output; /** * An `identity` block as defined below. */ readonly identity: pulumi.Output; /** * The Azure location where the API Management Service exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The URL for the Management API associated with this API Management service. */ readonly managementApiUrl: pulumi.Output; /** * The version which the control plane API calls to API Management service are limited with version equal to or newer than. */ readonly minApiVersion: pulumi.Output; /** * The name of the API Management Service. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Email address from which the notification will be sent. */ readonly notificationSenderEmail: pulumi.Output; /** * The URL for the Publisher Portal associated with this API Management service. */ readonly portalUrl: pulumi.Output; /** * The Private IP addresses of the API Management Service. Available only when the API Manager instance is using Virtual Network mode. */ readonly privateIpAddresses: pulumi.Output; /** * A `protocols` block as defined below. */ readonly protocols: pulumi.Output; /** * 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. */ readonly publicIpAddressId: pulumi.Output; /** * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU. */ readonly publicIpAddresses: pulumi.Output; /** * 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. */ readonly publicNetworkAccessEnabled: pulumi.Output; /** * The email of publisher/company. */ readonly publisherEmail: pulumi.Output; /** * The name of publisher/company. */ readonly publisherName: pulumi.Output; /** * The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The URL for the SCM (Source Code Management) Endpoint associated with this API Management service. */ readonly scmUrl: pulumi.Output; /** * A `security` block as defined below. */ readonly security: pulumi.Output; /** * A `signIn` block as defined below. */ readonly signIn: pulumi.Output; /** * A `signUp` block as defined below. */ readonly signUp: pulumi.Output; /** * `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. 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 SKUs 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. */ readonly skuName: pulumi.Output; /** * A mapping of tags assigned to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A `tenantAccess` block as defined below. */ readonly tenantAccess: pulumi.Output; /** * A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`. */ readonly virtualNetworkConfiguration: pulumi.Output; /** * 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 `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference). */ readonly virtualNetworkType: pulumi.Output; /** * 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. */ readonly zones: pulumi.Output; /** * Create a Service resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServiceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Service resources. */ export interface ServiceState { /** * One or more `additionalLocation` blocks as defined below. */ additionalLocations?: pulumi.Input[]>; /** * One or more `certificate` blocks (up to 10) as defined below. */ certificates?: pulumi.Input[]>; /** * Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`. */ clientCertificateEnabled?: pulumi.Input; /** * A `delegation` block as defined below. */ delegation?: pulumi.Input; /** * The URL for the Developer Portal associated with this API Management service. */ developerPortalUrl?: pulumi.Input; /** * Disable the gateway in main region? This is only supported when `additionalLocation` is set. */ gatewayDisabled?: pulumi.Input; /** * The URL of the Regional Gateway for the API Management Service in the specified region. */ gatewayRegionalUrl?: pulumi.Input; /** * The URL of the Gateway for the API Management Service. */ gatewayUrl?: pulumi.Input; /** * A `hostnameConfiguration` block as defined below. */ hostnameConfiguration?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure location where the API Management Service exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The URL for the Management API associated with this API Management service. */ managementApiUrl?: pulumi.Input; /** * The version which the control plane API calls to API Management service are limited with version equal to or newer than. */ minApiVersion?: pulumi.Input; /** * The name of the API Management Service. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Email address from which the notification will be sent. */ notificationSenderEmail?: pulumi.Input; /** * The URL for the Publisher Portal associated with this API Management service. */ portalUrl?: pulumi.Input; /** * The Private IP addresses of the API Management Service. Available only when the API Manager instance is using Virtual Network mode. */ privateIpAddresses?: pulumi.Input[]>; /** * A `protocols` block as defined below. */ protocols?: pulumi.Input; /** * 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. */ publicIpAddressId?: pulumi.Input; /** * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard and Premium SKU. */ publicIpAddresses?: pulumi.Input[]>; /** * 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. */ publicNetworkAccessEnabled?: pulumi.Input; /** * The email of publisher/company. */ publisherEmail?: pulumi.Input; /** * The name of publisher/company. */ publisherName?: pulumi.Input; /** * The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The URL for the SCM (Source Code Management) Endpoint associated with this API Management service. */ scmUrl?: pulumi.Input; /** * A `security` block as defined below. */ security?: pulumi.Input; /** * A `signIn` block as defined below. */ signIn?: pulumi.Input; /** * A `signUp` block as defined below. */ signUp?: pulumi.Input; /** * `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. 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 SKUs 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. */ skuName?: pulumi.Input; /** * A mapping of tags assigned to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `tenantAccess` block as defined below. */ tenantAccess?: pulumi.Input; /** * A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`. */ virtualNetworkConfiguration?: pulumi.Input; /** * 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 `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference). */ virtualNetworkType?: pulumi.Input; /** * 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. */ zones?: pulumi.Input[]>; } /** * The set of arguments for constructing a Service resource. */ export interface ServiceArgs { /** * One or more `additionalLocation` blocks as defined below. */ additionalLocations?: pulumi.Input[]>; /** * One or more `certificate` blocks (up to 10) as defined below. */ certificates?: pulumi.Input[]>; /** * Enforce a client certificate to be presented on each request to the gateway? This is only supported when SKU type is `Consumption`. */ clientCertificateEnabled?: pulumi.Input; /** * A `delegation` block as defined below. */ delegation?: pulumi.Input; /** * Disable the gateway in main region? This is only supported when `additionalLocation` is set. */ gatewayDisabled?: pulumi.Input; /** * A `hostnameConfiguration` block as defined below. */ hostnameConfiguration?: pulumi.Input; /** * An `identity` block as defined below. */ identity?: pulumi.Input; /** * The Azure location where the API Management Service exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The version which the control plane API calls to API Management service are limited with version equal to or newer than. */ minApiVersion?: pulumi.Input; /** * The name of the API Management Service. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Email address from which the notification will be sent. */ notificationSenderEmail?: pulumi.Input; /** * A `protocols` block as defined below. */ protocols?: pulumi.Input; /** * 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. */ publicIpAddressId?: pulumi.Input; /** * 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. */ publicNetworkAccessEnabled?: pulumi.Input; /** * The email of publisher/company. */ publisherEmail: pulumi.Input; /** * The name of publisher/company. */ publisherName: pulumi.Input; /** * The name of the Resource Group in which the API Management Service should exist. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * A `security` block as defined below. */ security?: pulumi.Input; /** * A `signIn` block as defined below. */ signIn?: pulumi.Input; /** * A `signUp` block as defined below. */ signUp?: pulumi.Input; /** * `skuName` is a string consisting of two parts separated by an underscore(\_). The first part is the `name`, valid values include: `Consumption`, `Developer`, `Basic`, `BasicV2`, `Standard`, `StandardV2`, `Premium` and `PremiumV2`. 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 SKUs 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. */ skuName: pulumi.Input; /** * A mapping of tags assigned to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A `tenantAccess` block as defined below. */ tenantAccess?: pulumi.Input; /** * A `virtualNetworkConfiguration` block as defined below. Required when `virtualNetworkType` is `External` or `Internal`. */ virtualNetworkConfiguration?: pulumi.Input; /** * 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 `virtualNetworkType` is `Internal` or `External`. Additionally, please ensure other necessary ports are open according to [api management network configuration](https://learn.microsoft.com/azure/api-management/virtual-network-reference). */ virtualNetworkType?: pulumi.Input; /** * 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. */ zones?: pulumi.Input[]>; }