GetCertificate

Use this data source to access information about an existing certificate in a Batch Account.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Batch.GetCertificate.InvokeAsync(new Azure.Batch.GetCertificateArgs
        {
            Name = "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
            AccountName = "examplebatchaccount",
            ResourceGroupName = "example",
        }));
        this.Thumbprint = example.Apply(example => example.Thumbprint);
    }

    [Output("thumbprint")]
    public Output<string> Thumbprint { get; set; }
}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := batch.LookupCertificate(ctx, &batch.LookupCertificateArgs{
            Name:              "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
            AccountName:       "examplebatchaccount",
            ResourceGroupName: "example",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("thumbprint", example.Thumbprint)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.batch.get_certificate(name="SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
    account_name="examplebatchaccount",
    resource_group_name="example")
pulumi.export("thumbprint", example.thumbprint)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.batch.getCertificate({
    name: "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
    accountName: "examplebatchaccount",
    resourceGroupName: "example",
});
export const thumbprint = example.then(example => example.thumbprint);

Using GetCertificate

function getCertificate(args: GetCertificateArgs, opts?: InvokeOptions): Promise<GetCertificateResult>
function  get_certificate(account_name=None, name=None, resource_group_name=None, opts=None)
func LookupCertificate(ctx *Context, args *LookupCertificateArgs, opts ...InvokeOption) (*LookupCertificateResult, error)

Note: This function is named LookupCertificate in the Go SDK.

public static class GetCertificate {
    public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AccountName string

The name of the Batch account.

Name string

The name of the Batch certificate.

ResourceGroupName string

The Name of the Resource Group where this Batch account exists.

AccountName string

The name of the Batch account.

Name string

The name of the Batch certificate.

ResourceGroupName string

The Name of the Resource Group where this Batch account exists.

accountName string

The name of the Batch account.

name string

The name of the Batch certificate.

resourceGroupName string

The Name of the Resource Group where this Batch account exists.

account_name str

The name of the Batch account.

name str

The name of the Batch certificate.

resource_group_name str

The Name of the Resource Group where this Batch account exists.

GetCertificate Result

The following output properties are available:

AccountName string
Format string

The format of the certificate, such as Cer or Pfx.

Id string

The provider-assigned unique ID for this managed resource.

Name string
PublicData string

The public key of the certificate.

ResourceGroupName string
Thumbprint string

The thumbprint of the certificate.

ThumbprintAlgorithm string

The algorithm of the certificate thumbprint.

AccountName string
Format string

The format of the certificate, such as Cer or Pfx.

Id string

The provider-assigned unique ID for this managed resource.

Name string
PublicData string

The public key of the certificate.

ResourceGroupName string
Thumbprint string

The thumbprint of the certificate.

ThumbprintAlgorithm string

The algorithm of the certificate thumbprint.

accountName string
format string

The format of the certificate, such as Cer or Pfx.

id string

The provider-assigned unique ID for this managed resource.

name string
publicData string

The public key of the certificate.

resourceGroupName string
thumbprint string

The thumbprint of the certificate.

thumbprintAlgorithm string

The algorithm of the certificate thumbprint.

account_name str
format str

The format of the certificate, such as Cer or Pfx.

id str

The provider-assigned unique ID for this managed resource.

name str
public_data str

The public key of the certificate.

resource_group_name str
thumbprint str

The thumbprint of the certificate.

thumbprint_algorithm str

The algorithm of the certificate thumbprint.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.