Skip to content

create_license_asset_group async

create_license_asset_group(
    name: LicenseAssetResourceName,
    license_asset_group_configurations: LicenseAssetGroupConfigurationList,
    associated_license_asset_ruleset_ar_ns: LicenseAssetRulesetArnList,
    client_token: String,
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    description: Optional[LicenseAssetResourceDescription] = None,
    properties: Optional[LicenseAssetGroupPropertyList] = None,
    tags: Optional[TagList] = None,
) -> CreateLicenseAssetGroupResponse

Creates a license asset group.

Parameters:

Raises:

Source code in docs_src/capo_license_manager/_services/async_license_manager.py
async def create_license_asset_group(
    self,
    name: "capo_license_manager.types.license_asset_resource_name.LicenseAssetResourceName",
    license_asset_group_configurations: "capo_license_manager.types.license_asset_group_configuration_list.LicenseAssetGroupConfigurationList",
    associated_license_asset_ruleset_ar_ns: "capo_license_manager.types.license_asset_ruleset_arn_list.LicenseAssetRulesetArnList",
    client_token: "capo_license_manager.types.string.String",
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    description: Optional[
        "capo_license_manager.types.license_asset_resource_description.LicenseAssetResourceDescription"
    ] = None,
    properties: Optional[
        "capo_license_manager.types.license_asset_group_property_list.LicenseAssetGroupPropertyList"
    ] = None,
    tags: Optional["capo_license_manager.types.tag_list.TagList"] = None,
) -> "capo_license_manager.types.create_license_asset_group_response.CreateLicenseAssetGroupResponse":
    """<p>Creates a license asset group.</p>

    Args:
        name: <p>License asset group name.</p>
        description: <p>License asset group description.</p>
        license_asset_group_configurations: <p>License asset group configurations.</p>
        associated_license_asset_ruleset_ar_ns: <p>ARNs of associated license asset rulesets.</p>
        properties: <p>License asset group properties.</p>
        tags: <p>Tags to add to the license asset group.</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.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_asset_group_request.CreateLicenseAssetGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager.types.create_license_asset_group_response.CreateLicenseAssetGroupResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.create_license_asset_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLicenseAssetGroup")
    )
    input_: capo_license_manager.types.create_license_asset_group_request.CreateLicenseAssetGroupRequest = {
        "name": name,
        "license_asset_group_configurations": license_asset_group_configurations,
        "associated_license_asset_ruleset_ar_ns": associated_license_asset_ruleset_ar_ns,
        "client_token": client_token,
    }
    if description is not None:
        input_["description"] = description
    if properties is not None:
        input_["properties"] = properties
    if tags is not None:
        input_["tags"] = tags

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