Azure Classic
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/v5/go/azure/batch"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
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) {
final var example = Output.of(BatchFunctions.getCertificate(GetCertificateArgs.builder()
.name("SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA")
.accountName("examplebatchaccount")
.resourceGroupName("example")
.build()));
ctx.export("thumbprint", example.apply(getCertificateResult -> getCertificateResult.getThumbprint()));
}
}
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);
variables:
example:
Fn::Invoke:
Function: azure:batch:getCertificate
Arguments:
name: SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA
accountName: examplebatchaccount
resourceGroupName: example
outputs:
thumbprint: ${example.thumbprint}
Using getCertificate
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCertificate(args: GetCertificateArgs, opts?: InvokeOptions): Promise<GetCertificateResult>
function getCertificateOutput(args: GetCertificateOutputArgs, opts?: InvokeOptions): Output<GetCertificateResult>
def get_certificate(account_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCertificateResult
def get_certificate_output(account_name: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCertificateResult]
func LookupCertificate(ctx *Context, args *LookupCertificateArgs, opts ...InvokeOption) (*LookupCertificateResult, error)
func LookupCertificateOutput(ctx *Context, args *LookupCertificateOutputArgs, opts ...InvokeOption) LookupCertificateResultOutput
> Note: This function is named LookupCertificate
in the Go SDK.
public static class GetCertificate
{
public static Task<GetCertificateResult> InvokeAsync(GetCertificateArgs args, InvokeOptions? opts = null)
public static Output<GetCertificateResult> Invoke(GetCertificateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCertificateResult> getCertificate(GetCertificateArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: azure:batch/getCertificate:getCertificate
Arguments:
# Arguments dictionary
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 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.
- 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.
getCertificate Result
The following output properties are available:
- Account
Name string - Format string
The format of the certificate, such as
Cer
orPfx
.- 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
Cer
orPfx
.- 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
Cer
orPfx
.- 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
Cer
orPfx
.- 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
Cer
orPfx
.- 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.
- account
Name String - format String
The format of the certificate, such as
Cer
orPfx
.- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.