Skip to content

submit_attachment_state_changes

submit_attachment_state_changes(
    attachments: AttachmentStateChanges,
    *,
    config_overrides: Optional[ECSClientConfig] = None,
    cluster: Optional[String] = None,
) -> SubmitAttachmentStateChangesResponse

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

Sent to acknowledge that an attachment changed states.

Parameters:

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

    The short name or full ARN of the cluster that hosts the container instance the attachment belongs to.

  • attachments (AttachmentStateChanges) –

    Any attachments associated with the state change request.

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.

  • UnknownServiceError –

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

Source code in docs_src/capo_ecs/_services/ecs.py
def submit_attachment_state_changes(
    self,
    attachments: "capo_ecs.types.attachment_state_changes.AttachmentStateChanges",
    *,
    config_overrides: Optional[ECSClientConfig] = None,
    cluster: Optional["capo_ecs.types.string.String"] = None,
) -> "capo_ecs.types.submit_attachment_state_changes_response.SubmitAttachmentStateChangesResponse":
    """<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>Sent to acknowledge that an attachment changed states.</p>

    Args:
        cluster: <p>The short name or full ARN of the cluster that hosts the container instance the attachment belongs to.</p>
        attachments: <p>Any attachments associated with the state change request.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ecs.types.submit_attachment_state_changes_request.SubmitAttachmentStateChangesRequest]",
    ) -> OperationResponse[
        "capo_ecs.types.submit_attachment_state_changes_response.SubmitAttachmentStateChangesResponse"
    ]:
        import capo_ecs._operations.amazon_ec2_container_service_v20141113.submit_attachment_state_changes

        output, http_response = (
            capo_ecs._operations.amazon_ec2_container_service_v20141113.submit_attachment_state_changes.submit_attachment_state_changes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SubmitAttachmentStateChanges")
    )
    input_: capo_ecs.types.submit_attachment_state_changes_request.SubmitAttachmentStateChangesRequest = {
        "attachments": attachments
    }
    if cluster is not None:
        input_["cluster"] = cluster

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output