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
LookupCertificatein the Go SDK.
public static class GetCertificate {
public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Account
Name string The name of the Batch account.
- Name string
The name of the Batch certificate.
- Resource
Group stringName The Name of the Resource Group where this Batch account exists.
- Account
Name string The name of the Batch account.
- Name string
The name of the Batch certificate.
- Resource
Group stringName The Name of the Resource Group where this Batch account exists.
- account
Name string The name of the Batch account.
- name string
The name of the Batch certificate.
- resource
Group stringName 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_ strname The Name of the Resource Group where this Batch account exists.
GetCertificate Result
The following output properties are available:
- Account
Name string - Format string
The format of the certificate, such as
CerorPfx.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Public
Data string The public key of the certificate.
- Resource
Group stringName - Thumbprint string
The thumbprint of the certificate.
- Thumbprint
Algorithm string The algorithm of the certificate thumbprint.
- Account
Name string - Format string
The format of the certificate, such as
CerorPfx.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Public
Data string The public key of the certificate.
- Resource
Group stringName - Thumbprint string
The thumbprint of the certificate.
- Thumbprint
Algorithm string The algorithm of the certificate thumbprint.
- account
Name string - format string
The format of the certificate, such as
CerorPfx.- id string
The provider-assigned unique ID for this managed resource.
- name string
- public
Data string The public key of the certificate.
- resource
Group stringName - thumbprint string
The thumbprint of the certificate.
- thumbprint
Algorithm string The algorithm of the certificate thumbprint.
- account_
name str - format str
The format of the certificate, such as
CerorPfx.- id str
The provider-assigned unique ID for this managed resource.
- name str
- public_
data str The public key of the certificate.
- resource_
group_ strname - 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
azurermTerraform Provider.