Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Monday, Jun 27, 2022 by Pulumi

getCertificate

Use this data source to access information about an App Service Certificate.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.AppService.GetCertificate.InvokeAsync(new Azure.AppService.GetCertificateArgs
        {
            Name = "example-app-service-certificate",
            ResourceGroupName = "example-rg",
        }));
        this.AppServiceCertificateId = example.Apply(example => example.Id);
    }

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

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := appservice.LookupCertificate(ctx, &appservice.LookupCertificateArgs{
			Name:              "example-app-service-certificate",
			ResourceGroupName: "example-rg",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("appServiceCertificateId", example.Id)
		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(AppserviceFunctions.getCertificate(GetCertificateArgs.builder()
            .name("example-app-service-certificate")
            .resourceGroupName("example-rg")
            .build()));

        ctx.export("appServiceCertificateId", example.apply(getCertificateResult -> getCertificateResult.id()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.appservice.get_certificate(name="example-app-service-certificate",
    resource_group_name="example-rg")
pulumi.export("appServiceCertificateId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.appservice.getCertificate({
    name: "example-app-service-certificate",
    resourceGroupName: "example-rg",
});
export const appServiceCertificateId = example.then(example => example.id);
variables:
  example:
    Fn::Invoke:
      Function: azure:appservice:getCertificate
      Arguments:
        name: example-app-service-certificate
        resourceGroupName: example-rg
outputs:
  appServiceCertificateId: ${example.id}

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(name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetCertificateResult
def get_certificate_output(name: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, 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:appservice/getCertificate:getCertificate
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

Specifies the name of the certificate.

ResourceGroupName string

The name of the resource group in which to create the certificate.

Tags Dictionary<string, string>
Name string

Specifies the name of the certificate.

ResourceGroupName string

The name of the resource group in which to create the certificate.

Tags map[string]string
name String

Specifies the name of the certificate.

resourceGroupName String

The name of the resource group in which to create the certificate.

tags Map<String,String>
name string

Specifies the name of the certificate.

resourceGroupName string

The name of the resource group in which to create the certificate.

tags {[key: string]: string}
name str

Specifies the name of the certificate.

resource_group_name str

The name of the resource group in which to create the certificate.

tags Mapping[str, str]
name String

Specifies the name of the certificate.

resourceGroupName String

The name of the resource group in which to create the certificate.

tags Map<String>

getCertificate Result

The following output properties are available:

ExpirationDate string

The expiration date for the certificate.

FriendlyName string

The friendly name of the certificate.

HostNames List<string>

List of host names the certificate applies to.

Id string

The provider-assigned unique ID for this managed resource.

IssueDate string

The issue date for the certificate.

Issuer string

The name of the certificate issuer.

Location string
Name string
ResourceGroupName string
SubjectName string

The subject name of the certificate.

Thumbprint string

The thumbprint for the certificate.

Tags Dictionary<string, string>
ExpirationDate string

The expiration date for the certificate.

FriendlyName string

The friendly name of the certificate.

HostNames []string

List of host names the certificate applies to.

Id string

The provider-assigned unique ID for this managed resource.

IssueDate string

The issue date for the certificate.

Issuer string

The name of the certificate issuer.

Location string
Name string
ResourceGroupName string
SubjectName string

The subject name of the certificate.

Thumbprint string

The thumbprint for the certificate.

Tags map[string]string
expirationDate String

The expiration date for the certificate.

friendlyName String

The friendly name of the certificate.

hostNames List<String>

List of host names the certificate applies to.

id String

The provider-assigned unique ID for this managed resource.

issueDate String

The issue date for the certificate.

issuer String

The name of the certificate issuer.

location String
name String
resourceGroupName String
subjectName String

The subject name of the certificate.

thumbprint String

The thumbprint for the certificate.

tags Map<String,String>
expirationDate string

The expiration date for the certificate.

friendlyName string

The friendly name of the certificate.

hostNames string[]

List of host names the certificate applies to.

id string

The provider-assigned unique ID for this managed resource.

issueDate string

The issue date for the certificate.

issuer string

The name of the certificate issuer.

location string
name string
resourceGroupName string
subjectName string

The subject name of the certificate.

thumbprint string

The thumbprint for the certificate.

tags {[key: string]: string}
expiration_date str

The expiration date for the certificate.

friendly_name str

The friendly name of the certificate.

host_names Sequence[str]

List of host names the certificate applies to.

id str

The provider-assigned unique ID for this managed resource.

issue_date str

The issue date for the certificate.

issuer str

The name of the certificate issuer.

location str
name str
resource_group_name str
subject_name str

The subject name of the certificate.

thumbprint str

The thumbprint for the certificate.

tags Mapping[str, str]
expirationDate String

The expiration date for the certificate.

friendlyName String

The friendly name of the certificate.

hostNames List<String>

List of host names the certificate applies to.

id String

The provider-assigned unique ID for this managed resource.

issueDate String

The issue date for the certificate.

issuer String

The name of the certificate issuer.

location String
name String
resourceGroupName String
subjectName String

The subject name of the certificate.

thumbprint String

The thumbprint for the certificate.

tags Map<String>

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.