Skip to content

create_license_version async

create_license_version(
    license_arn: Arn,
    license_name: String,
    product_name: String,
    issuer: Issuer,
    home_region: String,
    validity: DatetimeRange,
    entitlements: EntitlementList,
    consumption_configuration: ConsumptionConfiguration,
    status: LicenseStatus,
    client_token: ClientToken,
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    license_metadata: Optional[MetadataList] = None,
    source_version: Optional[String] = None,
    reset_usage: Optional[Boolean] = None,
) -> CreateLicenseVersionResponse

Creates a new version of the specified license.

Parameters:

  • license_arn (Arn) –

    Amazon Resource Name (ARN) of the license.

  • license_name (String) –

    License name.

  • product_name (String) –

    Product name.

  • issuer (Issuer) –

    License issuer.

  • home_region (String) –

    Home Region of the license.

  • validity (DatetimeRange) –

    Date and time range during which the license is valid, in ISO8601-UTC format.

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

    Information about the license.

  • entitlements (EntitlementList) –

    License entitlements.

  • consumption_configuration (ConsumptionConfiguration) –

    Configuration for consumption of the license. Choose a provisional configuration for workloads running with continuous connectivity. Choose a borrow configuration for workloads with offline usage.

  • status (LicenseStatus) –

    License status.

  • client_token (ClientToken) –

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

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

    Current version of the license.

  • reset_usage (Optional[Boolean], default: None ) –

    Specifies whether to reset the license usage for the new license version. If you don't specify a value, the license usage is not reset.

Raises:

Source code in docs_src/capo_license_manager/_services/async_license_manager.py
async def create_license_version(
    self,
    license_arn: "capo_license_manager.types.arn.Arn",
    license_name: "capo_license_manager.types.string.String",
    product_name: "capo_license_manager.types.string.String",
    issuer: "capo_license_manager.types.issuer.Issuer",
    home_region: "capo_license_manager.types.string.String",
    validity: "capo_license_manager.types.datetime_range.DatetimeRange",
    entitlements: "capo_license_manager.types.entitlement_list.EntitlementList",
    consumption_configuration: "capo_license_manager.types.consumption_configuration.ConsumptionConfiguration",
    status: "capo_license_manager.types.license_status.LicenseStatus",
    client_token: "capo_license_manager.types.client_token.ClientToken",
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    license_metadata: Optional[
        "capo_license_manager.types.metadata_list.MetadataList"
    ] = None,
    source_version: Optional["capo_license_manager.types.string.String"] = None,
    reset_usage: Optional["capo_license_manager.types.boolean.Boolean"] = None,
) -> "capo_license_manager.types.create_license_version_response.CreateLicenseVersionResponse":
    """<p>Creates a new version of the specified license.</p>

    Args:
        license_arn: <p>Amazon Resource Name (ARN) of the license.</p>
        license_name: <p>License name.</p>
        product_name: <p>Product name.</p>
        issuer: <p>License issuer.</p>
        home_region: <p>Home Region of the license.</p>
        validity: <p>Date and time range during which the license is valid, in ISO8601-UTC format.</p>
        license_metadata: <p>Information about the license.</p>
        entitlements: <p>License entitlements.</p>
        consumption_configuration: <p>Configuration for consumption of the license. Choose a provisional configuration for workloads running with continuous connectivity. Choose a borrow configuration for workloads with offline usage.</p>
        status: <p>License status.</p>
        client_token: <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
        source_version: <p>Current version of the license.</p>
        reset_usage: <p>Specifies whether to reset the license usage for the new license version. If you don't specify a value, the license usage is not reset.</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.conflict_exception.ConflictException: <p>There was a conflict processing the request. Try your request again.</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.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_version_request.CreateLicenseVersionRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager.types.create_license_version_response.CreateLicenseVersionResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.create_license_version

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLicenseVersion")
    )
    input_: capo_license_manager.types.create_license_version_request.CreateLicenseVersionRequest = {
        "license_arn": license_arn,
        "license_name": license_name,
        "product_name": product_name,
        "issuer": issuer,
        "home_region": home_region,
        "validity": validity,
        "entitlements": entitlements,
        "consumption_configuration": consumption_configuration,
        "status": status,
        "client_token": client_token,
    }
    if license_metadata is not None:
        input_["license_metadata"] = license_metadata
    if source_version is not None:
        input_["source_version"] = source_version
    if reset_usage is not None:
        input_["reset_usage"] = reset_usage

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