This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
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 AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ResourceExplorer2::View", "Properties" : { "Filters" :SearchFilter, "IncludedProperties" :[ IncludedProperty, ... ], "Scope" :String, "Tags" :{, "ViewName" :Key:Value, ...}String} }
YAML
Type: AWS::ResourceExplorer2::View Properties: Filters:SearchFilterIncludedProperties:- IncludedPropertyScope:StringTags: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 AWS 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 AWS Region that begin with the lettersusand are not tagged with a keyStagethat has the valueprod.Required: No
Type: SearchFilter
Update requires: No interruption
IncludedProperties-
A list of fields that provide additional information about the view.
Required: No
Type: Array of IncludedProperty
Update requires: No interruption
Scope-
The root ARN of the account, an organizational unit (OU), or an organization ARN. If left empty, the default is account.
Required: No
Type: String
Update requires: Replacement
-
Tag key and value pairs that are attached to the view.
Required: No
Type: Object of String
Pattern:
.+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 Ref function, Ref returns 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 Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic 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::GetAtt intrinsic function, see Fn::GetAtt.
ViewArn-
The ARN of the new view. For example:
arn:aws:resource-explorer-2:us-east-1:123456789012:view/MyView/EXAMPLE8-90ab-cdef-fedc-EXAMPLE22222
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