Skip to content

describe_agent

describe_agent(
    agent_arn: AgentArn, *, config_overrides: Optional[DataSyncClientConfig] = None
) -> DescribeAgentResponse

Returns information about an DataSync agent, such as its name, service endpoint type, and status.

Parameters:

  • agent_arn (AgentArn) –

    Specifies the Amazon Resource Name (ARN) of the DataSync agent that you want information about.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def describe_agent(
    self,
    agent_arn: "capo_datasync.types.agent_arn.AgentArn",
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
) -> "capo_datasync.types.describe_agent_response.DescribeAgentResponse":
    """<p>Returns information about an DataSync agent, such as its name, service endpoint type, and status.</p>

    Args:
        agent_arn: <p>Specifies the Amazon Resource Name (ARN) of the DataSync agent that you want information about.</p>

    Raises:
        capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
        capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datasync.types.describe_agent_request.DescribeAgentRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.describe_agent_response.DescribeAgentResponse"
    ]:
        import capo_datasync._operations.fmrs_service.describe_agent

        output, http_response = (
            capo_datasync._operations.fmrs_service.describe_agent.describe_agent(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeAgent")
    )
    input_: capo_datasync.types.describe_agent_request.DescribeAgentRequest = {
        "agent_arn": agent_arn
    }

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