Azure Native

v1.78.0 published on Wednesday, Sep 14, 2022 by Pulumi

Certificate

Certificate details. API Version: 2020-12-01.

Example Usage

ApiManagementCreateCertificate

using System.Collections.Generic;
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",
    });

});
package main

import (
	apimanagement "github.com/pulumi/pulumi-azure-native/sdk/go/azure/apimanagement"
	"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
	})
}
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());

    }
}
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")
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",
});
resources:
  certificate:
    type: azure-native:apimanagement:Certificate
    properties:
      certificateId: tempcert
      data: '****************Base 64 Encoded Certificate *******************************'
      password: '****Certificate Password******'
      resourceGroupName: rg1
      serviceName: apimService1

ApiManagementCreateCertificateWithKeyVault

using System.Collections.Generic;
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",
    });

});
package main

import (
	apimanagement "github.com/pulumi/pulumi-azure-native/sdk/go/azure/apimanagement"
	"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
	})
}
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("templateCertkv")
            .keyVault(Map.ofEntries(
                Map.entry("identityClientId", "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0"),
                Map.entry("secretIdentifier", "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert")
            ))
            .resourceGroupName("rg1")
            .serviceName("apimService1")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.apimanagement.Certificate("certificate",
    certificate_id="templateCertkv",
    key_vault=azure_native.apimanagement.KeyVaultContractCreatePropertiesArgs(
        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")
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",
});
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

Create a Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                certificate_id: Optional[str] = None,
                data: Optional[str] = None,
                key_vault: Optional[KeyVaultContractCreatePropertiesArgs] = None,
                password: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                service_name: Optional[str] = None)
@overload
def Certificate(resource_name: str,
                args: CertificateArgs,
                opts: Optional[ResourceOptions] = 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.

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.

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

The Certificate resource accepts the following input properties:

ResourceGroupName string

The name of the resource group.

ServiceName string

The name of the API Management service.

CertificateId 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.KeyVaultContractCreatePropertiesArgs

KeyVault location details of the certificate.

Password string

Password for the Certificate

ResourceGroupName string

The name of the resource group.

ServiceName string

The name of the API Management service.

CertificateId 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 String

The name of the resource group.

serviceName String

The name of the API Management service.

certificateId 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 string

The name of the resource group.

serviceName string

The name of the API Management service.

certificateId 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

resource_group_name str

The name of the resource group.

service_name str

The name of the API Management service.

certificate_id 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 String

The name of the resource group.

serviceName String

The name of the API Management service.

certificateId 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

Resource name.

Subject string

Subject attribute of the certificate.

Thumbprint string

Thumbprint of the certificate.

Type string

Resource type for API Management resource.

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

Resource name.

Subject string

Subject attribute of the certificate.

Thumbprint string

Thumbprint of the certificate.

Type string

Resource type for API Management resource.

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

Resource name.

subject String

Subject attribute of the certificate.

thumbprint String

Thumbprint of the certificate.

type String

Resource type for API Management resource.

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

Resource name.

subject string

Subject attribute of the certificate.

thumbprint string

Thumbprint of the certificate.

type string

Resource type for API Management resource.

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

Resource name.

subject str

Subject attribute of the certificate.

thumbprint str

Thumbprint of the certificate.

type str

Resource type for API Management resource.

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

Resource name.

subject String

Subject attribute of the certificate.

thumbprint String

Thumbprint of the certificate.

type String

Resource type for API Management resource.

Supporting Types

KeyVaultContractCreateProperties

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

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

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/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0