Skip to content

update_license_configuration

update_license_configuration(
    license_configuration_arn: String,
    *,
    config_overrides: Optional[LicenseManagerClientConfig] = None,
    license_configuration_status: Optional[LicenseConfigurationStatus] = None,
    license_rules: Optional[StringList] = None,
    license_count: Optional[BoxLong] = None,
    license_count_hard_limit: Optional[BoxBoolean] = None,
    name: Optional[String] = None,
    description: Optional[String] = None,
    product_information_list: Optional[ProductInformationList] = None,
    disassociate_when_not_found: Optional[BoxBoolean] = None,
    license_expiry: Optional[BoxLong] = None,
) -> UpdateLicenseConfigurationResponse

Modifies the attributes of an existing license configuration.

Parameters:

  • license_configuration_arn (String) –

    Amazon Resource Name (ARN) of the license configuration.

  • license_configuration_status (Optional[LicenseConfigurationStatus], default: None ) –

    New status of the license configuration.

  • license_rules (Optional[StringList], default: None ) –

    New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.

  • license_count (Optional[BoxLong], default: None ) –

    New number of licenses managed by the license configuration.

  • license_count_hard_limit (Optional[BoxBoolean], default: None ) –

    New hard limit of the number of available licenses.

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

    New name of the license configuration.

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

    New description of the license configuration.

  • product_information_list (Optional[ProductInformationList], default: None ) –

    New product information.

  • disassociate_when_not_found (Optional[BoxBoolean], default: None ) –

    When true, disassociates a resource when software is uninstalled.

  • license_expiry (Optional[BoxLong], default: None ) –

    License configuration expiry time.

Raises:

Source code in docs_src/capo_license_manager/_services/license_manager.py
def update_license_configuration(
    self,
    license_configuration_arn: "capo_license_manager.types.string.String",
    *,
    config_overrides: Optional[LicenseManagerClientConfig] = None,
    license_configuration_status: Optional[
        "capo_license_manager.types.license_configuration_status.LicenseConfigurationStatus"
    ] = None,
    license_rules: Optional[
        "capo_license_manager.types.string_list.StringList"
    ] = None,
    license_count: Optional["capo_license_manager.types.box_long.BoxLong"] = None,
    license_count_hard_limit: Optional[
        "capo_license_manager.types.box_boolean.BoxBoolean"
    ] = None,
    name: Optional["capo_license_manager.types.string.String"] = None,
    description: Optional["capo_license_manager.types.string.String"] = None,
    product_information_list: Optional[
        "capo_license_manager.types.product_information_list.ProductInformationList"
    ] = None,
    disassociate_when_not_found: Optional[
        "capo_license_manager.types.box_boolean.BoxBoolean"
    ] = None,
    license_expiry: Optional["capo_license_manager.types.box_long.BoxLong"] = None,
) -> "capo_license_manager.types.update_license_configuration_response.UpdateLicenseConfigurationResponse":
    """<p>Modifies the attributes of an existing license configuration.</p>

    Args:
        license_configuration_arn: <p>Amazon Resource Name (ARN) of the license configuration.</p>
        license_configuration_status: <p>New status of the license configuration.</p>
        license_rules: <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
        license_count: <p>New number of licenses managed by the license configuration.</p>
        license_count_hard_limit: <p>New hard limit of the number of available licenses.</p>
        name: <p>New name of the license configuration.</p>
        description: <p>New description of the license configuration.</p>
        product_information_list: <p>New product information.</p>
        disassociate_when_not_found: <p>When true, disassociates a resource when software is uninstalled.</p>
        license_expiry: <p>License configuration expiry time.</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.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.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Your resource limits have been exceeded.</p>
        capo_license_manager.errors.server_internal_exception.ServerInternalException: <p>The server experienced an internal error. Try 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.update_license_configuration_request.UpdateLicenseConfigurationRequest]",
    ) -> OperationResponse[
        "capo_license_manager.types.update_license_configuration_response.UpdateLicenseConfigurationResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.update_license_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateLicenseConfiguration")
    )
    input_: capo_license_manager.types.update_license_configuration_request.UpdateLicenseConfigurationRequest = {
        "license_configuration_arn": license_configuration_arn
    }
    if license_configuration_status is not None:
        input_["license_configuration_status"] = license_configuration_status
    if license_rules is not None:
        input_["license_rules"] = license_rules
    if license_count is not None:
        input_["license_count"] = license_count
    if license_count_hard_limit is not None:
        input_["license_count_hard_limit"] = license_count_hard_limit
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if product_information_list is not None:
        input_["product_information_list"] = product_information_list
    if disassociate_when_not_found is not None:
        input_["disassociate_when_not_found"] = disassociate_when_not_found
    if license_expiry is not None:
        input_["license_expiry"] = license_expiry

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