Skip to content

discover_poll_endpoint async

discover_poll_endpoint(
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    container_instance: Optional[String] = None,
    cluster: Optional[String] = None,
) -> DiscoverPollEndpointResponse

This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.

Returns an endpoint for the Amazon ECS agent to poll for updates.

Parameters:

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

    The container instance ID or full ARN of the container instance. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.

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

    The short name or full Amazon Resource Name (ARN) of the cluster that the container instance belongs to.

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.

Source code in docs_src/capo_ecs/_services/async_ecs.py
async def discover_poll_endpoint(
    self,
    *,
    config_overrides: Optional[AsyncECSClientConfig] = None,
    container_instance: Optional["capo_ecs.types.string.String"] = None,
    cluster: Optional["capo_ecs.types.string.String"] = None,
) -> "capo_ecs.types.discover_poll_endpoint_response.DiscoverPollEndpointResponse":
    """<note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Returns an endpoint for the Amazon ECS agent to poll for updates.</p>

    Args:
        container_instance: <p>The container instance ID or full ARN of the container instance. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
        cluster: <p>The short name or full Amazon Resource Name (ARN) of the cluster that the container instance belongs to.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ecs.types.discover_poll_endpoint_request.DiscoverPollEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_ecs.types.discover_poll_endpoint_response.DiscoverPollEndpointResponse"
    ]:
        import capo_ecs._operations.amazon_ec2_container_service_v20141113.discover_poll_endpoint

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DiscoverPollEndpoint")
    )
    input_: capo_ecs.types.discover_poll_endpoint_request.DiscoverPollEndpointRequest = {}
    if container_instance is not None:
        input_["container_instance"] = container_instance
    if cluster is not None:
        input_["cluster"] = cluster

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