共用方式為


RoleAssignmentProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentProperties

Implements

public final class RoleAssignmentProperties
implements JsonSerializable<RoleAssignmentProperties>

Role assignment properties.

Constructor Summary

Constructor Description
RoleAssignmentProperties()

Creates an instance of RoleAssignmentProperties class.

Method Summary

Modifier and Type Method and Description
String condition()

Get the condition property: The conditions on the role assignment.

String conditionVersion()

Get the conditionVersion property: Version of the condition.

String createdBy()

Get the createdBy property: Id of the user who created the assignment.

OffsetDateTime createdOn()

Get the createdOn property: Time it was created.

String delegatedManagedIdentityResourceId()

Get the delegatedManagedIdentityResourceId property: Id of the delegated managed identity resource.

String description()

Get the description property: Description of role assignment.

static RoleAssignmentProperties fromJson(JsonReader jsonReader)

Reads an instance of RoleAssignmentProperties from the JsonReader.

String principalId()

Get the principalId property: The principal ID.

PrincipalType principalType()

Get the principalType property: The principal type of the assigned principal ID.

String roleDefinitionId()

Get the roleDefinitionId property: The role definition ID.

String scope()

Get the scope property: The role assignment scope.

JsonWriter toJson(JsonWriter jsonWriter)
String updatedBy()

Get the updatedBy property: Id of the user who updated the assignment.

OffsetDateTime updatedOn()

Get the updatedOn property: Time it was updated.

void validate()

Validates the instance.

RoleAssignmentProperties withCondition(String condition)

Set the condition property: The conditions on the role assignment.

RoleAssignmentProperties withConditionVersion(String conditionVersion)

Set the conditionVersion property: Version of the condition.

RoleAssignmentProperties withDelegatedManagedIdentityResourceId(String delegatedManagedIdentityResourceId)

Set the delegatedManagedIdentityResourceId property: Id of the delegated managed identity resource.

RoleAssignmentProperties withDescription(String description)

Set the description property: Description of role assignment.

RoleAssignmentProperties withPrincipalId(String principalId)

Set the principalId property: The principal ID.

RoleAssignmentProperties withPrincipalType(PrincipalType principalType)

Set the principalType property: The principal type of the assigned principal ID.

RoleAssignmentProperties withRoleDefinitionId(String roleDefinitionId)

Set the roleDefinitionId property: The role definition ID.

Methods inherited from java.lang.Object

Constructor Details

RoleAssignmentProperties

public RoleAssignmentProperties()

Creates an instance of RoleAssignmentProperties class.

Method Details

condition

public String condition()

Get the condition property: The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource\[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'.

Returns:

the condition value.

conditionVersion

public String conditionVersion()

Get the conditionVersion property: Version of the condition. Currently the only accepted value is '2.0'.

Returns:

the conditionVersion value.

createdBy

public String createdBy()

Get the createdBy property: Id of the user who created the assignment.

Returns:

the createdBy value.

createdOn

public OffsetDateTime createdOn()

Get the createdOn property: Time it was created.

Returns:

the createdOn value.

delegatedManagedIdentityResourceId

public String delegatedManagedIdentityResourceId()

Get the delegatedManagedIdentityResourceId property: Id of the delegated managed identity resource.

Returns:

the delegatedManagedIdentityResourceId value.

description

public String description()

Get the description property: Description of role assignment.

Returns:

the description value.

fromJson

public static RoleAssignmentProperties fromJson(JsonReader jsonReader)

Reads an instance of RoleAssignmentProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of RoleAssignmentProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

principalId

public String principalId()

Get the principalId property: The principal ID.

Returns:

the principalId value.

principalType

public PrincipalType principalType()

Get the principalType property: The principal type of the assigned principal ID.

Returns:

the principalType value.

roleDefinitionId

public String roleDefinitionId()

Get the roleDefinitionId property: The role definition ID.

Returns:

the roleDefinitionId value.

scope

public String scope()

Get the scope property: The role assignment scope.

Returns:

the scope value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

updatedBy

public String updatedBy()

Get the updatedBy property: Id of the user who updated the assignment.

Returns:

the updatedBy value.

updatedOn

public OffsetDateTime updatedOn()

Get the updatedOn property: Time it was updated.

Returns:

the updatedOn value.

validate

public void validate()

Validates the instance.

withCondition

public RoleAssignmentProperties withCondition(String condition)

Set the condition property: The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource\[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'.

Parameters:

condition - the condition value to set.

Returns:

the RoleAssignmentProperties object itself.

withConditionVersion

public RoleAssignmentProperties withConditionVersion(String conditionVersion)

Set the conditionVersion property: Version of the condition. Currently the only accepted value is '2.0'.

Parameters:

conditionVersion - the conditionVersion value to set.

Returns:

the RoleAssignmentProperties object itself.

withDelegatedManagedIdentityResourceId

public RoleAssignmentProperties withDelegatedManagedIdentityResourceId(String delegatedManagedIdentityResourceId)

Set the delegatedManagedIdentityResourceId property: Id of the delegated managed identity resource.

Parameters:

delegatedManagedIdentityResourceId - the delegatedManagedIdentityResourceId value to set.

Returns:

the RoleAssignmentProperties object itself.

withDescription

public RoleAssignmentProperties withDescription(String description)

Set the description property: Description of role assignment.

Parameters:

description - the description value to set.

Returns:

the RoleAssignmentProperties object itself.

withPrincipalId

public RoleAssignmentProperties withPrincipalId(String principalId)

Set the principalId property: The principal ID.

Parameters:

principalId - the principalId value to set.

Returns:

the RoleAssignmentProperties object itself.

withPrincipalType

public RoleAssignmentProperties withPrincipalType(PrincipalType principalType)

Set the principalType property: The principal type of the assigned principal ID.

Parameters:

principalType - the principalType value to set.

Returns:

the RoleAssignmentProperties object itself.

withRoleDefinitionId

public RoleAssignmentProperties withRoleDefinitionId(String roleDefinitionId)

Set the roleDefinitionId property: The role definition ID.

Parameters:

roleDefinitionId - the roleDefinitionId value to set.

Returns:

the RoleAssignmentProperties object itself.

Applies to