public class GrantPermissionRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.grantPermission(GrantPermissionRequest)
.
Grant user or role the specified permission on the specified object.
Modifier and Type | Class and Description |
---|---|
static class |
GrantPermissionRequest.ObjectType
The type of object being granted to
Supported values:
CONTEXT :
Context
CREDENTIAL : Credential
DATASINK :
Data Sink
DATASOURCE : Data Source
DIRECTORY : KIFS File Directory
GRAPH : A
Graph object
PROC : UDF
Procedure
SCHEMA :
Schema
SQL_PROC :
SQL Procedure
SYSTEM :
System-level access
TABLE :
Database Table
TABLE_MONITOR : Table monitor
A set of string constants for the parameter objectType . |
static class |
GrantPermissionRequest.Options
Optional parameters.
|
static class |
GrantPermissionRequest.Permission
Permission being granted.
|
Constructor and Description |
---|
GrantPermissionRequest()
Constructs a GrantPermissionRequest object with default parameters.
|
GrantPermissionRequest(String principal,
String object,
String objectType,
String permission,
Map<String,String> options)
Constructs a GrantPermissionRequest object with the specified
parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getObject() |
String |
getObjectType() |
Map<String,String> |
getOptions() |
String |
getPermission() |
String |
getPrincipal() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
GrantPermissionRequest |
setObject(String object) |
GrantPermissionRequest |
setObjectType(String objectType) |
GrantPermissionRequest |
setOptions(Map<String,String> options) |
GrantPermissionRequest |
setPermission(String permission) |
GrantPermissionRequest |
setPrincipal(String principal) |
String |
toString() |
public GrantPermissionRequest()
public GrantPermissionRequest(String principal, String object, String objectType, String permission, Map<String,String> options)
principal
- Name of the user or role for which the permission is
being granted. Must be an existing user or role. The
default value is ''.object
- Name of object permission is being granted to. It is
recommended to use a fully-qualified name when possible.objectType
- The type of object being granted to
Supported values:
CONTEXT
: Context
CREDENTIAL
: Credential
DATASINK
: Data Sink
DATASOURCE
: Data Source
DIRECTORY
: KIFS File Directory
GRAPH
: A Graph object
PROC
: UDF Procedure
SCHEMA
: Schema
SQL_PROC
: SQL Procedure
SYSTEM
: System-level access
TABLE
: Database Table
TABLE_MONITOR
: Table monitor
permission
- Permission being granted.
Supported values:
ADMIN
: Full read/write and administrative access on
the object.
CONNECT
: Connect access on the given data source or
data sink.
DELETE
: Delete rows from tables.
EXECUTE
: Ability to Execute the Procedure object.
INSERT
: Insert access to tables.
READ
: Ability to read, list and use the object.
UPDATE
: Update access to the table.
USER_ADMIN
: Access to administer users and roles
that do not have system_admin permission.
WRITE
: Access to write, change and delete objects.
options
- Optional parameters.
COLUMNS
: Apply table security to these columns,
comma-separated. The default value is ''.
FILTER_EXPRESSION
: Optional filter expression to apply
to this grant. Only rows that match the filter will be
affected. The default value is ''.
WITH_GRANT_OPTION
: Allow the recipient to grant the
same permission (or subset) to others
Supported values:
The default value is FALSE
.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getPrincipal()
public GrantPermissionRequest setPrincipal(String principal)
principal
- Name of the user or role for which the permission is
being granted. Must be an existing user or role. The
default value is ''.this
to mimic the builder pattern.public String getObject()
public GrantPermissionRequest setObject(String object)
object
- Name of object permission is being granted to. It is
recommended to use a fully-qualified name when possible.this
to mimic the builder pattern.public String getObjectType()
CONTEXT
: Context
CREDENTIAL
: Credential
DATASINK
: Data Sink
DATASOURCE
: Data Source
DIRECTORY
: KIFS File Directory
GRAPH
: A Graph object
PROC
:
UDF Procedure
SCHEMA
: Schema
SQL_PROC
: SQL Procedure
SYSTEM
: System-level access
TABLE
: Database Table
TABLE_MONITOR
: Table monitor
public GrantPermissionRequest setObjectType(String objectType)
objectType
- The type of object being granted to
Supported values:
CONTEXT
: Context
CREDENTIAL
: Credential
DATASINK
: Data Sink
DATASOURCE
: Data Source
DIRECTORY
: KIFS File Directory
GRAPH
: A Graph object
PROC
: UDF Procedure
SCHEMA
: Schema
SQL_PROC
: SQL Procedure
SYSTEM
: System-level access
TABLE
: Database Table
TABLE_MONITOR
: Table monitor
this
to mimic the builder pattern.public String getPermission()
ADMIN
: Full read/write and administrative access on the object.
CONNECT
: Connect access on the given data source or data sink.
DELETE
: Delete rows from tables.
EXECUTE
: Ability to Execute the Procedure object.
INSERT
: Insert access to tables.
READ
:
Ability to read, list and use the object.
UPDATE
: Update access to the table.
USER_ADMIN
: Access to administer users and roles that do not
have system_admin permission.
WRITE
: Access to write, change and delete objects.
public GrantPermissionRequest setPermission(String permission)
permission
- Permission being granted.
Supported values:
ADMIN
: Full read/write and administrative access on
the object.
CONNECT
: Connect access on the given data source or
data sink.
DELETE
: Delete rows from tables.
EXECUTE
: Ability to Execute the Procedure object.
INSERT
: Insert access to tables.
READ
: Ability to read, list and use the object.
UPDATE
: Update access to the table.
USER_ADMIN
: Access to administer users and roles
that do not have system_admin permission.
WRITE
: Access to write, change and delete objects.
this
to mimic the builder pattern.public Map<String,String> getOptions()
COLUMNS
: Apply table security to these columns,
comma-separated. The default value is ''.
FILTER_EXPRESSION
: Optional filter expression to apply to this
grant. Only rows that match the filter will be affected. The
default value is ''.
WITH_GRANT_OPTION
: Allow the recipient to grant the same
permission (or subset) to others
Supported values:
The default value is FALSE
.
Map
.public GrantPermissionRequest setOptions(Map<String,String> options)
options
- Optional parameters.
COLUMNS
: Apply table security to these columns,
comma-separated. The default value is ''.
FILTER_EXPRESSION
: Optional filter expression to apply
to this grant. Only rows that match the filter will be
affected. The default value is ''.
WITH_GRANT_OPTION
: Allow the recipient to grant the
same permission (or subset) to others
Supported values:
The default value is FALSE
.
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2024. All rights reserved.