Assignment
Package: flyteplugins.union.remote
Represents role/policy assignments for an identity.
class Assignment(
pb2: IdentityAssignment,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
IdentityAssignment |
Properties
| Property | Type | Description |
|---|---|---|
policies |
None |
|
roles |
None |
|
subject |
None |
Methods
| Method | Description |
|---|---|
create() |
Assign a policy to an identity. |
get() |
Get assignments for an identity. |
listall() |
List assignments for all members in the organization. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
unassign() |
Unassign a policy from an identity. |
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 Assignment.create.aio().
def create(
cls,
user_subject: str | None,
creds_subject: str | None,
email: str | None,
policy: str,
) -> AssignmentAssign a policy to an identity.
Exactly one of user_subject, creds_subject, or email must be provided.
| Parameter | Type | Description |
|---|---|---|
cls |
||
user_subject |
str | None |
User subject identifier. |
creds_subject |
str | None |
Client credentials application subject. |
email |
str | None |
User email for lookup. |
policy |
str |
Policy name to assign. |
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 Assignment.get.aio().
def get(
cls,
user_subject: str | None,
creds_subject: str | None,
) -> AssignmentGet assignments for an identity.
One of user_subject or creds_subject must be provided.
| Parameter | Type | Description |
|---|---|---|
cls |
||
user_subject |
str | None |
|
creds_subject |
str | None |
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 Assignment.listall.aio().
def listall(
cls,
limit: int,
) -> AsyncIterator[Assignment]List assignments for all members 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.
unassign()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await Assignment.unassign.aio().
def unassign(
cls,
user_subject: str | None,
creds_subject: str | None,
policy: str,
)Unassign a policy from an identity.
One of user_subject or creds_subject must be provided.
| Parameter | Type | Description |
|---|---|---|
cls |
||
user_subject |
str | None |
|
creds_subject |
str | None |
|
policy |
str |