Skip to content

list_linux_subscriptions

list_linux_subscriptions(
    *,
    config_overrides: Optional[LicenseManagerLinuxSubscriptionsClientConfig] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[BoxInteger] = None,
    next_token: Optional[str] = None,
) -> ListLinuxSubscriptionsResponse

Lists the Linux subscriptions that have been discovered. If you have linked your organization, the returned results will include data aggregated across your accounts in Organizations.

Parameters:

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

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of Subscription with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.

    The valid names for this filter are:

    • Subscription

    The valid Operators for this filter are:

    • contains

    • equals

    • Notequal

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

    The maximum items to return in a request.

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

    A token to specify where to start paginating. This is the nextToken from a previously truncated response.

Raises:

Source code in docs_src/capo_license_manager_linux_subscriptions/_services/license_manager_linux_subscriptions.py
def list_linux_subscriptions(
    self,
    *,
    config_overrides: Optional[LicenseManagerLinuxSubscriptionsClientConfig] = None,
    filters: Optional[
        "capo_license_manager_linux_subscriptions.types.filter_list.FilterList"
    ] = None,
    max_results: Optional[
        "capo_license_manager_linux_subscriptions.types.box_integer.BoxInteger"
    ] = None,
    next_token: Optional[str] = None,
) -> "capo_license_manager_linux_subscriptions.types.list_linux_subscriptions_response.ListLinuxSubscriptionsResponse":
    """<p>Lists the Linux subscriptions that have been discovered. If you have linked your organization, the returned results will include data aggregated across your accounts in Organizations.</p>

    Args:
        filters: <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>Subscription</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.</p> <p>The valid names for this filter are:</p> <ul> <li> <p> <code>Subscription</code> </p> </li> </ul> <p>The valid Operators for this filter are:</p> <ul> <li> <p> <code>contains</code> </p> </li> <li> <p> <code>equals</code> </p> </li> <li> <p> <code>Notequal</code> </p> </li> </ul>
        max_results: <p>The maximum items to return in a request.</p>
        next_token: <p>A token to specify where to start paginating. This is the nextToken from a previously truncated response.</p>

    Raises:
        capo_license_manager_linux_subscriptions.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_license_manager_linux_subscriptions.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_license_manager_linux_subscriptions.errors.validation_exception.ValidationException: <p>The provided input is not valid. Try your request again.</p>
        capo_license_manager_linux_subscriptions.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_license_manager_linux_subscriptions.types.list_linux_subscriptions_request.ListLinuxSubscriptionsRequest]",
    ) -> OperationResponse[
        "capo_license_manager_linux_subscriptions.types.list_linux_subscriptions_response.ListLinuxSubscriptionsResponse"
    ]:
        import capo_license_manager_linux_subscriptions._operations.license_manager_linux_subscriptions.list_linux_subscriptions

        output, http_response = (
            capo_license_manager_linux_subscriptions._operations.license_manager_linux_subscriptions.list_linux_subscriptions.list_linux_subscriptions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListLinuxSubscriptions")
    )
    input_: capo_license_manager_linux_subscriptions.types.list_linux_subscriptions_request.ListLinuxSubscriptionsRequest = {}
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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