Skip to content

list_resource_inventory async

list_resource_inventory(
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    max_results: Optional[BoxInteger] = None,
    next_token: Optional[String] = None,
    filters: Optional[InventoryFilterList] = None,
) -> ListResourceInventoryResponse

Lists resources managed using Systems Manager inventory.

Parameters:

  • max_results (Optional[BoxInteger], default: None ) –

    Maximum number of results to return in a single call.

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

    Token for the next set of results.

  • filters (Optional[InventoryFilterList], default: None ) –

    Filters to scope the results. The following filters and logical operators are supported:

    • account_id - The ID of the Amazon Web Services account that owns the resource. Logical operators are EQUALS | NOT_EQUALS.

    • application_name - The name of the application. Logical operators are EQUALS | BEGINS_WITH.

    • license_included - The type of license included. Logical operators are EQUALS | NOT_EQUALS. Possible values are sql-server-enterprise | sql-server-standard | sql-server-web | windows-server-datacenter.

    • platform - The platform of the resource. Logical operators are EQUALS | BEGINS_WITH.

    • resource_id - The ID of the resource. Logical operators are EQUALS | NOT_EQUALS.

    • tag: - The key/value combination of a tag assigned to the resource. Logical operators are EQUALS (single account) or EQUALS | NOT_EQUALS (cross account).

Raises:

Source code in docs_src/capo_license_manager/_services/async_license_manager.py
async def list_resource_inventory(
    self,
    *,
    config_overrides: Optional[AsyncLicenseManagerClientConfig] = None,
    max_results: Optional[
        "capo_license_manager.types.box_integer.BoxInteger"
    ] = None,
    next_token: Optional["capo_license_manager.types.string.String"] = None,
    filters: Optional[
        "capo_license_manager.types.inventory_filter_list.InventoryFilterList"
    ] = None,
) -> "capo_license_manager.types.list_resource_inventory_response.ListResourceInventoryResponse":
    """<p>Lists resources managed using Systems Manager inventory.</p>

    Args:
        max_results: <p>Maximum number of results to return in a single call.</p>
        next_token: <p>Token for the next set of results.</p>
        filters: <p>Filters to scope the results. The following filters and logical operators are supported:</p> <ul> <li> <p> <code>account_id</code> - The ID of the Amazon Web Services account that owns the resource. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>.</p> </li> <li> <p> <code>application_name</code> - The name of the application. Logical operators are <code>EQUALS</code> | <code>BEGINS_WITH</code>.</p> </li> <li> <p> <code>license_included</code> - The type of license included. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>. Possible values are <code>sql-server-enterprise</code> | <code>sql-server-standard</code> | <code>sql-server-web</code> | <code>windows-server-datacenter</code>.</p> </li> <li> <p> <code>platform</code> - The platform of the resource. Logical operators are <code>EQUALS</code> | <code>BEGINS_WITH</code>.</p> </li> <li> <p> <code>resource_id</code> - The ID of the resource. Logical operators are <code>EQUALS</code> | <code>NOT_EQUALS</code>.</p> </li> <li> <p> <code>tag:<key></code> - The key/value combination of a tag assigned to the resource. Logical operators are <code>EQUALS</code> (single account) or <code>EQUALS</code> | <code>NOT_EQUALS</code> (cross account).</p> </li> </ul>

    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.failed_dependency_exception.FailedDependencyException: <p>A dependency required to run the API is missing.</p>
        capo_license_manager.errors.filter_limit_exceeded_exception.FilterLimitExceededException: <p>The request uses too many filters or too many filter values.</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.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_license_manager.types.list_resource_inventory_request.ListResourceInventoryRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager.types.list_resource_inventory_response.ListResourceInventoryResponse"
    ]:
        import capo_license_manager._operations.aws_license_manager.list_resource_inventory

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListResourceInventory")
    )
    input_: capo_license_manager.types.list_resource_inventory_request.ListResourceInventoryRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if filters is not None:
        input_["filters"] = filters

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