flytekit.models.security
flytekit.models.security
Directory
Classes
flytekit.models.security.Enum
Create a collection of name/value pairs.
Example enumeration:
class Color(Enum):
… RED = 1
… BLUE = 2
… GREEN = 3
Access them by:
Color.RED
<Color.RED: 1>
Color(1)
<Color.RED: 1>
Color[‘RED’]
<Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
len(Color)
3
list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own
attributes – see the documentation for details.
flytekit.models.security.Identity
def Identity (
iam_role: typing. Optional[str],
k8s_service_account: typing. Optional[str],
oauth2_client: typing. Optional[flytekit. models. security. OAuth2Client],
execution_identity: typing. Optional[str],
):
Parameter
Type
iam_role
typing.Optional[str]
k8s_service_account
typing.Optional[str]
oauth2_client
typing.Optional[flytekit.models.security.OAuth2Client]
execution_identity
typing.Optional[str]
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object: flyteidl. core. security_pb2. Identity,
):
Parameter
Type
pb2_object
flyteidl.core.security_pb2.Identity
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
flytekit.models.security.OAuth2Client
def OAuth2Client (
client_id: str,
client_secret: str,
):
Parameter
Type
client_id
str
client_secret
str
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object: flyteidl. core. security_pb2. OAuth2Client,
):
Parameter
Type
pb2_object
flyteidl.core.security_pb2.OAuth2Client
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
flytekit.models.security.OAuth2TokenRequest
def OAuth2TokenRequest (
name: str,
client: flytekit. models. security. OAuth2Client,
idp_discovery_endpoint: typing. Optional[str],
token_endpoint: typing. Optional[str],
type_: < enum 'Type' > ,
):
Parameter
Type
name
str
client
flytekit.models.security.OAuth2Client
idp_discovery_endpoint
typing.Optional[str]
token_endpoint
typing.Optional[str]
type_
<enum 'Type'>
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object: flyteidl. core. security_pb2. OAuth2TokenRequest,
):
Parameter
Type
pb2_object
flyteidl.core.security_pb2.OAuth2TokenRequest
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
flytekit.models.security.Secret
See :std:ref:cookbook:secrets
for usage examples.
def Secret (
group: typing. Optional[str],
key: typing. Optional[str],
group_version: typing. Optional[str],
mount_requirement: < enum 'MountType' > ,
env_var: typing. Optional[str],
):
Parameter
Type
group
typing.Optional[str]
key
typing.Optional[str]
group_version
typing.Optional[str]
mount_requirement
<enum 'MountType'>
env_var
typing.Optional[str]
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object: flyteidl. core. security_pb2. Secret,
):
Parameter
Type
pb2_object
flyteidl.core.security_pb2.Secret
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty
flytekit.models.security.SecurityContext
This is a higher level wrapper object that for the most part users shouldn’t have to worry about. You should
be able to just use :py:class:flytekit.Secret
instead.
def SecurityContext (
run_as: typing. Optional[flytekit. models. security. Identity],
secrets: typing. Optional[typing. List[flytekit. models. security. Secret]],
tokens: typing. Optional[typing. List[flytekit. models. security. OAuth2TokenRequest]],
):
Parameter
Type
run_as
typing.Optional[flytekit.models.security.Identity]
secrets
typing.Optional[typing.List[flytekit.models.security.Secret]]
tokens
typing.Optional[typing.List[flytekit.models.security.OAuth2TokenRequest]]
Methods
from_flyte_idl()
def from_flyte_idl (
pb2_object: flyteidl. core. security_pb2. SecurityContext,
):
Parameter
Type
pb2_object
flyteidl.core.security_pb2.SecurityContext
serialize_to_string()
def serialize_to_string ()
short_string()
to_flyte_idl()
verbose_string()
Properties
Property
Type
Description
is_empty