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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

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

    Using getSecrets

    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 getSecrets(args: GetSecretsArgs, opts?: InvokeOptions): Promise<GetSecretsResult>
    function getSecretsOutput(args: GetSecretsOutputArgs, opts?: InvokeOptions): Output<GetSecretsResult>
    def get_secrets(key_vault_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSecretsResult
    def get_secrets_output(key_vault_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetSecretsResult]
    func GetSecrets(ctx *Context, args *GetSecretsArgs, opts ...InvokeOption) (*GetSecretsResult, error)
    func GetSecretsOutput(ctx *Context, args *GetSecretsOutputArgs, opts ...InvokeOption) GetSecretsResultOutput

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

    public static class GetSecrets 
    {
        public static Task<GetSecretsResult> InvokeAsync(GetSecretsArgs args, InvokeOptions? opts = null)
        public static Output<GetSecretsResult> Invoke(GetSecretsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOptions options)
    public static Output<GetSecretsResult> getSecrets(GetSecretsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:keyvault/getSecrets:getSecrets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    KeyVaultId string
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.
    KeyVaultId string
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.
    keyVaultId String
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.
    keyVaultId string
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.
    key_vault_id str
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.
    keyVaultId String
    Specifies the ID of the Key Vault instance to fetch secret names from, available on the azure.keyvault.KeyVault Data Source / Resource.

    getSecrets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultId string
    The Key Vault ID.
    Names List<string>
    List containing names of secrets that exist in this Key Vault.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyVaultId string
    The Key Vault ID.
    Names []string
    List containing names of secrets that exist in this Key Vault.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultId String
    The Key Vault ID.
    names List<String>
    List containing names of secrets that exist in this Key Vault.
    id string
    The provider-assigned unique ID for this managed resource.
    keyVaultId string
    The Key Vault ID.
    names string[]
    List containing names of secrets that exist in this Key Vault.
    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 secrets that exist in this Key Vault.
    id String
    The provider-assigned unique ID for this managed resource.
    keyVaultId String
    The Key Vault ID.
    names List<String>
    List containing names of secrets that exist in this Key Vault.

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.