We recommend using Azure Native.
azure.appservice.getCertificate
Explore with Pulumi AI
Use this data source to access information about an App Service Certificate.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.AppService.GetCertificate.Invoke(new()
{
Name = "example-app-service-certificate",
ResourceGroupName = "example-rg",
});
return new Dictionary<string, object?>
{
["appServiceCertificateId"] = example.Apply(getCertificateResult => getCertificateResult.Id),
};
});
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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.AppserviceFunctions;
import com.pulumi.azure.appservice.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 = AppserviceFunctions.getCertificate(GetCertificateArgs.builder()
.name("example-app-service-certificate")
.resourceGroupName("example-rg")
.build());
ctx.export("appServiceCertificateId", example.applyValue(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.
- Resource
Group stringName The name of the resource group in which to create the certificate.
- Dictionary<string, string>
- Name string
Specifies the name of the certificate.
- Resource
Group stringName The name of the resource group in which to create the certificate.
- map[string]string
- name String
Specifies the name of the certificate.
- resource
Group StringName The name of the resource group in which to create the certificate.
- Map<String,String>
- name string
Specifies the name of the certificate.
- resource
Group stringName The name of the resource group in which to create the certificate.
- {[key: string]: string}
- name str
Specifies the name of the certificate.
- resource_
group_ strname The name of the resource group in which to create the certificate.
- Mapping[str, str]
- name String
Specifies the name of the certificate.
- resource
Group StringName The name of the resource group in which to create the certificate.
- Map<String>
getCertificate Result
The following output properties are available:
- Expiration
Date string The expiration date for the certificate.
- Friendly
Name string The friendly name of the certificate.
- Host
Names List<string> List of host names the certificate applies to.
- Id string
The provider-assigned unique ID for this managed resource.
- Issue
Date string The issue date for the certificate.
- Issuer string
The name of the certificate issuer.
- Location string
- Name string
- Resource
Group stringName - Subject
Name string The subject name of the certificate.
- Thumbprint string
The thumbprint for the certificate.
- Dictionary<string, string>
- Expiration
Date string The expiration date for the certificate.
- Friendly
Name string The friendly name of the certificate.
- Host
Names []string List of host names the certificate applies to.
- Id string
The provider-assigned unique ID for this managed resource.
- Issue
Date string The issue date for the certificate.
- Issuer string
The name of the certificate issuer.
- Location string
- Name string
- Resource
Group stringName - Subject
Name string The subject name of the certificate.
- Thumbprint string
The thumbprint for the certificate.
- map[string]string
- expiration
Date String The expiration date for the certificate.
- friendly
Name String The friendly name of the certificate.
- host
Names List<String> List of host names the certificate applies to.
- id String
The provider-assigned unique ID for this managed resource.
- issue
Date String The issue date for the certificate.
- issuer String
The name of the certificate issuer.
- location String
- name String
- resource
Group StringName - subject
Name String The subject name of the certificate.
- thumbprint String
The thumbprint for the certificate.
- Map<String,String>
- expiration
Date string The expiration date for the certificate.
- friendly
Name string The friendly name of the certificate.
- host
Names string[] List of host names the certificate applies to.
- id string
The provider-assigned unique ID for this managed resource.
- issue
Date string The issue date for the certificate.
- issuer string
The name of the certificate issuer.
- location string
- name string
- resource
Group stringName - subject
Name string The subject name of the certificate.
- thumbprint string
The thumbprint for the certificate.
- {[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_ strname - subject_
name str The subject name of the certificate.
- thumbprint str
The thumbprint for the certificate.
- Mapping[str, str]
- expiration
Date String The expiration date for the certificate.
- friendly
Name String The friendly name of the certificate.
- host
Names List<String> List of host names the certificate applies to.
- id String
The provider-assigned unique ID for this managed resource.
- issue
Date String The issue date for the certificate.
- issuer String
The name of the certificate issuer.
- location String
- name String
- resource
Group StringName - subject
Name String The subject name of the certificate.
- thumbprint String
The thumbprint for the certificate.
- Map<String>
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.