We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.batch.getCertificate
Explore with Pulumi AI
Use this data source to access information about an existing certificate in a Batch Account.
Example Usage
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);
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)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Batch.GetCertificate.Invoke(new()
{
Name = "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
AccountName = "examplebatchaccount",
ResourceGroupName = "example",
});
return new Dictionary<string, object?>
{
["thumbprint"] = example.Apply(getCertificateResult => getCertificateResult.Thumbprint),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.batch.BatchFunctions;
import com.pulumi.azure.batch.inputs.GetCertificateArgs;
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) {
final var example = BatchFunctions.getCertificate(GetCertificateArgs.builder()
.name("SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA")
.accountName("examplebatchaccount")
.resourceGroupName("example")
.build());
ctx.export("thumbprint", example.applyValue(getCertificateResult -> getCertificateResult.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
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.