Class CertificatePolicy
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CertificatePolicy>
certificate.-
Constructor Summary
ConstructorsConstructorDescriptionCertificatePolicy(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 TypeMethodDescriptionstatic CertificatePolicyforPlatformManaged(PlatformManaged platformManaged) Creates a certificate policy for a platform-managed certificate.static CertificatePolicyfromJson(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aCertificatePolicy.Get the certificate type.Get the content type.Get the the UTC time at which certificate policy was created.static CertificatePolicyGet the default certificate policy.Get the enhanced key usage.Get the issuer name.Get the key curve.Get the key size.Get the key type.Get the key usage.Get the lifetime actionsGet the platform managed certificate configuration.Get the subject.Get the subjectAlternativeNames.Get the UTC time at which certificate policy was last updated.Get the validity in months.Get the certificate transparency status.Get the enabled status.Get the exportable.Get the key reuse status.setCertificateTransparent(Boolean certificateTransparent) Set the certificate transparency status.setCertificateType(String certificateType) Set the certificate type to request from the issuer.setContentType(CertificateContentType contentType) Set the content type.setEnabled(Boolean enabled) Set the enabled status.setEnhancedKeyUsage(List<String> ekus) Set the enhanced key usage.setExportable(Boolean exportable) Set the exportable value.setKeyCurveName(CertificateKeyCurveName keyCurveName) Set the key curve.setKeyReusable(Boolean keyReusable) Set the reuse key value.setKeySize(Integer keySize) Set the key size.setKeyType(CertificateKeyType keyType) Get the key type.setKeyUsage(CertificateKeyUsage... keyUsage) Set the key usage.setLifetimeActions(LifetimeAction... actions) Set the lifetime actionssetPlatformManaged(PlatformManaged platformManaged) Set the platform managed certificate configuration.setSubject(String subject) Set the subject Name.setSubjectAlternativeNames(SubjectAlternativeNames subjectAlternativeNames) Set the subjectAlternativeNames.setValidityInMonths(Integer validityInMonths) Set the validity in months.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CertificatePolicy
-
CertificatePolicy
Creates certificate policy.- Parameters:
issuerName- The issuer name to set.subjectAlternativeNames- The subject alternative names 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
-
getKeyUsage
-
setKeyUsage
Set the key usage.- Parameters:
keyUsage- the key usage value to set- Returns:
- the updated CertificatePolicy object itself.
-
getEnhancedKeyUsage
-
setEnhancedKeyUsage
Set the enhanced key usage.- Parameters:
ekus- the ekus value to set- Returns:
- the updated CertificatePolicy object itself.
-
isExportable
-
setExportable
Set the exportable value.- Parameters:
exportable- the exportable value to set- Returns:
- the updated CertificatePolicy object itself.
-
getKeyType
-
setKeyType
Get the key type.- Parameters:
keyType- the key type- Returns:
- the key type
-
getKeySize
-
isKeyReusable
-
setKeyReusable
Set the reuse key value.- Parameters:
keyReusable- the reuseKey value to set- Returns:
- the updated CertificatePolicy object itself.
-
getKeyCurveName
-
getCreatedOn
Get the the UTC time at which certificate policy was created.- Returns:
- the created UTC time.
-
getUpdatedOn
Get the UTC time at which certificate policy was last updated.- Returns:
- the last updated UTC time.
-
isEnabled
-
setEnabled
Set the enabled status.- Parameters:
enabled- The enabled status to set.- Returns:
- the updated CertificatePolicy object itself.
-
getContentType
-
setContentType
Set the content type.- Parameters:
contentType- the content type value to set- Returns:
- the updated CertificatePolicy object itself.
-
getSubjectAlternativeNames
Get the subjectAlternativeNames.- Returns:
- the subjectAlternativeNames.
-
setSubjectAlternativeNames
public CertificatePolicy setSubjectAlternativeNames(SubjectAlternativeNames subjectAlternativeNames) Set the subjectAlternativeNames.- Parameters:
subjectAlternativeNames- the subjectAlternativeNames to set- Returns:
- the updated CertificatePolicy object itself.
-
setSubject
Set the subject Name.- Parameters:
subject- the subject Name to set- Returns:
- the updated CertificatePolicy object itself.
-
setValidityInMonths
Set the validity in months.- Parameters:
validityInMonths- the validityInMonths value to set- Returns:
- the updated CertificatePolicy object itself.
-
setKeySize
Set the key size.- Parameters:
keySize- the key size value to set- Returns:
- the updated CertificatePolicy object itself.
-
setKeyCurveName
Set the key curve.- Parameters:
keyCurveName- the key curve value to set- Returns:
- the updated CertificatePolicy object itself.
-
setCertificateType
Set the certificate type to request from the issuer.- Parameters:
certificateType- the certificateType to request from issuer.- Returns:
- the updated CertificatePolicy object itself.
-
setCertificateTransparent
Set the certificate transparency status.- Parameters:
certificateTransparent- the certificateTransparency status to set- Returns:
- the updated CertificatePolicy object itself.
-
getSubject
-
getValidityInMonths
-
getIssuerName
-
getCertificateType
-
isCertificateTransparent
Get the certificate transparency status.- Returns:
- the certificate transparency status
-
getPlatformManaged
Get the platform managed certificate configuration.Warning: this property is currently intended for internal (first-party) Key Vault use only. It is populated when the policy uses platform-managed configuration in service version
2026-04-01. Third-party callers should not rely on this property; the underlying service contract may change without notice.- Returns:
- the platform managed certificate configuration.
-
setPlatformManaged
Set the platform managed certificate configuration.Warning: this property is currently intended for internal (first-party) Key Vault use only. It is exposed in service version
2026-04-01, but the feature is not generally available. Third-party calls that supply aPlatformManagedconfiguration will be rejected by the service. Do not use this setter in production code.- Parameters:
platformManaged- the platform managed certificate configuration.- Returns:
- the updated CertificatePolicy object itself.
-
setLifetimeActions
Set the lifetime actions- Parameters:
actions- the lifetime actions to set.- Returns:
- the updated certificate policy object itself.
-
getLifetimeActions
Get the lifetime actions- Returns:
- the lifetime actions
-
getDefault
Get the default certificate policy.- Returns:
- the default certificate policy.
-
forPlatformManaged
Creates a certificate policy for a platform-managed certificate. The returned policy contains only the platform-managed configuration (and optionally key properties set via subsequent calls such assetKeyType(CertificateKeyType)orsetKeySize(Integer)). Issuer and X.509 certificate properties are intentionally left unset — the service rejects create requests that specify them whenplatformManagedis set.Warning: this factory is currently intended for internal (first-party) Key Vault use only. It targets service version
2026-04-01, but the feature is not generally available. Third-party calls will be rejected by the service. Do not use in production code.- Parameters:
platformManaged- the platform-managed certificate configuration.- Returns:
- a
CertificatePolicysuitable for creating a platform-managed certificate.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CertificatePolicy>- Throws:
IOException
-
fromJson
Reads a JSON stream into aCertificatePolicy.- Parameters:
jsonReader- TheJsonReaderbeing read.- Returns:
- The
CertificatePolicythat the JSON stream represented, may return null. - Throws:
IOException- If aCertificatePolicyfails to be read from thejsonReader.
-