1. Packages
  2. Azure Native v2
  3. API Docs
  4. apimanagement
  5. Certificate
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.apimanagement.Certificate

Explore with Pulumi AI

Certificate details. Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.

Other available API versions: 2016-10-10, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview.

Example Usage

ApiManagementCreateCertificate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var certificate = new AzureNative.ApiManagement.Certificate("certificate", new()
    {
        CertificateId = "tempcert",
        Data = "****************Base 64 Encoded Certificate *******************************",
        Password = "****Certificate Password******",
        ResourceGroupName = "rg1",
        ServiceName = "apimService1",
    });

});
Copy
package main

import (
	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apimanagement.NewCertificate(ctx, "certificate", &apimanagement.CertificateArgs{
			CertificateId:     pulumi.String("tempcert"),
			Data:              pulumi.String("****************Base 64 Encoded Certificate *******************************"),
			Password:          pulumi.String("****Certificate Password******"),
			ResourceGroupName: pulumi.String("rg1"),
			ServiceName:       pulumi.String("apimService1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.Certificate;
import com.pulumi.azurenative.apimanagement.CertificateArgs;
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 certificate = new Certificate("certificate", CertificateArgs.builder()
            .certificateId("tempcert")
            .data("****************Base 64 Encoded Certificate *******************************")
            .password("****Certificate Password******")
            .resourceGroupName("rg1")
            .serviceName("apimService1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const certificate = new azure_native.apimanagement.Certificate("certificate", {
    certificateId: "tempcert",
    data: "****************Base 64 Encoded Certificate *******************************",
    password: "****Certificate Password******",
    resourceGroupName: "rg1",
    serviceName: "apimService1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.apimanagement.Certificate("certificate",
    certificate_id="tempcert",
    data="****************Base 64 Encoded Certificate *******************************",
    password="****Certificate Password******",
    resource_group_name="rg1",
    service_name="apimService1")
Copy
resources:
  certificate:
    type: azure-native:apimanagement:Certificate
    properties:
      certificateId: tempcert
      data: '****************Base 64 Encoded Certificate *******************************'
      password: '****Certificate Password******'
      resourceGroupName: rg1
      serviceName: apimService1
Copy

ApiManagementCreateCertificateWithKeyVault

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var certificate = new AzureNative.ApiManagement.Certificate("certificate", new()
    {
        CertificateId = "templateCertkv",
        KeyVault = new AzureNative.ApiManagement.Inputs.KeyVaultContractCreatePropertiesArgs
        {
            IdentityClientId = "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
            SecretIdentifier = "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
        },
        ResourceGroupName = "rg1",
        ServiceName = "apimService1",
    });

});
Copy
package main

import (
	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apimanagement.NewCertificate(ctx, "certificate", &apimanagement.CertificateArgs{
			CertificateId: pulumi.String("templateCertkv"),
			KeyVault: &apimanagement.KeyVaultContractCreatePropertiesArgs{
				IdentityClientId: pulumi.String("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
				SecretIdentifier: pulumi.String("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert"),
			},
			ResourceGroupName: pulumi.String("rg1"),
			ServiceName:       pulumi.String("apimService1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.Certificate;
import com.pulumi.azurenative.apimanagement.CertificateArgs;
import com.pulumi.azurenative.apimanagement.inputs.KeyVaultContractCreatePropertiesArgs;
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 certificate = new Certificate("certificate", CertificateArgs.builder()
            .certificateId("templateCertkv")
            .keyVault(KeyVaultContractCreatePropertiesArgs.builder()
                .identityClientId("ceaa6b06-c00f-43ef-99ac-f53d1fe876a0")
                .secretIdentifier("https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert")
                .build())
            .resourceGroupName("rg1")
            .serviceName("apimService1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const certificate = new azure_native.apimanagement.Certificate("certificate", {
    certificateId: "templateCertkv",
    keyVault: {
        identityClientId: "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
        secretIdentifier: "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
    },
    resourceGroupName: "rg1",
    serviceName: "apimService1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.apimanagement.Certificate("certificate",
    certificate_id="templateCertkv",
    key_vault={
        "identity_client_id": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0",
        "secret_identifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert",
    },
    resource_group_name="rg1",
    service_name="apimService1")
Copy
resources:
  certificate:
    type: azure-native:apimanagement:Certificate
    properties:
      certificateId: templateCertkv
      keyVault:
        identityClientId: ceaa6b06-c00f-43ef-99ac-f53d1fe876a0
        secretIdentifier: https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert
      resourceGroupName: rg1
      serviceName: apimService1
Copy

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,
                resource_group_name: Optional[str] = None,
                service_name: Optional[str] = None,
                certificate_id: Optional[str] = None,
                data: Optional[str] = None,
                key_vault: Optional[KeyVaultContractCreatePropertiesArgs] = 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-native:apimanagement:Certificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. CertificateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CertificateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 AzureNative.Apimanagement.Certificate("certificateResource", new()
{
    ResourceGroupName = "string",
    ServiceName = "string",
    CertificateId = "string",
    Data = "string",
    KeyVault = 
    {
        { "identityClientId", "string" },
        { "secretIdentifier", "string" },
    },
    Password = "string",
});
Copy
example, err := apimanagement.NewCertificate(ctx, "certificateResource", &apimanagement.CertificateArgs{
	ResourceGroupName: "string",
	ServiceName:       "string",
	CertificateId:     "string",
	Data:              "string",
	KeyVault: map[string]interface{}{
		"identityClientId": "string",
		"secretIdentifier": "string",
	},
	Password: "string",
})
Copy
var certificateResource = new Certificate("certificateResource", CertificateArgs.builder()
    .resourceGroupName("string")
    .serviceName("string")
    .certificateId("string")
    .data("string")
    .keyVault(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .password("string")
    .build());
Copy
certificate_resource = azure_native.apimanagement.Certificate("certificateResource",
    resource_group_name=string,
    service_name=string,
    certificate_id=string,
    data=string,
    key_vault={
        identityClientId: string,
        secretIdentifier: string,
    },
    password=string)
Copy
const certificateResource = new azure_native.apimanagement.Certificate("certificateResource", {
    resourceGroupName: "string",
    serviceName: "string",
    certificateId: "string",
    data: "string",
    keyVault: {
        identityClientId: "string",
        secretIdentifier: "string",
    },
    password: "string",
});
Copy
type: azure-native:apimanagement:Certificate
properties:
    certificateId: string
    data: string
    keyVault:
        identityClientId: string
        secretIdentifier: string
    password: string
    resourceGroupName: string
    serviceName: string
Copy

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:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
CertificateId Changes to this property will trigger replacement. string
Identifier of the certificate entity. Must be unique in the current API Management service instance.
Data string
Base 64 encoded certificate using the application/x-pkcs12 representation.
KeyVault Pulumi.AzureNative.ApiManagement.Inputs.KeyVaultContractCreateProperties
KeyVault location details of the certificate.
Password string
Password for the Certificate
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
CertificateId Changes to this property will trigger replacement. string
Identifier of the certificate entity. Must be unique in the current API Management service instance.
Data string
Base 64 encoded certificate using the application/x-pkcs12 representation.
KeyVault KeyVaultContractCreatePropertiesArgs
KeyVault location details of the certificate.
Password string
Password for the Certificate
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
certificateId Changes to this property will trigger replacement. String
Identifier of the certificate entity. Must be unique in the current API Management service instance.
data String
Base 64 encoded certificate using the application/x-pkcs12 representation.
keyVault KeyVaultContractCreateProperties
KeyVault location details of the certificate.
password String
Password for the Certificate
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
certificateId Changes to this property will trigger replacement. string
Identifier of the certificate entity. Must be unique in the current API Management service instance.
data string
Base 64 encoded certificate using the application/x-pkcs12 representation.
keyVault KeyVaultContractCreateProperties
KeyVault location details of the certificate.
password string
Password for the Certificate
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the API Management service.
certificate_id Changes to this property will trigger replacement. str
Identifier of the certificate entity. Must be unique in the current API Management service instance.
data str
Base 64 encoded certificate using the application/x-pkcs12 representation.
key_vault KeyVaultContractCreatePropertiesArgs
KeyVault location details of the certificate.
password str
Password for the Certificate
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
certificateId Changes to this property will trigger replacement. String
Identifier of the certificate entity. Must be unique in the current API Management service instance.
data String
Base 64 encoded certificate using the application/x-pkcs12 representation.
keyVault Property Map
KeyVault location details of the certificate.
password String
Password for the Certificate

Outputs

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

ExpirationDate string
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Subject string
Subject attribute of the certificate.
Thumbprint string
Thumbprint of the certificate.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
ExpirationDate string
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Subject string
Subject attribute of the certificate.
Thumbprint string
Thumbprint of the certificate.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
expirationDate String
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
subject String
Subject attribute of the certificate.
thumbprint String
Thumbprint of the certificate.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
expirationDate string
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
subject string
Subject attribute of the certificate.
thumbprint string
Thumbprint of the certificate.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
expiration_date str
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
subject str
Subject attribute of the certificate.
thumbprint str
Thumbprint of the certificate.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
expirationDate String
Expiration date of the certificate. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
subject String
Subject attribute of the certificate.
thumbprint String
Thumbprint of the certificate.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

KeyVaultContractCreateProperties
, KeyVaultContractCreatePropertiesArgs

IdentityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
SecretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
IdentityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
SecretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId String
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
secretIdentifier String
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
secretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identity_client_id str
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
secret_identifier str
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId String
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
secretIdentifier String
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi

KeyVaultContractPropertiesResponse
, KeyVaultContractPropertiesResponseArgs

IdentityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
LastStatus Pulumi.AzureNative.ApiManagement.Inputs.KeyVaultLastAccessStatusContractPropertiesResponse
Last time sync and refresh status of secret from key vault.
SecretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
IdentityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
LastStatus KeyVaultLastAccessStatusContractPropertiesResponse
Last time sync and refresh status of secret from key vault.
SecretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId String
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
lastStatus KeyVaultLastAccessStatusContractPropertiesResponse
Last time sync and refresh status of secret from key vault.
secretIdentifier String
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId string
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
lastStatus KeyVaultLastAccessStatusContractPropertiesResponse
Last time sync and refresh status of secret from key vault.
secretIdentifier string
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identity_client_id str
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
last_status KeyVaultLastAccessStatusContractPropertiesResponse
Last time sync and refresh status of secret from key vault.
secret_identifier str
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi
identityClientId String
Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.
lastStatus Property Map
Last time sync and refresh status of secret from key vault.
secretIdentifier String
Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi

KeyVaultLastAccessStatusContractPropertiesResponse
, KeyVaultLastAccessStatusContractPropertiesResponseArgs

Code string
Last status code for sync and refresh of secret from key vault.
Message string
Details of the error else empty.
TimeStampUtc string
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
Code string
Last status code for sync and refresh of secret from key vault.
Message string
Details of the error else empty.
TimeStampUtc string
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
code String
Last status code for sync and refresh of secret from key vault.
message String
Details of the error else empty.
timeStampUtc String
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
code string
Last status code for sync and refresh of secret from key vault.
message string
Details of the error else empty.
timeStampUtc string
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
code str
Last status code for sync and refresh of secret from key vault.
message str
Details of the error else empty.
time_stamp_utc str
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.
code String
Last status code for sync and refresh of secret from key vault.
message String
Details of the error else empty.
timeStampUtc String
Last time secret was accessed. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:apimanagement:Certificate templateCertkv /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0