Role
Package: flyteplugins.union.remote
Represents a Union RBAC Role.
class Role(
pb2: RolePb2,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
RolePb2 |
Properties
| Property | Type | Description |
|---|---|---|
actions |
None |
|
description |
None |
|
name |
None |
|
organization |
None |
|
role_type |
None |
Methods
| Method | Description |
|---|---|
create() |
Create a new role. |
delete() |
Delete a role. |
get() |
Get a role by name. |
listall() |
List all roles in the organization. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
update() |
Update a role. |
create()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Role.create.aio().
def create(
cls,
name: str,
description: str,
actions: list[str] | None,
) -> RoleCreate a new role.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
description |
str |
|
actions |
list[str] | None |
delete()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Role.delete.aio().
def delete(
cls,
name: str,
)Delete a role.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
get()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Role.get.aio().
def get(
cls,
name: str,
) -> RoleGet a role by name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
listall()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Role.listall.aio().
def listall(
cls,
limit: int,
) -> AsyncIterator[Role]List all roles in the organization.
| Parameter | Type | Description |
|---|---|---|
cls |
||
limit |
int |
to_dict()
def to_dict()Convert the object to a JSON-serializable dictionary.
Returns: dict: A dictionary representation of the object.
to_json()
def to_json()Convert the object to a JSON string.
Returns: str: A JSON string representation of the object.
update()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Role.update.aio().
def update(
cls,
name: str,
description: str,
actions: list[str] | None,
)Update a role.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
|
description |
str |
|
actions |
list[str] | None |