Skip to content

update_view

update_view(
    view_arn: str,
    *,
    config_overrides: Optional[ResourceExplorer2ClientConfig] = None,
    included_properties: Optional[IncludedPropertyList] = None,
    filters: Optional[SearchFilter] = None,
) -> UpdateViewOutput

Modifies some of the details of a view. You can change the filter string and the list of included properties. You can't change the name of the view.

Parameters:

  • view_arn (str) –

    The Amazon resource name (ARN) of the view that you want to modify.

  • included_properties (Optional[IncludedPropertyList], default: None ) –

    Specifies optional fields that you want included in search results from this view. It is a list of objects that each describe a field to include.

    The default is an empty list, with no optional fields included in the results.

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

    An array of strings that specify which resources are included in the results of queries made using this view. When you use this view in a Search operation, the filter string is combined with the search's QueryString parameter using a logical AND operator.

    For information about the supported syntax, see Search query reference for Resource Explorer in the Amazon Web Services Resource Explorer User Guide.

    This query string in the context of this operation supports only filter prefixes with optional operators. It doesn't support free-form text. For example, the string region:us* service:ec2 -tag:stage=prod includes all Amazon EC2 resources in any Amazon Web Services Region that begins with the letters us and is not tagged with a key Stage that has the value prod.

Raises:

Source code in docs_src/capo_resource_explorer_2/_services/resource_explorer2.py
def update_view(
    self,
    view_arn: str,
    *,
    config_overrides: Optional[ResourceExplorer2ClientConfig] = None,
    included_properties: Optional[
        "capo_resource_explorer_2.types.included_property_list.IncludedPropertyList"
    ] = None,
    filters: Optional[
        "capo_resource_explorer_2.types.search_filter.SearchFilter"
    ] = None,
) -> "capo_resource_explorer_2.types.update_view_output.UpdateViewOutput":
    """<p>Modifies some of the details of a view. You can change the filter string and the list of included properties. You can't change the name of the view.</p>

    Args:
        view_arn: <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the view that you want to modify.</p>
        included_properties: <p>Specifies optional fields that you want included in search results from this view. It is a list of objects that each describe a field to include.</p> <p>The default is an empty list, with no optional fields included in the results.</p>
        filters: <p>An array of strings that specify which resources are included in the results of queries made using this view. When you use this view in a <a>Search</a> operation, the filter string is combined with the search's <code>QueryString</code> parameter using a logical <code>AND</code> operator.</p> <p>For information about the supported syntax, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html">Search query reference for Resource Explorer</a> in the <i>Amazon Web Services Resource Explorer User Guide</i>.</p> <important> <p>This query string in the context of this operation supports only <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters">filter prefixes</a> with optional <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-operators">operators</a>. It doesn't support free-form text. For example, the string <code>region:us* service:ec2 -tag:stage=prod</code> includes all Amazon EC2 resources in any Amazon Web Services Region that begins with the letters <code>us</code> and is <i>not</i> tagged with a key <code>Stage</code> that has the value <code>prod</code>.</p> </important>

    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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request failed because it exceeds a service quota.</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.
    """

    def _handler(
        req: "OperationRequest[capo_resource_explorer_2.types.update_view_input.UpdateViewInput]",
    ) -> OperationResponse[
        "capo_resource_explorer_2.types.update_view_output.UpdateViewOutput"
    ]:
        import capo_resource_explorer_2._operations.resource_explorer.update_view

        output, http_response = (
            capo_resource_explorer_2._operations.resource_explorer.update_view.update_view(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_resource_explorer_2.types.update_view_input.UpdateViewInput",
    ) -> dict[str, Any]:
        import capo_resource_explorer_2.types.update_view_input

        return capo_resource_explorer_2.types.update_view_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_resource_explorer_2.types.update_view_output.UpdateViewOutput",
    ) -> dict[str, Any]:
        import capo_resource_explorer_2.types.update_view_output

        return capo_resource_explorer_2.types.update_view_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateView", redact_input=_redact_input, redact_output=_redact_output
        ),
    )
    input_: capo_resource_explorer_2.types.update_view_input.UpdateViewInput = {
        "view_arn": view_arn
    }
    if included_properties is not None:
        input_["included_properties"] = included_properties
    if filters is not None:
        input_["filters"] = filters

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