Skip to content

list_daemon_task_definitions async

list_daemon_task_definitions(
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    family_prefix: Optional[String] = None,
    family: Optional[String] = None,
    revision: Optional[DaemonTaskDefinitionRevisionFilter] = None,
    status: Optional[DaemonTaskDefinitionStatusFilter] = None,
    sort: Optional[SortOrder] = None,
    next_token: Optional[String] = None,
    max_results: Optional[BoxedInteger] = None,
) -> ListDaemonTaskDefinitionsResponse

Returns a list of daemon task definitions that are registered to your account. You can filter the results by family name, status, or both to find daemon task definitions that match your criteria.

Parameters:

  • family_prefix (Optional[String], default: None ) –

    The full family name to filter the ListDaemonTaskDefinitions results with. Specifying a familyPrefix limits the listed daemon task definitions to daemon task definition families that start with the familyPrefix string.

  • family (Optional[String], default: None ) –

    The exact name of the daemon task definition family to filter results with.

  • revision (Optional[DaemonTaskDefinitionRevisionFilter], default: None ) –

    The revision filter to apply. Specify LAST_REGISTERED to return only the last registered revision for each daemon task definition family.

  • status (Optional[DaemonTaskDefinitionStatusFilter], default: None ) –

    The daemon task definition status to filter the ListDaemonTaskDefinitions results with. By default, only ACTIVE daemon task definitions are listed. If you set this parameter to DELETE_IN_PROGRESS, only daemon task definitions that are in the process of being deleted are listed. If you set this parameter to ALL, all daemon task definitions are listed regardless of status.

  • sort (Optional[SortOrder], default: None ) –

    The order to sort the results. Valid values are ASC and DESC. By default (ASC), daemon task definitions are listed in ascending order by family name and revision number.

  • next_token (Optional[String], default: None ) –

    The nextToken value returned from a ListDaemonTaskDefinitions request indicating that more results are available to fulfill the request and further calls will be needed. If maxResults was provided, it's possible for the number of results to be fewer than maxResults.

    This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

  • max_results (Optional[BoxedInteger], default: None ) –

    The maximum number of daemon task definition results that ListDaemonTaskDefinitions returned in paginated output. When this parameter is used, ListDaemonTaskDefinitions only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListDaemonTaskDefinitions request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListDaemonTaskDefinitions returns up to 100 results and a nextToken value if applicable.

Raises:

  • AccessDeniedException –

    You don't have authorization to perform the requested action.

  • ClientException –

    These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

  • InvalidParameterException –

    The specified parameter isn't valid. Review the available parameters for the API request.

    For more information about service event errors, see Amazon ECS service event messages.

  • ServerException –

    These errors are usually caused by a server issue.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To list daemon task definitions This example lists all daemon task definitions in your account that start with the monitoring prefix.

>>> await client.list_daemon_task_definitions(family_prefix='monitoring')
Source code in docs_src/capo_ecs/_services/async_ecs.py
async def list_daemon_task_definitions(
    self,
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    family_prefix: Optional["capo_ecs.types.string.String"] = None,
    family: Optional["capo_ecs.types.string.String"] = None,
    revision: Optional[
        "capo_ecs.types.daemon_task_definition_revision_filter.DaemonTaskDefinitionRevisionFilter"
    ] = None,
    status: Optional[
        "capo_ecs.types.daemon_task_definition_status_filter.DaemonTaskDefinitionStatusFilter"
    ] = None,
    sort: Optional["capo_ecs.types.sort_order.SortOrder"] = None,
    next_token: Optional["capo_ecs.types.string.String"] = None,
    max_results: Optional["capo_ecs.types.boxed_integer.BoxedInteger"] = None,
) -> "capo_ecs.types.list_daemon_task_definitions_response.ListDaemonTaskDefinitionsResponse":
    """<p>Returns a list of daemon task definitions that are registered to your account. You can filter the results by family name, status, or both to find daemon task definitions that match your criteria.</p>

    Args:
        family_prefix: <p>The full family name to filter the <code>ListDaemonTaskDefinitions</code> results with. Specifying a <code>familyPrefix</code> limits the listed daemon task definitions to daemon task definition families that start with the <code>familyPrefix</code> string.</p>
        family: <p>The exact name of the daemon task definition family to filter results with.</p>
        revision: <p>The revision filter to apply. Specify <code>LAST_REGISTERED</code> to return only the last registered revision for each daemon task definition family.</p>
        status: <p>The daemon task definition status to filter the <code>ListDaemonTaskDefinitions</code> results with. By default, only <code>ACTIVE</code> daemon task definitions are listed. If you set this parameter to <code>DELETE_IN_PROGRESS</code>, only daemon task definitions that are in the process of being deleted are listed. If you set this parameter to <code>ALL</code>, all daemon task definitions are listed regardless of status.</p>
        sort: <p>The order to sort the results. Valid values are <code>ASC</code> and <code>DESC</code>. By default (<code>ASC</code>), daemon task definitions are listed in ascending order by family name and revision number.</p>
        next_token: <p>The <code>nextToken</code> value returned from a <code>ListDaemonTaskDefinitions</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it's possible for the number of results to be fewer than <code>maxResults</code>.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>
        max_results: <p>The maximum number of daemon task definition results that <code>ListDaemonTaskDefinitions</code> returned in paginated output. When this parameter is used, <code>ListDaemonTaskDefinitions</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListDaemonTaskDefinitions</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListDaemonTaskDefinitions</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>

    Raises:
        capo_ecs.errors.access_denied_exception.AccessDeniedException: <p>You don't have authorization to perform the requested action.</p>
        capo_ecs.errors.client_exception.ClientException: <p>These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.</p>
        capo_ecs.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter isn't valid. Review the available parameters for the API request.</p> <p>For more information about service event errors, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-event-messages-list.html">Amazon ECS service event messages</a>. </p>
        capo_ecs.errors.server_exception.ServerException: <p>These errors are usually caused by a server issue.</p>
        capo_ecs.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To list daemon task definitions
        This example lists all daemon task definitions in your account that start with the monitoring prefix.

        >>> await client.list_daemon_task_definitions(family_prefix='monitoring')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecs.types.list_daemon_task_definitions_request.ListDaemonTaskDefinitionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecs.types.list_daemon_task_definitions_response.ListDaemonTaskDefinitionsResponse"
    ]:
        import capo_ecs._operations.amazon_ec2_container_service_v20141113.list_daemon_task_definitions

        (
            output,
            http_response,
        ) = await capo_ecs._operations.amazon_ec2_container_service_v20141113.list_daemon_task_definitions.async_list_daemon_task_definitions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDaemonTaskDefinitions")
    )
    input_: capo_ecs.types.list_daemon_task_definitions_request.ListDaemonTaskDefinitionsRequest = {}
    if family_prefix is not None:
        input_["family_prefix"] = family_prefix
    if family is not None:
        input_["family"] = family
    if revision is not None:
        input_["revision"] = revision
    if status is not None:
        input_["status"] = status
    if sort is not None:
        input_["sort"] = sort
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output