Clients#

This module provides lower-level access to a Union or Flyte backend.

class flytekit.clients.friendly.SynchronousFlyteClient(cfg, **kwargs)#

This is a low-level client that users can use to make direct gRPC service calls to the control plane. See the service spec. This is more user-friendly interface than the raw client so users should try to use this class first. Create a client by

SynchronousFlyteClient("your.domain:port", insecure=True)
# insecure should be True if your flyteadmin deployment doesn't have SSL enabled
Parameters:

cfg (PlatformConfig)

create_execution(project, domain, name, execution_spec, inputs)#

This will create an execution for the given execution spec. :param Text project: :param Text domain: :param Text name: :param flytekit.models.execution.ExecutionSpec execution_spec: This is the specification for the execution. :param flytekit.models.literals.LiteralMap inputs: The inputs for the execution :returns: The unique identifier for the execution. :rtype: flytekit.models.core.identifier.WorkflowExecutionIdentifier

create_launch_plan(launch_plan_identifer, launch_plan_spec)#

This will create a launch plan definition in the Admin database. Once successful, the launch plan object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flytekit.models.core.identifier.Identifier launch_plan_identifer: The identifier for this launch plan.

Param:

flytekit.models.launch_plan.LaunchPlanSpec launch_plan_spec: This is the actual definition of the launch plan that should be created.

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the launch plan is found, this exception is raised. The client might choose to ignore this exception because the identical launch plan is already registered.

  • grpc.RpcError

create_task(task_identifer, task_spec)#

This will create a task definition in the Admin database. Once successful, the task object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. Furthermore, as long as the request remains identical, calling this method multiple times will result in success.

Parameters:
  • task_identifer (flytekit.models.core.identifier.Identifier) – The identifier for this task.

  • task_spec (flytekit.models.task.TaskSpec) – This is the actual definition of the task that should be created.

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the task is found, this exception is raised. The client might choose to ignore this exception because the identical task is already registered.

  • grpc.RpcError

create_workflow(workflow_identifier, workflow_spec)#

This will create a workflow definition in the Admin database. Once successful, the workflow object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. Furthermore, as long as the request remains identical, calling this method multiple times will result in success.

Param:

flytekit.models.core.identifier.Identifier workflow_identifier: The identifier for this workflow.

Param:

flytekit.models.admin.workflow.WorkflowSpec workflow_spec: This is the actual definition of the workflow that should be created.

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the workflow is found, this exception is raised. The client might choose to ignore this exception because the identical workflow is already registered.

  • grpc.RpcError

get_active_launch_plan(identifier)#

Retrieves the active launch plan entity given a named entity identifier (project, domain, name). Raises an error if no active launch plan exists.

Parameters:

identifier (flytekit.models.common.NamedEntityIdentifier) – NamedEntityIdentifier to list.

Return type:

flytekit.models.launch_plan.LaunchPlan

get_execution(id)#
Parameters:

id (flytekit.models.core.identifier.WorkflowExecutionIdentifier)

Return type:

flytekit.models.execution.Execution

get_execution_data(id)#

Returns signed URLs to LiteralMap blobs for an execution’s inputs and outputs (when available).

Parameters:

id (flytekit.models.core.identifier.WorkflowExecutionIdentifier)

Return type:

flytekit.models.execution.WorkflowExecutionGetDataResponse

get_launch_plan(id)#

Retrieves a launch plan entity.

Parameters:

id (flytekit.models.core.identifier.Identifier) – unique identifier for launch plan to retrieve

Return type:

flytekit.models.launch_plan.LaunchPlan

get_node_execution(node_execution_identifier)#
Parameters:

node_execution_identifier (flytekit.models.core.identifier.NodeExecutionIdentifier)

Return type:

flytekit.models.node_execution.NodeExecution

get_node_execution_data(node_execution_identifier)#

Returns signed URLs to LiteralMap blobs for a node execution’s inputs and outputs (when available).

Parameters:

node_execution_identifier (flytekit.models.core.identifier.NodeExecutionIdentifier)

Return type:

NodeExecutionGetDataResponse

get_project_domain_attributes(project, domain, resource_type)#

Fetches the custom attributes set for a project and domain combination. :param Text project: :param Text domain: :param flytekit.models.MatchableResource resource_type: :return:

get_task(id)#

This returns a single task for a given identifier.

Parameters:

id (flytekit.models.core.identifier.Identifier) – The ID representing a given task.

Raises:

TODO

Return type:

flytekit.models.task.Task

get_task_execution(id)#
Parameters:

id (flytekit.models.core.identifier.TaskExecutionIdentifier)

Return type:

flytekit.models.admin.task_execution.TaskExecution

get_task_execution_data(task_execution_identifier)#

Returns signed URLs to LiteralMap blobs for a node execution’s inputs and outputs (when available).

Parameters:

task_execution_identifier (flytekit.models.core.identifier.TaskExecutionIdentifier)

Return type:

flytekit.models.execution.NodeExecutionGetDataResponse

get_upload_signed_url(project, domain, content_md5=None, filename=None, expires_in=None, filename_root=None, add_content_md5_metadata=True)#

Get a signed url to be used during fast registration

Parameters:
  • project (str) – Project to create the upload location for

  • domain (str) – Domain to create the upload location for

  • content_md5 (bytes | None) – ContentMD5 restricts the upload location to the specific MD5 provided. The content_md5 will also appear in the generated path.

  • filename (str | None) – If provided this specifies a desired suffix for the generated location

  • expires_in (timedelta | None) – If provided this defines a requested expiration duration for the generated url

  • filename_root (str | None) – If provided will be used as the root of the filename. If not, Admin will use a hash This option is useful when uploading a series of files that you want to be grouped together.

  • add_content_md5_metadata (bool) – If true, the content md5 will be added to the metadata in signed URL

Return type:

flyteidl.service.dataproxy_pb2.CreateUploadLocationResponse

get_workflow(id)#

This returns a single workflow for a given ID.

Parameters:

id (flytekit.models.core.identifier.Identifier) – The ID representing a given task.

Raises:

TODO

Return type:

flytekit.models.admin.workflow.Workflow

get_workflow_attributes(project, domain, workflow, resource_type)#

Fetches the custom attributes set for a project, domain, and workflow combination. :param Text project: :param Text domain: :param Text workflow: :param flytekit.models.MatchableResource resource_type: :return:

list_active_launch_plans_paginated(project, domain, limit=100, token=None, sort_by=None)#

This returns a page of currently active launch plan meta-information for launch plans in a given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • project (Text)

  • domain (Text)

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (int) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.launch_plan.LaunchPlan], str

list_executions_paginated(project, domain, limit=100, token=None, filters=None, sort_by=None)#

This returns a page of executions in a given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • project (Text) – Project in which to list executions.

  • domain (Text) – Project in which to list executions.

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (Text) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • filters (list[flytekit.models.filters.Filter]) – [Optional] If specified, the filters will be applied to the query. If the filter is not supported, an exception will be raised.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

(list[flytekit.models.execution.Execution], Text)

list_launch_plan_ids_paginated(project, domain, limit=100, token=None, sort_by=None)#

This returns a page of identifiers for the launch plans for a given project and domain. Filters can also be specified.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

Text project: The namespace of the project to list.

Param:

Text domain: The domain space of the project to list.

Param:

int limit: [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

Param:

int token: [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

Parameters:

sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.common.NamedEntityIdentifier], Text

list_launch_plans_paginated(identifier, limit=100, token=None, filters=None, sort_by=None)#

This returns a page of launch plan meta-information for launch plans in a given project and domain. Optionally, specifying a name will limit the results to only workflows with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • identifier (flytekit.models.common.NamedEntityIdentifier) – NamedEntityIdentifier to list.

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (int) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • filters (list[flytekit.models.filters.Filter]) – [Optional] If specified, the filters will be applied to the query. If the filter is not supported, an exception will be raised.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.launch_plan.LaunchPlan], str

list_matchable_attributes(resource_type)#

Fetches all custom attributes for a resource type. :param flytekit.models.MatchableResource resource_type: :return:

list_node_executions(workflow_execution_identifier, limit=100, token=None, filters=None, sort_by=None, unique_parent_id=None)#

Get node executions associated with a given workflow execution.

Parameters:
  • workflow_execution_identifier (flytekit.models.core.identifier.WorkflowExecutionIdentifier)

  • limit (int) – Limit the number of items returned in the response.

  • token (str | None) – If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token="foo".

  • filters (list[flytekit.models.filters.Filter])

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

  • unique_parent_id (str) – If specified, returns the node executions for the unique_parent_id node id.

Return type:

list[flytekit.models.node_execution.NodeExecution], Text

list_node_executions_for_task_paginated(task_execution_identifier, limit=100, token=None, filters=None, sort_by=None)#

This returns nodes spawned by a specific task execution. This is generally from things like dynamic tasks. :param flytekit.models.core.identifier.TaskExecutionIdentifier task_execution_identifier: :param int limit: Number to return per page :param Text token: [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. :param list[flytekit.models.filters.Filter] filters: :param flytekit.models.admin.common.Sort sort_by: [Optional] If provided, the results will be sorted. :rtype: list[flytekit.models.node_execution.NodeExecution], Text

list_projects_paginated(limit=100, token=None, filters=None, sort_by=None)#

This returns a page of projects.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (Text) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • filters (list[flytekit.models.filters.Filter]) – [Optional] If specified, the filters will be applied to the query. If the filter is not supported, an exception will be raised.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

grpc.RpcError

Return type:

(list[flytekit.models.Project], Text)

list_task_executions_paginated(node_execution_identifier, limit=100, token=None, filters=None, sort_by=None)#
Parameters:
  • node_execution_identifier (flytekit.models.core.identifier.NodeExecutionIdentifier)

  • limit (int)

  • token (Text) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”.

  • filters (list[flytekit.models.filters.Filter])

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Return type:

(list[flytekit.models.admin.task_execution.TaskExecution], Text)

list_task_ids_paginated(project, domain, limit=100, token=None, sort_by=None)#

This returns a page of identifiers for the tasks for a given project and domain. Filters can also be specified.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • project (Text) – The namespace of the project to list.

  • domain (Text) – The domain space of the project to list.

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (Text) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.common.NamedEntityIdentifier], Text

list_tasks_paginated(identifier, limit=100, token=None, filters=None, sort_by=None)#

This returns a page of task metadata for tasks in a given project and domain. Optionally, specifying a name will limit the results to only tasks with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • identifier (flytekit.models.common.NamedEntityIdentifier) – NamedEntityIdentifier to list.

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (int) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • filters (list[flytekit.models.filters.Filter]) – [Optional] If specified, the filters will be applied to the query. If the filter is not supported, an exception will be raised.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.task.Task], Text

list_workflow_ids_paginated(project, domain, limit=100, token=None, sort_by=None)#

This returns a page of identifiers for the workflows for a given project and domain. Filters can also be specified.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

Text project: The namespace of the project to list.

Param:

Text domain: The domain space of the project to list.

Param:

int limit: [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

Param:

int token: [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

Parameters:

sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.common.NamedEntityIdentifier], Text

list_workflows_paginated(identifier, limit=100, token=None, filters=None, sort_by=None)#

This returns a page of workflow meta-information for workflows in a given project and domain. Optionally, specifying a name will limit the results to only workflows with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Parameters:
  • identifier (flytekit.models.common.NamedEntityIdentifier) – NamedEntityIdentifier to list.

  • limit (int) – [Optional] The maximum number of entries to return. Must be greater than 0. The maximum page size is determined by the Union Admin Service configuration. If limit is greater than the maximum page size, an exception will be raised.

  • token (int) – [Optional] If specified, this specifies where in the rows of results to skip before reading. If you previously retrieved a page response with token=”foo” and you want the next page, specify token=”foo”. Please see the notes for this function about the caveats of the paginated API.

  • filters (list[flytekit.models.filters.Filter]) – [Optional] If specified, the filters will be applied to the query. If the filter is not supported, an exception will be raised.

  • sort_by (flytekit.models.admin.common.Sort) – [Optional] If provided, the results will be sorted.

Raises:

TODO

Return type:

list[flytekit.models.admin.workflow.Workflow], Text

property raw#

Gives access to the raw client :rtype: flytekit.clients.raw.RawSynchronousFlyteClient

recover_execution(id, name=None)#

Recreates a previously-run workflow execution that will only start executing from the last known failure point. :param flytekit.models.core.identifier.WorkflowExecutionIdentifier id: :param name str: Optional name to assign to the newly created execution. :rtype: flytekit.models.core.identifier.WorkflowExecutionIdentifier

Parameters:

name (str)

register_project(project)#

Registers a project. :param flytekit.models.project.Project project: :rtype: flyteidl.admin.project_pb2.ProjectRegisterResponse

relaunch_execution(id, name=None)#
Parameters:
  • id (flytekit.models.core.identifier.WorkflowExecutionIdentifier)

  • name (Text) – [Optional] name for the new execution. If not specified, a randomly generated name will be used

Returns:

The unique identifier for the new execution.

Return type:

flytekit.models.core.identifier.WorkflowExecutionIdentifier

terminate_execution(id, cause)#
Parameters:
  • id (flytekit.models.core.identifier.WorkflowExecutionIdentifier)

  • cause (Text)

update_launch_plan(id, state)#

Updates a launch plan. Currently, this can only be used to update a given launch plan’s state (ACTIVE v. INACTIVE) for schedules. If a launch plan with a given project, domain, and name is set to ACTIVE, then any other launch plan with the same project, domain, and name that was set to ACTIVE will be switched to INACTIVE in one transaction.

Parameters:
  • id (flytekit.models.core.identifier.Identifier) – identifier for launch plan to update

  • state (int) – Enum value from flytekit.models.launch_plan.LaunchPlanState

update_named_entity(resource_type, id, metadata)#

Updates the metadata associated with a named entity. A named entity is designated a resource, e.g. a workflow, task or launch plan specified by {project, domain, name} across all versions of the resource.

Parameters:
  • resource_type (int) – Enum value from flytekit.models.identifier.ResourceType

  • id (flytekit.models.admin.named_entity.NamedEntityIdentifier) – identifier for named entity to update

  • metadata (flytekit.models.admin.named_entity.NamedEntityIdentifierMetadata)

update_project(project)#

Update an existing project specified by id. :param flytekit.models.project.Project project: :rtype: flyteidl.admin.project_pb2.ProjectUpdateResponse

update_project_domain_attributes(project, domain, matching_attributes)#

Sets custom attributes for a project and domain combination. :param Text project: :param Text domain: :param flytekit.models.MatchingAttributes matching_attributes: :return:

update_workflow_attributes(project, domain, workflow, matching_attributes)#

Sets custom attributes for a project, domain, and workflow combination. :param Text project: :param Text domain: :param Text workflow: :param flytekit.models.MatchingAttributes matching_attributes: :return:

class flytekit.clients.raw.RawSynchronousFlyteClient(cfg, **kwargs)#

This is a thin synchronous wrapper around the auto-generated GRPC stubs for communicating with the admin service.

This client should be usable regardless of environment in which this is used. In other words, configurations should be explicit as opposed to inferred from the environment or a configuration file. To create a client,

from flytekit.configuration import PlatformConfig
RawSynchronousFlyteClient(PlatformConfig(endpoint="a.b.com", insecure=True))  # or
SynchronousFlyteClient(PlatformConfig(endpoint="a.b.com", insecure=True))
Parameters:

cfg (PlatformConfig)

create_execution(create_execution_request)#

This will create an execution for the given execution spec. :param flyteidl.admin.execution_pb2.ExecutionCreateRequest create_execution_request: :rtype: flyteidl.admin.execution_pb2.ExecutionCreateResponse

create_launch_plan(launch_plan_create_request)#

This will create a launch plan definition in the Admin database. Once successful, the launch plan object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.launch_plan_pb2.LaunchPlanCreateRequest launch_plan_create_request: The request protobuf object

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the launch plan is found, this exception is raised. The client might choose to ignore this exception because the identical launch plan is already registered.

  • grpc.RpcError

create_task(task_create_request)#

This will create a task definition in the Admin database. Once successful, the task object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.task_pb2.TaskCreateRequest task_create_request: The request protobuf object.

Return type:

flyteidl.admin.task_pb2.TaskCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the task is found, this exception is raised. The client might choose to ignore this exception because the identical task is already registered.

  • grpc.RpcError

create_upload_location(create_upload_location_request)#

Get a signed url to be used during fast registration :param flyteidl.service.dataproxy_pb2.CreateUploadLocationRequest create_upload_location_request: :rtype: flyteidl.service.dataproxy_pb2.CreateUploadLocationResponse

Parameters:

create_upload_location_request (CreateUploadLocationRequest)

Return type:

CreateUploadLocationResponse

create_workflow(workflow_create_request)#

This will create a workflow definition in the Admin database. Once successful, the workflow object can be retrieved via the client or viewed via the UI or command-line interfaces.

Note

Overwrites are not supported so any request for a given project, domain, name, and version that exists in the database must match the existing definition exactly. This also means that as long as the request remains identical, calling this method multiple times will result in success.

Param:

flyteidl.admin.workflow_pb2.WorkflowCreateRequest workflow_create_request:

Return type:

flyteidl.admin.workflow_pb2.WorkflowCreateResponse

Raises:
  • flytekit.common.exceptions.user.FlyteEntityAlreadyExistsException – If an identical version of the workflow is found, this exception is raised. The client might choose to ignore this exception because the identical workflow is already registered.

  • grpc.RpcError

get_active_launch_plan(active_launch_plan_request)#

Retrieves a launch plan entity.

Parameters:

active_launch_plan_request (flyteidl.admin.common_pb2.ActiveLaunchPlanRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlan

get_execution(get_object_request)#

Returns an execution of a workflow entity.

Parameters:

get_object_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetRequest)

Return type:

flyteidl.admin.execution_pb2.Execution

get_execution_data(get_execution_data_request)#

Returns signed URLs to LiteralMap blobs for an execution’s inputs and outputs (when available).

Parameters:

get_execution_data_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetRequest)

Return type:

flyteidl.admin.execution_pb2.WorkflowExecutionGetDataResponse

get_execution_metrics(get_execution_metrics_request)#

Returns metrics partitioning and categorizing the workflow execution time-series.

Parameters:

get_execution_metrics_request (flyteidl.admin.execution_pb2.WorkflowExecutionGetMetricsRequest)

Return type:

flyteidl.admin.execution_pb2.WorkflowExecutionGetMetricsResponse

get_launch_plan(object_get_request)#

Retrieves a launch plan entity.

Parameters:

object_get_request (flyteidl.admin.common_pb2.ObjectGetRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlan

get_node_execution(node_execution_request)#
Parameters:

node_execution_request (flyteidl.admin.node_execution_pb2.NodeExecutionGetRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecution

get_node_execution_data(get_node_execution_data_request)#

Returns signed URLs to LiteralMap blobs for a node execution’s inputs and outputs (when available).

Parameters:

get_node_execution_data_request (flyteidl.admin.node_execution_pb2.NodeExecutionGetDataRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionGetDataResponse

get_project_domain_attributes(project_domain_attributes_get_request)#

This fetches the attributes for a project and domain registered with the Union Admin Service :param flyteidl.admin.ProjectDomainAttributesGetRequest project_domain_attributes_get_request: :rtype: flyteidl.admin.ProjectDomainAttributesGetResponse

get_task(get_object_request)#

This returns a single task for a given identifier.

Param:

flyteidl.admin.common_pb2.ObjectGetRequest get_object_request:

Return type:

flyteidl.admin.task_pb2.Task

Raises:

TODO

get_task_execution(task_execution_request)#
Parameters:

task_execution_request (flyteidl.admin.task_execution_pb2.TaskExecutionGetRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecution

get_task_execution_data(get_task_execution_data_request)#

Returns signed URLs to LiteralMap blobs for a task execution’s inputs and outputs (when available).

Parameters:

get_task_execution_data_request (flyteidl.admin.task_execution_pb2.TaskExecutionGetDataRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecutionGetDataResponse

get_workflow(get_object_request)#

This returns a single workflow for a given identifier.

Param:

flyteidl.admin.common_pb2.ObjectGetRequest get_object_request:

Return type:

flyteidl.admin.workflow_pb2.Workflow

Raises:

TODO

get_workflow_attributes(workflow_attributes_get_request)#

This fetches the attributes for a project, domain, and workflow registered with the Union Admin Service :param flyteidl.admin.GetWorkflowAttributesAttributesRequest workflow_attributes_get_request: :rtype: flyteidl.admin.WorkflowAttributesGetResponse

list_active_launch_plans_paginated(active_launch_plan_list_request)#

Lists Active Launch Plans for a given (project, domain)

Param:

flyteidl.admin.common_pb2.ActiveLaunchPlanListRequest active_launch_plan_list_request:

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanList

list_executions_paginated(resource_list_request)#

Lists the executions for a given identifier.

Parameters:

resource_list_request (flyteidl.admin.common_pb2.ResourceListRequest)

Return type:

flyteidl.admin.execution_pb2.ExecutionList

list_launch_plan_ids_paginated(identifier_list_request)#

Lists launch plan named identifiers for a given project and domain.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

list_launch_plans_paginated(resource_list_request)#

Lists Launch Plans for a given Identifier (project, domain, name)

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanList

list_matchable_attributes(matchable_attributes_list_request)#

This fetches the attributes for a specific resource type registered with the Union Admin Service :param flyteidl.admin.ListMatchableAttributesRequest matchable_attributes_list_request: :rtype: flyteidl.admin.ListMatchableAttributesResponse

list_node_executions_for_task_paginated(node_execution_for_task_list_request)#
Parameters:

node_execution_for_task_list_request (flyteidl.admin.node_execution_pb2.NodeExecutionListRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionList

list_node_executions_paginated(node_execution_list_request)#
Parameters:

node_execution_list_request (flyteidl.admin.node_execution_pb2.NodeExecutionListRequest)

Return type:

flyteidl.admin.node_execution_pb2.NodeExecutionList

list_projects(project_list_request=None)#

This will return a list of the projects registered with the Union Admin Service :param flyteidl.admin.project_pb2.ProjectListRequest project_list_request: :rtype: flyteidl.admin.project_pb2.Projects

Parameters:

project_list_request (ProjectListRequest | None)

list_signals(signal_list_request)#

This lists signals

Parameters:

signal_list_request (SignalListRequest)

Return type:

SignalList

list_task_executions_paginated(task_execution_list_request)#
Parameters:

task_execution_list_request (flyteidl.admin.task_execution_pb2.TaskExecutionListRequest)

Return type:

flyteidl.admin.task_execution_pb2.TaskExecutionList

list_task_ids_paginated(identifier_list_request)#

This returns a page of identifiers for the tasks for a given project and domain. Filters can also be specified.

Note

The name field in the TaskListRequest is ignored.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

Raises:

TODO

list_tasks_paginated(resource_list_request)#

This returns a page of task metadata for tasks in a given project and domain. Optionally, specifying a name will limit the results to only tasks with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.task_pb2.TaskList

Raises:

TODO

list_workflow_ids_paginated(identifier_list_request)#

This returns a page of identifiers for the workflows for a given project and domain. Filters can also be specified.

Note

The name field in the WorkflowListRequest is ignored.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.NamedEntityIdentifierListRequest identifier_list_request:

Return type:

flyteidl.admin.common_pb2.NamedEntityIdentifierList

Raises:

TODO

list_workflows_paginated(resource_list_request)#

This returns a page of workflow meta-information for workflows in a given project and domain. Optionally, specifying a name will limit the results to only workflows with that name in the given project and domain.

Note

This is a paginated API. Use the token field in the request to specify a page offset token. The user of the API is responsible for providing this token.

Note

If entries are added to the database between requests for different pages, it is possible to receive entries on the second page that also appeared on the first.

Param:

flyteidl.admin.common_pb2.ResourceListRequest resource_list_request:

Return type:

flyteidl.admin.workflow_pb2.WorkflowList

Raises:

TODO

recover_execution(recover_execution_request)#

This will recreate an execution with the same spec as the one belonging to the given execution identifier. :param flyteidl.admin.execution_pb2.ExecutionRecoverRequest recover_execution_request: :rtype: flyteidl.admin.execution_pb2.ExecutionRecoverResponse

register_project(project_register_request)#

Registers a project along with a set of domains. :param flyteidl.admin.project_pb2.ProjectRegisterRequest project_register_request: :rtype: flyteidl.admin.project_pb2.ProjectRegisterResponse

relaunch_execution(relaunch_execution_request)#
Parameters:

relaunch_execution_request (flyteidl.admin.execution_pb2.ExecutionRelaunchRequest)

Return type:

flyteidl.admin.execution_pb2.ExecutionCreateResponse

set_signal(signal_set_request)#

This sets a signal

Parameters:

signal_set_request (SignalSetRequest)

Return type:

SignalSetResponse

terminate_execution(terminate_execution_request)#
Parameters:

terminate_execution_request (flyteidl.admin.execution_pb2.TerminateExecutionRequest)

Return type:

flyteidl.admin.execution_pb2.TerminateExecutionResponse

update_launch_plan(update_request)#

Allows updates to a launch plan at a given identifier. Currently, a launch plan may only have it’s state switched between ACTIVE and INACTIVE.

Parameters:

update_request (flyteidl.admin.launch_plan_pb2.LaunchPlanUpdateRequest)

Return type:

flyteidl.admin.launch_plan_pb2.LaunchPlanUpdateResponse

update_named_entity(update_named_entity_request)#
Parameters:

update_named_entity_request (flyteidl.admin.common_pb2.NamedEntityUpdateRequest)

Return type:

flyteidl.admin.common_pb2.NamedEntityUpdateResponse

update_project(project)#

Update an existing project specified by id. :param flyteidl.admin.project_pb2.Project project: :rtype: flyteidl.admin.project_pb2.ProjectUpdateResponse

update_project_domain_attributes(project_domain_attributes_update_request)#

This updates the attributes for a project and domain registered with the Union Admin Service :param flyteidl.admin.ProjectDomainAttributesUpdateRequest project_domain_attributes_update_request: :rtype: flyteidl.admin.ProjectDomainAttributesUpdateResponse

update_workflow_attributes(workflow_attributes_update_request)#

This updates the attributes for a project, domain, and workflow registered with the Union Admin Service :param flyteidl.admin.UpdateWorkflowAttributesRequest workflow_attributes_update_request: :rtype: flyteidl.admin.WorkflowAttributesUpdateResponse