679 строки
167 KiB
YAML
679 строки
167 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.security.keyvault.keys.KeyAsyncClient"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient"
|
|
name: "KeyAsyncClient"
|
|
nameWithType: "KeyAsyncClient"
|
|
summary: "The <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient\"></xref> provides asynchronous methods to manage <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the Azure Key Vault."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **KeyAsyncClient**"
|
|
methods:
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.backupKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.backupKey(String name)"
|
|
name: "backupKey(String name)"
|
|
nameWithType: "KeyAsyncClient.backupKey(String name)"
|
|
summary: "Requests a backup of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> be downloaded to the client."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<byte[]> backupKey(String name)"
|
|
desc: "Requests a backup of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> be downloaded to the client. The key backup operation exports a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> from Azure Key Vault in a protected form. Note that this operation does not return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to generate a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in one Azure Key Vault instance, backup the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, and then restore it into another Azure Key Vault instance. The backup operation may be used to export, in protected form, any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> from Azure Key Vault. Individual versions of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> cannot be backed up. `Backup/Restore` can be performed within geographical boundaries only; meaning that a backup from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area. This operation requires the `key/backup` permission.\n\n**Code Samples**\n\nBacks up the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> from the key vault. Subscribes to the call asynchronously and prints out the length of the key's backup byte array returned in the response.\n\n```java\nkeyAsyncClient.backupKey(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(bytes ->\n System.out.printf(\"Key backup byte array length: %s%n\", bytes.length));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the backed up key blob."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.backupKeyWithResponse(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.backupKeyWithResponse(String name)"
|
|
name: "backupKeyWithResponse(String name)"
|
|
nameWithType: "KeyAsyncClient.backupKeyWithResponse(String name)"
|
|
summary: "Requests a backup of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> be downloaded to the client."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<byte[]>> backupKeyWithResponse(String name)"
|
|
desc: "Requests a backup of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> be downloaded to the client. The key backup operation exports a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> from Azure Key Vault in a protected form. Note that this operation does not return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to generate a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in one Azure Key Vault instance, backup the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, and then restore it into another Azure Key Vault instance. The backup operation may be used to export, in protected form, any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> from Azure Key Vault. Individual versions of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> cannot be backed up. `Backup/Restore` can be performed within geographical boundaries only; meaning that a backup from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area. This operation requires the `key/backup` permission.\n\n**Code Samples**\n\nBacks up the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> from the key vault. Subscribes to the call asynchronously and prints out the length of the key's backup byte array returned in the response.\n\n```java\nkeyAsyncClient.backupKeyWithResponse(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(backupKeyResponse ->\n System.out.printf(\"Key backup byte array length: %s%n\", backupKeyResponse.getValue().length));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the backed up\n key blob."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.beginDeleteKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.beginDeleteKey(String name)"
|
|
name: "beginDeleteKey(String name)"
|
|
nameWithType: "KeyAsyncClient.beginDeleteKey(String name)"
|
|
summary: "Deletes a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> of any type from the key vault."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to be deleted."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public PollerFlux<DeletedKey,Void> beginDeleteKey(String name)"
|
|
desc: "Deletes a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> of any type from the key vault. If soft-delete is enabled on the key vault then the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is placed in the deleted state and requires to be purged for permanent deletion else the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is permanently deleted. The delete operation applies to any <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> stored in Azure Key Vault but it cannot be applied to an individual version of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. This operation removes the cryptographic material associated with the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, which means the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is not usable for `Sign/Verify`, `Wrap/Unwrap` or `Encrypt/Decrypt` operations. This operation requires the `keys/delete` permission.\n\n**Code Samples**\n\nDeletes the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the Azure Key Vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.beginDeleteKey(\"keyName\")\n .subscribe(pollResponse -> {\n System.out.printf(\"Deletion status: %s%n\", pollResponse.getStatus());\n System.out.printf(\"Key name: %s%n\", pollResponse.getValue().getName());\n System.out.printf(\"Key delete date: %s%n\", pollResponse.getValue().getDeletedOn());\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref> to poll on the <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> status."
|
|
type: "<xref href=\"com.azure.core.util.polling.PollerFlux?alt=com.azure.core.util.polling.PollerFlux&text=PollerFlux\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.DeletedKey?alt=com.azure.security.keyvault.keys.models.DeletedKey&text=DeletedKey\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.beginRecoverDeletedKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.beginRecoverDeletedKey(String name)"
|
|
name: "beginRecoverDeletedKey(String name)"
|
|
nameWithType: "KeyAsyncClient.beginRecoverDeletedKey(String name)"
|
|
summary: "Recovers the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> in the key vault to its latest version and can only be performed on a soft-delete enabled vault."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> to be recovered."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public PollerFlux<KeyVaultKey,Void> beginRecoverDeletedKey(String name)"
|
|
desc: "Recovers the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> in the key vault to its latest version and can only be performed on a soft-delete enabled vault. An attempt to recover an <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"non-deleted key\"></xref> will return an error. Consider this the inverse of the delete operation on soft-delete enabled vaults. This operation requires the `keys/recover` permission.\n\n**Code Samples**\n\nRecovers the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the recovered key details when a response has been received.\n\n```java\nkeyAsyncClient.beginRecoverDeletedKey(\"deletedKeyName\")\n .subscribe(pollResponse -> {\n System.out.printf(\"Recovery status: %s%n\", pollResponse.getStatus());\n System.out.printf(\"Key name: %s%n\", pollResponse.getValue().getName());\n System.out.printf(\"Key type: %s%n\", pollResponse.getValue().getKeyType());\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref> to poll on the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"recovered key\"></xref> status."
|
|
type: "<xref href=\"com.azure.core.util.polling.PollerFlux?alt=com.azure.core.util.polling.PollerFlux&text=PollerFlux\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createEcKey(com.azure.security.keyvault.keys.models.CreateEcKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createEcKey(CreateEcKeyOptions createEcKeyOptions)"
|
|
name: "createEcKey(CreateEcKeyOptions createEcKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createEcKey(CreateEcKeyOptions createEcKeyOptions)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> being created."
|
|
name: "createEcKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateEcKeyOptions&text=CreateEcKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> createEcKey(CreateEcKeyOptions createEcKeyOptions)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> and stores it in the key vault. The create EC key operation can be used to create any EC <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateEcKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getCurveName()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key curve\"></xref> can be optionally specified. If not specified, the default value <xref uid=\"com.azure.security.keyvault.keys.models.KeyCurveName.P_256\" data-throw-if-not-resolved=\"false\" data-raw-source=\"P-256\"></xref> is used by Azure Key Vault. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyVaultKey\"></xref> key to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> with a <xref uid=\"com.azure.security.keyvault.keys.models.KeyCurveName.P_384\" data-throw-if-not-resolved=\"false\" data-raw-source=\"P-384\"></xref> web key curve. The key activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions(\"keyName\")\n .setCurveName(KeyCurveName.P_384)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createEcKey(createEcKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(ecKey ->\n System.out.printf(\"Created key with name: %s and id: %s %n\", ecKey.getName(),\n ecKey.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createEcKeyWithResponse(com.azure.security.keyvault.keys.models.CreateEcKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions)"
|
|
name: "createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> being created."
|
|
name: "createEcKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateEcKeyOptions&text=CreateEcKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyVaultKey>> createEcKeyWithResponse(CreateEcKeyOptions createEcKeyOptions)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> and stores it in the key vault. The create EC key operation can be used to create any EC <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateEcKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getCurveName()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key curve\"></xref> can be optionally specified. If not specified, the default value <xref uid=\"com.azure.security.keyvault.keys.models.KeyCurveName.P_256\" data-throw-if-not-resolved=\"false\" data-raw-source=\"P-256\"></xref> is used by Azure Key Vault. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateEcKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyVaultKey\"></xref> key to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref> with a <xref uid=\"com.azure.security.keyvault.keys.models.KeyCurveName.P_384\" data-throw-if-not-resolved=\"false\" data-raw-source=\"P-384\"></xref> web key curve. The key activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateEcKeyOptions createEcKeyOptions = new CreateEcKeyOptions(\"keyName\")\n .setCurveName(KeyCurveName.P_384)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createEcKeyWithResponse(createEcKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(createEcKeyResponse ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", createEcKeyResponse.getValue().getName(),\n createEcKeyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createKey(com.azure.security.keyvault.keys.models.CreateKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createKey(CreateKeyOptions createKeyOptions)"
|
|
name: "createKey(CreateKeyOptions createKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createKey(CreateKeyOptions createKeyOptions)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> being created."
|
|
name: "createKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateKeyOptions&text=CreateKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> createKey(CreateKeyOptions createKeyOptions)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The create key operation can be used to create any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions.getExpiresOn()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions.getNotBefore()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions.isEnabled()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions.getKeyType()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT\"></xref>, and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> which activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateKeyOptions createKeyOptions = new CreateKeyOptions(\"keyName\", KeyType.RSA)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createKey(createKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(key ->\n System.out.printf(\"Created key with name: %s and id: %s %n\", key.getName(),\n key.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createKey(java.lang.String,com.azure.security.keyvault.keys.models.KeyType)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createKey(String name, KeyType keyType)"
|
|
name: "createKey(String name, KeyType keyType)"
|
|
nameWithType: "KeyAsyncClient.createKey(String name, KeyType keyType)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> being created."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. For valid values, see <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyType\"></xref>."
|
|
name: "keyType"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyType?alt=com.azure.security.keyvault.keys.models.KeyType&text=KeyType\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> createKey(String name, KeyType keyType)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The create key operation can be used to create any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT\"></xref>, and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref>. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.createKey(\"keyName\", KeyType.EC)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(key ->\n System.out.printf(\"Created key with name: %s and id: %s %n\", key.getName(),\n key.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createKeyWithResponse(com.azure.security.keyvault.keys.models.CreateKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createKeyWithResponse(CreateKeyOptions createKeyOptions)"
|
|
name: "createKeyWithResponse(CreateKeyOptions createKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createKeyWithResponse(CreateKeyOptions createKeyOptions)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> being created."
|
|
name: "createKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateKeyOptions&text=CreateKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyVaultKey>> createKeyWithResponse(CreateKeyOptions createKeyOptions)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The create key operation can be used to create any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.EC_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA-HSM\"></xref>, <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT\"></xref>, and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"EC key\"></xref>. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateKeyOptions createKeyOptions = new CreateKeyOptions(\"keyName\", KeyType.RSA)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createKeyWithResponse(createKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(createKeyResponse ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", createKeyResponse.getValue().getName(),\n createKeyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createOctKey(com.azure.security.keyvault.keys.models.CreateOctKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createOctKey(CreateOctKeyOptions createOctKeyOptions)"
|
|
name: "createOctKey(CreateOctKeyOptions createOctKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createOctKey(CreateOctKeyOptions createOctKeyOptions)"
|
|
summary: "Creates and stores a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> being created."
|
|
name: "createOctKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateOctKeyOptions&text=CreateOctKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> createOctKey(CreateOctKeyOptions createOctKeyOptions)"
|
|
desc: "Creates and stores a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> in the key vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the key. This operation requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateOctKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyVaultKey\"></xref> key to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref>. The <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the details of the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> when a response has been received.\n\n```java\nCreateOctKeyOptions createOctKeyOptions = new CreateOctKeyOptions(\"keyName\")\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createOctKey(createOctKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(octKey ->\n System.out.printf(\"Created key with name: %s and id: %s %n\", octKey.getName(),\n octKey.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createOctKeyWithResponse(com.azure.security.keyvault.keys.models.CreateOctKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createOctKeyWithResponse(CreateOctKeyOptions createOctKeyOptions)"
|
|
name: "createOctKeyWithResponse(CreateOctKeyOptions createOctKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createOctKeyWithResponse(CreateOctKeyOptions createOctKeyOptions)"
|
|
summary: "Creates and stores a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> being created."
|
|
name: "createOctKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateOctKeyOptions&text=CreateOctKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyVaultKey>> createOctKeyWithResponse(CreateOctKeyOptions createOctKeyOptions)"
|
|
desc: "Creates and stores a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref> in the key vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the key. This operation requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateOctKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateOctKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyVaultKey\"></xref> key to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.OCT_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OCT-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"symmetric key\"></xref>. The <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the details of the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> when a response has been received.\n\n```java\nCreateOctKeyOptions createOctKeyOptions = new CreateOctKeyOptions(\"keyName\")\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createOctKeyWithResponse(createOctKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(createOctKeyResponse ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", createOctKeyResponse.getValue().getName(),\n createOctKeyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createRsaKey(com.azure.security.keyvault.keys.models.CreateRsaKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createRsaKey(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
name: "createRsaKey(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createRsaKey(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
summary: "/\\*\\* Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> being created."
|
|
name: "createRsaKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateRsaKeyOptions&text=CreateRsaKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> createRsaKey(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
desc: "/\\*\\* Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> and stores it in the key vault. The create RSA key operation can be used to create any RSA key type in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateRsaKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getKeySize()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keySize\"></xref> can be optionally specified. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> with size 2048 which activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions(\"keyName\")\n .setKeySize(2048)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createRsaKey(createRsaKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(rsaKey ->\n System.out.printf(\"Created key with name: %s and id: %s %n\", rsaKey.getName(),\n rsaKey.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.createRsaKeyWithResponse(com.azure.security.keyvault.keys.models.CreateRsaKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
name: "createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
summary: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> being created."
|
|
name: "createRsaKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions?alt=com.azure.security.keyvault.keys.models.CreateRsaKeyOptions&text=CreateRsaKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyVaultKey>> createRsaKeyWithResponse(CreateRsaKeyOptions createRsaKeyOptions)"
|
|
desc: "Creates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> and stores it in the key vault. The create RSA key operation can be used to create any RSA key type in Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. It requires the `keys/create` permission.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CreateRsaKeyOptions\"></xref> parameter is required. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getKeySize()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keySize\"></xref> can be optionally specified. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values are optional. The <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` by Azure Key Vault, if not specified.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.CreateRsaKeyOptions.getKeyType*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keyType\"></xref> indicates the type of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to create. Possible values include: <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyType.RSA_HSM\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA-HSM\"></xref>.\n\n**Code Samples**\n\nCreates a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RSA key\"></xref> with size 2048 which activates in one day and expires in one year. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref> details when a response has been received.\n\n```java\nCreateRsaKeyOptions createRsaKeyOptions = new CreateRsaKeyOptions(\"keyName\")\n .setKeySize(2048)\n .setNotBefore(OffsetDateTime.now().plusDays(1))\n .setExpiresOn(OffsetDateTime.now().plusYears(1));\n\n keyAsyncClient.createRsaKeyWithResponse(createRsaKeyOptions)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(createRsaKeyResponse ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", createRsaKeyResponse.getValue().getName(),\n createRsaKeyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"created key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getCryptographyAsyncClient(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getCryptographyAsyncClient(String keyName)"
|
|
name: "getCryptographyAsyncClient(String keyName)"
|
|
nameWithType: "KeyAsyncClient.getCryptographyAsyncClient(String keyName)"
|
|
summary: "Creates a <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> for the latest version of a given key."
|
|
parameters:
|
|
- description: "The name of the key."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public CryptographyAsyncClient getCryptographyAsyncClient(String keyName)"
|
|
desc: "Creates a <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> for the latest version of a given key.\n\nTo ensure correct behavior when performing operations such as `Decrypt`, `Unwrap` and `Verify`, it is recommended to use a <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> created for the specific key version that was used for the corresponding inverse operation: `Encrypt`, `Wrap`, or `Sign`, respectively.\n\nYou can provide a key version either via <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.getCryptographyAsyncClient(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#getCryptographyAsyncClient(String, String)\"></xref> or by ensuring it is included in the `keyIdentifier` passed to <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyClientBuilder.keyIdentifier(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyClientBuilder#keyIdentifier(String)\"></xref> before building a client."
|
|
returns:
|
|
description: "An instance of <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> associated with the latest version of a key with the\n provided name."
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient?alt=com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient&text=CryptographyAsyncClient\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getCryptographyAsyncClient(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getCryptographyAsyncClient(String keyName, String keyVersion)"
|
|
name: "getCryptographyAsyncClient(String keyName, String keyVersion)"
|
|
nameWithType: "KeyAsyncClient.getCryptographyAsyncClient(String keyName, String keyVersion)"
|
|
summary: "Creates a <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> for a given key version."
|
|
parameters:
|
|
- description: "The name of the key."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The key version."
|
|
name: "keyVersion"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public CryptographyAsyncClient getCryptographyAsyncClient(String keyName, String keyVersion)"
|
|
desc: "Creates a <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> for a given key version."
|
|
returns:
|
|
description: "An instance of <xref uid=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CryptographyAsyncClient\"></xref> associated with a key with the provided name and version.\n If <code>keyVersion</code> is <code>null</code> or empty, the client will use the latest version of the key."
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient?alt=com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient&text=CryptographyAsyncClient\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getDeletedKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getDeletedKey(String name)"
|
|
name: "getDeletedKey(String name)"
|
|
nameWithType: "KeyAsyncClient.getDeletedKey(String name)"
|
|
summary: "Gets the public part of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
parameters:
|
|
- description: "The name of the deleted <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<DeletedKey> getDeletedKey(String name)"
|
|
desc: "Gets the public part of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>. The get deleted Key operation is applicable for soft-delete enabled vaults. This operation requires the `keys/get` permission.\n\n**Code Samples**\n\nGets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getDeletedKey(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(deletedKey ->\n System.out.printf(\"Deleted key's recovery id:%s%n\", deletedKey.getRecoveryId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.DeletedKey?alt=com.azure.security.keyvault.keys.models.DeletedKey&text=DeletedKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getDeletedKeyWithResponse(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getDeletedKeyWithResponse(String name)"
|
|
name: "getDeletedKeyWithResponse(String name)"
|
|
nameWithType: "KeyAsyncClient.getDeletedKeyWithResponse(String name)"
|
|
summary: "Gets the public part of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
parameters:
|
|
- description: "The name of the deleted <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<DeletedKey>> getDeletedKeyWithResponse(String name)"
|
|
desc: "Gets the public part of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>. The get deleted Key operation is applicable for soft-delete enabled vaults. This operation requires the `keys/get` permission.\n\n**Code Samples**\n\nGets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getDeletedKeyWithResponse(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(getDeletedKeyResponse ->\n System.out.printf(\"Deleted key's recovery id: %s%n\", getDeletedKeyResponse.getValue().getRecoveryId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.DeletedKey?alt=com.azure.security.keyvault.keys.models.DeletedKey&text=DeletedKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getKey(String name)"
|
|
name: "getKey(String name)"
|
|
nameWithType: "KeyAsyncClient.getKey(String name)"
|
|
summary: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, cannot be <code>null</code>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<KeyVaultKey> getKey(String name)"
|
|
desc: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version. The get key operation is applicable to all <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key types\"></xref> and it requires the `keys/get` permission.\n\n**Code Samples**\n\nGets a specific version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"retrieved key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getKey(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(key ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", key.getName(),\n key.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the requested <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. The content of the key is <code>null</code>\n if <code>name</code> is <code>null</code> or empty."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getKey(String name, String version)"
|
|
name: "getKey(String name, String version)"
|
|
nameWithType: "KeyAsyncClient.getKey(String name, String version)"
|
|
summary: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, cannot be <code>null</code>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The version of the key to retrieve. If this is an empty String or null, this call is\n equivalent to calling <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#getKey(String)\"></xref>, with the latest version being retrieved."
|
|
name: "version"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<KeyVaultKey> getKey(String name, String version)"
|
|
desc: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version. The get key operation is applicable to all <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key types\"></xref> and it requires the `keys/get` permission.\n\n**Code Samples**\n\nGets a specific version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"retrieved key\"></xref> details when a response has been received.\n\n```java\nString keyVersion = \"6A385B124DEF4096AF1361A85B16C204\";\n\n keyAsyncClient.getKey(\"keyName\", keyVersion)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(key ->\n System.out.printf(\"Created key with name: %s and: id %s%n\", key.getName(),\n key.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the requested <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>.\n The content of the key is <code>null</code> if both <code>name</code> and <code>version</code> are <code>null</code> or empty."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyRotationPolicy(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyRotationPolicy(String keyName)"
|
|
name: "getKeyRotationPolicy(String keyName)"
|
|
nameWithType: "KeyAsyncClient.getKeyRotationPolicy(String keyName)"
|
|
summary: "Gets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<KeyRotationPolicy> getKeyRotationPolicy(String keyName)"
|
|
desc: "Gets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name. This operation requires the `keys/get` permission.\n\n**Code Samples**\n\nRetrieves the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy\"></xref> of a given <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getKeyRotationPolicy(\"keyName\")\n .subscribe(keyRotationPolicy ->\n System.out.printf(\"Retrieved key rotation policy with id: %s%n\", keyRotationPolicy.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyRotationPolicyWithResponse(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyRotationPolicyWithResponse(String keyName)"
|
|
name: "getKeyRotationPolicyWithResponse(String keyName)"
|
|
nameWithType: "KeyAsyncClient.getKeyRotationPolicyWithResponse(String keyName)"
|
|
summary: "Gets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<KeyRotationPolicy>> getKeyRotationPolicyWithResponse(String keyName)"
|
|
desc: "Gets the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name. This operation requires the `keys/get` permission.\n\n**Code Samples**\n\nRetrieves the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy\"></xref> of a given <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP Response\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getKeyRotationPolicyWithResponse(\"keyName\")\n .subscribe(getKeyRotationPolicyResponse ->\n System.out.printf(\"Response received successfully with status code: %d. Retrieved key rotation policy\"\n + \"with id: %s%n\", getKeyRotationPolicyResponse.getStatusCode(),\n getKeyRotationPolicyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for this operation and the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyWithResponse(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getKeyWithResponse(String name, String version)"
|
|
name: "getKeyWithResponse(String name, String version)"
|
|
nameWithType: "KeyAsyncClient.getKeyWithResponse(String name, String version)"
|
|
summary: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, cannot be <code>null</code>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The version of the key to retrieve. If this is an empty String or null, this call is\n equivalent to calling <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#getKey(String)\"></xref>, with the latest version being retrieved."
|
|
name: "version"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<KeyVaultKey>> getKeyWithResponse(String name, String version)"
|
|
desc: "Gets the public part of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and key version. The get key operation is applicable to all <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key types\"></xref> and it requires the `keys/get` permission.\n\n**Code Samples**\n\nGets a specific version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"retrieved key\"></xref> details when a response has been received.\n\n```java\nString keyVersion = \"6A385B124DEF4096AF1361A85B16C204\";\n\n keyAsyncClient.getKeyWithResponse(\"keyName\", keyVersion)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(getKeyResponse ->\n System.out.printf(\"Created key with name: %s and: id %s%n\",\n getKeyResponse.getValue().getName(), getKeyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n requested <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. The content of the key is <code>null</code> if both <code>name</code> and\n <code>version</code> are <code>null</code> or empty."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getRandomBytes(int)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getRandomBytes(int count)"
|
|
name: "getRandomBytes(int count)"
|
|
nameWithType: "KeyAsyncClient.getRandomBytes(int count)"
|
|
summary: "Get the requested number of bytes containing random values from a managed HSM."
|
|
parameters:
|
|
- description: "The requested number of random bytes."
|
|
name: "count"
|
|
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<byte[]> getRandomBytes(int count)"
|
|
desc: "Get the requested number of bytes containing random values from a managed HSM.\n\n**Code Samples**\n\nGets a number of bytes containing random values from a Managed HSM. Prints out the retrieved bytes in base64Url format.\n\n```java\nint amount = 16;\n keyAsyncClient.getRandomBytes(amount)\n .subscribe(randomBytes ->\n System.out.printf(\"Retrieved %d random bytes: %s%n\", amount, Arrays.toString(randomBytes)));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the requested number of bytes containing random values from a managed HSM."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getRandomBytesWithResponse(int)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getRandomBytesWithResponse(int count)"
|
|
name: "getRandomBytesWithResponse(int count)"
|
|
nameWithType: "KeyAsyncClient.getRandomBytesWithResponse(int count)"
|
|
summary: "Get the requested number of bytes containing random values from a managed HSM."
|
|
parameters:
|
|
- description: "The requested number of random bytes."
|
|
name: "count"
|
|
type: "<xref href=\"int?alt=int&text=int\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<byte[]>> getRandomBytesWithResponse(int count)"
|
|
desc: "Get the requested number of bytes containing random values from a managed HSM.\n\n**Code Samples**\n\nGets a number of bytes containing random values from a Managed HSM. Prints out the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP Response\"></xref> details and the retrieved bytes in base64Url format.\n\n```java\nint amountOfBytes = 16;\n keyAsyncClient.getRandomBytesWithResponse(amountOfBytes).subscribe(response ->\n System.out.printf(\"Response received successfully with status code: %d. Retrieved %d random bytes: %s%n\",\n response.getStatusCode(), amountOfBytes, Arrays.toString(response.getValue())));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for this operation and the requested number\n of bytes containing random values from a managed HSM."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.getVaultUrl()"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.getVaultUrl()"
|
|
name: "getVaultUrl()"
|
|
nameWithType: "KeyAsyncClient.getVaultUrl()"
|
|
summary: "Get the vault endpoint url to which service requests are sent to."
|
|
syntax: "public String getVaultUrl()"
|
|
desc: "Get the vault endpoint url to which service requests are sent to."
|
|
returns:
|
|
description: "The vault endpoint url"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.importKey(com.azure.security.keyvault.keys.models.ImportKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.importKey(ImportKeyOptions importKeyOptions)"
|
|
name: "importKey(ImportKeyOptions importKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.importKey(ImportKeyOptions importKeyOptions)"
|
|
summary: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWebKey\"></xref> being imported."
|
|
name: "importKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.ImportKeyOptions?alt=com.azure.security.keyvault.keys.models.ImportKeyOptions&text=ImportKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> importKey(ImportKeyOptions importKeyOptions)"
|
|
desc: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The import key operation may be used to import any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> into Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. This operation requires the `keys/import` permission.\n\n<xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ImportKeyOptions\"></xref> is required and its fields <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getName*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"name\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key material\"></xref> cannot be `null`. The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values in `keyImportOptions` are optional. If not specified, no values are set for the fields. The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` and the <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.isHardwareProtected()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"hsm\"></xref> field is set to `false` by Azure Key Vault, if they are not specified.\n\n**Code Samples**\n\nImports a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> into key vault. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref> details when a response has been received.\n\n```java\nImportKeyOptions options = new ImportKeyOptions(\"keyName\", jsonWebKeyToImport)\n .setHardwareProtected(false);\n\n keyAsyncClient.importKey(options).subscribe(keyVaultKey ->\n System.out.printf(\"Imported key with name: %s and id: %s%n\", keyVaultKey.getName(), keyVaultKey.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.importKey(java.lang.String,com.azure.security.keyvault.keys.models.JsonWebKey)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.importKey(String name, JsonWebKey keyMaterial)"
|
|
name: "importKey(String name, JsonWebKey keyMaterial)"
|
|
nameWithType: "KeyAsyncClient.importKey(String name, JsonWebKey keyMaterial)"
|
|
summary: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The name for the imported key."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The Json web key being imported."
|
|
name: "keyMaterial"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.JsonWebKey?alt=com.azure.security.keyvault.keys.models.JsonWebKey&text=JsonWebKey\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyVaultKey> importKey(String name, JsonWebKey keyMaterial)"
|
|
desc: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The import key operation may be used to import any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> into Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. This operation requires the `keys/import` permission.\n\n**Code Samples**\n\nImports a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> into key vault. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.importKey(\"keyName\", jsonWebKeyToImport)\n .subscribe(keyVaultKey ->\n System.out.printf(\"Imported key with name: %s and id: %s%n\", keyVaultKey.getName(),\n keyVaultKey.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.importKeyWithResponse(com.azure.security.keyvault.keys.models.ImportKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.importKeyWithResponse(ImportKeyOptions importKeyOptions)"
|
|
name: "importKeyWithResponse(ImportKeyOptions importKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.importKeyWithResponse(ImportKeyOptions importKeyOptions)"
|
|
summary: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options object\"></xref> containing information about the\n <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWebKey\"></xref> being imported."
|
|
name: "importKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.ImportKeyOptions?alt=com.azure.security.keyvault.keys.models.ImportKeyOptions&text=ImportKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyVaultKey>> importKeyWithResponse(ImportKeyOptions importKeyOptions)"
|
|
desc: "Imports an externally created <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and stores it in the key vault. The import key operation may be used to import any <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key type\"></xref> into Azure Key Vault. If a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> with the provided name already exists, Azure Key Vault creates a new version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. This operation requires the `keys/import` permission.\n\n<xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ImportKeyOptions\"></xref> is required and its fields <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getName*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"name\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getKey()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key material\"></xref> cannot be `null`. The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getExpiresOn*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"expires\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.getNotBefore*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"notBefore\"></xref> values in `keyImportOptions` are optional. If not specified, no values are set for the fields. The <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.isEnabled*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"enabled\"></xref> field is set to `true` and the <xref uid=\"com.azure.security.keyvault.keys.models.ImportKeyOptions.isHardwareProtected()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"hsm\"></xref> field is set to `false` by Azure Key Vault, if they are not specified.\n\n**Code Samples**\n\nImports a new <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> into key vault. Subscribes to the call asynchronously and prints out the newly <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref> details when a response has been received.\n\n```java\nImportKeyOptions importKeyOptions = new ImportKeyOptions(\"keyName\", jsonWebKeyToImport)\n .setHardwareProtected(false);\n\n keyAsyncClient.importKeyWithResponse(importKeyOptions).subscribe(response ->\n System.out.printf(\"Imported key with name: %s and id: %s%n\", response.getValue().getName(),\n response.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"imported key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.listDeletedKeys()"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.listDeletedKeys()"
|
|
name: "listDeletedKeys()"
|
|
nameWithType: "KeyAsyncClient.listDeletedKeys()"
|
|
summary: "Lists <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> of the key vault."
|
|
syntax: "public PagedFlux<DeletedKey> listDeletedKeys()"
|
|
desc: "Lists <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> of the key vault. The <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> are retrieved as <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWebKey\"></xref> structures that contain the public part of a <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>. The get deleted keys operation is applicable for vaults enabled for soft-delete. This operation requires the `keys/list` permission.\n\n**Code Samples**\n\nLists the <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> in the key vault. Subscribes to the call asynchronously and prints out the recovery id of each <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> when a response has been received.\n\n```java\nkeyAsyncClient.listDeletedKeys()\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(deletedKey ->\n System.out.printf(\"Deleted key's recovery id:%s%n\", deletedKey.getRecoveryId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.http.rest.PagedFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedFlux\"></xref> containing all of the <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> in the vault."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedFlux?alt=com.azure.core.http.rest.PagedFlux&text=PagedFlux\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.DeletedKey?alt=com.azure.security.keyvault.keys.models.DeletedKey&text=DeletedKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.listPropertiesOfKeyVersions(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.listPropertiesOfKeyVersions(String name)"
|
|
name: "listPropertiesOfKeyVersions(String name)"
|
|
nameWithType: "KeyAsyncClient.listPropertiesOfKeyVersions(String name)"
|
|
summary: "List all versions of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref>."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public PagedFlux<KeyProperties> listPropertiesOfKeyVersions(String name)"
|
|
desc: "List all versions of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref>. The individual key response in the flux is represented by <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyProperties\"></xref> as only the key identifier, attributes and tags are provided in the response. The key material values are not provided in the response. This operation requires the `keys/list` permission.\n\n**Code Samples**\n\nIt is possible to get the keys with key material of all the versions from this information. Convert the <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key properties\"></xref> to <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key \"></xref> using <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#getKey(String, String)\"></xref> within <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux#flatMap(Function)\"></xref>.\n\n```java\nkeyAsyncClient.listPropertiesOfKeyVersions(\"keyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .flatMap(keyProperties -> keyAsyncClient.getKey(keyProperties.getName(), keyProperties.getVersion()))\n .subscribe(key ->\n System.out.printf(\"Retrieved key version: %s with name: %s and type: %s%n\",\n key.getProperties().getVersion(), key.getName(), key.getKeyType()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.http.rest.PagedFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedFlux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyProperties\"></xref> of all the versions of the specified\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the vault. <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> is empty if key with <code>name</code> does not exist in the key\n vault."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedFlux?alt=com.azure.core.http.rest.PagedFlux&text=PagedFlux\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyProperties?alt=com.azure.security.keyvault.keys.models.KeyProperties&text=KeyProperties\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.listPropertiesOfKeys()"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.listPropertiesOfKeys()"
|
|
name: "listPropertiesOfKeys()"
|
|
nameWithType: "KeyAsyncClient.listPropertiesOfKeys()"
|
|
summary: "List <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the key vault."
|
|
syntax: "public PagedFlux<KeyProperties> listPropertiesOfKeys()"
|
|
desc: "List <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the key vault. Retrieves a list of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the key vault as <xref uid=\"com.azure.security.keyvault.keys.models.JsonWebKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"JsonWebKey\"></xref> structures that contain the public part of a stored <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. The list operation is applicable to all <xref uid=\"com.azure.security.keyvault.keys.models.KeyType\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key types\"></xref> and the individual <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> response in the list is represented by <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyProperties\"></xref> as only the key identifier, attributes and tags are provided in the response. The key material and individual key versions are not listed in the response. This operation requires the `keys/list` permission.\n\n**Code Samples**\n\nIt is possible to get <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"full keys\"></xref> with key material from this information. Convert the <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key properties\"></xref> to <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> using <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.getKey(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#getKey(String, String)\"></xref> within <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Flux#flatMap(Function)\"></xref>.\n\n```java\nkeyAsyncClient.listPropertiesOfKeys()\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .flatMap(keyProperties -> keyAsyncClient.getKey(keyProperties.getName(), keyProperties.getVersion()))\n .subscribe(key -> System.out.printf(\"Retrieved key with name: %s and type: %s%n\",\n key.getName(),\n key.getKeyType()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"com.azure.core.http.rest.PagedFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PagedFlux\"></xref> containing <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> of all the keys in the vault."
|
|
type: "<xref href=\"com.azure.core.http.rest.PagedFlux?alt=com.azure.core.http.rest.PagedFlux&text=PagedFlux\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyProperties?alt=com.azure.security.keyvault.keys.models.KeyProperties&text=KeyProperties\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.purgeDeletedKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.purgeDeletedKey(String name)"
|
|
name: "purgeDeletedKey(String name)"
|
|
nameWithType: "KeyAsyncClient.purgeDeletedKey(String name)"
|
|
summary: "Permanently deletes the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> without the possibility of recovery."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Void> purgeDeletedKey(String name)"
|
|
desc: "Permanently deletes the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> without the possibility of recovery. The purge deleted key operation is applicable for soft-delete enabled vaults. This operation requires the `keys/purge` permission.\n\n**Code Samples**\n\nPurges the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the status code from the server response when a response has been received.\n\n```java\nkeyAsyncClient.purgeDeletedKey(\"deletedKeyName\")\n .subscribe(ignored ->\n System.out.println(\"Successfully purged deleted key\"));\n```"
|
|
returns:
|
|
description: "An empty <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.purgeDeletedKeyWithResponse(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.purgeDeletedKeyWithResponse(String name)"
|
|
name: "purgeDeletedKeyWithResponse(String name)"
|
|
nameWithType: "KeyAsyncClient.purgeDeletedKeyWithResponse(String name)"
|
|
summary: "Permanently deletes the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> without the possibility of recovery."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<Void>> purgeDeletedKeyWithResponse(String name)"
|
|
desc: "Permanently deletes the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> without the possibility of recovery. The purge deleted key operation is applicable for soft-delete enabled vaults. This operation requires the `keys/purge` permission.\n\n**Code Samples**\n\nPurges the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted key\"></xref> from the key vault enabled for soft-delete. Subscribes to the call asynchronously and prints out the status code from the server response when a response has been received.\n\n```java\nkeyAsyncClient.purgeDeletedKeyWithResponse(\"deletedKeyName\")\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(purgeDeletedKeyResponse ->\n System.out.printf(\"Purge response status code: %d%n\", purgeDeletedKeyResponse.getStatusCode()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a Response containing status code and HTTP headers."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(String name, String targetAttestationToken)"
|
|
name: "releaseKey(String name, String targetAttestationToken)"
|
|
nameWithType: "KeyAsyncClient.releaseKey(String name, String targetAttestationToken)"
|
|
summary: "Releases the latest version of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to release."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The attestation assertion for the target of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> release."
|
|
name: "targetAttestationToken"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<ReleaseKeyResult> releaseKey(String name, String targetAttestationToken)"
|
|
desc: "Releases the latest version of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>.\n\nThe <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> must be exportable. This operation requires the `keys/release` permission.\n\n**Code Samples**\n\nReleases a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the signed object that contains the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"released key\"></xref> when a response has been received.\n\n```java\nString targetAttestationToken = \"someAttestationToken\";\n ReleaseKeyResult releaseKeyResult = keyClient.releaseKey(\"keyName\", targetAttestationToken);\n\n System.out.printf(\"Signed object containing released key: %s%n\", releaseKeyResult);\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReleaseKeyResult\"></xref> containing the released key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult?alt=com.azure.security.keyvault.keys.models.ReleaseKeyResult&text=ReleaseKeyResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(java.lang.String,java.lang.String,java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(String name, String version, String targetAttestationToken)"
|
|
name: "releaseKey(String name, String version, String targetAttestationToken)"
|
|
nameWithType: "KeyAsyncClient.releaseKey(String name, String version, String targetAttestationToken)"
|
|
summary: "Releases a key."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to release."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The version of the key to retrieve. If this is empty or <code>null</code>, this call is equivalent to\n calling <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#releaseKey(String, String)\"></xref>, with the latest key version being released."
|
|
name: "version"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The attestation assertion for the target of the key release."
|
|
name: "targetAttestationToken"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<ReleaseKeyResult> releaseKey(String name, String version, String targetAttestationToken)"
|
|
desc: "Releases a key.\n\nThe key must be exportable. This operation requires the 'keys/release' permission.\n\n**Code Samples**\n\nReleases a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the signed object that contains the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"released key\"></xref> when a response has been received.\n\n```java\nString myKeyVersion = \"6A385B124DEF4096AF1361A85B16C204\";\n String myTargetAttestationToken = \"someAttestationToken\";\n\n keyAsyncClient.releaseKey(\"keyName\", myKeyVersion, myTargetAttestationToken)\n .subscribe(releaseKeyResult ->\n System.out.printf(\"Signed object containing released key: %s%n\", releaseKeyResult.getValue()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReleaseKeyResult\"></xref> containing the released key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult?alt=com.azure.security.keyvault.keys.models.ReleaseKeyResult&text=ReleaseKeyResult\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKeyWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.security.keyvault.keys.models.ReleaseKeyOptions)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.releaseKeyWithResponse(String name, String version, String targetAttestationToken, ReleaseKeyOptions releaseKeyOptions)"
|
|
name: "releaseKeyWithResponse(String name, String version, String targetAttestationToken, ReleaseKeyOptions releaseKeyOptions)"
|
|
nameWithType: "KeyAsyncClient.releaseKeyWithResponse(String name, String version, String targetAttestationToken, ReleaseKeyOptions releaseKeyOptions)"
|
|
summary: "Releases a key."
|
|
parameters:
|
|
- description: "The name of the key to release."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The version of the key to retrieve. If this is empty or <code>null</code>, this call is equivalent to\n calling <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient.releaseKey(java.lang.String,java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient#releaseKey(String, String)\"></xref>, with the latest key version being released."
|
|
name: "version"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The attestation assertion for the target of the key release."
|
|
name: "targetAttestationToken"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "Additional <xref uid=\"com.azure.security.keyvault.keys.models.ReleaseKeyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"options\"></xref> for releasing a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "releaseKeyOptions"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.ReleaseKeyOptions?alt=com.azure.security.keyvault.keys.models.ReleaseKeyOptions&text=ReleaseKeyOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<ReleaseKeyResult>> releaseKeyWithResponse(String name, String version, String targetAttestationToken, ReleaseKeyOptions releaseKeyOptions)"
|
|
desc: "Releases a key.\n\nThe key must be exportable. This operation requires the 'keys/release' permission.\n\n**Code Samples**\n\nReleases a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP Response\"></xref> details and the signed object that contains the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"released key\"></xref> when a response has been received.\n\n```java\nString releaseKeyVersion = \"6A385B124DEF4096AF1361A85B16C204\";\n String someTargetAttestationToken = \"someAttestationToken\";\n ReleaseKeyOptions releaseKeyOptions = new ReleaseKeyOptions()\n .setAlgorithm(KeyExportEncryptionAlgorithm.RSA_AES_KEY_WRAP_256)\n .setNonce(\"someNonce\");\n\n keyAsyncClient.releaseKeyWithResponse(\"keyName\", releaseKeyVersion, someTargetAttestationToken,\n releaseKeyOptions)\n .subscribe(releaseKeyResponse ->\n System.out.printf(\"Response received successfully with status code: %d. Signed object containing\"\n + \"released key: %s%n\", releaseKeyResponse.getStatusCode(),\n releaseKeyResponse.getValue().getValue()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for this operation and the\n <xref uid=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReleaseKeyResult\"></xref> containing the released key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.ReleaseKeyResult?alt=com.azure.security.keyvault.keys.models.ReleaseKeyResult&text=ReleaseKeyResult\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.restoreKeyBackup(byte[])"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.restoreKeyBackup(byte[] backup)"
|
|
name: "restoreKeyBackup(byte[] backup)"
|
|
nameWithType: "KeyAsyncClient.restoreKeyBackup(byte[] backup)"
|
|
summary: "Restores a backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to a vault."
|
|
parameters:
|
|
- description: "The backup blob associated with the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "backup"
|
|
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
|
|
syntax: "public Mono<KeyVaultKey> restoreKeyBackup(byte[] backup)"
|
|
desc: "Restores a backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to a vault. Imports a previously backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> into Azure Key Vault, restoring the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, its key identifier, attributes and access control policies. The restore operation may be used to import a previously backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Individual versions of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> cannot be restored. The <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target key vault, the restore operation will be rejected. While the key name is retained during restore, the final key identifier will change if the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is restored to a different vault. Restore will restore all versions and preserve version identifiers. The restore operation is subject to security constraints: The target key vault must be owned by the same Microsoft Azure Subscription as the source key vault. The user must have the `restore` permission in the target key vault. This operation requires the `keys/restore` permission.\n\n**Code Samples**\n\nRestores the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault from its backup. Subscribes to the call asynchronously and prints out the restored key details when a response has been received.\n\n//Pass the Key Backup Byte array to the restore operation.\n\n```java\nkeyAsyncClient.restoreKeyBackup(keyBackupByteArray)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(restoreKeyResponse ->\n System.out.printf(\"Restored key with name: %s and: id %s%n\", restoreKeyResponse.getName(),\n restoreKeyResponse.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"restored key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.restoreKeyBackupWithResponse(byte[])"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.restoreKeyBackupWithResponse(byte[] backup)"
|
|
name: "restoreKeyBackupWithResponse(byte[] backup)"
|
|
nameWithType: "KeyAsyncClient.restoreKeyBackupWithResponse(byte[] backup)"
|
|
summary: "Restores a backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to a vault."
|
|
parameters:
|
|
- description: "The backup blob associated with the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "backup"
|
|
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
|
|
syntax: "public Mono<Response<KeyVaultKey>> restoreKeyBackupWithResponse(byte[] backup)"
|
|
desc: "Restores a backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to a vault. Imports a previously backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> into Azure Key Vault, restoring the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, its key identifier, attributes and access control policies. The restore operation may be used to import a previously backed up <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Individual versions of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> cannot be restored. The <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target key vault, the restore operation will be rejected. While the key name is retained during restore, the final key identifier will change if the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> is restored to a different vault. Restore will restore all versions and preserve version identifiers. The restore operation is subject to security constraints: The target key vault must be owned by the same Microsoft Azure Subscription as the source key vault. The user must have the `restore` permission in the target key vault. This operation requires the `keys/restore` permission.\n\n**Code Samples**\n\nRestores the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault from its backup. Subscribes to the call asynchronously and prints out the restored key details when a response has been received.\n\n//Pass the Key Backup Byte array to the restore operation.\n\n```java\nkeyAsyncClient.restoreKeyBackupWithResponse(keyBackupByteArray)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(restoreKeyBackupResponse ->\n System.out.printf(\"Restored key with name: %s and: id %s%n\",\n restoreKeyBackupResponse.getValue().getName(), restoreKeyBackupResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"restored key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.rotateKey(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.rotateKey(String name)"
|
|
name: "rotateKey(String name)"
|
|
nameWithType: "KeyAsyncClient.rotateKey(String name)"
|
|
summary: "Rotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
parameters:
|
|
- description: "The name of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to be rotated. The system will generate a new version in the\n specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<KeyVaultKey> rotateKey(String name)"
|
|
desc: "Rotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. The rotate key operation will do so based on <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key's rotation policy\"></xref>. This operation requires the `keys/rotate` permission.\n\n**Code Samples**\n\nRotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Prints out <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotated key\"></xref> details.\n\n```java\nkeyAsyncClient.rotateKey(\"keyName\")\n .subscribe(key ->\n System.out.printf(\"Rotated key with name: %s and version:%s%n\", key.getName(),\n key.getProperties().getVersion()));\n```"
|
|
returns:
|
|
description: "The new version of the rotated <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.rotateKeyWithResponse(java.lang.String)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.rotateKeyWithResponse(String name)"
|
|
name: "rotateKeyWithResponse(String name)"
|
|
nameWithType: "KeyAsyncClient.rotateKeyWithResponse(String name)"
|
|
summary: "Rotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
parameters:
|
|
- description: "The name of <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> to be rotated. The system will generate a new version in the\n specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "name"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public Mono<Response<KeyVaultKey>> rotateKeyWithResponse(String name)"
|
|
desc: "Rotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. The rotate key operation will do so based on <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key's rotation policy\"></xref>. This operation requires the `keys/rotate` permission.\n\n**Code Samples**\n\nRotates a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP Response\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotated key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.rotateKeyWithResponse(\"keyName\")\n .subscribe(rotateKeyResponse ->\n System.out.printf(\"Response received successfully with status code: %d. Rotated key with name: %s and\"\n + \"version: %s%n\", rotateKeyResponse.getStatusCode(), rotateKeyResponse.getValue().getName(),\n rotateKeyResponse.getValue().getProperties().getVersion()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for this operation and the new version of\n the rotated <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyProperties(com.azure.security.keyvault.keys.models.KeyProperties,com.azure.security.keyvault.keys.models.KeyOperation...)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyProperties(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
name: "updateKeyProperties(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
nameWithType: "KeyAsyncClient.updateKeyProperties(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
summary: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> associated with the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, but not the cryptographic key material of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key properties\"></xref> object with updated properties."
|
|
name: "keyProperties"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyProperties?alt=com.azure.security.keyvault.keys.models.KeyProperties&text=KeyProperties\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The updated <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> to associate with the key."
|
|
name: "keyOperations"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyOperation?alt=com.azure.security.keyvault.keys.models.KeyOperation&text=KeyOperation\" data-throw-if-not-resolved=\"False\" />[]"
|
|
syntax: "public Mono<KeyVaultKey> updateKeyProperties(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
desc: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> associated with the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, but not the cryptographic key material of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault. The update operation changes specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> of an existing stored <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> that are not specified in the request are left unchanged. The cryptographic key material of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> itself cannot be changed. This operation requires the `keys/set` permission.\n\n**Code Samples**\n\nGets latest version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, changes its notBefore time and then updates it in the Azure Key Vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"returned key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getKey(\"keyName\")\n .subscribe(key -> {\n //Update the not before time of the key.\n key.getProperties().setNotBefore(OffsetDateTime.now().plusDays(50));\n keyAsyncClient.updateKeyProperties(key.getProperties(), KeyOperation.ENCRYPT,\n KeyOperation.DECRYPT)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(updatedKey ->\n System.out.printf(\"Updated key's \\\"not before time\\\": %s%n\",\n updatedKey.getProperties().getNotBefore().toString()));\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"updated key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyPropertiesWithResponse(com.azure.security.keyvault.keys.models.KeyProperties,com.azure.security.keyvault.keys.models.KeyOperation...)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
name: "updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
nameWithType: "KeyAsyncClient.updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
summary: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> associated with the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, but not the cryptographic key material of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault."
|
|
parameters:
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key properties\"></xref> object with updated properties."
|
|
name: "keyProperties"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyProperties?alt=com.azure.security.keyvault.keys.models.KeyProperties&text=KeyProperties\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "The updated <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> to associate with the key."
|
|
name: "keyOperations"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyOperation?alt=com.azure.security.keyvault.keys.models.KeyOperation&text=KeyOperation\" data-throw-if-not-resolved=\"False\" />[]"
|
|
syntax: "public Mono<Response<KeyVaultKey>> updateKeyPropertiesWithResponse(KeyProperties keyProperties, KeyOperation[] keyOperations)"
|
|
desc: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyOperation\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key operations\"></xref> associated with the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, but not the cryptographic key material of the specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> in the key vault. The update operation changes specified <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> of an existing stored <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"attributes\"></xref> that are not specified in the request are left unchanged. The cryptographic key material of a <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref> itself cannot be changed. This operation requires the `keys/set` permission.\n\n**Code Samples**\n\nGets latest version of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>, changes its notBefore time and then updates it in the Azure Key Vault. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"returned key\"></xref> details when a response has been received.\n\n```java\nkeyAsyncClient.getKey(\"keyName\")\n .subscribe(getKeyResponse -> {\n //Update the not before time of the key.\n getKeyResponse.getProperties().setNotBefore(OffsetDateTime.now().plusDays(50));\n keyAsyncClient.updateKeyPropertiesWithResponse(getKeyResponse.getProperties(), KeyOperation.ENCRYPT,\n KeyOperation.DECRYPT)\n .contextWrite(Context.of(\"key1\", \"value1\", \"key2\", \"value2\"))\n .subscribe(updateKeyResponse ->\n System.out.printf(\"Updated key's \\\"not before time\\\": %s%n\",\n updateKeyResponse.getValue().getProperties().getNotBefore().toString()));\n });\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing a <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"updated key\"></xref>."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyVaultKey?alt=com.azure.security.keyvault.keys.models.KeyVaultKey&text=KeyVaultKey\" data-throw-if-not-resolved=\"False\" />>>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyRotationPolicy(java.lang.String,com.azure.security.keyvault.keys.models.KeyRotationPolicy)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyRotationPolicy(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
name: "updateKeyRotationPolicy(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
nameWithType: "KeyAsyncClient.updateKeyRotationPolicy(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
summary: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> of the key with the provided name."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
name: "keyRotationPolicy"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<KeyRotationPolicy> updateKeyRotationPolicy(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
desc: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> of the key with the provided name. This operation requires the `keys/update` permission.\n\n**Code Samples**\n\nUpdates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy\"></xref> of a given <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy key\"></xref> details when a response has been received.\n\n```java\nList<KeyRotationLifetimeAction> lifetimeActions = new ArrayList<>();\n KeyRotationLifetimeAction rotateLifetimeAction = new KeyRotationLifetimeAction(KeyRotationPolicyAction.ROTATE)\n .setTimeAfterCreate(\"P90D\");\n KeyRotationLifetimeAction notifyLifetimeAction = new KeyRotationLifetimeAction(KeyRotationPolicyAction.NOTIFY)\n .setTimeBeforeExpiry(\"P45D\");\n\n lifetimeActions.add(rotateLifetimeAction);\n lifetimeActions.add(notifyLifetimeAction);\n\n KeyRotationPolicy keyRotationPolicy = new KeyRotationPolicy()\n .setLifetimeActions(lifetimeActions)\n .setExpiresIn(\"P6M\");\n\n keyAsyncClient.updateKeyRotationPolicy(\"keyName\", keyRotationPolicy)\n .subscribe(updatedPolicy ->\n System.out.printf(\"Updated key rotation policy with id: %s%n\", updatedPolicy.getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />>"
|
|
- uid: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyRotationPolicyWithResponse(java.lang.String,com.azure.security.keyvault.keys.models.KeyRotationPolicy)"
|
|
fullName: "com.azure.security.keyvault.keys.KeyAsyncClient.updateKeyRotationPolicyWithResponse(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
name: "updateKeyRotationPolicyWithResponse(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
nameWithType: "KeyAsyncClient.updateKeyRotationPolicyWithResponse(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
summary: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> of the key with the provided name."
|
|
parameters:
|
|
- description: "The name of the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>."
|
|
name: "keyName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- description: "The <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
name: "keyRotationPolicy"
|
|
type: "<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public Mono<Response<KeyRotationPolicy>> updateKeyRotationPolicyWithResponse(String keyName, KeyRotationPolicy keyRotationPolicy)"
|
|
desc: "Updates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> of the key with the provided name. This operation requires the `keys/update` permission.\n\n**Code Samples**\n\nUpdates the <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy\"></xref> of a given <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key\"></xref>. Subscribes to the call asynchronously and prints out the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP Response\"></xref> and <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"rotation policy key\"></xref> details when a response has been received.\n\n```java\nList<KeyRotationLifetimeAction> myLifetimeActions = new ArrayList<>();\n KeyRotationLifetimeAction myRotateLifetimeAction = new KeyRotationLifetimeAction(KeyRotationPolicyAction.ROTATE)\n .setTimeAfterCreate(\"P90D\");\n KeyRotationLifetimeAction myNotifyLifetimeAction = new KeyRotationLifetimeAction(KeyRotationPolicyAction.NOTIFY)\n .setTimeBeforeExpiry(\"P45D\");\n\n myLifetimeActions.add(myRotateLifetimeAction);\n myLifetimeActions.add(myNotifyLifetimeAction);\n\n KeyRotationPolicy myKeyRotationPolicy = new KeyRotationPolicy()\n .setLifetimeActions(myLifetimeActions)\n .setExpiresIn(\"P6M\");\n\n keyAsyncClient.updateKeyRotationPolicyWithResponse(\"keyName\", myKeyRotationPolicy)\n .subscribe(myUpdatedPolicyResponse ->\n System.out.printf(\"Response received successfully with status code: %d. Updated key rotation policy\"\n + \"with id: %s%n\", myUpdatedPolicyResponse.getStatusCode(),\n myUpdatedPolicyResponse.getValue().getId()));\n```"
|
|
returns:
|
|
description: "A <xref uid=\"reactor.core.publisher.Mono\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Mono\"></xref> containing the <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HTTP response\"></xref> for this operation and the\n <xref uid=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyRotationPolicy\"></xref> for the key."
|
|
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.security.keyvault.keys.models.KeyRotationPolicy?alt=com.azure.security.keyvault.keys.models.KeyRotationPolicy&text=KeyRotationPolicy\" data-throw-if-not-resolved=\"False\" />>>"
|
|
type: "class"
|
|
desc: "The <xref uid=\"com.azure.security.keyvault.keys.KeyAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyAsyncClient\"></xref> provides asynchronous methods to manage <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref> in the Azure Key Vault. The client supports creating, retrieving, updating, deleting, purging, backing up, restoring, listing, releasing and rotating the <xref uid=\"com.azure.security.keyvault.keys.models.KeyVaultKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"keys\"></xref>. The client also supports listing <xref uid=\"com.azure.security.keyvault.keys.models.DeletedKey\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted keys\"></xref> for a soft-delete enabled Azure Key Vault.\n\n**Samples to construct the async client**\n\n```java\nKeyAsyncClient keyAsyncClient = new KeyClientBuilder()\n .vaultUrl(\"<your-key-vault-url>\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .buildAsyncClient();\n```"
|
|
metadata: {}
|
|
package: "com.azure.security.keyvault.keys"
|
|
artifact: com.azure:azure-security-keyvault-keys:4.6.0
|