Skip to content

describe_agreement

describe_agreement(
    agreement_id: AgreementId,
    server_id: ServerId,
    *,
    config_overrides: Optional[TransferClientConfig] = None,
) -> DescribeAgreementResponse

Describes the agreement that's identified by the AgreementId.

Parameters:

  • agreement_id (AgreementId) –

    A unique identifier for the agreement. This identifier is returned when you create an agreement.

  • server_id (ServerId) –

    The server identifier that's associated with the agreement.

Raises:

Source code in docs_src/capo_transfer/_services/transfer.py
def describe_agreement(
    self,
    agreement_id: "capo_transfer.types.agreement_id.AgreementId",
    server_id: "capo_transfer.types.server_id.ServerId",
    *,
    config_overrides: Optional[TransferClientConfig] = None,
) -> "capo_transfer.types.describe_agreement_response.DescribeAgreementResponse":
    """<p>Describes the agreement that's identified by the <code>AgreementId</code>.</p>

    Args:
        agreement_id: <p>A unique identifier for the agreement. This identifier is returned when you create an agreement.</p>
        server_id: <p>The server identifier that's associated with the agreement.</p>

    Raises:
        capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
        capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
        capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
        capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_transfer.types.describe_agreement_request.DescribeAgreementRequest]",
    ) -> OperationResponse[
        "capo_transfer.types.describe_agreement_response.DescribeAgreementResponse"
    ]:
        import capo_transfer._operations.transfer_service.describe_agreement

        output, http_response = (
            capo_transfer._operations.transfer_service.describe_agreement.describe_agreement(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeAgreement")
    )
    input_: capo_transfer.types.describe_agreement_request.DescribeAgreementRequest = {
        "agreement_id": agreement_id,
        "server_id": server_id,
    }

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