The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
Secret
Package: flyte.remote
Parameters
class Secret(
pb2: definition_pb2.Secret,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
definition_pb2.Secret |
Properties
| Property | Type | Description |
|---|---|---|
name |
None |
Get the name of the secret. |
type |
None |
Get the type of the secret as a string (“regular” or “image_pull”). |
Methods
| Method | Description |
|---|---|
create() |
Create a new secret. |
delete() |
Delete a secret by name. |
get() |
Retrieve a secret by name. |
listall() |
List all secrets in the current project and domain. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
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 Secret.create.aio().
def create(
cls,
name: str,
value: Union[str, bytes],
type: SecretTypes,
)Create a new secret.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
The name of the secret. |
value |
Union[str, bytes] |
The secret value as a string or bytes. |
type |
SecretTypes |
Type of secret - either “regular” or “image_pull”. |
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 Secret.delete.aio().
def delete(
cls,
name,
)Delete a secret by name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
The name of the secret to delete. |
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 Secret.get.aio().
def get(
cls,
name: str,
) -> SecretRetrieve a secret by name.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str |
The name of the secret to retrieve. |
Returns: A Secret object.
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 Secret.listall.aio().
def listall(
cls,
limit: int,
) -> AsyncIterator[Secret]List all secrets in the current project and domain.
| Parameter | Type | Description |
|---|---|---|
cls |
||
limit |
int |
Maximum number of secrets to return per page. |
Returns: An async iterator of Secret objects.
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.