Class ImportKeyRequest.Builder
- java.lang.Object
-
- com.microsoft.azure.keyvault.requests.ImportKeyRequest.Builder
-
- Enclosing class:
- ImportKeyRequest
public static class ImportKeyRequest.Builder extends Object
TheImportKeyRequestbuilder.
-
-
Constructor Summary
Constructors Constructor Description Builder(String vaultBaseUrl, String keyName, JsonWebKey key)The builder for constructingImportKeyRequestobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImportKeyRequestbuild()builds theImportKeyRequestobject.ImportKeyRequest.BuilderwithAttributes(Attributes attributes)Set the key attributes value.ImportKeyRequest.BuilderwithHsm(boolean isHsm)Set the isHsm to true if the key is imported as a hardware key to HSM, false otherwise.ImportKeyRequest.BuilderwithTags(Map<String,String> tags)Set the tags value.
-
-
-
Constructor Detail
-
Builder
public Builder(String vaultBaseUrl, String keyName, JsonWebKey key)
The builder for constructingImportKeyRequestobject.- Parameters:
vaultBaseUrl- The vault name, e.g. https://myvault.vault.azure.net.keyName- The name of the key in the given vault.key- The Json web key.
-
-
Method Detail
-
withHsm
public ImportKeyRequest.Builder withHsm(boolean isHsm)
Set the isHsm to true if the key is imported as a hardware key to HSM, false otherwise.- Parameters:
isHsm- True, if the key is hardware key to be stored in HSM. false otherwise- Returns:
- the Builder object itself.
-
withAttributes
public ImportKeyRequest.Builder withAttributes(Attributes attributes)
Set the key attributes value.- Parameters:
attributes- the key management attributes value to set- Returns:
- the Builder object itself.
-
withTags
public ImportKeyRequest.Builder withTags(Map<String,String> tags)
Set the tags value.- Parameters:
tags- Application-specific metadata in the form of key-value pairs.- Returns:
- the Builder object itself.
-
build
public ImportKeyRequest build()
builds theImportKeyRequestobject.- Returns:
- the
ImportKeyRequestobject.
-
-