1. Packages
  2. Azure Classic
  3. API Docs
  4. batch
  5. getCertificate

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.batch.getCertificate

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    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/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
    	})
    }
    
    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:

    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.
    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.
    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.

    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.
    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.
    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.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi