

# Working with views
<a name="views"></a>

A *view* is the mechanism used to query the resources listed in an index. The view defines what information in the index is visible and available for search and discovery purposes. A user never directly queries the Resource Explorer index. Instead, queries must always go through a view which lets the view creator limit which resources the user can see in search results. 

## Granting access to a view
<a name="views-granting-access"></a>

Resource Explorer provides three types of views: User views, Amazon managed views, and Amazon service views.

**User views**  
User views are created and managed by users or administrators. When automatic setup occurs, Resource Explorer creates user-owned default views that include tags for comprehensive filtering capabilities.

**Amazon service views**  
A [service view](aws-service-views.md) is a pre-defined view owned and managed by Amazon Web Services services (not customer accounts) in Amazon Resource Explorer that enables controlled access to resource data.  
A Resource Explorer-owned view is a type of service view that acts as a fallback when no user-owned default view exists in a Region. These views cannot be modified or deleted by users and provide basic search functionality through Resource Explorer-owned indexes.

**Amazon managed views**  
A [managed view](aws-managed-views.md) provides other Amazon Web Services services with the ability to access resource information indexed by Resource Explorer for your Amazon Web Services account or organization with your consent. 

Views are stored on a per-Region basis. A view can access only the Resource Explorer index in that Amazon Web Services Region. To access account-wide search results, you must use a view in the Region that contains the *aggregator index* for the account. The **Quick setup** option creates a default view in the Amazon Web Services Region with the aggregator index and with filters that include all resources in all Amazon Web Services Regions used by the account.

For information about how to create views, see [Configuring a Resource Explorer view to provide access to resource searches](customer-views.md#configure-views). For information about how to use views in a query, see [Using Amazon Resource Explorer to search for resources](using-search.md). 

Every view has an [Amazon resource name (ARN)](https://docs.amazonaws.cn/general/latest/gr/aws-arns-and-namespaces.html) that you can reference in permission policies to grant access to individual views. You can also pass a view's ARN as a parameter to any API or Amazon CLI operation that interacts with a view. The ARN of a view looks similar to the following example.

```
arn:aws-cn:resource-explorer-2:cn-north-1:123456789012:view/My-View-Name/1a2b3c4d-5d6e-7f8a-9b0c-abcd11111111
```

**Note**  
Every view ARN includes an Amazon generated UUID at the end. This helps to ensure that users who might have had access to views with a specific name that was deleted can't automatically access a new view created with the same name.

## Comparison of view types
<a name="service-views-comparison"></a>

The following table compares the different types of views available in Resource Explorer:


| Feature | User Views | Managed Views | Service Views | 
| --- | --- | --- | --- | 
| Created by | User | Amazon Service (per account) | Amazon Service (global) | 
| Can user modify | Yes | No | No | 
| Can user delete | Yes | Via service only | No | 
| Requires user setup | Yes | Service manages | No | 
| Access to config/relationship data | No | Yes | Yes | 
| Streaming support | No | No | Yes | 