Class KeyVaultKeyIdentifier
- java.lang.Object
-
- com.azure.security.keyvault.keys.models.KeyVaultKeyIdentifier
-
public final class KeyVaultKeyIdentifier extends Object
Information about aKeyVaultKeyparsed from the key URL. You can use this information when calling methods ofKeyClientorKeyAsyncClient.
-
-
Constructor Summary
Constructors Constructor Description KeyVaultKeyIdentifier(String sourceId)Create a newKeyVaultKeyIdentifierfrom a given Key Vault identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Gets the name of the key.StringgetSourceId()Gets the key identifier used to create this object.StringgetVaultUrl()Gets the URL of the Key Vault.StringgetVersion()Gets the optional version of the key.
-
-
-
Constructor Detail
-
KeyVaultKeyIdentifier
public KeyVaultKeyIdentifier(String sourceId)
Create a newKeyVaultKeyIdentifierfrom a given Key Vault identifier.Some examples:
- https://{key-vault-name}.vault.azure.net/keys/{key-name}
- https://{key-vault-name}.vault.azure.net/keys/{key-name}/pending
- https://{key-vault-name}.vault.azure.net/keys/{key-name}/{unique-version-id}
- https://{key-vault-name}.vault.azure.net/deletedkeys/{deleted-key-name}
- Parameters:
sourceId- The identifier to extract information from.- Throws:
IllegalArgumentException- IfsourceIdis an invalid Key Vault identifier.NullPointerException- IfsourceIdisnull.
-
-
Method Detail
-
getSourceId
public String getSourceId()
Gets the key identifier used to create this object.- Returns:
- The key 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 key.- Returns:
- The key name.
-
getVersion
public String getVersion()
Gets the optional version of the key.- Returns:
- The key version.
-
-