Class ServicePrincipal
java.lang.Object
com.azure.resourcemanager.sql.models.ServicePrincipal
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ServicePrincipal>
public final class ServicePrincipal
extends Object
implements com.azure.json.JsonSerializable<ServicePrincipal>
The managed instance's service principal configuration for a resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclientId()Get the clientId property: The Azure Active Directory application client id.static ServicePrincipalfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ServicePrincipal from the JsonReader.Get the principalId property: The Azure Active Directory application object id.tenantId()Get the tenantId property: The Azure Active Directory tenant id.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Service principal type.voidvalidate()Validates the instance.withType(ServicePrincipalType type) Set the type property: Service principal type.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
-
ServicePrincipal
public ServicePrincipal()Creates an instance of ServicePrincipal class.
-
-
Method Details
-
principalId
Get the principalId property: The Azure Active Directory application object id.- Returns:
- the principalId value.
-
clientId
Get the clientId property: The Azure Active Directory application client id.- Returns:
- the clientId value.
-
tenantId
Get the tenantId property: The Azure Active Directory tenant id.- Returns:
- the tenantId value.
-
type
Get the type property: Service principal type.- Returns:
- the type value.
-
withType
Set the type property: Service principal type.- Parameters:
type- the type value to set.- Returns:
- the ServicePrincipal 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<ServicePrincipal>- Throws:
IOException
-
fromJson
Reads an instance of ServicePrincipal from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ServicePrincipal if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ServicePrincipal.
-