Skip to content

describe_task_sets async

describe_task_sets(
    cluster: String,
    service: String,
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    task_sets: Optional[StringList] = None,
    include: Optional[TaskSetFieldList] = None,
) -> DescribeTaskSetsResponse

Describes the task sets in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see Amazon ECS Deployment Types in the Amazon Elastic Container Service Developer Guide.

Parameters:

  • cluster (String) –

    The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

  • service (String) –

    The short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.

  • task_sets (Optional[StringList], default: None ) –

    The ID or full Amazon Resource Name (ARN) of task sets to describe.

  • include (Optional[TaskSetFieldList], default: None ) –

    Specifies whether to see the resource tags for the task set. If TAGS is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.

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.

  • ServiceNotActiveException –

    The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with CreateService.

  • ServiceNotFoundException –

    The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.

  • UnsupportedFeatureException –

    The specified task isn't supported in this Region.

  • UnknownServiceError –

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

Examples:

To describe a task set This example describes a task set in service MyService that uses an EXTERNAL deployment controller.

>>> await client.describe_task_sets(cluster='MyCluster', service='MyService', task_sets=['arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789'])
Source code in docs_src/capo_ecs/_services/async_ecs.py
async def describe_task_sets(
    self,
    cluster: "capo_ecs.types.string.String",
    service: "capo_ecs.types.string.String",
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    task_sets: Optional["capo_ecs.types.string_list.StringList"] = None,
    include: Optional["capo_ecs.types.task_set_field_list.TaskSetFieldList"] = None,
) -> "capo_ecs.types.describe_task_sets_response.DescribeTaskSetsResponse":
    """<p>Describes the task sets in the specified cluster and service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>

    Args:
        cluster: <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.</p>
        service: <p>The short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.</p>
        task_sets: <p>The ID or full Amazon Resource Name (ARN) of task sets to describe.</p>
        include: <p>Specifies whether to see the resource tags for the task set. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags aren't included in the response.</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.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.service_not_active_exception.ServiceNotActiveException: <p>The specified service isn't active. You can't update a service that's inactive. If you have previously deleted a service, you can re-create it with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html">CreateService</a>.</p>
        capo_ecs.errors.service_not_found_exception.ServiceNotFoundException: <p>The specified service wasn't found. You can view your available services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>. Amazon ECS services are cluster specific and Region specific.</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 describe a task set
        This example describes a task set in service MyService that uses an EXTERNAL deployment controller.

        >>> await client.describe_task_sets(cluster='MyCluster', service='MyService', task_sets=['arn:aws:ecs:us-west-2:123456789012:task-set/MyCluster/MyService/ecs-svc/1234567890123456789'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecs.types.describe_task_sets_request.DescribeTaskSetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecs.types.describe_task_sets_response.DescribeTaskSetsResponse"
    ]:
        import capo_ecs._operations.amazon_ec2_container_service_v20141113.describe_task_sets

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeTaskSets")
    )
    input_: capo_ecs.types.describe_task_sets_request.DescribeTaskSetsRequest = {
        "cluster": cluster,
        "service": service,
    }
    if task_sets is not None:
        input_["task_sets"] = task_sets
    if include is not None:
        input_["include"] = include

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