0.2.1

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()

This method can be called both synchronously or asynchronously.

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,
) -> Assignment

Assign 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()

This method can be called both synchronously or asynchronously.

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,
) -> Assignment

Get 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()

This method can be called both synchronously or asynchronously.

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()

This method can be called both synchronously or asynchronously.

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