

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS Resource Explorer
<a name="AWS_ResourceExplorer2"></a>

**Resource types**
+ [AWS::ResourceExplorer2::DefaultViewAssociation](aws-resource-resourceexplorer2-defaultviewassociation.md)
+ [AWS::ResourceExplorer2::Index](aws-resource-resourceexplorer2-index.md)
+ [AWS::ResourceExplorer2::View](aws-resource-resourceexplorer2-view.md)

# AWS::ResourceExplorer2::DefaultViewAssociation
<a name="aws-resource-resourceexplorer2-defaultviewassociation"></a>

Sets the specified view as the default for the AWS Region in which you call this operation. If a user makes a search query that doesn't explicitly specify the view to use, Resource Explorer chooses this default view automatically for searches performed in this AWS Region.

## Syntax
<a name="aws-resource-resourceexplorer2-defaultviewassociation-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-resourceexplorer2-defaultviewassociation-syntax.json"></a>

```
{
  "Type" : "AWS::ResourceExplorer2::DefaultViewAssociation",
  "Properties" : {
      "[ViewArn](#cfn-resourceexplorer2-defaultviewassociation-viewarn)" : String
    }
}
```

### YAML
<a name="aws-resource-resourceexplorer2-defaultviewassociation-syntax.yaml"></a>

```
Type: AWS::ResourceExplorer2::DefaultViewAssociation
Properties:
  [ViewArn](#cfn-resourceexplorer2-defaultviewassociation-viewarn): String
```

## Properties
<a name="aws-resource-resourceexplorer2-defaultviewassociation-properties"></a>

`ViewArn`  <a name="cfn-resourceexplorer2-defaultviewassociation-viewarn"></a>
The ARN of the view to set as the default for the AWS Region and AWS account in which you call this operation. The specified view must already exist in the specified Region.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1011`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-resourceexplorer2-defaultviewassociation-return-values"></a>

### Ref
<a name="aws-resource-resourceexplorer2-defaultviewassociation-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the identity of the principal that the view is now associated with in the specified AWS Region. For example:

 `123456789012` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-resourceexplorer2-defaultviewassociation-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-resourceexplorer2-defaultviewassociation-return-values-fn--getatt-fn--getatt"></a>

`AssociatedAwsPrincipal`  <a name="AssociatedAwsPrincipal-fn::getatt"></a>
The unique identifier of the principal for which the specified view was made the default for the AWS Region that contains the view. For example:  
 `123456789012` 

## Examples
<a name="aws-resource-resourceexplorer2-defaultviewassociation--examples"></a>

### Designating the default view for the Region
<a name="aws-resource-resourceexplorer2-defaultviewassociation--examples--Designating_the_default_view_for_the_Region"></a>

#### JSON
<a name="aws-resource-resourceexplorer2-defaultviewassociation--examples--Designating_the_default_view_for_the_Region--json"></a>

```
{
    "Description": "Sample stack template that designates SampleView as the default for its Region",
    "Resources": {
        "SampleDefaultViewAssociation": {
            "Type": "AWS::ResourceExplorer2::DefaultViewAssociation",
            "Properties": {
                "ViewArn": {
                    "Ref": "SampleView"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-resourceexplorer2-defaultviewassociation--examples--Designating_the_default_view_for_the_Region--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample stack template that creates a resource-based policy for SampleView
  SampleDefaultViewAssociation:
    Type: 'AWS::ResourceExplorer2::DefaultViewAssociation'
    Properties:
      ViewArn: !Ref SampleView
```

# AWS::ResourceExplorer2::Index
<a name="aws-resource-resourceexplorer2-index"></a>

Turns on Resource Explorer in the AWS Region in which you called this operation by creating an index. Resource Explorer begins discovering the resources in this Region and stores the details about the resources in the index so that they can be queried by using the [Search](https://docs.aws.amazon.com/resource-explorer/latest/apireference/API_Search.html) operation.

You can create either a local index that returns search results from only the AWS Region in which the index exists, or you can create an aggregator index that returns search results from all AWS Regions in the AWS account.

For more details about what happens when you turn on Resource Explorer in an AWS Region, see [Turning on Resource Explorer to index your resources in an AWS Region](https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-service-activate.html) in the *AWS Resource Explorer User Guide.*

If this is the first AWS Region in which you've created an index for Resource Explorer, this operation also creates a service-linked role in your AWS account that allows Resource Explorer to search for your resources and populate the index.

## Syntax
<a name="aws-resource-resourceexplorer2-index-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-resourceexplorer2-index-syntax.json"></a>

```
{
  "Type" : "AWS::ResourceExplorer2::Index",
  "Properties" : {
      "[Tags](#cfn-resourceexplorer2-index-tags)" : {Key: Value, ...},
      "[Type](#cfn-resourceexplorer2-index-type)" : String
    }
}
```

### YAML
<a name="aws-resource-resourceexplorer2-index-syntax.yaml"></a>

```
Type: AWS::ResourceExplorer2::Index
Properties:
  [Tags](#cfn-resourceexplorer2-index-tags): 
    Key: Value
  [Type](#cfn-resourceexplorer2-index-type): String
```

## Properties
<a name="aws-resource-resourceexplorer2-index-properties"></a>

`Tags`  <a name="cfn-resourceexplorer2-index-tags"></a>
The specified tags are attached to only the index created in this AWS Region. The tags don't attach to any of the resources listed in the index.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-resourceexplorer2-index-type"></a>
Specifies the type of the index in this Region. For information about the aggregator index and how it differs from a local index, see [Turning on cross-Region search by creating an aggregator index](https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html) in the *AWS Resource Explorer User Guide.*.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `LOCAL | AGGREGATOR`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-resourceexplorer2-index-return-values"></a>

### Ref
<a name="aws-resource-resourceexplorer2-index-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the new index. For example:

 `arn:aws:resource-explorer-2:us-east-1:123456789012:index/EXAMPLE8-90ab-cdef-fedc-EXAMPLE22222` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-resourceexplorer2-index-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-resourceexplorer2-index-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The ARN of the new index for the AWS Region. For example:  
 `arn:aws:resource-explorer-2:us-east-1:123456789012:index/EXAMPLE8-90ab-cdef-fedc-EXAMPLE22222` 

`IndexState`  <a name="IndexState-fn::getatt"></a>
Indicates the current state of the index. For example:  
 `CREATING` 

## Examples
<a name="aws-resource-resourceexplorer2-index--examples"></a>

### Turning on Resource Explorer in a Region by creating an index
<a name="aws-resource-resourceexplorer2-index--examples--Turning_on_Resource_Explorer_in_a_Region_by_creating_an_index"></a>

#### JSON
<a name="aws-resource-resourceexplorer2-index--examples--Turning_on_Resource_Explorer_in_a_Region_by_creating_an_index--json"></a>

```
{
    "Description": "Sample stack template that creates a Resource Explorer aggregator index",
    "Resources": {
        "SampleIndex": {
            "Type": "AWS::ResourceExplorer2::Index",
            "Properties": {
                "Type": "AGGREGATOR",
                "Tags": {
                    "Purpose": "ResourceExplorer Sample Stack"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-resourceexplorer2-index--examples--Turning_on_Resource_Explorer_in_a_Region_by_creating_an_index--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template that creates a Resource Explorer aggregator index
Resources:
  SampleIndex:
    Type: 'AWS::ResourceExplorer2::Index'
    Properties:
      Type: AGGREGATOR
      Tags:
        Purpose: ResourceExplorer Sample Stack
```

# AWS::ResourceExplorer2::View
<a name="aws-resource-resourceexplorer2-view"></a>

Creates a view that users can query by using the [Search](https://docs.aws.amazon.com/resource-explorer/latest/apireference/API_Search.html) operation. Results from queries that you make using this view include only resources that match the view's `Filters`.

## Syntax
<a name="aws-resource-resourceexplorer2-view-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-resourceexplorer2-view-syntax.json"></a>

```
{
  "Type" : "AWS::ResourceExplorer2::View",
  "Properties" : {
      "[Filters](#cfn-resourceexplorer2-view-filters)" : SearchFilter,
      "[IncludedProperties](#cfn-resourceexplorer2-view-includedproperties)" : [ IncludedProperty, ... ],
      "[Scope](#cfn-resourceexplorer2-view-scope)" : String,
      "[Tags](#cfn-resourceexplorer2-view-tags)" : {Key: Value, ...},
      "[ViewName](#cfn-resourceexplorer2-view-viewname)" : String
    }
}
```

### YAML
<a name="aws-resource-resourceexplorer2-view-syntax.yaml"></a>

```
Type: AWS::ResourceExplorer2::View
Properties:
  [Filters](#cfn-resourceexplorer2-view-filters): 
    SearchFilter
  [IncludedProperties](#cfn-resourceexplorer2-view-includedproperties): 
    - IncludedProperty
  [Scope](#cfn-resourceexplorer2-view-scope): String
  [Tags](#cfn-resourceexplorer2-view-tags): 
    Key: Value
  [ViewName](#cfn-resourceexplorer2-view-viewname): String
```

## Properties
<a name="aws-resource-resourceexplorer2-view-properties"></a>

`Filters`  <a name="cfn-resourceexplorer2-view-filters"></a>
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](https://docs.aws.amazon.com/resource-explorer/latest/apireference/API_Search.html) 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](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html) in the *AWS Resource Explorer User Guide*.  
This query string in the context of this operation supports only [filter prefixes](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters) with optional [operators](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-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 AWS Region that begin with the letters `us` and are *not* tagged with a key `Stage` that has the value `prod`.
*Required*: No  
*Type*: [SearchFilter](aws-properties-resourceexplorer2-view-searchfilter.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IncludedProperties`  <a name="cfn-resourceexplorer2-view-includedproperties"></a>
A list of fields that provide additional information about the view.  
*Required*: No  
*Type*: Array of [IncludedProperty](aws-properties-resourceexplorer2-view-includedproperty.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Scope`  <a name="cfn-resourceexplorer2-view-scope"></a>
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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-resourceexplorer2-view-tags"></a>
Tag key and value pairs that are attached to the view.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.+`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ViewName`  <a name="cfn-resourceexplorer2-view-viewname"></a>
The name of the new view.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^[a-zA-Z0-9\-]{1,64}$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-resourceexplorer2-view-return-values"></a>

### Ref
<a name="aws-resource-resourceexplorer2-view-return-values-ref"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-resourceexplorer2-view-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-resourceexplorer2-view-return-values-fn--getatt-fn--getatt"></a>

`ViewArn`  <a name="ViewArn-fn::getatt"></a>
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
<a name="aws-resource-resourceexplorer2-view--examples"></a>

### Creating a view for users to search an index
<a name="aws-resource-resourceexplorer2-view--examples--Creating_a_view_for_users_to_search_an_index"></a>

#### JSON
<a name="aws-resource-resourceexplorer2-view--examples--Creating_a_view_for_users_to_search_an_index--json"></a>

```
{
    "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
<a name="aws-resource-resourceexplorer2-view--examples--Creating_a_view_for_users_to_search_an_index--yaml"></a>

```
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
```

# AWS::ResourceExplorer2::View IncludedProperty
<a name="aws-properties-resourceexplorer2-view-includedproperty"></a>

Information about an additional property that describes a resource, that you can optionally include in a view.

## Syntax
<a name="aws-properties-resourceexplorer2-view-includedproperty-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-resourceexplorer2-view-includedproperty-syntax.json"></a>

```
{
  "[Name](#cfn-resourceexplorer2-view-includedproperty-name)" : String
}
```

### YAML
<a name="aws-properties-resourceexplorer2-view-includedproperty-syntax.yaml"></a>

```
  [Name](#cfn-resourceexplorer2-view-includedproperty-name): String
```

## Properties
<a name="aws-properties-resourceexplorer2-view-includedproperty-properties"></a>

`Name`  <a name="cfn-resourceexplorer2-view-includedproperty-name"></a>
The name of the property that is included in this view.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1011`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ResourceExplorer2::View SearchFilter
<a name="aws-properties-resourceexplorer2-view-searchfilter"></a>

A search filter defines which resources can be part of a search query result set.

## Syntax
<a name="aws-properties-resourceexplorer2-view-searchfilter-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-resourceexplorer2-view-searchfilter-syntax.json"></a>

```
{
  "[FilterString](#cfn-resourceexplorer2-view-searchfilter-filterstring)" : String
}
```

### YAML
<a name="aws-properties-resourceexplorer2-view-searchfilter-syntax.yaml"></a>

```
  [FilterString](#cfn-resourceexplorer2-view-searchfilter-filterstring): 
    String
```

## Properties
<a name="aws-properties-resourceexplorer2-view-searchfilter-properties"></a>

`FilterString`  <a name="cfn-resourceexplorer2-view-searchfilter-filterstring"></a>
The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a Search operation.  
For information about the supported syntax, see [Search query reference](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html) in the *AWS Resource Explorer User Guide*.  
This query string in the context of this operation supports only [filter prefixes](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-filters) with optional [operators](https://docs.aws.amazon.com/resource-explorer/latest/userguide/using-search-query-syntax.html#query-syntax-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 AWS Region that begin with the letters `us` and are *not* tagged with a key `Stage` that has the value `prod`.
*Required*: Yes  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)