Skip to content

list_daemon_deployments async

list_daemon_deployments(
    daemon_arn: String,
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    status: Optional[DaemonDeploymentStatusList] = None,
    created_at: Optional[CreatedAt] = None,
    max_results: Optional[BoxedInteger] = None,
    next_token: Optional[String] = None,
) -> ListDaemonDeploymentsResponse

Returns a list of daemon deployments for a specified daemon. You can filter the results by status or creation time.

Parameters:

  • daemon_arn (String) –

    The Amazon Resource Name (ARN) of the daemon to list deployments for.

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

    An optional filter to narrow the ListDaemonDeployments results by deployment status. If you don't specify a status, all deployments are returned.

  • created_at (Optional[CreatedAt], default: None ) –

    An optional filter to narrow the ListDaemonDeployments results by creation time. If you don't specify a time range, all deployments are returned.

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

    The maximum number of daemon deployment results that ListDaemonDeployments returned in paginated output. When this parameter is used, ListDaemonDeployments 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 ListDaemonDeployments request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn't used, then ListDaemonDeployments returns up to 20 results and a nextToken value if applicable.

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

    The nextToken value returned from a ListDaemonDeployments 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.

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.

  • ClusterNotFoundException –

    The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.

  • 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.

  • UnsupportedFeatureException –

    The specified task isn't supported in this Region.

  • UnknownServiceError –

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

Examples:

To list daemon deployments This example lists all successful daemon deployments for the my-monitoring-daemon daemon.

>>> await client.list_daemon_deployments(daemon_arn='arn:aws:ecs:us-east-1:123456789012:daemon/my-cluster/my-monitoring-daemon', status=['SUCCESSFUL'])
Source code in docs_src/capo_ecs/_services/async_ecs.py
async def list_daemon_deployments(
    self,
    daemon_arn: "capo_ecs.types.string.String",
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    status: Optional[
        "capo_ecs.types.daemon_deployment_status_list.DaemonDeploymentStatusList"
    ] = None,
    created_at: Optional["capo_ecs.types.created_at.CreatedAt"] = None,
    max_results: Optional["capo_ecs.types.boxed_integer.BoxedInteger"] = None,
    next_token: Optional["capo_ecs.types.string.String"] = None,
) -> (
    "capo_ecs.types.list_daemon_deployments_response.ListDaemonDeploymentsResponse"
):
    """<p>Returns a list of daemon deployments for a specified daemon. You can filter the results by status or creation time.</p>

    Args:
        daemon_arn: <p>The Amazon Resource Name (ARN) of the daemon to list deployments for.</p>
        status: <p>An optional filter to narrow the <code>ListDaemonDeployments</code> results by deployment status. If you don't specify a status, all deployments are returned.</p>
        created_at: <p>An optional filter to narrow the <code>ListDaemonDeployments</code> results by creation time. If you don't specify a time range, all deployments are returned.</p>
        max_results: <p>The maximum number of daemon deployment results that <code>ListDaemonDeployments</code> returned in paginated output. When this parameter is used, <code>ListDaemonDeployments</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>ListDaemonDeployments</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>ListDaemonDeployments</code> returns up to 20 results and a <code>nextToken</code> value if applicable.</p>
        next_token: <p>The <code>nextToken</code> value returned from a <code>ListDaemonDeployments</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>

    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.cluster_not_found_exception.ClusterNotFoundException: <p>The specified cluster wasn't found. You can view your available clusters with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListClusters.html">ListClusters</a>. Amazon ECS clusters are Region specific.</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.unsupported_feature_exception.UnsupportedFeatureException: <p>The specified task isn't supported in this Region.</p>
        capo_ecs.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To list daemon deployments
        This example lists all successful daemon deployments for the my-monitoring-daemon daemon.

        >>> await client.list_daemon_deployments(daemon_arn='arn:aws:ecs:us-east-1:123456789012:daemon/my-cluster/my-monitoring-daemon', status=['SUCCESSFUL'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecs.types.list_daemon_deployments_request.ListDaemonDeploymentsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecs.types.list_daemon_deployments_response.ListDaemonDeploymentsResponse"
    ]:
        import capo_ecs._operations.amazon_ec2_container_service_v20141113.list_daemon_deployments

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDaemonDeployments")
    )
    input_: capo_ecs.types.list_daemon_deployments_request.ListDaemonDeploymentsRequest = {
        "daemon_arn": daemon_arn
    }
    if status is not None:
        input_["status"] = status
    if created_at is not None:
        input_["created_at"] = created_at
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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