Skip to content

create_license_conversion_task_for_resource async

create_license_conversion_task_for_resource(
    resource_arn: Arn,
    source_license_context: LicenseConversionContext,
    destination_license_context: LicenseConversionContext,
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
) -> CreateLicenseConversionTaskForResourceResponse

Creates a new license conversion task.

Parameters:

Raises:

Source code in docs_src/capo_license_manager/_services/async_license_manager.py
async def create_license_conversion_task_for_resource(
    self,
    resource_arn: "capo_license_manager.types.arn.Arn",
    source_license_context: "capo_license_manager.types.license_conversion_context.LicenseConversionContext",
    destination_license_context: "capo_license_manager.types.license_conversion_context.LicenseConversionContext",
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
) -> "capo_license_manager.types.create_license_conversion_task_for_resource_response.CreateLicenseConversionTaskForResourceResponse":
    """<p>Creates a new license conversion task.</p>

    Args:
        resource_arn: <p>Amazon Resource Name (ARN) of the resource you are converting the license type for.</p>
        source_license_context: <p>Information that identifies the license type you are converting from. For the structure of the source license, see <a href="https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli">Convert a license type using the CLI </a> in the <i>License Manager User Guide</i>.</p>
        destination_license_context: <p>Information that identifies the license type you are converting to. For the structure of the destination license, see <a href="https://docs.aws.amazon.com/license-manager/latest/userguide/conversion-procedures.html#conversion-cli">Convert a license type using the CLI </a> in the <i>License Manager User Guide</i>.</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.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameter values are not valid.</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.server_internal_exception.ServerInternalException: <p>The server experienced an internal error. Try 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_license_manager.types.create_license_conversion_task_for_resource_request.CreateLicenseConversionTaskForResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager.types.create_license_conversion_task_for_resource_response.CreateLicenseConversionTaskForResourceResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.create_license_conversion_task_for_resource

        (
            output,
            http_response,
        ) = await capo_license_manager._operations.aws_license_manager.create_license_conversion_task_for_resource.async_create_license_conversion_task_for_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLicenseConversionTaskForResource")
    )
    input_: capo_license_manager.types.create_license_conversion_task_for_resource_request.CreateLicenseConversionTaskForResourceRequest = {
        "resource_arn": resource_arn,
        "source_license_context": source_license_context,
        "destination_license_context": destination_license_context,
    }

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