1. Packages
  2. Azure Native v1
  3. API Docs
  4. web
  5. Certificate
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.web.Certificate

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    SSL certificate for an app. API Version: 2020-12-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"
    	"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 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")
    
    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",
    });
    
    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: "string",
    	Location:          "string",
    	HostNames: []string{
    		"string",
    	},
    	KeyVaultId:             "string",
    	KeyVaultSecretName:     "string",
    	Kind:                   "string",
    	CanonicalName:          "string",
    	Name:                   "string",
    	Password:               "string",
    	PfxBlob:                "string",
    	DomainValidationMethod: "string",
    	ServerFarmId:           "string",
    	Tags: map[string]interface{}{
    		"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(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .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:

    ResourceGroupName string
    Name of the resource group to which the resource belongs.
    CanonicalName string
    CNAME of the certificate to be issued via free certificate
    DomainValidationMethod string
    Method of domain validation for free cert
    HostNames List<string>
    Host names the certificate applies to.
    KeyVaultId string
    Key Vault Csm resource Id.
    KeyVaultSecretName string
    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.
    ServerFarmId string
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    Tags Dictionary<string, string>
    Resource tags.
    ResourceGroupName string
    Name of the resource group to which the resource belongs.
    CanonicalName string
    CNAME of the certificate to be issued via free certificate
    DomainValidationMethod string
    Method of domain validation for free cert
    HostNames []string
    Host names the certificate applies to.
    KeyVaultId string
    Key Vault Csm resource Id.
    KeyVaultSecretName string
    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.
    ServerFarmId string
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    Tags map[string]string
    Resource tags.
    resourceGroupName String
    Name of the resource group to which the resource belongs.
    canonicalName String
    CNAME of the certificate to be issued via free certificate
    domainValidationMethod String
    Method of domain validation for free cert
    hostNames List<String>
    Host names the certificate applies to.
    keyVaultId String
    Key Vault Csm resource Id.
    keyVaultSecretName String
    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.
    serverFarmId String
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    tags Map<String,String>
    Resource tags.
    resourceGroupName string
    Name of the resource group to which the resource belongs.
    canonicalName string
    CNAME of the certificate to be issued via free certificate
    domainValidationMethod string
    Method of domain validation for free cert
    hostNames string[]
    Host names the certificate applies to.
    keyVaultId string
    Key Vault Csm resource Id.
    keyVaultSecretName string
    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.
    serverFarmId string
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    tags {[key: string]: string}
    Resource tags.
    resource_group_name str
    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_method str
    Method of domain validation for free cert
    host_names Sequence[str]
    Host names the certificate applies to.
    key_vault_id str
    Key Vault Csm resource Id.
    key_vault_secret_name str
    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_id str
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    tags Mapping[str, str]
    Resource tags.
    resourceGroupName String
    Name of the resource group to which the resource belongs.
    canonicalName String
    CNAME of the certificate to be issued via free certificate
    domainValidationMethod String
    Method of domain validation for free cert
    hostNames List<String>
    Host names the certificate applies to.
    keyVaultId String
    Key Vault Csm resource Id.
    keyVaultSecretName String
    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.
    serverFarmId String
    Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
    tags 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.
    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?.
    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?.
    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?.
    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?.
    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?.
    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:Certificate testc6282 /subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/certificates/testc6282 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi