azure-native.web.Certificate
Explore with Pulumi AI
SSL certificate for an app. Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
Other available API versions: 2016-03-01, 2020-10-01, 2023-01-01, 2023-12-01, 2024-04-01.
Example Usage
Create Or Update Certificate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() => 
{
    var certificate = new AzureNative.Web.Certificate("certificate", new()
    {
        HostNames = new[]
        {
            "ServerCert",
        },
        Location = "East US",
        Name = "testc6282",
        Password = "<password>",
        ResourceGroupName = "testrg123",
    });
});
package main
import (
	web "github.com/pulumi/pulumi-azure-native-sdk/web/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := web.NewCertificate(ctx, "certificate", &web.CertificateArgs{
			HostNames: pulumi.StringArray{
				pulumi.String("ServerCert"),
			},
			Location:          pulumi.String("East US"),
			Name:              pulumi.String("testc6282"),
			Password:          pulumi.String("<password>"),
			ResourceGroupName: pulumi.String("testrg123"),
		})
		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.web.Certificate;
import com.pulumi.azurenative.web.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()
            .hostNames("ServerCert")
            .location("East US")
            .name("testc6282")
            .password("<password>")
            .resourceGroupName("testrg123")
            .build());
    }
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const certificate = new azure_native.web.Certificate("certificate", {
    hostNames: ["ServerCert"],
    location: "East US",
    name: "testc6282",
    password: "<password>",
    resourceGroupName: "testrg123",
});
import pulumi
import pulumi_azure_native as azure_native
certificate = azure_native.web.Certificate("certificate",
    host_names=["ServerCert"],
    location="East US",
    name="testc6282",
    password="<password>",
    resource_group_name="testrg123")
resources:
  certificate:
    type: azure-native:web:Certificate
    properties:
      hostNames:
        - ServerCert
      location: East US
      name: testc6282
      password: <password>
      resourceGroupName: testrg123
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,
                location: Optional[str] = None,
                host_names: Optional[Sequence[str]] = None,
                key_vault_id: Optional[str] = None,
                key_vault_secret_name: Optional[str] = None,
                kind: Optional[str] = None,
                canonical_name: Optional[str] = None,
                name: Optional[str] = None,
                password: Optional[str] = None,
                pfx_blob: Optional[str] = None,
                domain_validation_method: Optional[str] = None,
                server_farm_id: Optional[str] = None,
                tags: Optional[Mapping[str, 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:web: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 examplecertificateResourceResourceFromWeb = new AzureNative.Web.Certificate("examplecertificateResourceResourceFromWeb", new()
{
    ResourceGroupName = "string",
    Location = "string",
    HostNames = new[]
    {
        "string",
    },
    KeyVaultId = "string",
    KeyVaultSecretName = "string",
    Kind = "string",
    CanonicalName = "string",
    Name = "string",
    Password = "string",
    PfxBlob = "string",
    DomainValidationMethod = "string",
    ServerFarmId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := web.NewCertificate(ctx, "examplecertificateResourceResourceFromWeb", &web.CertificateArgs{
	ResourceGroupName: pulumi.String("string"),
	Location:          pulumi.String("string"),
	HostNames: pulumi.StringArray{
		pulumi.String("string"),
	},
	KeyVaultId:             pulumi.String("string"),
	KeyVaultSecretName:     pulumi.String("string"),
	Kind:                   pulumi.String("string"),
	CanonicalName:          pulumi.String("string"),
	Name:                   pulumi.String("string"),
	Password:               pulumi.String("string"),
	PfxBlob:                pulumi.String("string"),
	DomainValidationMethod: pulumi.String("string"),
	ServerFarmId:           pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var examplecertificateResourceResourceFromWeb = new Certificate("examplecertificateResourceResourceFromWeb", CertificateArgs.builder()
    .resourceGroupName("string")
    .location("string")
    .hostNames("string")
    .keyVaultId("string")
    .keyVaultSecretName("string")
    .kind("string")
    .canonicalName("string")
    .name("string")
    .password("string")
    .pfxBlob("string")
    .domainValidationMethod("string")
    .serverFarmId("string")
    .tags(Map.of("string", "string"))
    .build());
examplecertificate_resource_resource_from_web = azure_native.web.Certificate("examplecertificateResourceResourceFromWeb",
    resource_group_name="string",
    location="string",
    host_names=["string"],
    key_vault_id="string",
    key_vault_secret_name="string",
    kind="string",
    canonical_name="string",
    name="string",
    password="string",
    pfx_blob="string",
    domain_validation_method="string",
    server_farm_id="string",
    tags={
        "string": "string",
    })
const examplecertificateResourceResourceFromWeb = new azure_native.web.Certificate("examplecertificateResourceResourceFromWeb", {
    resourceGroupName: "string",
    location: "string",
    hostNames: ["string"],
    keyVaultId: "string",
    keyVaultSecretName: "string",
    kind: "string",
    canonicalName: "string",
    name: "string",
    password: "string",
    pfxBlob: "string",
    domainValidationMethod: "string",
    serverFarmId: "string",
    tags: {
        string: "string",
    },
});
type: azure-native:web:Certificate
properties:
    canonicalName: string
    domainValidationMethod: string
    hostNames:
        - string
    keyVaultId: string
    keyVaultSecretName: string
    kind: string
    location: string
    name: string
    password: string
    pfxBlob: string
    resourceGroupName: string
    serverFarmId: string
    tags:
        string: 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:
- ResourceGroup stringName 
- Name of the resource group to which the resource belongs.
- CanonicalName string
- CNAME of the certificate to be issued via free certificate
- DomainValidation stringMethod 
- Method of domain validation for free cert
- HostNames List<string>
- Host names the certificate applies to.
- KeyVault stringId 
- Key Vault Csm resource Id.
- KeyVault stringSecret Name 
- Key Vault secret name.
- Kind string
- Kind of resource.
- Location string
- Resource Location.
- Name string
- Name of the certificate.
- Password string
- Certificate password.
- PfxBlob string
- Pfx blob.
- ServerFarm stringId 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- Dictionary<string, string>
- Resource tags.
- ResourceGroup stringName 
- Name of the resource group to which the resource belongs.
- CanonicalName string
- CNAME of the certificate to be issued via free certificate
- DomainValidation stringMethod 
- Method of domain validation for free cert
- HostNames []string
- Host names the certificate applies to.
- KeyVault stringId 
- Key Vault Csm resource Id.
- KeyVault stringSecret Name 
- Key Vault secret name.
- Kind string
- Kind of resource.
- Location string
- Resource Location.
- Name string
- Name of the certificate.
- Password string
- Certificate password.
- PfxBlob string
- Pfx blob.
- ServerFarm stringId 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- map[string]string
- Resource tags.
- resourceGroup StringName 
- Name of the resource group to which the resource belongs.
- canonicalName String
- CNAME of the certificate to be issued via free certificate
- domainValidation StringMethod 
- Method of domain validation for free cert
- hostNames List<String>
- Host names the certificate applies to.
- keyVault StringId 
- Key Vault Csm resource Id.
- keyVault StringSecret Name 
- Key Vault secret name.
- kind String
- Kind of resource.
- location String
- Resource Location.
- name String
- Name of the certificate.
- password String
- Certificate password.
- pfxBlob String
- Pfx blob.
- serverFarm StringId 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- Map<String,String>
- Resource tags.
- resourceGroup stringName 
- Name of the resource group to which the resource belongs.
- canonicalName string
- CNAME of the certificate to be issued via free certificate
- domainValidation stringMethod 
- Method of domain validation for free cert
- hostNames string[]
- Host names the certificate applies to.
- keyVault stringId 
- Key Vault Csm resource Id.
- keyVault stringSecret Name 
- Key Vault secret name.
- kind string
- Kind of resource.
- location string
- Resource Location.
- name string
- Name of the certificate.
- password string
- Certificate password.
- pfxBlob string
- Pfx blob.
- serverFarm stringId 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- {[key: string]: string}
- Resource tags.
- resource_group_ strname 
- Name of the resource group to which the resource belongs.
- canonical_name str
- CNAME of the certificate to be issued via free certificate
- domain_validation_ strmethod 
- Method of domain validation for free cert
- host_names Sequence[str]
- Host names the certificate applies to.
- key_vault_ strid 
- Key Vault Csm resource Id.
- key_vault_ strsecret_ name 
- Key Vault secret name.
- kind str
- Kind of resource.
- location str
- Resource Location.
- name str
- Name of the certificate.
- password str
- Certificate password.
- pfx_blob str
- Pfx blob.
- server_farm_ strid 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- Mapping[str, str]
- Resource tags.
- resourceGroup StringName 
- Name of the resource group to which the resource belongs.
- canonicalName String
- CNAME of the certificate to be issued via free certificate
- domainValidation StringMethod 
- Method of domain validation for free cert
- hostNames List<String>
- Host names the certificate applies to.
- keyVault StringId 
- Key Vault Csm resource Id.
- keyVault StringSecret Name 
- Key Vault secret name.
- kind String
- Kind of resource.
- location String
- Resource Location.
- name String
- Name of the certificate.
- password String
- Certificate password.
- pfxBlob String
- Pfx blob.
- serverFarm StringId 
- Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
- Map<String>
- Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Certificate resource produces the following output properties:
- CerBlob string
- Raw bytes of .cer file
- ExpirationDate string
- Certificate expiration date.
- FriendlyName string
- Friendly name of the certificate.
- HostingEnvironment Pulumi.Profile Azure Native. Web. Outputs. Hosting Environment Profile Response 
- Specification for the App Service Environment to use for the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- IssueDate string
- Certificate issue Date.
- Issuer string
- Certificate issuer.
- KeyVault stringSecret Status 
- Status of the Key Vault secret.
- PublicKey stringHash 
- Public key hash.
- SelfLink string
- Self link.
- SiteName string
- App name.
- SubjectName string
- Subject name of the certificate.
- Thumbprint string
- Certificate thumbprint.
- Type string
- Resource type.
- Valid bool
- Is the certificate valid?.
- CerBlob string
- Raw bytes of .cer file
- ExpirationDate string
- Certificate expiration date.
- FriendlyName string
- Friendly name of the certificate.
- HostingEnvironment HostingProfile Environment Profile Response 
- Specification for the App Service Environment to use for the certificate.
- Id string
- The provider-assigned unique ID for this managed resource.
- IssueDate string
- Certificate issue Date.
- Issuer string
- Certificate issuer.
- KeyVault stringSecret Status 
- Status of the Key Vault secret.
- PublicKey stringHash 
- Public key hash.
- SelfLink string
- Self link.
- SiteName string
- App name.
- SubjectName string
- Subject name of the certificate.
- Thumbprint string
- Certificate thumbprint.
- Type string
- Resource type.
- Valid bool
- Is the certificate valid?.
- cerBlob String
- Raw bytes of .cer file
- expirationDate String
- Certificate expiration date.
- friendlyName String
- Friendly name of the certificate.
- hostingEnvironment HostingProfile Environment Profile Response 
- Specification for the App Service Environment to use for the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- issueDate String
- Certificate issue Date.
- issuer String
- Certificate issuer.
- keyVault StringSecret Status 
- Status of the Key Vault secret.
- publicKey StringHash 
- Public key hash.
- selfLink String
- Self link.
- siteName String
- App name.
- subjectName String
- Subject name of the certificate.
- thumbprint String
- Certificate thumbprint.
- type String
- Resource type.
- valid Boolean
- Is the certificate valid?.
- cerBlob string
- Raw bytes of .cer file
- expirationDate string
- Certificate expiration date.
- friendlyName string
- Friendly name of the certificate.
- hostingEnvironment HostingProfile Environment Profile Response 
- Specification for the App Service Environment to use for the certificate.
- id string
- The provider-assigned unique ID for this managed resource.
- issueDate string
- Certificate issue Date.
- issuer string
- Certificate issuer.
- keyVault stringSecret Status 
- Status of the Key Vault secret.
- publicKey stringHash 
- Public key hash.
- selfLink string
- Self link.
- siteName string
- App name.
- subjectName string
- Subject name of the certificate.
- thumbprint string
- Certificate thumbprint.
- type string
- Resource type.
- valid boolean
- Is the certificate valid?.
- cer_blob str
- Raw bytes of .cer file
- expiration_date str
- Certificate expiration date.
- friendly_name str
- Friendly name of the certificate.
- hosting_environment_ Hostingprofile Environment Profile Response 
- Specification for the App Service Environment to use for the certificate.
- id str
- The provider-assigned unique ID for this managed resource.
- issue_date str
- Certificate issue Date.
- issuer str
- Certificate issuer.
- key_vault_ strsecret_ status 
- Status of the Key Vault secret.
- public_key_ strhash 
- Public key hash.
- self_link str
- Self link.
- site_name str
- App name.
- subject_name str
- Subject name of the certificate.
- thumbprint str
- Certificate thumbprint.
- type str
- Resource type.
- valid bool
- Is the certificate valid?.
- cerBlob String
- Raw bytes of .cer file
- expirationDate String
- Certificate expiration date.
- friendlyName String
- Friendly name of the certificate.
- hostingEnvironment Property MapProfile 
- Specification for the App Service Environment to use for the certificate.
- id String
- The provider-assigned unique ID for this managed resource.
- issueDate String
- Certificate issue Date.
- issuer String
- Certificate issuer.
- keyVault StringSecret Status 
- Status of the Key Vault secret.
- publicKey StringHash 
- Public key hash.
- selfLink String
- Self link.
- siteName String
- App name.
- subjectName String
- Subject name of the certificate.
- thumbprint String
- Certificate thumbprint.
- type String
- Resource type.
- valid Boolean
- Is the certificate valid?.
Supporting Types
HostingEnvironmentProfileResponse, HostingEnvironmentProfileResponseArgs        
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:web:Certificate testc6282 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0