1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. apimanagement
  6. Certificate

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an Certificate within an API Management Service.

    Example Usage

    With Base64 Certificate)

    using System;
    using System.IO;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
    	private static string ReadFileBase64(string path) {
    		return Convert.ToBase64String(Encoding.UTF8.GetBytes(File.ReadAllText(path)))
    	}
    
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleService = new Azure.ApiManagement.Service("exampleService", new Azure.ApiManagement.ServiceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                PublisherName = "My Company",
                PublisherEmail = "company@exmaple.com",
                SkuName = "Developer_1",
            });
            var exampleCertificate = new Azure.ApiManagement.Certificate("exampleCertificate", new Azure.ApiManagement.CertificateArgs
            {
                ApiManagementName = exampleService.Name,
                ResourceGroupName = exampleResourceGroup.Name,
                Data = ReadFileBase64("example.pfx"),
            });
        }
    
    }
    
    package main
    
    import (
    	"encoding/base64"
    	"io/ioutil"
    
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/apimanagement"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func filebase64OrPanic(path string) pulumi.StringPtrInput {
    	if fileData, err := ioutil.ReadFile(path); err == nil {
    		return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
    	} else {
    		panic(err.Error())
    	}
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleService, err := apimanagement.NewService(ctx, "exampleService", &apimanagement.ServiceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			PublisherName:     pulumi.String("My Company"),
    			PublisherEmail:    pulumi.String("company@exmaple.com"),
    			SkuName:           pulumi.String("Developer_1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apimanagement.NewCertificate(ctx, "exampleCertificate", &apimanagement.CertificateArgs{
    			ApiManagementName: exampleService.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Data:              filebase64OrPanic("example.pfx"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * from "fs";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleService = new azure.apimanagement.Service("exampleService", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        publisherName: "My Company",
        publisherEmail: "company@exmaple.com",
        skuName: "Developer_1",
    });
    const exampleCertificate = new azure.apimanagement.Certificate("exampleCertificate", {
        apiManagementName: exampleService.name,
        resourceGroupName: exampleResourceGroup.name,
        data: Buffer.from(fs.readFileSync("example.pfx"), 'binary').toString('base64'),
    });
    
    import pulumi
    import base64
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_service = azure.apimanagement.Service("exampleService",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        publisher_name="My Company",
        publisher_email="company@exmaple.com",
        sku_name="Developer_1")
    example_certificate = azure.apimanagement.Certificate("exampleCertificate",
        api_management_name=example_service.name,
        resource_group_name=example_resource_group.name,
        data=(lambda path: base64.b64encode(open(path).read().encode()).decode())("example.pfx"))
    

    Example coming soon!

    With Key Vault Certificate)

    using System;
    using System.IO;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
    	private static string ReadFileBase64(string path) {
    		return Convert.ToBase64String(Encoding.UTF8.GetBytes(File.ReadAllText(path)))
    	}
    
        public MyStack()
        {
            var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleService = new Azure.ApiManagement.Service("exampleService", new Azure.ApiManagement.ServiceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                PublisherName = "My Company",
                PublisherEmail = "company@terraform.io",
                SkuName = "Developer_1",
                Identity = new Azure.ApiManagement.Inputs.ServiceIdentityArgs
                {
                    Type = "SystemAssigned",
                },
            });
            var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new Azure.KeyVault.KeyVaultArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                SoftDeleteEnabled = true,
                TenantId = data.Azurerm_client_config.Example.Tenant_id,
                SkuName = "standard",
            });
            var exampleAccessPolicy = new Azure.KeyVault.AccessPolicy("exampleAccessPolicy", new Azure.KeyVault.AccessPolicyArgs
            {
                KeyVaultId = exampleKeyVault.Id,
                TenantId = exampleService.Identity.Apply(identity => identity?.TenantId),
                ObjectId = exampleService.Identity.Apply(identity => identity?.PrincipalId),
                SecretPermissions = 
                {
                    "get",
                },
                CertificatePermissions = 
                {
                    "get",
                },
            });
            var exampleCertificate = new Azure.KeyVault.Certificate("exampleCertificate", new Azure.KeyVault.CertificateArgs
            {
                KeyVaultId = exampleKeyVault.Id,
                Certificate = new Azure.KeyVault.Inputs.CertificateCertificateArgs
                {
                    Contents = ReadFileBase64("example_cert.pfx"),
                    Password = "terraform",
                },
                CertificatePolicy = new Azure.KeyVault.Inputs.CertificateCertificatePolicyArgs
                {
                    IssuerParameters = new Azure.KeyVault.Inputs.CertificateCertificatePolicyIssuerParametersArgs
                    {
                        Name = "Self",
                    },
                    KeyProperties = new Azure.KeyVault.Inputs.CertificateCertificatePolicyKeyPropertiesArgs
                    {
                        Exportable = true,
                        KeySize = 2048,
                        KeyType = "RSA",
                        ReuseKey = false,
                    },
                    SecretProperties = new Azure.KeyVault.Inputs.CertificateCertificatePolicySecretPropertiesArgs
                    {
                        ContentType = "application/x-pkcs12",
                    },
                },
            });
            var exampleApimanagement_certificateCertificate = new Azure.ApiManagement.Certificate("exampleApimanagement/certificateCertificate", new Azure.ApiManagement.CertificateArgs
            {
                ApiManagementName = exampleService.Name,
                ResourceGroupName = exampleResourceGroup.Name,
                KeyVaultSecretId = exampleCertificate.SecretId,
            });
        }
    
    }
    
    package main
    
    import (
    	"encoding/base64"
    	"io/ioutil"
    
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/apimanagement"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/keyvault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func filebase64OrPanic(path string) pulumi.StringPtrInput {
    	if fileData, err := ioutil.ReadFile(path); err == nil {
    		return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
    	} else {
    		panic(err.Error())
    	}
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleService, err := apimanagement.NewService(ctx, "exampleService", &apimanagement.ServiceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			PublisherName:     pulumi.String("My Company"),
    			PublisherEmail:    pulumi.String("company@terraform.io"),
    			SkuName:           pulumi.String("Developer_1"),
    			Identity: &apimanagement.ServiceIdentityArgs{
    				Type: pulumi.String("SystemAssigned"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			SoftDeleteEnabled: pulumi.Bool(true),
    			TenantId:          pulumi.Any(data.Azurerm_client_config.Example.Tenant_id),
    			SkuName:           pulumi.String("standard"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = keyvault.NewAccessPolicy(ctx, "exampleAccessPolicy", &keyvault.AccessPolicyArgs{
    			KeyVaultId: exampleKeyVault.ID(),
    			TenantId: exampleService.Identity.ApplyT(func(identity apimanagement.ServiceIdentity) (string, error) {
    				return identity.TenantId, nil
    			}).(pulumi.StringOutput),
    			ObjectId: exampleService.Identity.ApplyT(func(identity apimanagement.ServiceIdentity) (string, error) {
    				return identity.PrincipalId, nil
    			}).(pulumi.StringOutput),
    			SecretPermissions: pulumi.StringArray{
    				pulumi.String("get"),
    			},
    			CertificatePermissions: pulumi.StringArray{
    				pulumi.String("get"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleCertificate, err := keyvault.NewCertificate(ctx, "exampleCertificate", &keyvault.CertificateArgs{
    			KeyVaultId: exampleKeyVault.ID(),
    			Certificate: &keyvault.CertificateCertificateArgs{
    				Contents: filebase64OrPanic("example_cert.pfx"),
    				Password: pulumi.String("terraform"),
    			},
    			CertificatePolicy: &keyvault.CertificateCertificatePolicyArgs{
    				IssuerParameters: &keyvault.CertificateCertificatePolicyIssuerParametersArgs{
    					Name: pulumi.String("Self"),
    				},
    				KeyProperties: &keyvault.CertificateCertificatePolicyKeyPropertiesArgs{
    					Exportable: pulumi.Bool(true),
    					KeySize:    pulumi.Int(2048),
    					KeyType:    pulumi.String("RSA"),
    					ReuseKey:   pulumi.Bool(false),
    				},
    				SecretProperties: &keyvault.CertificateCertificatePolicySecretPropertiesArgs{
    					ContentType: pulumi.String("application/x-pkcs12"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apimanagement.NewCertificate(ctx, "exampleApimanagement/certificateCertificate", &apimanagement.CertificateArgs{
    			ApiManagementName: exampleService.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    			KeyVaultSecretId:  exampleCertificate.SecretId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * from "fs";
    
    const current = azure.core.getClientConfig({});
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleService = new azure.apimanagement.Service("exampleService", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        publisherName: "My Company",
        publisherEmail: "company@terraform.io",
        skuName: "Developer_1",
        identity: {
            type: "SystemAssigned",
        },
    });
    const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        softDeleteEnabled: true,
        tenantId: data.azurerm_client_config.example.tenant_id,
        skuName: "standard",
    });
    const exampleAccessPolicy = new azure.keyvault.AccessPolicy("exampleAccessPolicy", {
        keyVaultId: exampleKeyVault.id,
        tenantId: exampleService.identity.apply(identity => identity?.tenantId),
        objectId: exampleService.identity.apply(identity => identity?.principalId),
        secretPermissions: ["get"],
        certificatePermissions: ["get"],
    });
    const exampleCertificate = new azure.keyvault.Certificate("exampleCertificate", {
        keyVaultId: exampleKeyVault.id,
        certificate: {
            contents: Buffer.from(fs.readFileSync("example_cert.pfx"), 'binary').toString('base64'),
            password: "terraform",
        },
        certificatePolicy: {
            issuerParameters: {
                name: "Self",
            },
            keyProperties: {
                exportable: true,
                keySize: 2048,
                keyType: "RSA",
                reuseKey: false,
            },
            secretProperties: {
                contentType: "application/x-pkcs12",
            },
        },
    });
    const exampleApimanagement_certificateCertificate = new azure.apimanagement.Certificate("exampleApimanagement/certificateCertificate", {
        apiManagementName: exampleService.name,
        resourceGroupName: exampleResourceGroup.name,
        keyVaultSecretId: exampleCertificate.secretId,
    });
    
    import pulumi
    import base64
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_service = azure.apimanagement.Service("exampleService",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        publisher_name="My Company",
        publisher_email="company@terraform.io",
        sku_name="Developer_1",
        identity=azure.apimanagement.ServiceIdentityArgs(
            type="SystemAssigned",
        ))
    example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        soft_delete_enabled=True,
        tenant_id=data["azurerm_client_config"]["example"]["tenant_id"],
        sku_name="standard")
    example_access_policy = azure.keyvault.AccessPolicy("exampleAccessPolicy",
        key_vault_id=example_key_vault.id,
        tenant_id=example_service.identity.tenant_id,
        object_id=example_service.identity.principal_id,
        secret_permissions=["get"],
        certificate_permissions=["get"])
    example_certificate = azure.keyvault.Certificate("exampleCertificate",
        key_vault_id=example_key_vault.id,
        certificate=azure.keyvault.CertificateCertificateArgs(
            contents=(lambda path: base64.b64encode(open(path).read().encode()).decode())("example_cert.pfx"),
            password="terraform",
        ),
        certificate_policy=azure.keyvault.CertificateCertificatePolicyArgs(
            issuer_parameters=azure.keyvault.CertificateCertificatePolicyIssuerParametersArgs(
                name="Self",
            ),
            key_properties=azure.keyvault.CertificateCertificatePolicyKeyPropertiesArgs(
                exportable=True,
                key_size=2048,
                key_type="RSA",
                reuse_key=False,
            ),
            secret_properties=azure.keyvault.CertificateCertificatePolicySecretPropertiesArgs(
                content_type="application/x-pkcs12",
            ),
        ))
    example_apimanagement_certificate_certificate = azure.apimanagement.Certificate("exampleApimanagement/certificateCertificate",
        api_management_name=example_service.name,
        resource_group_name=example_resource_group.name,
        key_vault_secret_id=example_certificate.secret_id)
    

    Example coming soon!

    Create Certificate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
    @overload
    def Certificate(resource_name: str,
                    args: CertificateArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Certificate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    api_management_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    data: Optional[str] = None,
                    key_vault_identity_client_id: Optional[str] = None,
                    key_vault_secret_id: Optional[str] = None,
                    name: Optional[str] = None,
                    password: Optional[str] = None)
    func NewCertificate(ctx *Context, name string, args CertificateArgs, opts ...ResourceOption) (*Certificate, error)
    public Certificate(string name, CertificateArgs args, CustomResourceOptions? opts = null)
    public Certificate(String name, CertificateArgs args)
    public Certificate(String name, CertificateArgs args, CustomResourceOptions options)
    
    type: azure:apimanagement:Certificate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CertificateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var certificateResource = new Azure.ApiManagement.Certificate("certificateResource", new()
    {
        ApiManagementName = "string",
        ResourceGroupName = "string",
        Data = "string",
        KeyVaultIdentityClientId = "string",
        KeyVaultSecretId = "string",
        Name = "string",
        Password = "string",
    });
    
    example, err := apimanagement.NewCertificate(ctx, "certificateResource", &apimanagement.CertificateArgs{
    	ApiManagementName:        pulumi.String("string"),
    	ResourceGroupName:        pulumi.String("string"),
    	Data:                     pulumi.String("string"),
    	KeyVaultIdentityClientId: pulumi.String("string"),
    	KeyVaultSecretId:         pulumi.String("string"),
    	Name:                     pulumi.String("string"),
    	Password:                 pulumi.String("string"),
    })
    
    var certificateResource = new com.pulumi.azure.apimanagement.Certificate("certificateResource", com.pulumi.azure.apimanagement.CertificateArgs.builder()
        .apiManagementName("string")
        .resourceGroupName("string")
        .data("string")
        .keyVaultIdentityClientId("string")
        .keyVaultSecretId("string")
        .name("string")
        .password("string")
        .build());
    
    certificate_resource = azure.apimanagement.Certificate("certificateResource",
        api_management_name="string",
        resource_group_name="string",
        data="string",
        key_vault_identity_client_id="string",
        key_vault_secret_id="string",
        name="string",
        password="string")
    
    const certificateResource = new azure.apimanagement.Certificate("certificateResource", {
        apiManagementName: "string",
        resourceGroupName: "string",
        data: "string",
        keyVaultIdentityClientId: "string",
        keyVaultSecretId: "string",
        name: "string",
        password: "string",
    });
    
    type: azure:apimanagement:Certificate
    properties:
        apiManagementName: string
        data: string
        keyVaultIdentityClientId: string
        keyVaultSecretId: string
        name: string
        password: string
        resourceGroupName: string
    

    Certificate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Certificate resource accepts the following input properties:

    ApiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    Data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    KeyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    KeyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    Name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    Password string
    The password used for this certificate. Changing this forces a new resource to be created.
    ApiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    Data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    KeyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    KeyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    Name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    Password string
    The password used for this certificate. Changing this forces a new resource to be created.
    apiManagementName String
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    data String
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    keyVaultIdentityClientId String
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId String
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name String
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password String
    The password used for this certificate. Changing this forces a new resource to be created.
    apiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    resourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    keyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password string
    The password used for this certificate. Changing this forces a new resource to be created.
    api_management_name str
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    resource_group_name str
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    data str
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    key_vault_identity_client_id str
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    key_vault_secret_id str
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name str
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password str
    The password used for this certificate. Changing this forces a new resource to be created.
    apiManagementName String
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    data String
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    keyVaultIdentityClientId String
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId String
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name String
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password String
    The password used for this certificate. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Certificate resource produces the following output properties:

    Expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Subject string
    The Subject of this Certificate.
    Thumbprint string
    The Thumbprint of this Certificate.
    Expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    Id string
    The provider-assigned unique ID for this managed resource.
    Subject string
    The Subject of this Certificate.
    Thumbprint string
    The Thumbprint of this Certificate.
    expiration String
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    id String
    The provider-assigned unique ID for this managed resource.
    subject String
    The Subject of this Certificate.
    thumbprint String
    The Thumbprint of this Certificate.
    expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    id string
    The provider-assigned unique ID for this managed resource.
    subject string
    The Subject of this Certificate.
    thumbprint string
    The Thumbprint of this Certificate.
    expiration str
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    id str
    The provider-assigned unique ID for this managed resource.
    subject str
    The Subject of this Certificate.
    thumbprint str
    The Thumbprint of this Certificate.
    expiration String
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    id String
    The provider-assigned unique ID for this managed resource.
    subject String
    The Subject of this Certificate.
    thumbprint String
    The Thumbprint of this Certificate.

    Look up Existing Certificate Resource

    Get an existing Certificate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CertificateState, opts?: CustomResourceOptions): Certificate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_management_name: Optional[str] = None,
            data: Optional[str] = None,
            expiration: Optional[str] = None,
            key_vault_identity_client_id: Optional[str] = None,
            key_vault_secret_id: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            subject: Optional[str] = None,
            thumbprint: Optional[str] = None) -> Certificate
    func GetCertificate(ctx *Context, name string, id IDInput, state *CertificateState, opts ...ResourceOption) (*Certificate, error)
    public static Certificate Get(string name, Input<string> id, CertificateState? state, CustomResourceOptions? opts = null)
    public static Certificate get(String name, Output<String> id, CertificateState state, CustomResourceOptions options)
    resources:  _:    type: azure:apimanagement:Certificate    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    Data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    Expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    KeyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    KeyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    Name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    Password string
    The password used for this certificate. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    Subject string
    The Subject of this Certificate.
    Thumbprint string
    The Thumbprint of this Certificate.
    ApiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    Data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    Expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    KeyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    KeyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    Name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    Password string
    The password used for this certificate. Changing this forces a new resource to be created.
    ResourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    Subject string
    The Subject of this Certificate.
    Thumbprint string
    The Thumbprint of this Certificate.
    apiManagementName String
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    data String
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    expiration String
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    keyVaultIdentityClientId String
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId String
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name String
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password String
    The password used for this certificate. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    subject String
    The Subject of this Certificate.
    thumbprint String
    The Thumbprint of this Certificate.
    apiManagementName string
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    data string
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    expiration string
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    keyVaultIdentityClientId string
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId string
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name string
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password string
    The password used for this certificate. Changing this forces a new resource to be created.
    resourceGroupName string
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    subject string
    The Subject of this Certificate.
    thumbprint string
    The Thumbprint of this Certificate.
    api_management_name str
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    data str
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    expiration str
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    key_vault_identity_client_id str
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    key_vault_secret_id str
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name str
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password str
    The password used for this certificate. Changing this forces a new resource to be created.
    resource_group_name str
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    subject str
    The Subject of this Certificate.
    thumbprint str
    The Thumbprint of this Certificate.
    apiManagementName String
    The Name of the API Management Service where this Service should be created. Changing this forces a new resource to be created.
    data String
    The base-64 encoded certificate data, which must be a PFX file. Changing this forces a new resource to be created.
    expiration String
    The Expiration Date of this Certificate, formatted as an RFC3339 string.
    keyVaultIdentityClientId String
    The Client ID of the User Assigned Managed Identity to use for retrieving certificate.
    keyVaultSecretId String
    The ID of the Key Vault Secret containing the SSL Certificate, which must be of the type application/x-pkcs12.
    name String
    The name of the API Management Certificate. Changing this forces a new resource to be created.
    password String
    The password used for this certificate. Changing this forces a new resource to be created.
    resourceGroupName String
    The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
    subject String
    The Subject of this Certificate.
    thumbprint String
    The Thumbprint of this Certificate.

    Import

    API Management Certificates can be imported using the resource id, e.g.

     $ pulumi import azure:apimanagement/certificate:Certificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ApiManagement/service/instance1/certificates/certificate1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial