GetDefaultView
Retrieves the Amazon Resource Name (ARN) of the view that is the default for the AWS Region in which you call this operation. You can then call GetView to retrieve the details of that view.
Minimum permissions
To call this operation, you must have the following permissions:
-
Action:
resource-explorer-2:GetDefaultView
Resource: No specific resource (*). However, an index must be present in the AWS Region in which you call the operation.
Related operations
-
To get details about more than one view, use BatchGetView.
-
To create a view, use CreateView.
-
To list the views in an AWS Region, use ListViews.
-
To see details about a specific view, use GetView.
-
To update the definition of a view, use UpdateView.
-
To delete a view, use DeleteView.
-
To make a view the default for an AWS Region, use AssociateDefaultView. To remove the default view for a Region, use DisassociateDefaultView.
Request Syntax
POST /GetDefaultView HTTP/1.1
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"ViewArn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ViewArn
-
The Amazon resource name (ARN) of the view that is the current default for the AWS Region in which you called this operation.
Type: String
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
The credentials that you used to call this operation don't have the minimum required permissions.
HTTP Status Code: 403
- InternalServerException
-
The request failed because of internal service error. Try your request again later.
HTTP Status Code: 500
- ResourceNotFoundException
-
You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.
HTTP Status Code: 404
- ThrottlingException
-
The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer.
HTTP Status Code: 429
- ValidationException
-
You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.
HTTP Status Code: 400
Examples
Example
The following example retrieves the ARN of the view that is the default view for the AWS Region in which you call the operation.
Sample Request
POST /GetDefaultView HTTP/1.1
Host: resource-explorer-2.us-east-1.amazonaws.com
X-Amz-Date: 20221101T200059Z
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>
Sample Response
HTTP/1.1 200 OK
Date: Tue, 01 Nov 2022 20:00:59 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>
{
"ViewArn": "arn:aws:resource-explorer-2:us-east-1:123456789012::view/My-Main-View/EXAMPLE8-90ab-cdef-fedc-EXAMPLE11111"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: