Skip to content

list_managed_views async

list_managed_views(
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    service_principal: Optional[str] = None,
) -> ListManagedViewsOutput

Lists the Amazon resource names (ARNs) of the Amazon Web Services-managed views available in the Amazon Web Services Region in which you call this operation.

Parameters:

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

    The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results.

    An API operation can return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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

    The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value of the previous call's NextToken response to indicate where the output should continue from. The pagination tokens expire after 24 hours.

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

    Specifies a service principal name. If specified, then the operation only returns the managed views that are managed by the input service.

Raises:

Source code in docs_src/capo_resource_explorer_2/_services/async_resource_explorer2.py
async def list_managed_views(
    self,
    *,
    config_overrides: Optional[AsyncResourceExplorer2ClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
    service_principal: Optional[str] = None,
) -> "capo_resource_explorer_2.types.list_managed_views_output.ListManagedViewsOutput":
    """<p>Lists the Amazon resource names (ARNs) of the <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/aws-managed-views.html">Amazon Web Services-managed views</a> available in the Amazon Web Services Region in which you call this operation. </p>

    Args:
        max_results: <p>The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the <code>NextToken</code> response element is present and has a value (is not null). Include that value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results.</p> <note> <p>An API operation can return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p> </note>
        next_token: <p>The parameter for receiving additional results if you receive a <code>NextToken</code> response in a previous request. A <code>NextToken</code> response indicates that more output is available. Set this parameter to the value of the previous call's <code>NextToken</code> response to indicate where the output should continue from. The pagination tokens expire after 24 hours.</p>
        service_principal: <p>Specifies a service principal name. If specified, then the operation only returns the managed views that are managed by the input service. </p>

    Raises:
        capo_resource_explorer_2.errors.access_denied_exception.AccessDeniedException: <p>The credentials that you used to call this operation don't have the minimum required permissions.</p>
        capo_resource_explorer_2.errors.internal_server_exception.InternalServerException: <p>The request failed because of internal service error. Try your request again later.</p>
        capo_resource_explorer_2.errors.throttling_exception.ThrottlingException: <p>The request failed because you exceeded a rate limit for this operation. For more information, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html">Quotas for Resource Explorer</a>.</p>
        capo_resource_explorer_2.errors.unauthorized_exception.UnauthorizedException: <p>The principal making the request isn't permitted to perform the operation.</p>
        capo_resource_explorer_2.errors.validation_exception.ValidationException: <p>You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.</p>
        capo_resource_explorer_2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_resource_explorer_2.types.list_managed_views_input.ListManagedViewsInput]",
    ) -> AsyncOperationResponse[
        "capo_resource_explorer_2.types.list_managed_views_output.ListManagedViewsOutput"
    ]:
        import capo_resource_explorer_2._operations.resource_explorer.list_managed_views

        (
            output,
            http_response,
        ) = await capo_resource_explorer_2._operations.resource_explorer.list_managed_views.async_list_managed_views(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListManagedViews")
    )
    input_: capo_resource_explorer_2.types.list_managed_views_input.ListManagedViewsInput = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if service_principal is not None:
        input_["service_principal"] = service_principal

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