import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a API Management Custom Domain. * * ## Disclaimers * * > **Note:** It's possible to define Custom Domains both within the `azure.apimanagement.Service` resource via the `hostnameConfigurations` block and by using this resource. However it's not possible to use both methods to manage Custom Domains within an API Management Service, since there will be conflicts. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const exampleResourceGroup = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const example = azure.keyvault.getKeyVault({ * name: "mykeyvault", * resourceGroupName: "some-resource-group", * }); * const exampleService = new azure.apimanagement.Service("example", { * name: "example-apim", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * publisherName: "pub1", * publisherEmail: "pub1@email.com", * skuName: "Developer_1", * }); * const exampleCertificate = new azure.keyvault.Certificate("example", { * name: "example-certificate", * keyVaultId: example.then(example => example.id), * certificatePolicy: { * issuerParameters: { * name: "Self", * }, * keyProperties: { * exportable: true, * keySize: 2048, * keyType: "RSA", * reuseKey: true, * }, * lifetimeActions: [{ * action: { * actionType: "AutoRenew", * }, * trigger: { * daysBeforeExpiry: 30, * }, * }], * secretProperties: { * contentType: "application/x-pkcs12", * }, * x509CertificateProperties: { * keyUsages: [ * "cRLSign", * "dataEncipherment", * "digitalSignature", * "keyAgreement", * "keyCertSign", * "keyEncipherment", * ], * subject: "CN=api.example.com", * validityInMonths: 12, * subjectAlternativeNames: { * dnsNames: [ * "api.example.com", * "portal.example.com", * ], * }, * }, * }, * }); * const exampleCustomDomain = new azure.apimanagement.CustomDomain("example", { * apiManagementId: exampleService.id, * gateways: [{ * hostName: "api.example.com", * keyVaultId: exampleCertificate.versionlessSecretId, * }], * developerPortals: [{ * hostName: "portal.example.com", * keyVaultId: exampleCertificate.versionlessSecretId, * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ApiManagement` - 2024-05-01 * * ## Import * * API Management Custom Domains can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:apimanagement/customDomain:CustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/customDomains/default * ``` */ export declare class CustomDomain extends pulumi.CustomResource { /** * Get an existing CustomDomain 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?: CustomDomainState, opts?: pulumi.CustomResourceOptions): CustomDomain; /** * Returns true if the given object is an instance of CustomDomain. 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 CustomDomain; /** * The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created. */ readonly apiManagementId: pulumi.Output; /** * One or more `developerPortal` blocks as defined below. */ readonly developerPortals: pulumi.Output; /** * One or more `gateway` blocks as defined below. */ readonly gateways: pulumi.Output; /** * One or more `management` blocks as defined below. */ readonly managements: pulumi.Output; /** * One or more `portal` blocks as defined below. */ readonly portals: pulumi.Output; /** * One or more `scm` blocks as defined below. */ readonly scms: pulumi.Output; /** * Create a CustomDomain 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: CustomDomainArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomDomain resources. */ export interface CustomDomainState { /** * The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created. */ apiManagementId?: pulumi.Input; /** * One or more `developerPortal` blocks as defined below. */ developerPortals?: pulumi.Input[]>; /** * One or more `gateway` blocks as defined below. */ gateways?: pulumi.Input[]>; /** * One or more `management` blocks as defined below. */ managements?: pulumi.Input[]>; /** * One or more `portal` blocks as defined below. */ portals?: pulumi.Input[]>; /** * One or more `scm` blocks as defined below. */ scms?: pulumi.Input[]>; } /** * The set of arguments for constructing a CustomDomain resource. */ export interface CustomDomainArgs { /** * The ID of the API Management service for which to configure Custom Domains. Changing this forces a new API Management Custom Domain resource to be created. */ apiManagementId: pulumi.Input; /** * One or more `developerPortal` blocks as defined below. */ developerPortals?: pulumi.Input[]>; /** * One or more `gateway` blocks as defined below. */ gateways?: pulumi.Input[]>; /** * One or more `management` blocks as defined below. */ managements?: pulumi.Input[]>; /** * One or more `portal` blocks as defined below. */ portals?: pulumi.Input[]>; /** * One or more `scm` blocks as defined below. */ scms?: pulumi.Input[]>; }