CreateKeyOptions Class

  • java.lang.Object
    • com.azure.security.keyvault.keys.models.CreateKeyOptions

public class CreateKeyOptions

Represents the configurable options to create a key.

Constructor Summary

Constructor Description
CreateKeyOptions(String name, KeyType keyType)

Creates instance of CreateKeyOptions with name as key name and keyType as type of the key.

Method Summary

Modifier and Type Method and Description
OffsetDateTime getExpiresOn()

Get the key expiration time in UTC.

List<KeyOperation> getKeyOperations()

Get the key operations.

KeyType getKeyType()

Get the key type.

String getName()

Get the key name.

OffsetDateTime getNotBefore()

Get the key's notBefore time in UTC.

KeyReleasePolicy getReleasePolicy()

Get the policy rules under which the key can be exported.

Map<String,String> getTags()

Get the tags associated with the key.

Boolean isEnabled()

Get the enabled value.

Boolean isExportable()

Get a flag that indicates if the private key can be exported.

CreateKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

CreateKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the key expiration time in UTC.

CreateKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

CreateKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

CreateKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the key's notBefore time in UTC.

CreateKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

CreateKeyOptions setTags(Map<String,String> tags)

Set the tags to be associated with the key.

Methods inherited from java.lang.Object

Constructor Details

CreateKeyOptions

public CreateKeyOptions(String name, KeyType keyType)

Creates instance of CreateKeyOptions with name as key name and keyType as type of the key.

Parameters:

name - The name of the key to create.
keyType - The type of the key to create.

Method Details

getExpiresOn

public OffsetDateTime getExpiresOn()

Get the key expiration time in UTC.

Returns:

The key expiration time in UTC.

getKeyOperations

public List getKeyOperations()

Get the key operations.

Returns:

The key operations.

getKeyType

public KeyType getKeyType()

Get the key type.

Returns:

The key type.

getName

public String getName()

Get the key name.

Returns:

The name of the key.

getNotBefore

public OffsetDateTime getNotBefore()

Get the key's notBefore time in UTC.

Returns:

The key's notBefore time in UTC.

getReleasePolicy

public KeyReleasePolicy getReleasePolicy()

Get the policy rules under which the key can be exported.

Returns:

The policy rules under which the key can be exported.

getTags

public Map getTags()

Get the tags associated with the key.

Returns:

The tag names and values.

isEnabled

public Boolean isEnabled()

Get the enabled value.

Returns:

The enabled value.

isExportable

public Boolean isExportable()

Get a flag that indicates if the private key can be exported.

Returns:

A flag that indicates if the private key can be exported.

setEnabled

public CreateKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

Parameters:

enabled - The enabled value to set.

Returns:

The updated CreateKeyOptions object.

setExpiresOn

public CreateKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the key expiration time in UTC.

Parameters:

expiresOn - The key expiration time in UTC.

Returns:

The updated CreateKeyOptions object.

setExportable

public CreateKeyOptions setExportable(Boolean exportable)

Set a flag that indicates if the private key can be exported.

Parameters:

exportable - A flag that indicates if the private key can be exported.

Returns:

The updated CreateKeyOptions object.

setKeyOperations

public CreateKeyOptions setKeyOperations(KeyOperation[] keyOperations)

Set the key operations.

Parameters:

keyOperations - The key operations to set.

Returns:

The updated CreateKeyOptions object.

setNotBefore

public CreateKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the key's notBefore time in UTC.

Parameters:

notBefore - The key's notBefore time in UTC.

Returns:

The updated CreateKeyOptions object.

setReleasePolicy

public CreateKeyOptions setReleasePolicy(KeyReleasePolicy releasePolicy)

Set the policy rules under which the key can be exported.

Parameters:

releasePolicy - The policy rules to set.

Returns:

The updated CreateKeyOptions object.

setTags

public CreateKeyOptions setTags(Map tags)

Set the tags to be associated with the key.

Parameters:

tags - The tags to set.

Returns:

The updated CreateKeyOptions object.

Applies to