Class KeyVaultSecretIdentifier
- java.lang.Object
-
- com.azure.security.keyvault.secrets.models.KeyVaultSecretIdentifier
-
public final class KeyVaultSecretIdentifier extends Object
Information about aKeyVaultSecretparsed from the secret URL. You can use this information when calling methods ofSecretClientorSecretAsyncClient.
-
-
Constructor Summary
Constructors Constructor Description KeyVaultSecretIdentifier(String sourceId)Create a newKeyVaultSecretIdentifierfrom a given Key Vault identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the name of the secret.StringgetSourceId()Gets the key identifier used to create this objectStringgetVaultUrl()Gets the URL of the Key Vault.StringgetVersion()Gets the optional version of the secret.
-
-
-
Constructor Detail
-
KeyVaultSecretIdentifier
public KeyVaultSecretIdentifier(String sourceId)
Create a newKeyVaultSecretIdentifierfrom a given Key Vault identifier.Some examples:
- https://{key-vault-name}.vault.azure.net/secrets/{secret-name}
- https://{key-vault-name}.vault.azure.net/secrets/{secret-name}/pending
- https://{key-vault-name}.vault.azure.net/secrets/{secret-name}/{unique-version-id}
- https://{key-vault-name}.vault.azure.net/deletedsecrets/{deleted-secret-name}
- Parameters:
sourceId- The identifier to extract information from.- Throws:
IllegalArgumentException- IfsourceIdis an invalid Key Vault Secret identifier.NullPointerException- IfsourceIdisnull.
-
-
Method Detail
-
getSourceId
public String getSourceId()
Gets the key identifier used to create this object- Returns:
- The secret identifier.
-
getVaultUrl
public String getVaultUrl()
Gets the URL of the Key Vault.- Returns:
- The Key Vault URL.
-
getName
public String getName()
Gets the name of the secret.- Returns:
- The secret name.
-
getVersion
public String getVersion()
Gets the optional version of the secret.- Returns:
- The secret version.
-
-