Class HostnameConfiguration
java.lang.Object
com.azure.resourcemanager.apimanagement.models.HostnameConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<HostnameConfiguration>
public final class HostnameConfiguration
extends Object
implements com.azure.json.JsonSerializable<HostnameConfiguration>
Custom hostname configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the certificate property: Certificate information.Get the certificatePassword property: Certificate Password.Get the certificateSource property: Certificate Source.Get the certificateStatus property: Certificate Status.Get the defaultSslBinding property: Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate.Get the encodedCertificate property: Base64 Encoded certificate.static HostnameConfigurationfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of HostnameConfiguration from the JsonReader.hostname()Get the hostname property: Hostname to configure on the Api Management service.Get the identityClientId property: System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.Get the keyVaultId property: Url to the KeyVault Secret containing the Ssl Certificate.Get the negotiateClientCertificate property: Specify true to always negotiate client certificate on the hostname.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Hostname type.voidvalidate()Validates the instance.withCertificate(CertificateInformation certificate) Set the certificate property: Certificate information.withCertificatePassword(String certificatePassword) Set the certificatePassword property: Certificate Password.withCertificateSource(CertificateSource certificateSource) Set the certificateSource property: Certificate Source.withCertificateStatus(CertificateStatus certificateStatus) Set the certificateStatus property: Certificate Status.withDefaultSslBinding(Boolean defaultSslBinding) Set the defaultSslBinding property: Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate.withEncodedCertificate(String encodedCertificate) Set the encodedCertificate property: Base64 Encoded certificate.withHostname(String hostname) Set the hostname property: Hostname to configure on the Api Management service.withIdentityClientId(String identityClientId) Set the identityClientId property: System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.withKeyVaultId(String keyVaultId) Set the keyVaultId property: Url to the KeyVault Secret containing the Ssl Certificate.withNegotiateClientCertificate(Boolean negotiateClientCertificate) Set the negotiateClientCertificate property: Specify true to always negotiate client certificate on the hostname.withType(HostnameType type) Set the type property: Hostname type.Methods inherited from class java.lang.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
-
HostnameConfiguration
public HostnameConfiguration()Creates an instance of HostnameConfiguration class.
-
-
Method Details
-
type
Get the type property: Hostname type.- Returns:
- the type value.
-
withType
Set the type property: Hostname type.- Parameters:
type- the type value to set.- Returns:
- the HostnameConfiguration object itself.
-
hostname
Get the hostname property: Hostname to configure on the Api Management service.- Returns:
- the hostname value.
-
withHostname
Set the hostname property: Hostname to configure on the Api Management service.- Parameters:
hostname- the hostname value to set.- Returns:
- the HostnameConfiguration object itself.
-
keyVaultId
Get the keyVaultId property: Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*.- Returns:
- the keyVaultId value.
-
withKeyVaultId
Set the keyVaultId property: Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*.- Parameters:
keyVaultId- the keyVaultId value to set.- Returns:
- the HostnameConfiguration object itself.
-
identityClientId
Get the identityClientId property: System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.- Returns:
- the identityClientId value.
-
withIdentityClientId
Set the identityClientId property: System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.- Parameters:
identityClientId- the identityClientId value to set.- Returns:
- the HostnameConfiguration object itself.
-
encodedCertificate
Get the encodedCertificate property: Base64 Encoded certificate.- Returns:
- the encodedCertificate value.
-
withEncodedCertificate
Set the encodedCertificate property: Base64 Encoded certificate.- Parameters:
encodedCertificate- the encodedCertificate value to set.- Returns:
- the HostnameConfiguration object itself.
-
certificatePassword
Get the certificatePassword property: Certificate Password.- Returns:
- the certificatePassword value.
-
withCertificatePassword
Set the certificatePassword property: Certificate Password.- Parameters:
certificatePassword- the certificatePassword value to set.- Returns:
- the HostnameConfiguration object itself.
-
defaultSslBinding
Get the defaultSslBinding property: Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type.- Returns:
- the defaultSslBinding value.
-
withDefaultSslBinding
Set the defaultSslBinding property: Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to gateway Hostname Type.- Parameters:
defaultSslBinding- the defaultSslBinding value to set.- Returns:
- the HostnameConfiguration object itself.
-
negotiateClientCertificate
Get the negotiateClientCertificate property: Specify true to always negotiate client certificate on the hostname. Default Value is false.- Returns:
- the negotiateClientCertificate value.
-
withNegotiateClientCertificate
Set the negotiateClientCertificate property: Specify true to always negotiate client certificate on the hostname. Default Value is false.- Parameters:
negotiateClientCertificate- the negotiateClientCertificate value to set.- Returns:
- the HostnameConfiguration object itself.
-
certificate
Get the certificate property: Certificate information.- Returns:
- the certificate value.
-
withCertificate
Set the certificate property: Certificate information.- Parameters:
certificate- the certificate value to set.- Returns:
- the HostnameConfiguration object itself.
-
certificateSource
Get the certificateSource property: Certificate Source.- Returns:
- the certificateSource value.
-
withCertificateSource
Set the certificateSource property: Certificate Source.- Parameters:
certificateSource- the certificateSource value to set.- Returns:
- the HostnameConfiguration object itself.
-
certificateStatus
Get the certificateStatus property: Certificate Status.- Returns:
- the certificateStatus value.
-
withCertificateStatus
Set the certificateStatus property: Certificate Status.- Parameters:
certificateStatus- the certificateStatus value to set.- Returns:
- the HostnameConfiguration object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<HostnameConfiguration>- Throws:
IOException
-
fromJson
public static HostnameConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of HostnameConfiguration from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of HostnameConfiguration if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the HostnameConfiguration.
-