AWS::ResourceExplorer2::View
Creates a view that users can query by using the Search
operation. Results from queries that you make using this view include only resources
that match the view's Filters.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ResourceExplorer2::View", "Properties" : { "Filters" :Filters, "IncludedProperties" :[ IncludedProperty, ... ], "Tags" :{, "ViewName" :Key:Value, ...}String} }
YAML
Type: AWS::ResourceExplorer2::View Properties: Filters:FiltersIncludedProperties:- IncludedPropertyTags:ViewName:Key:ValueString
Properties
Filters-
An array of strings that include search keywords, prefixes, and operators that filter the results that are returned for queries made using this view. When you use this view in a Search operation, the filter string is combined with the search's
QueryStringparameter using a logicalANDoperator.For information about the supported syntax, see Search query reference for Resource Explorer in the Amazon Resource Explorer User Guide.
Important
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=prodincludes all Amazon EC2 resources in any Amazon Web Services Region that begin with the lettersusand are not tagged with a keyStagethat has the valueprod.Required: No
Type: Filters
Update requires: No interruption
IncludedProperties-
A list of fields that provide additional information about the view.
Required: No
Type: List of IncludedProperty
Update requires: No interruption
Tags-
Tag key and value pairs that are attached to the view.
Required: No
Type: Map of String
Update requires: No interruption
ViewName-
The name of the new view.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9\-]{1,64}$Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the ARN of the new view. For example:
arn:aws:resource-explorer-2:us-east-1:123456789012:view/CFNStackView2/EXAMPLE8-90ab-cdef-fedc-EXAMPLE22222
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
Creating a view for users to search an index
JSON
{ "Description": "Sample stack template that creates a Resource Explorer view for the SampleIndex", "Resources": { "SampleView": { "Type": "AWS::ResourceExplorer2::View", "Properties": { "ViewName": "mySampleView", "IncludedProperties": [ { "Name": "tags" } ], "Tags": { "Purpose": "ResourceExplorer Sample Stack" } }, "DependsOn": "SampleIndex" } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Description: A sample template that creates a Resource Explorer view for the SampleIndex SampleView: Type: 'AWS::ResourceExplorer2::View' Properties: ViewName: mySampleView IncludedProperties: - Name: tags Tags: Purpose: ResourceExplorer Sample Stack DependsOn: SampleIndex