This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.keyvault.getSecret
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. Azure REST API version: 2023-02-01.
Other available API versions: 2023-07-01, 2024-04-01-preview, 2024-11-01, 2024-12-01-preview.
Using getSecret
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 getSecret(args: GetSecretArgs, opts?: InvokeOptions): Promise<GetSecretResult>
function getSecretOutput(args: GetSecretOutputArgs, opts?: InvokeOptions): Output<GetSecretResult>def get_secret(resource_group_name: Optional[str] = None,
               secret_name: Optional[str] = None,
               vault_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetSecretResult
def get_secret_output(resource_group_name: Optional[pulumi.Input[str]] = None,
               secret_name: Optional[pulumi.Input[str]] = None,
               vault_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetSecretResult]func LookupSecret(ctx *Context, args *LookupSecretArgs, opts ...InvokeOption) (*LookupSecretResult, error)
func LookupSecretOutput(ctx *Context, args *LookupSecretOutputArgs, opts ...InvokeOption) LookupSecretResultOutput> Note: This function is named LookupSecret in the Go SDK.
public static class GetSecret 
{
    public static Task<GetSecretResult> InvokeAsync(GetSecretArgs args, InvokeOptions? opts = null)
    public static Output<GetSecretResult> Invoke(GetSecretInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
public static Output<GetSecretResult> getSecret(GetSecretArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:keyvault:getSecret
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ResourceGroup stringName 
- The name of the Resource Group to which the vault belongs.
- SecretName string
- The name of the secret.
- VaultName string
- The name of the vault.
- ResourceGroup stringName 
- The name of the Resource Group to which the vault belongs.
- SecretName string
- The name of the secret.
- VaultName string
- The name of the vault.
- resourceGroup StringName 
- The name of the Resource Group to which the vault belongs.
- secretName String
- The name of the secret.
- vaultName String
- The name of the vault.
- resourceGroup stringName 
- The name of the Resource Group to which the vault belongs.
- secretName string
- The name of the secret.
- vaultName string
- The name of the vault.
- resource_group_ strname 
- The name of the Resource Group to which the vault belongs.
- secret_name str
- The name of the secret.
- vault_name str
- The name of the vault.
- resourceGroup StringName 
- The name of the Resource Group to which the vault belongs.
- secretName String
- The name of the secret.
- vaultName String
- The name of the vault.
getSecret Result
The following output properties are available:
- Id string
- Fully qualified identifier of the key vault resource.
- Location string
- Azure location of the key vault resource.
- Name string
- Name of the key vault resource.
- Properties
Pulumi.Azure Native. Key Vault. Outputs. Secret Properties Response 
- Properties of the secret
- Dictionary<string, string>
- Tags assigned to the key vault resource.
- Type string
- Resource type of the key vault resource.
- Id string
- Fully qualified identifier of the key vault resource.
- Location string
- Azure location of the key vault resource.
- Name string
- Name of the key vault resource.
- Properties
SecretProperties Response 
- Properties of the secret
- map[string]string
- Tags assigned to the key vault resource.
- Type string
- Resource type of the key vault resource.
- id String
- Fully qualified identifier of the key vault resource.
- location String
- Azure location of the key vault resource.
- name String
- Name of the key vault resource.
- properties
SecretProperties Response 
- Properties of the secret
- Map<String,String>
- Tags assigned to the key vault resource.
- type String
- Resource type of the key vault resource.
- id string
- Fully qualified identifier of the key vault resource.
- location string
- Azure location of the key vault resource.
- name string
- Name of the key vault resource.
- properties
SecretProperties Response 
- Properties of the secret
- {[key: string]: string}
- Tags assigned to the key vault resource.
- type string
- Resource type of the key vault resource.
- id str
- Fully qualified identifier of the key vault resource.
- location str
- Azure location of the key vault resource.
- name str
- Name of the key vault resource.
- properties
SecretProperties Response 
- Properties of the secret
- Mapping[str, str]
- Tags assigned to the key vault resource.
- type str
- Resource type of the key vault resource.
- id String
- Fully qualified identifier of the key vault resource.
- location String
- Azure location of the key vault resource.
- name String
- Name of the key vault resource.
- properties Property Map
- Properties of the secret
- Map<String>
- Tags assigned to the key vault resource.
- type String
- Resource type of the key vault resource.
Supporting Types
SecretAttributesResponse  
- Created int
- Creation time in seconds since 1970-01-01T00:00:00Z.
- Updated int
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- Enabled bool
- Determines whether the object is enabled.
- Expires int
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- NotBefore int
- Not before date in seconds since 1970-01-01T00:00:00Z.
- Created int
- Creation time in seconds since 1970-01-01T00:00:00Z.
- Updated int
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- Enabled bool
- Determines whether the object is enabled.
- Expires int
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- NotBefore int
- Not before date in seconds since 1970-01-01T00:00:00Z.
- created Integer
- Creation time in seconds since 1970-01-01T00:00:00Z.
- updated Integer
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- enabled Boolean
- Determines whether the object is enabled.
- expires Integer
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- notBefore Integer
- Not before date in seconds since 1970-01-01T00:00:00Z.
- created number
- Creation time in seconds since 1970-01-01T00:00:00Z.
- updated number
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- enabled boolean
- Determines whether the object is enabled.
- expires number
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- notBefore number
- Not before date in seconds since 1970-01-01T00:00:00Z.
- created int
- Creation time in seconds since 1970-01-01T00:00:00Z.
- updated int
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- enabled bool
- Determines whether the object is enabled.
- expires int
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- not_before int
- Not before date in seconds since 1970-01-01T00:00:00Z.
- created Number
- Creation time in seconds since 1970-01-01T00:00:00Z.
- updated Number
- Last updated time in seconds since 1970-01-01T00:00:00Z.
- enabled Boolean
- Determines whether the object is enabled.
- expires Number
- Expiry date in seconds since 1970-01-01T00:00:00Z.
- notBefore Number
- Not before date in seconds since 1970-01-01T00:00:00Z.
SecretPropertiesResponse  
- SecretUri string
- The URI to retrieve the current version of the secret.
- SecretUri stringWith Version 
- The URI to retrieve the specific version of the secret.
- Attributes
Pulumi.Azure Native. Key Vault. Inputs. Secret Attributes Response 
- The attributes of the secret.
- ContentType string
- The content type of the secret.
- Value string
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
- SecretUri string
- The URI to retrieve the current version of the secret.
- SecretUri stringWith Version 
- The URI to retrieve the specific version of the secret.
- Attributes
SecretAttributes Response 
- The attributes of the secret.
- ContentType string
- The content type of the secret.
- Value string
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
- secretUri String
- The URI to retrieve the current version of the secret.
- secretUri StringWith Version 
- The URI to retrieve the specific version of the secret.
- attributes
SecretAttributes Response 
- The attributes of the secret.
- contentType String
- The content type of the secret.
- value String
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
- secretUri string
- The URI to retrieve the current version of the secret.
- secretUri stringWith Version 
- The URI to retrieve the specific version of the secret.
- attributes
SecretAttributes Response 
- The attributes of the secret.
- contentType string
- The content type of the secret.
- value string
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
- secret_uri str
- The URI to retrieve the current version of the secret.
- secret_uri_ strwith_ version 
- The URI to retrieve the specific version of the secret.
- attributes
SecretAttributes Response 
- The attributes of the secret.
- content_type str
- The content type of the secret.
- value str
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
- secretUri String
- The URI to retrieve the current version of the secret.
- secretUri StringWith Version 
- The URI to retrieve the specific version of the secret.
- attributes Property Map
- The attributes of the secret.
- contentType String
- The content type of the secret.
- value String
- The value of the secret. NOTE: 'value' will never be returned from the service, as APIs using this model are is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi