SqlRoleDefinitionResource Class

  • java.lang.Object
    • com.azure.resourcemanager.cosmos.fluent.models.SqlRoleDefinitionResource

Implements

public final class SqlRoleDefinitionResource
implements JsonSerializable<SqlRoleDefinitionResource>

Azure Cosmos DB SQL Role Definition resource object.

Constructor Summary

Constructor Description
SqlRoleDefinitionResource()

Creates an instance of SqlRoleDefinitionResource 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 Role Assignments may be created using this Role Definition.

static SqlRoleDefinitionResource fromJson(JsonReader jsonReader)

Reads an instance of SqlRoleDefinitionResource from the JsonReader.

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.

JsonWriter toJson(JsonWriter jsonWriter)
RoleDefinitionType type()

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

void validate()

Validates the instance.

SqlRoleDefinitionResource withAssignableScopes(List<String> assignableScopes)

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

SqlRoleDefinitionResource withPermissions(List<Permission> permissions)

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

SqlRoleDefinitionResource withRoleName(String roleName)

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

SqlRoleDefinitionResource withType(RoleDefinitionType type)

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

Methods inherited from java.lang.Object

Constructor Details

SqlRoleDefinitionResource

public SqlRoleDefinitionResource()

Creates an instance of SqlRoleDefinitionResource class.

Method Details

assignableScopes

public List<String> assignableScopes()

Get the assignableScopes property: A set of fully qualified Scopes at or below which 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 SqlRoleDefinitionResource fromJson(JsonReader jsonReader)

Reads an instance of SqlRoleDefinitionResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public RoleDefinitionType type()

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 SqlRoleDefinitionResource withAssignableScopes(List<String> assignableScopes)

Set the assignableScopes property: A set of fully qualified Scopes at or below which 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 SqlRoleDefinitionResource object itself.

withPermissions

public SqlRoleDefinitionResource 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 SqlRoleDefinitionResource object itself.

withRoleName

public SqlRoleDefinitionResource 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 SqlRoleDefinitionResource object itself.

withType

public SqlRoleDefinitionResource withType(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 SqlRoleDefinitionResource object itself.

Applies to