Class SqlRoleDefinitionCreateUpdateParameters
java.lang.Object
com.azure.resourcemanager.cosmos.models.SqlRoleDefinitionCreateUpdateParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SqlRoleDefinitionCreateUpdateParameters>
public final class SqlRoleDefinitionCreateUpdateParameters
extends Object
implements com.azure.json.JsonSerializable<SqlRoleDefinitionCreateUpdateParameters>
Parameters to create and update an Azure Cosmos DB SQL Role Definition.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SqlRoleDefinitionCreateUpdateParameters class. -
Method Summary
Modifier and TypeMethodDescriptionGet the assignableScopes property: A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SqlRoleDefinitionCreateUpdateParameters from the JsonReader.Get the permissions property: The set of operations allowed through this Role Definition.roleName()
Get the roleName property: A user-friendly name for the Role Definition.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: Indicates whether the Role Definition was built-in or user created.void
validate()
Validates the instance.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.withPermissions
(List<Permission> permissions) Set the permissions property: The set of operations allowed through this Role Definition.withRoleName
(String roleName) Set the roleName property: A user-friendly name for the Role Definition.withType
(RoleDefinitionType type) Set the type property: Indicates whether the Role Definition was built-in or user created.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SqlRoleDefinitionCreateUpdateParameters
public SqlRoleDefinitionCreateUpdateParameters()Creates an instance of SqlRoleDefinitionCreateUpdateParameters class.
-
-
Method Details
-
roleName
Get the roleName property: A user-friendly name for the Role Definition. Must be unique for the database account.- Returns:
- the roleName value.
-
withRoleName
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 SqlRoleDefinitionCreateUpdateParameters object itself.
-
type
Get the type property: Indicates whether the Role Definition was built-in or user created.- Returns:
- the type value.
-
withType
Set the type property: Indicates whether the Role Definition was built-in or user created.- Parameters:
type
- the type value to set.- Returns:
- the SqlRoleDefinitionCreateUpdateParameters object itself.
-
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.
-
withAssignableScopes
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 SqlRoleDefinitionCreateUpdateParameters object itself.
-
permissions
Get the permissions property: The set of operations allowed through this Role Definition.- Returns:
- the permissions value.
-
withPermissions
Set the permissions property: The set of operations allowed through this Role Definition.- Parameters:
permissions
- the permissions value to set.- Returns:
- the SqlRoleDefinitionCreateUpdateParameters object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<SqlRoleDefinitionCreateUpdateParameters>
- Throws:
IOException
-
fromJson
public static SqlRoleDefinitionCreateUpdateParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SqlRoleDefinitionCreateUpdateParameters from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of SqlRoleDefinitionCreateUpdateParameters 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 SqlRoleDefinitionCreateUpdateParameters.
-