Class RunCommandManagedIdentity
java.lang.Object
com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RunCommandManagedIdentity>
public final class RunCommandManagedIdentity
extends Object
implements com.azure.json.JsonSerializable<RunCommandManagedIdentity>
Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage
blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make
sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's
container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for
Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's
identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and
https://aka.ms/RunCommandManaged.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RunCommandManagedIdentity class. -
Method Summary
Modifier and TypeMethodDescriptionclientId()Get the clientId property: Client Id (GUID value) of the user-assigned managed identity.static RunCommandManagedIdentityfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RunCommandManagedIdentity from the JsonReader.objectId()Get the objectId property: Object Id (GUID value) of the user-assigned managed identity.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withClientId(String clientId) Set the clientId property: Client Id (GUID value) of the user-assigned managed identity.withObjectId(String objectId) Set the objectId property: Object Id (GUID value) of the user-assigned managed identity.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
-
RunCommandManagedIdentity
public RunCommandManagedIdentity()Creates an instance of RunCommandManagedIdentity class.
-
-
Method Details
-
clientId
Get the clientId property: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.- Returns:
- the clientId value.
-
withClientId
Set the clientId property: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.- Parameters:
clientId- the clientId value to set.- Returns:
- the RunCommandManagedIdentity object itself.
-
objectId
Get the objectId property: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.- Returns:
- the objectId value.
-
withObjectId
Set the objectId property: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.- Parameters:
objectId- the objectId value to set.- Returns:
- the RunCommandManagedIdentity 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<RunCommandManagedIdentity>- Throws:
IOException
-
fromJson
public static RunCommandManagedIdentity fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RunCommandManagedIdentity from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RunCommandManagedIdentity 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 RunCommandManagedIdentity.
-