CertificatePolicy Class

  • java.lang.Object
    • com.azure.security.keyvault.certificates.models.CertificatePolicy

Implements

public final class CertificatePolicy
implements JsonSerializable<CertificatePolicy>

The Certificate Management policy for the KeyVaultCertificate.

Constructor Summary

Constructor Description
CertificatePolicy(String issuerName, SubjectAlternativeNames subjectAlternativeNames)

Creates certificate policy.

CertificatePolicy(String issuerName, String subject)

Creates certificate policy.

CertificatePolicy(String issuerName, String subject, SubjectAlternativeNames subjectAlternativeNames)

Creates certificate policy.

Method Summary

Modifier and Type Method and Description
static CertificatePolicy fromJson(JsonReader jsonReader)

Reads a JSON stream into a CertificatePolicy.

String getCertificateType()

Get the certificate type.

CertificateContentType getContentType()

Get the content type.

OffsetDateTime getCreatedOn()

Get the the UTC time at which certificate policy was created.

static CertificatePolicy getDefault()

Get the default certificate policy.

List<String> getEnhancedKeyUsage()

Get the enhanced key usage.

String getIssuerName()

Get the issuer name.

CertificateKeyCurveName getKeyCurveName()

Get the key curve.

Integer getKeySize()

Get the key size.

CertificateKeyType getKeyType()

Get the key type.

List<CertificateKeyUsage> getKeyUsage()

Get the key usage.

List<LifetimeAction> getLifetimeActions()

Get the lifetime actions

String getSubject()

Get the subject.

SubjectAlternativeNames getSubjectAlternativeNames()

Get the subjectAlternativeNames.

OffsetDateTime getUpdatedOn()

Get the UTC time at which certificate policy was last updated.

Integer getValidityInMonths()

Get the validity in months.

Boolean isCertificateTransparent()

Get the certificate transparency status.

Boolean isEnabled()

Get the enabled status.

Boolean isExportable()

Get the exportable.

Boolean isKeyReusable()

Get the key reuse status.

CertificatePolicy setCertificateTransparent(Boolean certificateTransparent)

Set the certificate transparency status.

CertificatePolicy setCertificateType(String certificateType)

Set the certificate type to request from the issuer.

CertificatePolicy setContentType(CertificateContentType contentType)

Set the content type.

CertificatePolicy setEnabled(Boolean enabled)

Set the enabled status.

CertificatePolicy setEnhancedKeyUsage(List<String> ekus)

Set the enhanced key usage.

CertificatePolicy setExportable(Boolean exportable)

Set the exportable value.

CertificatePolicy setKeyCurveName(CertificateKeyCurveName keyCurveName)

Set the key curve.

CertificatePolicy setKeyReusable(Boolean keyReusable)

Set the reuse key value.

CertificatePolicy setKeySize(Integer keySize)

Set the key size.

CertificatePolicy setKeyType(CertificateKeyType keyType)

Get the key type.

CertificatePolicy setKeyUsage(CertificateKeyUsage[] keyUsage)

Set the key usage.

CertificatePolicy setLifetimeActions(LifetimeAction[] actions)

Set the lifetime actions

CertificatePolicy setSubject(String subject)

Set the subject Name.

CertificatePolicy setSubjectAlternativeNames(SubjectAlternativeNames subjectAlternativeNames)

Set the subjectAlternativeNames.

CertificatePolicy setValidityInMonths(Integer validityInMonths)

Set the validity in months.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

CertificatePolicy

public CertificatePolicy(String issuerName, SubjectAlternativeNames subjectAlternativeNames)

Creates certificate policy.

Parameters:

issuerName - The issuer name to set.
subjectAlternativeNames - The subject alternative names to set.

CertificatePolicy

public CertificatePolicy(String issuerName, String subject)

Creates certificate policy.

Parameters:

issuerName - The issuer name to set.
subject - The subject name to set.

CertificatePolicy

public CertificatePolicy(String issuerName, String subject, SubjectAlternativeNames subjectAlternativeNames)

Creates certificate policy.

Parameters:

issuerName - The issuer name to set.
subject - The subject name to set.
subjectAlternativeNames - The subject alternative names to set.

Method Details

fromJson

public static CertificatePolicy fromJson(JsonReader jsonReader)

Reads a JSON stream into a CertificatePolicy.

Parameters:

jsonReader - The JsonReader being read.

Returns:

The CertificatePolicy that the JSON stream represented, may return null.

Throws:

IOException

- If a CertificatePolicy fails to be read from the jsonReader.

getCertificateType

public String getCertificateType()

Get the certificate type.

Returns:

the certificate type

getContentType

public CertificateContentType getContentType()

Get the content type.

Returns:

the content type

getCreatedOn

public OffsetDateTime getCreatedOn()

Get the the UTC time at which certificate policy was created.

Returns:

the created UTC time.

getDefault

public static CertificatePolicy getDefault()

Get the default certificate policy.

Returns:

the default certificate policy.

getEnhancedKeyUsage

public List getEnhancedKeyUsage()

Get the enhanced key usage.

Returns:

the enhanced key usage

getIssuerName

public String getIssuerName()

Get the issuer name.

Returns:

the issuer name.

getKeyCurveName

public CertificateKeyCurveName getKeyCurveName()

Get the key curve.

Returns:

the curve value

getKeySize

public Integer getKeySize()

Get the key size.

Returns:

the key size

getKeyType

public CertificateKeyType getKeyType()

Get the key type.

Returns:

the key type value

getKeyUsage

public List getKeyUsage()

Get the key usage.

Returns:

the key usage

getLifetimeActions

public List getLifetimeActions()

Get the lifetime actions

Returns:

the lifetime actions

getSubject

public String getSubject()

Get the subject.

Returns:

the subject

getSubjectAlternativeNames

public SubjectAlternativeNames getSubjectAlternativeNames()

Get the subjectAlternativeNames.

Returns:

the subjectAlternativeNames.

getUpdatedOn

public OffsetDateTime getUpdatedOn()

Get the UTC time at which certificate policy was last updated.

Returns:

the last updated UTC time.

getValidityInMonths

public Integer getValidityInMonths()

Get the validity in months.

Returns:

the validity in months

isCertificateTransparent

public Boolean isCertificateTransparent()

Get the certificate transparency status.

Returns:

the certificate transparency status

isEnabled

public Boolean isEnabled()

Get the enabled status.

Returns:

the enabled status

isExportable

public Boolean isExportable()

Get the exportable.

Returns:

the exportable value

isKeyReusable

public Boolean isKeyReusable()

Get the key reuse status.

Returns:

the key reuse status

setCertificateTransparent

public CertificatePolicy setCertificateTransparent(Boolean certificateTransparent)

Set the certificate transparency status.

Parameters:

certificateTransparent - the certificateTransparency status to set

Returns:

the updated CertificatePolicy object itself.

setCertificateType

public CertificatePolicy setCertificateType(String certificateType)

Set the certificate type to request from the issuer.

Parameters:

certificateType - the certificateType to request from issuer.

Returns:

the updated CertificatePolicy object itself.

setContentType

public CertificatePolicy setContentType(CertificateContentType contentType)

Set the content type.

Parameters:

contentType - the content type value to set

Returns:

the updated CertificatePolicy object itself.

setEnabled

public CertificatePolicy setEnabled(Boolean enabled)

Set the enabled status.

Parameters:

enabled - The enabled status to set.

Returns:

the updated CertificatePolicy object itself.

setEnhancedKeyUsage

public CertificatePolicy setEnhancedKeyUsage(List ekus)

Set the enhanced key usage.

Parameters:

ekus - the ekus value to set

Returns:

the updated CertificatePolicy object itself.

setExportable

public CertificatePolicy setExportable(Boolean exportable)

Set the exportable value.

Parameters:

exportable - the exportable value to set

Returns:

the updated CertificatePolicy object itself.

setKeyCurveName

public CertificatePolicy setKeyCurveName(CertificateKeyCurveName keyCurveName)

Set the key curve.

Parameters:

keyCurveName - the key curve value to set

Returns:

the updated CertificatePolicy object itself.

setKeyReusable

public CertificatePolicy setKeyReusable(Boolean keyReusable)

Set the reuse key value.

Parameters:

keyReusable - the reuseKey value to set

Returns:

the updated CertificatePolicy object itself.

setKeySize

public CertificatePolicy setKeySize(Integer keySize)

Set the key size.

Parameters:

keySize - the key size value to set

Returns:

the updated CertificatePolicy object itself.

setKeyType

public CertificatePolicy setKeyType(CertificateKeyType keyType)

Get the key type.

Parameters:

keyType - the key type

Returns:

the key type

setKeyUsage

public CertificatePolicy setKeyUsage(CertificateKeyUsage[] keyUsage)

Set the key usage.

Parameters:

keyUsage - the key usage value to set

Returns:

the updated CertificatePolicy object itself.

setLifetimeActions

public CertificatePolicy setLifetimeActions(LifetimeAction[] actions)

Set the lifetime actions

Parameters:

actions - the lifetime actions to set.

Returns:

the updated certificate policy object itself.

setSubject

public CertificatePolicy setSubject(String subject)

Set the subject Name.

Parameters:

subject - the subject Name to set

Returns:

the updated CertificatePolicy object itself.

setSubjectAlternativeNames

public CertificatePolicy setSubjectAlternativeNames(SubjectAlternativeNames subjectAlternativeNames)

Set the subjectAlternativeNames.

Parameters:

subjectAlternativeNames - the subjectAlternativeNames to set

Returns:

the updated CertificatePolicy object itself.

setValidityInMonths

public CertificatePolicy setValidityInMonths(Integer validityInMonths)

Set the validity in months.

Parameters:

validityInMonths - the validityInMonths value to set

Returns:

the updated CertificatePolicy object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to