Azure Native

Pulumi Official
Package maintained by Pulumi
v1.67.0 published on Tuesday, Jul 12, 2022 by Pulumi

Certificate

Contains information about a certificate. API Version: 2021-01-01.

Example Usage

CreateCertificate - Full

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var certificate = new AzureNative.Batch.Certificate("certificate", new AzureNative.Batch.CertificateArgs
        {
            AccountName = "sampleacct",
            CertificateName = "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
            Data = "MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
            Format = AzureNative.Batch.CertificateFormat.Pfx,
            Password = "<ExamplePassword>",
            ResourceGroupName = "default-azurebatch-japaneast",
            Thumbprint = "0a0e4f50d51beadeac1d35afc5116098e7902e6e",
            ThumbprintAlgorithm = "sha1",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := batch.NewCertificate(ctx, "certificate", &batch.CertificateArgs{
			AccountName:         pulumi.String("sampleacct"),
			CertificateName:     pulumi.String("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
			Data:                pulumi.String("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."),
			Format:              batch.CertificateFormatPfx,
			Password:            pulumi.String("<ExamplePassword>"),
			ResourceGroupName:   pulumi.String("default-azurebatch-japaneast"),
			Thumbprint:          pulumi.String("0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
			ThumbprintAlgorithm: pulumi.String("sha1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()        
            .accountName("sampleacct")
            .certificateName("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
            .data("MIIJsgIBAzCCCW4GCSqGSIb3DQE...")
            .format("Pfx")
            .password("<ExamplePassword>")
            .resourceGroupName("default-azurebatch-japaneast")
            .thumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e")
            .thumbprintAlgorithm("sha1")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.batch.Certificate("certificate",
    account_name="sampleacct",
    certificate_name="sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data="MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
    format=azure_native.batch.CertificateFormat.PFX,
    password="<ExamplePassword>",
    resource_group_name="default-azurebatch-japaneast",
    thumbprint="0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    thumbprint_algorithm="sha1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const certificate = new azure_native.batch.Certificate("certificate", {
    accountName: "sampleacct",
    certificateName: "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data: "MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
    format: azure_native.batch.CertificateFormat.Pfx,
    password: "<ExamplePassword>",
    resourceGroupName: "default-azurebatch-japaneast",
    thumbprint: "0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    thumbprintAlgorithm: "sha1",
});
resources:
  certificate:
    type: azure-native:batch:Certificate
    properties:
      accountName: sampleacct
      certificateName: sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e
      data: MIIJsgIBAzCCCW4GCSqGSIb3DQE...
      format: Pfx
      password: <ExamplePassword>
      resourceGroupName: default-azurebatch-japaneast
      thumbprint: 0a0e4f50d51beadeac1d35afc5116098e7902e6e
      thumbprintAlgorithm: sha1

CreateCertificate - Minimal Cer

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var certificate = new AzureNative.Batch.Certificate("certificate", new AzureNative.Batch.CertificateArgs
        {
            AccountName = "sampleacct",
            CertificateName = "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
            Data = "MIICrjCCAZagAwI...",
            Format = AzureNative.Batch.CertificateFormat.Cer,
            ResourceGroupName = "default-azurebatch-japaneast",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := batch.NewCertificate(ctx, "certificate", &batch.CertificateArgs{
			AccountName:       pulumi.String("sampleacct"),
			CertificateName:   pulumi.String("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
			Data:              pulumi.String("MIICrjCCAZagAwI..."),
			Format:            batch.CertificateFormatCer,
			ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()        
            .accountName("sampleacct")
            .certificateName("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
            .data("MIICrjCCAZagAwI...")
            .format("Cer")
            .resourceGroupName("default-azurebatch-japaneast")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.batch.Certificate("certificate",
    account_name="sampleacct",
    certificate_name="sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data="MIICrjCCAZagAwI...",
    format=azure_native.batch.CertificateFormat.CER,
    resource_group_name="default-azurebatch-japaneast")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const certificate = new azure_native.batch.Certificate("certificate", {
    accountName: "sampleacct",
    certificateName: "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data: "MIICrjCCAZagAwI...",
    format: azure_native.batch.CertificateFormat.Cer,
    resourceGroupName: "default-azurebatch-japaneast",
});
resources:
  certificate:
    type: azure-native:batch:Certificate
    properties:
      accountName: sampleacct
      certificateName: sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e
      data: MIICrjCCAZagAwI...
      format: Cer
      resourceGroupName: default-azurebatch-japaneast

CreateCertificate - Minimal Pfx

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var certificate = new AzureNative.Batch.Certificate("certificate", new AzureNative.Batch.CertificateArgs
        {
            AccountName = "sampleacct",
            CertificateName = "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
            Data = "MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
            Password = "<ExamplePassword>",
            ResourceGroupName = "default-azurebatch-japaneast",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := batch.NewCertificate(ctx, "certificate", &batch.CertificateArgs{
			AccountName:       pulumi.String("sampleacct"),
			CertificateName:   pulumi.String("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e"),
			Data:              pulumi.String("MIIJsgIBAzCCCW4GCSqGSIb3DQE..."),
			Password:          pulumi.String("<ExamplePassword>"),
			ResourceGroupName: pulumi.String("default-azurebatch-japaneast"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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()        
            .accountName("sampleacct")
            .certificateName("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e")
            .data("MIIJsgIBAzCCCW4GCSqGSIb3DQE...")
            .password("<ExamplePassword>")
            .resourceGroupName("default-azurebatch-japaneast")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

certificate = azure_native.batch.Certificate("certificate",
    account_name="sampleacct",
    certificate_name="sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data="MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
    password="<ExamplePassword>",
    resource_group_name="default-azurebatch-japaneast")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const certificate = new azure_native.batch.Certificate("certificate", {
    accountName: "sampleacct",
    certificateName: "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
    data: "MIIJsgIBAzCCCW4GCSqGSIb3DQE...",
    password: "<ExamplePassword>",
    resourceGroupName: "default-azurebatch-japaneast",
});
resources:
  certificate:
    type: azure-native:batch:Certificate
    properties:
      accountName: sampleacct
      certificateName: sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e
      data: MIIJsgIBAzCCCW4GCSqGSIb3DQE...
      password: <ExamplePassword>
      resourceGroupName: default-azurebatch-japaneast

Create a Certificate Resource

new Certificate(name: string, args: CertificateArgs, opts?: CustomResourceOptions);
@overload
def Certificate(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_name: Optional[str] = None,
                certificate_name: Optional[str] = None,
                data: Optional[str] = None,
                format: Optional[CertificateFormat] = None,
                password: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                thumbprint: Optional[str] = None,
                thumbprint_algorithm: 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:batch: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:

AccountName string

The name of the Batch account.

Data string

The maximum size is 10KB.

ResourceGroupName string

The name of the resource group that contains the Batch account.

CertificateName string

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

Format Pulumi.AzureNative.Batch.CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

Password string

This must not be specified if the certificate format is Cer.

Thumbprint string

This must match the thumbprint from the name.

ThumbprintAlgorithm string

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

AccountName string

The name of the Batch account.

Data string

The maximum size is 10KB.

ResourceGroupName string

The name of the resource group that contains the Batch account.

CertificateName string

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

Format CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

Password string

This must not be specified if the certificate format is Cer.

Thumbprint string

This must match the thumbprint from the name.

ThumbprintAlgorithm string

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

accountName String

The name of the Batch account.

data String

The maximum size is 10KB.

resourceGroupName String

The name of the resource group that contains the Batch account.

certificateName String

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

format CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

password String

This must not be specified if the certificate format is Cer.

thumbprint String

This must match the thumbprint from the name.

thumbprintAlgorithm String

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

accountName string

The name of the Batch account.

data string

The maximum size is 10KB.

resourceGroupName string

The name of the resource group that contains the Batch account.

certificateName string

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

format CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

password string

This must not be specified if the certificate format is Cer.

thumbprint string

This must match the thumbprint from the name.

thumbprintAlgorithm string

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

account_name str

The name of the Batch account.

data str

The maximum size is 10KB.

resource_group_name str

The name of the resource group that contains the Batch account.

certificate_name str

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

format CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

password str

This must not be specified if the certificate format is Cer.

thumbprint str

This must match the thumbprint from the name.

thumbprint_algorithm str

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

accountName String

The name of the Batch account.

data String

The maximum size is 10KB.

resourceGroupName String

The name of the resource group that contains the Batch account.

certificateName String

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

format "Pfx" | "Cer"

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

password String

This must not be specified if the certificate format is Cer.

thumbprint String

This must match the thumbprint from the name.

thumbprintAlgorithm String

This must match the first portion of the certificate name. Currently required to be 'SHA1'.

Outputs

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

DeleteCertificateError Pulumi.AzureNative.Batch.Outputs.DeleteCertificateErrorResponse

This is only returned when the certificate provisioningState is 'Failed'.

Etag string

The ETag of the resource, used for concurrency statements.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource.

PreviousProvisioningState string

The previous provisioned state of the resource

PreviousProvisioningStateTransitionTime string
ProvisioningState string
ProvisioningStateTransitionTime string
PublicData string

The public key of the certificate.

Type string

The type of the resource.

DeleteCertificateError DeleteCertificateErrorResponse

This is only returned when the certificate provisioningState is 'Failed'.

Etag string

The ETag of the resource, used for concurrency statements.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the resource.

PreviousProvisioningState string

The previous provisioned state of the resource

PreviousProvisioningStateTransitionTime string
ProvisioningState string
ProvisioningStateTransitionTime string
PublicData string

The public key of the certificate.

Type string

The type of the resource.

deleteCertificateError DeleteCertificateErrorResponse

This is only returned when the certificate provisioningState is 'Failed'.

etag String

The ETag of the resource, used for concurrency statements.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource.

previousProvisioningState String

The previous provisioned state of the resource

previousProvisioningStateTransitionTime String
provisioningState String
provisioningStateTransitionTime String
publicData String

The public key of the certificate.

type String

The type of the resource.

deleteCertificateError DeleteCertificateErrorResponse

This is only returned when the certificate provisioningState is 'Failed'.

etag string

The ETag of the resource, used for concurrency statements.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the resource.

previousProvisioningState string

The previous provisioned state of the resource

previousProvisioningStateTransitionTime string
provisioningState string
provisioningStateTransitionTime string
publicData string

The public key of the certificate.

type string

The type of the resource.

delete_certificate_error DeleteCertificateErrorResponse

This is only returned when the certificate provisioningState is 'Failed'.

etag str

The ETag of the resource, used for concurrency statements.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the resource.

previous_provisioning_state str

The previous provisioned state of the resource

previous_provisioning_state_transition_time str
provisioning_state str
provisioning_state_transition_time str
public_data str

The public key of the certificate.

type str

The type of the resource.

deleteCertificateError Property Map

This is only returned when the certificate provisioningState is 'Failed'.

etag String

The ETag of the resource, used for concurrency statements.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the resource.

previousProvisioningState String

The previous provisioned state of the resource

previousProvisioningStateTransitionTime String
provisioningState String
provisioningStateTransitionTime String
publicData String

The public key of the certificate.

type String

The type of the resource.

Supporting Types

CertificateFormat

Pfx
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

Cer
Cer

The certificate is a base64-encoded X.509 certificate.

CertificateFormatPfx
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

CertificateFormatCer
Cer

The certificate is a base64-encoded X.509 certificate.

Pfx
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

Cer
Cer

The certificate is a base64-encoded X.509 certificate.

Pfx
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

Cer
Cer

The certificate is a base64-encoded X.509 certificate.

PFX
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

CER
Cer

The certificate is a base64-encoded X.509 certificate.

"Pfx"
Pfx

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

"Cer"
Cer

The certificate is a base64-encoded X.509 certificate.

DeleteCertificateErrorResponse

Code string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

Message string

A message describing the error, intended to be suitable for display in a user interface.

Details List<Pulumi.AzureNative.Batch.Inputs.DeleteCertificateErrorResponse>

A list of additional details about the error.

Target string

The target of the particular error. For example, the name of the property in error.

Code string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

Message string

A message describing the error, intended to be suitable for display in a user interface.

Details []DeleteCertificateErrorResponse

A list of additional details about the error.

Target string

The target of the particular error. For example, the name of the property in error.

code String

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message String

A message describing the error, intended to be suitable for display in a user interface.

details List<DeleteCertificateErrorResponse>

A list of additional details about the error.

target String

The target of the particular error. For example, the name of the property in error.

code string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message string

A message describing the error, intended to be suitable for display in a user interface.

details DeleteCertificateErrorResponse[]

A list of additional details about the error.

target string

The target of the particular error. For example, the name of the property in error.

code str

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message str

A message describing the error, intended to be suitable for display in a user interface.

details Sequence[DeleteCertificateErrorResponse]

A list of additional details about the error.

target str

The target of the particular error. For example, the name of the property in error.

code String

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message String

A message describing the error, intended to be suitable for display in a user interface.

details List<Property Map>

A list of additional details about the error.

target String

The target of the particular error. For example, the name of the property in error.

Import

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

$ pulumi import azure-native:batch:Certificate sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e /subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e 

Package Details

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