1. Packages
  2. Azure Native
  3. API Docs
  4. keyvault
  5. getSecret
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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.keyvault.getSecret

Explore with Pulumi AI

azure-native logo
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.73.0 published on Wednesday, Nov 20, 2024 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.

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure-native:keyvault:getSecret
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceGroupName string
    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.
    ResourceGroupName string
    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.
    resourceGroupName String
    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.
    resourceGroupName string
    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_name str
    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.
    resourceGroupName String
    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.AzureNative.KeyVault.Outputs.SecretPropertiesResponse
    Properties of the secret
    Tags 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 SecretPropertiesResponse
    Properties of the secret
    Tags 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 SecretPropertiesResponse
    Properties of the secret
    tags 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 SecretPropertiesResponse
    Properties of the secret
    tags {[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 SecretPropertiesResponse
    Properties of the secret
    tags 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
    tags 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.
    SecretUriWithVersion string
    The URI to retrieve the specific version of the secret.
    Attributes Pulumi.AzureNative.KeyVault.Inputs.SecretAttributesResponse
    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.
    SecretUriWithVersion string
    The URI to retrieve the specific version of the secret.
    Attributes SecretAttributesResponse
    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.
    secretUriWithVersion String
    The URI to retrieve the specific version of the secret.
    attributes SecretAttributesResponse
    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.
    secretUriWithVersion string
    The URI to retrieve the specific version of the secret.
    attributes SecretAttributesResponse
    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_with_version str
    The URI to retrieve the specific version of the secret.
    attributes SecretAttributesResponse
    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.
    secretUriWithVersion String
    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
    azure-native logo
    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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi