1. Packages
  2. Azure Classic
  3. API Docs
  4. keyvault
  5. getCertificates

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

azure.keyvault.getCertificates

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

    Use this data source to retrieve a list of certificate names from an existing Key Vault.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    	
    object NotImplemented(string errorMessage) 
    {
        throw new System.NotImplementedException(errorMessage);
    }
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.KeyVault.GetCertificates.Invoke(new()
        {
            KeyVaultId = existing.Id,
        });
    
        var exampleGetCertificate = .ToDictionary(item => {
            var __key = item.Key;
            return __key;
        }, item => {
            var __key = item.Key;
            return Azure.KeyVault.GetCertificate.Invoke(new()
            {
                Name = __key,
                KeyVaultId = existing.Id,
            });
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/keyvault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func notImplemented(message string) pulumi.AnyOutput {
    	panic(message)
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := keyvault.GetCertificates(ctx, &keyvault.GetCertificatesArgs{
    			KeyVaultId: existing.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_ := "TODO: For expression"
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_azure as azure
    
    
    def not_implemented(msg):
        raise NotImplementedError(msg)
    
    example = azure.keyvault.get_certificates(key_vault_id=existing["id"])
    example_get_certificate = {__key: azure.keyvault.get_certificate(name=__key,
        key_vault_id=existing["id"]) for __key, __value in not_implemented("toset(data.azurerm_key_vault_certificates.example.names)")}
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    function notImplemented(message: string) {
        throw new Error(message);
    }
    
    const example = azure.keyvault.getCertificates({
        keyVaultId: existing.id,
    });
    const exampleGetCertificate = .reduce((__obj, [, ]) => ({ ...__obj, [__key]: azure.keyvault.getCertificate({
        name: __key,
        keyVaultId: existing.id,
    }) }));
    

    Coming soon!

    Using getCertificates

    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 getCertificates(args: GetCertificatesArgs, opts?: InvokeOptions): Promise<GetCertificatesResult>
    function getCertificatesOutput(args: GetCertificatesOutputArgs, opts?: InvokeOptions): Output<GetCertificatesResult>
    def get_certificates(include_pending: Optional[bool] = None,
                         key_vault_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCertificatesResult
    def get_certificates_output(include_pending: Optional[pulumi.Input[bool]] = None,
                         key_vault_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCertificatesResult]
    func GetCertificates(ctx *Context, args *GetCertificatesArgs, opts ...InvokeOption) (*GetCertificatesResult, error)
    func GetCertificatesOutput(ctx *Context, args *GetCertificatesOutputArgs, opts ...InvokeOption) GetCertificatesResultOutput

    > Note: This function is named GetCertificates in the Go SDK.

    public static class GetCertificates 
    {
        public static Task<GetCertificatesResult> InvokeAsync(GetCertificatesArgs args, InvokeOptions? opts = null)
        public static Output<GetCertificatesResult> Invoke(GetCertificatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCertificatesResult> getCertificates(GetCertificatesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:keyvault/getCertificates:getCertificates
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyVaultId string

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    IncludePending bool
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.
    KeyVaultId string

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    IncludePending bool
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.
    keyVaultId String

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    includePending Boolean
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.
    keyVaultId string

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    includePending boolean
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.
    key_vault_id str

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    include_pending bool
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.
    keyVaultId String

    Specifies the ID of the Key Vault instance to fetch certificate names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

    includePending Boolean
    Specifies whether to include certificates which are not completely provisioned. Defaults to true.

    getCertificates Result

    The following output properties are available:

    Certificates List<GetCertificatesCertificate>
    One or more certificates blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultId string
    The Key Vault ID.
    Names List<string>
    List containing names of certificates that exist in this Key Vault.
    IncludePending bool
    Certificates []GetCertificatesCertificate
    One or more certificates blocks as defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultId string
    The Key Vault ID.
    Names []string
    List containing names of certificates that exist in this Key Vault.
    IncludePending bool
    certificates List<GetCertificatesCertificate>
    One or more certificates blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultId String
    The Key Vault ID.
    names List<String>
    List containing names of certificates that exist in this Key Vault.
    includePending Boolean
    certificates GetCertificatesCertificate[]
    One or more certificates blocks as defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    keyVaultId string
    The Key Vault ID.
    names string[]
    List containing names of certificates that exist in this Key Vault.
    includePending boolean
    certificates Sequence[GetCertificatesCertificate]
    One or more certificates blocks as defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    key_vault_id str
    The Key Vault ID.
    names Sequence[str]
    List containing names of certificates that exist in this Key Vault.
    include_pending bool
    certificates List<Property Map>
    One or more certificates blocks as defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultId String
    The Key Vault ID.
    names List<String>
    List containing names of certificates that exist in this Key Vault.
    includePending Boolean

    Supporting Types

    GetCertificatesCertificate

    Enabled bool
    Whether this certificate is enabled.
    Id string
    The ID of this certificate.
    Name string
    The name of certificate.
    Tags Dictionary<string, string>
    The tags of this certificate.
    Enabled bool
    Whether this certificate is enabled.
    Id string
    The ID of this certificate.
    Name string
    The name of certificate.
    Tags map[string]string
    The tags of this certificate.
    enabled Boolean
    Whether this certificate is enabled.
    id String
    The ID of this certificate.
    name String
    The name of certificate.
    tags Map<String,String>
    The tags of this certificate.
    enabled boolean
    Whether this certificate is enabled.
    id string
    The ID of this certificate.
    name string
    The name of certificate.
    tags {[key: string]: string}
    The tags of this certificate.
    enabled bool
    Whether this certificate is enabled.
    id str
    The ID of this certificate.
    name str
    The name of certificate.
    tags Mapping[str, str]
    The tags of this certificate.
    enabled Boolean
    Whether this certificate is enabled.
    id String
    The ID of this certificate.
    name String
    The name of certificate.
    tags Map<String>
    The tags of this certificate.

    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.67.1 published on Tuesday, Feb 27, 2024 by Pulumi