1. Packages
  2. Azure Native
  3. API Docs
  4. web
  5. SiteCertificate
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi

azure-native.web.SiteCertificate

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi

    SSL certificate for an app.

    Uses Azure REST API version 2024-11-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 siteCertificate = new AzureNative.Web.SiteCertificate("siteCertificate", new()
        {
            CertificateName = "testc6282",
            HostNames = new[]
            {
                "ServerCert",
            },
            Location = "East US",
            Name = "testSiteName",
            Password = "<password>",
            ResourceGroupName = "testrg123",
        });
    
    });
    
    package main
    
    import (
    	web "github.com/pulumi/pulumi-azure-native-sdk/web/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := web.NewSiteCertificate(ctx, "siteCertificate", &web.SiteCertificateArgs{
    			CertificateName: pulumi.String("testc6282"),
    			HostNames: pulumi.StringArray{
    				pulumi.String("ServerCert"),
    			},
    			Location:          pulumi.String("East US"),
    			Name:              pulumi.String("testSiteName"),
    			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.SiteCertificate;
    import com.pulumi.azurenative.web.SiteCertificateArgs;
    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 siteCertificate = new SiteCertificate("siteCertificate", SiteCertificateArgs.builder()
                .certificateName("testc6282")
                .hostNames("ServerCert")
                .location("East US")
                .name("testSiteName")
                .password("<password>")
                .resourceGroupName("testrg123")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const siteCertificate = new azure_native.web.SiteCertificate("siteCertificate", {
        certificateName: "testc6282",
        hostNames: ["ServerCert"],
        location: "East US",
        name: "testSiteName",
        password: "<password>",
        resourceGroupName: "testrg123",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    site_certificate = azure_native.web.SiteCertificate("siteCertificate",
        certificate_name="testc6282",
        host_names=["ServerCert"],
        location="East US",
        name="testSiteName",
        password="<password>",
        resource_group_name="testrg123")
    
    resources:
      siteCertificate:
        type: azure-native:web:SiteCertificate
        properties:
          certificateName: testc6282
          hostNames:
            - ServerCert
          location: East US
          name: testSiteName
          password: <password>
          resourceGroupName: testrg123
    

    Create SiteCertificate Resource

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

    Constructor syntax

    new SiteCertificate(name: string, args: SiteCertificateArgs, opts?: CustomResourceOptions);
    @overload
    def SiteCertificate(resource_name: str,
                        args: SiteCertificateArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def SiteCertificate(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        kind: Optional[str] = None,
                        host_names: Optional[Sequence[str]] = None,
                        key_vault_id: Optional[str] = None,
                        key_vault_secret_name: Optional[str] = None,
                        canonical_name: Optional[str] = None,
                        location: Optional[str] = None,
                        domain_validation_method: Optional[str] = None,
                        password: Optional[str] = None,
                        pfx_blob: Optional[str] = None,
                        certificate_name: Optional[str] = None,
                        server_farm_id: Optional[str] = None,
                        tags: Optional[Mapping[str, str]] = None)
    func NewSiteCertificate(ctx *Context, name string, args SiteCertificateArgs, opts ...ResourceOption) (*SiteCertificate, error)
    public SiteCertificate(string name, SiteCertificateArgs args, CustomResourceOptions? opts = null)
    public SiteCertificate(String name, SiteCertificateArgs args)
    public SiteCertificate(String name, SiteCertificateArgs args, CustomResourceOptions options)
    
    type: azure-native:web:SiteCertificate
    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 SiteCertificateArgs
    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 SiteCertificateArgs
    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 SiteCertificateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SiteCertificateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SiteCertificateArgs
    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 siteCertificateResource = new AzureNative.Web.SiteCertificate("siteCertificateResource", new()
    {
        Name = "string",
        ResourceGroupName = "string",
        Kind = "string",
        HostNames = new[]
        {
            "string",
        },
        KeyVaultId = "string",
        KeyVaultSecretName = "string",
        CanonicalName = "string",
        Location = "string",
        DomainValidationMethod = "string",
        Password = "string",
        PfxBlob = "string",
        CertificateName = "string",
        ServerFarmId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := web.NewSiteCertificate(ctx, "siteCertificateResource", &web.SiteCertificateArgs{
    	Name:              pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Kind:              pulumi.String("string"),
    	HostNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	KeyVaultId:             pulumi.String("string"),
    	KeyVaultSecretName:     pulumi.String("string"),
    	CanonicalName:          pulumi.String("string"),
    	Location:               pulumi.String("string"),
    	DomainValidationMethod: pulumi.String("string"),
    	Password:               pulumi.String("string"),
    	PfxBlob:                pulumi.String("string"),
    	CertificateName:        pulumi.String("string"),
    	ServerFarmId:           pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var siteCertificateResource = new SiteCertificate("siteCertificateResource", SiteCertificateArgs.builder()
        .name("string")
        .resourceGroupName("string")
        .kind("string")
        .hostNames("string")
        .keyVaultId("string")
        .keyVaultSecretName("string")
        .canonicalName("string")
        .location("string")
        .domainValidationMethod("string")
        .password("string")
        .pfxBlob("string")
        .certificateName("string")
        .serverFarmId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    site_certificate_resource = azure_native.web.SiteCertificate("siteCertificateResource",
        name="string",
        resource_group_name="string",
        kind="string",
        host_names=["string"],
        key_vault_id="string",
        key_vault_secret_name="string",
        canonical_name="string",
        location="string",
        domain_validation_method="string",
        password="string",
        pfx_blob="string",
        certificate_name="string",
        server_farm_id="string",
        tags={
            "string": "string",
        })
    
    const siteCertificateResource = new azure_native.web.SiteCertificate("siteCertificateResource", {
        name: "string",
        resourceGroupName: "string",
        kind: "string",
        hostNames: ["string"],
        keyVaultId: "string",
        keyVaultSecretName: "string",
        canonicalName: "string",
        location: "string",
        domainValidationMethod: "string",
        password: "string",
        pfxBlob: "string",
        certificateName: "string",
        serverFarmId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:web:SiteCertificate
    properties:
        canonicalName: string
        certificateName: 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
    

    SiteCertificate 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 SiteCertificate resource accepts the following input properties:

    Name string
    Name of the site.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    CanonicalName string
    CNAME of the certificate to be issued via free certificate
    CertificateName string
    Name of the certificate.
    DomainValidationMethod string
    Method of domain validation for free cert
    HostNames List<string>
    Host names the certificate applies to.
    KeyVaultId string
    Azure Key Vault Csm resource Id.
    KeyVaultSecretName string
    Azure Key Vault secret name.
    Kind string
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    Location string
    Resource Location.
    Password string
    Certificate password.
    PfxBlob string
    Pfx blob.
    ServerFarmId string
    Resource ID of the associated App Service plan.
    Tags Dictionary<string, string>
    Resource tags.
    Name string
    Name of the site.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    CanonicalName string
    CNAME of the certificate to be issued via free certificate
    CertificateName string
    Name of the certificate.
    DomainValidationMethod string
    Method of domain validation for free cert
    HostNames []string
    Host names the certificate applies to.
    KeyVaultId string
    Azure Key Vault Csm resource Id.
    KeyVaultSecretName string
    Azure Key Vault secret name.
    Kind string
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    Location string
    Resource Location.
    Password string
    Certificate password.
    PfxBlob string
    Pfx blob.
    ServerFarmId string
    Resource ID of the associated App Service plan.
    Tags map[string]string
    Resource tags.
    name String
    Name of the site.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    canonicalName String
    CNAME of the certificate to be issued via free certificate
    certificateName String
    Name of the certificate.
    domainValidationMethod String
    Method of domain validation for free cert
    hostNames List<String>
    Host names the certificate applies to.
    keyVaultId String
    Azure Key Vault Csm resource Id.
    keyVaultSecretName String
    Azure Key Vault secret name.
    kind String
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    location String
    Resource Location.
    password String
    Certificate password.
    pfxBlob String
    Pfx blob.
    serverFarmId String
    Resource ID of the associated App Service plan.
    tags Map<String,String>
    Resource tags.
    name string
    Name of the site.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    canonicalName string
    CNAME of the certificate to be issued via free certificate
    certificateName string
    Name of the certificate.
    domainValidationMethod string
    Method of domain validation for free cert
    hostNames string[]
    Host names the certificate applies to.
    keyVaultId string
    Azure Key Vault Csm resource Id.
    keyVaultSecretName string
    Azure Key Vault secret name.
    kind string
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    location string
    Resource Location.
    password string
    Certificate password.
    pfxBlob string
    Pfx blob.
    serverFarmId string
    Resource ID of the associated App Service plan.
    tags {[key: string]: string}
    Resource tags.
    name str
    Name of the site.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    canonical_name str
    CNAME of the certificate to be issued via free certificate
    certificate_name str
    Name of the certificate.
    domain_validation_method str
    Method of domain validation for free cert
    host_names Sequence[str]
    Host names the certificate applies to.
    key_vault_id str
    Azure Key Vault Csm resource Id.
    key_vault_secret_name str
    Azure Key Vault secret name.
    kind str
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    location str
    Resource Location.
    password str
    Certificate password.
    pfx_blob str
    Pfx blob.
    server_farm_id str
    Resource ID of the associated App Service plan.
    tags Mapping[str, str]
    Resource tags.
    name String
    Name of the site.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    canonicalName String
    CNAME of the certificate to be issued via free certificate
    certificateName String
    Name of the certificate.
    domainValidationMethod String
    Method of domain validation for free cert
    hostNames List<String>
    Host names the certificate applies to.
    keyVaultId String
    Azure Key Vault Csm resource Id.
    keyVaultSecretName String
    Azure Key Vault secret name.
    kind String
    Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
    location String
    Resource Location.
    password String
    Certificate password.
    pfxBlob String
    Pfx blob.
    serverFarmId String
    Resource ID of the associated App Service plan.
    tags Map<String>
    Resource tags.

    Outputs

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

    AzureApiVersion string
    The Azure API version of the resource.
    CerBlob string
    Raw bytes of .cer file
    ExpirationDate string
    Certificate expiration date.
    FriendlyName string
    Friendly name of the certificate.
    HostingEnvironmentProfile Pulumi.AzureNative.Web.Outputs.HostingEnvironmentProfileResponse
    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.
    KeyVaultSecretStatus string
    Status of the Key Vault secret.
    PublicKeyHash string
    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?.
    AzureApiVersion string
    The Azure API version of the resource.
    CerBlob string
    Raw bytes of .cer file
    ExpirationDate string
    Certificate expiration date.
    FriendlyName string
    Friendly name of the certificate.
    HostingEnvironmentProfile HostingEnvironmentProfileResponse
    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.
    KeyVaultSecretStatus string
    Status of the Key Vault secret.
    PublicKeyHash string
    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?.
    azureApiVersion String
    The Azure API version of the resource.
    cerBlob String
    Raw bytes of .cer file
    expirationDate String
    Certificate expiration date.
    friendlyName String
    Friendly name of the certificate.
    hostingEnvironmentProfile HostingEnvironmentProfileResponse
    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.
    keyVaultSecretStatus String
    Status of the Key Vault secret.
    publicKeyHash String
    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?.
    azureApiVersion string
    The Azure API version of the resource.
    cerBlob string
    Raw bytes of .cer file
    expirationDate string
    Certificate expiration date.
    friendlyName string
    Friendly name of the certificate.
    hostingEnvironmentProfile HostingEnvironmentProfileResponse
    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.
    keyVaultSecretStatus string
    Status of the Key Vault secret.
    publicKeyHash string
    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?.
    azure_api_version str
    The Azure API version of the resource.
    cer_blob str
    Raw bytes of .cer file
    expiration_date str
    Certificate expiration date.
    friendly_name str
    Friendly name of the certificate.
    hosting_environment_profile HostingEnvironmentProfileResponse
    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_secret_status str
    Status of the Key Vault secret.
    public_key_hash str
    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?.
    azureApiVersion String
    The Azure API version of the resource.
    cerBlob String
    Raw bytes of .cer file
    expirationDate String
    Certificate expiration date.
    friendlyName String
    Friendly name of the certificate.
    hostingEnvironmentProfile Property Map
    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.
    keyVaultSecretStatus String
    Status of the Key Vault secret.
    publicKeyHash String
    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

    Name string
    Name of the App Service Environment.
    Type string
    Resource type of the App Service Environment.
    Id string
    Resource ID of the App Service Environment.
    Name string
    Name of the App Service Environment.
    Type string
    Resource type of the App Service Environment.
    Id string
    Resource ID of the App Service Environment.
    name String
    Name of the App Service Environment.
    type String
    Resource type of the App Service Environment.
    id String
    Resource ID of the App Service Environment.
    name string
    Name of the App Service Environment.
    type string
    Resource type of the App Service Environment.
    id string
    Resource ID of the App Service Environment.
    name str
    Name of the App Service Environment.
    type str
    Resource type of the App Service Environment.
    id str
    Resource ID of the App Service Environment.
    name String
    Name of the App Service Environment.
    type String
    Resource type of the App Service Environment.
    id String
    Resource ID of the App Service Environment.

    Import

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

    $ pulumi import azure-native:web:SiteCertificate testc6282 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates/{certificateName} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.7.1 published on Wednesday, Aug 13, 2025 by Pulumi