MongoMIRoleDefinitionResourceInner Class

public final class MongoMIRoleDefinitionResourceInner
extends ProxyResource

Parameters to create and update an Azure Cosmos DB MongoMI Role Definition.

Constructor Summary

Constructor Description
MongoMIRoleDefinitionResourceInner()

Creates an instance of MongoMIRoleDefinitionResourceInner class.

Method Summary

Modifier and Type Method and Description
List<String> assignableScopes()

Get the assignableScopes property: A set of fully qualified Scopes at or below which MongoMI Role Assignments may be created using this Role Definition.

static MongoMIRoleDefinitionResourceInner fromJson(JsonReader jsonReader)

Reads an instance of MongoMIRoleDefinitionResourceInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

String idPropertiesId()

Get the id property: The path id for the Role Definition.

String name()

Get the name property: The name of the resource.

List<Permission> permissions()

Get the permissions property: The set of operations allowed through this Role Definition.

String roleName()

Get the roleName property: A user-friendly name for the Role Definition.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

RoleDefinitionType typePropertiesType()

Get the type property: Indicates whether the Role Definition was built-in or user created.

void validate()

Validates the instance.

MongoMIRoleDefinitionResourceInner withAssignableScopes(List<String> assignableScopes)

Set the assignableScopes property: A set of fully qualified Scopes at or below which MongoMI Role Assignments may be created using this Role Definition.

MongoMIRoleDefinitionResourceInner withIdPropertiesId(String id)

Set the id property: The path id for the Role Definition.

MongoMIRoleDefinitionResourceInner withPermissions(List<Permission> permissions)

Set the permissions property: The set of operations allowed through this Role Definition.

MongoMIRoleDefinitionResourceInner withRoleName(String roleName)

Set the roleName property: A user-friendly name for the Role Definition.

MongoMIRoleDefinitionResourceInner withTypePropertiesType(RoleDefinitionType type)

Set the type property: Indicates whether the Role Definition was built-in or user created.

Methods inherited from ProxyResource

Methods inherited from java.lang.Object

Constructor Details

MongoMIRoleDefinitionResourceInner

public MongoMIRoleDefinitionResourceInner()

Creates an instance of MongoMIRoleDefinitionResourceInner class.

Method Details

assignableScopes

public List<String> assignableScopes()

Get the assignableScopes property: A set of fully qualified Scopes at or below which MongoMI Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.

Returns:

the assignableScopes value.

fromJson

public static MongoMIRoleDefinitionResourceInner fromJson(JsonReader jsonReader)

Reads an instance of MongoMIRoleDefinitionResourceInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MongoMIRoleDefinitionResourceInner 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.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

MongoMIRoleDefinitionResourceInner.id()

Returns:

the id value.

idPropertiesId

public String idPropertiesId()

Get the id property: The path id for the Role Definition.

Returns:

the id value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

MongoMIRoleDefinitionResourceInner.name()

Returns:

the name value.

permissions

public List<Permission> permissions()

Get the permissions property: The set of operations allowed through this Role Definition.

Returns:

the permissions value.

roleName

public String roleName()

Get the roleName property: A user-friendly name for the Role Definition. Must be unique for the database account.

Returns:

the roleName value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

MongoMIRoleDefinitionResourceInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

MongoMIRoleDefinitionResourceInner.type()

Returns:

the type value.

typePropertiesType

public RoleDefinitionType typePropertiesType()

Get the type property: Indicates whether the Role Definition was built-in or user created.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withAssignableScopes

public MongoMIRoleDefinitionResourceInner withAssignableScopes(List<String> assignableScopes)

Set the assignableScopes property: A set of fully qualified Scopes at or below which MongoMI Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist.

Parameters:

assignableScopes - the assignableScopes value to set.

Returns:

the MongoMIRoleDefinitionResourceInner object itself.

withIdPropertiesId

public MongoMIRoleDefinitionResourceInner withIdPropertiesId(String id)

Set the id property: The path id for the Role Definition.

Parameters:

id - the id value to set.

Returns:

the MongoMIRoleDefinitionResourceInner object itself.

withPermissions

public MongoMIRoleDefinitionResourceInner withPermissions(List<Permission> permissions)

Set the permissions property: The set of operations allowed through this Role Definition.

Parameters:

permissions - the permissions value to set.

Returns:

the MongoMIRoleDefinitionResourceInner object itself.

withRoleName

public MongoMIRoleDefinitionResourceInner withRoleName(String roleName)

Set the roleName property: A user-friendly name for the Role Definition. Must be unique for the database account.

Parameters:

roleName - the roleName value to set.

Returns:

the MongoMIRoleDefinitionResourceInner object itself.

withTypePropertiesType

public MongoMIRoleDefinitionResourceInner withTypePropertiesType(RoleDefinitionType type)

Set the type property: Indicates whether the Role Definition was built-in or user created.

Parameters:

type - the type value to set.

Returns:

the MongoMIRoleDefinitionResourceInner object itself.

Applies to