Skip to content

checkout_borrow_license

checkout_borrow_license(
    license_arn: Arn,
    entitlements: EntitlementDataList,
    digital_signature_method: DigitalSignatureMethod,
    client_token: ClientToken,
    *,
    config_overrides: Optional[LicenseManagerClientConfig] = None,
    node_id: Optional[String] = None,
    checkout_metadata: Optional[MetadataList] = None,
) -> CheckoutBorrowLicenseResponse

Checks out the specified license for offline use.

Parameters:

  • license_arn (Arn) –

    Amazon Resource Name (ARN) of the license. The license must use the borrow consumption configuration.

  • entitlements (EntitlementDataList) –

    License entitlements. Partial checkouts are not supported.

  • digital_signature_method (DigitalSignatureMethod) –

    Digital signature method. The possible value is JSON Web Signature (JWS) algorithm PS384. For more information, see RFC 7518 Digital Signature with RSASSA-PSS.

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

    Node ID.

  • checkout_metadata (Optional[MetadataList], default: None ) –

    Information about constraints.

  • client_token (ClientToken) –

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_license_manager/_services/license_manager.py
def checkout_borrow_license(
    self,
    license_arn: "capo_license_manager.types.arn.Arn",
    entitlements: "capo_license_manager.types.entitlement_data_list.EntitlementDataList",
    digital_signature_method: "capo_license_manager.types.digital_signature_method.DigitalSignatureMethod",
    client_token: "capo_license_manager.types.client_token.ClientToken",
    *,
    config_overrides: Optional[LicenseManagerClientConfig] = None,
    node_id: Optional["capo_license_manager.types.string.String"] = None,
    checkout_metadata: Optional[
        "capo_license_manager.types.metadata_list.MetadataList"
    ] = None,
) -> "capo_license_manager.types.checkout_borrow_license_response.CheckoutBorrowLicenseResponse":
    """<p>Checks out the specified license for offline use.</p>

    Args:
        license_arn: <p>Amazon Resource Name (ARN) of the license. The license must use the borrow consumption configuration.</p>
        entitlements: <p>License entitlements. Partial checkouts are not supported.</p>
        digital_signature_method: <p>Digital signature method. The possible value is JSON Web Signature (JWS) algorithm PS384. For more information, see <a href="https://tools.ietf.org/html/rfc7518#section-3.5">RFC 7518 Digital Signature with RSASSA-PSS</a>.</p>
        node_id: <p>Node ID.</p>
        checkout_metadata: <p>Information about constraints.</p>
        client_token: <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>

    Raises:
        capo_license_manager.errors.access_denied_exception.AccessDeniedException: <p>Access to resource denied.</p>
        capo_license_manager.errors.authorization_exception.AuthorizationException: <p>The Amazon Web Services user account does not have permission to perform the action. Check the IAM policy associated with this account.</p>
        capo_license_manager.errors.entitlement_not_allowed_exception.EntitlementNotAllowedException: <p>The entitlement is not allowed.</p>
        capo_license_manager.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameter values are not valid.</p>
        capo_license_manager.errors.no_entitlements_allowed_exception.NoEntitlementsAllowedException: <p>There are no entitlements found for this license, or the entitlement maximum count is reached.</p>
        capo_license_manager.errors.rate_limit_exceeded_exception.RateLimitExceededException: <p>Too many requests have been submitted. Try again after a brief wait.</p>
        capo_license_manager.errors.redirect_exception.RedirectException: <p>This is not the correct Region for the resource. Try again.</p>
        capo_license_manager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
        capo_license_manager.errors.server_internal_exception.ServerInternalException: <p>The server experienced an internal error. Try again.</p>
        capo_license_manager.errors.unsupported_digital_signature_method_exception.UnsupportedDigitalSignatureMethodException: <p>The digital signature method is unsupported. Try your request again.</p>
        capo_license_manager.errors.validation_exception.ValidationException: <p>The provided input is not valid. Try your request again.</p>
        capo_license_manager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_license_manager.types.checkout_borrow_license_request.CheckoutBorrowLicenseRequest]",
    ) -> OperationResponse[
        "capo_license_manager.types.checkout_borrow_license_response.CheckoutBorrowLicenseResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.checkout_borrow_license

        output, http_response = (
            capo_license_manager._operations.aws_license_manager.checkout_borrow_license.checkout_borrow_license(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CheckoutBorrowLicense")
    )
    input_: capo_license_manager.types.checkout_borrow_license_request.CheckoutBorrowLicenseRequest = {
        "license_arn": license_arn,
        "entitlements": entitlements,
        "digital_signature_method": digital_signature_method,
        "client_token": client_token,
    }
    if node_id is not None:
        input_["node_id"] = node_id
    if checkout_metadata is not None:
        input_["checkout_metadata"] = checkout_metadata

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