DeleteViewCommand

Deletes the specified view.

If the specified view is the default view for its Amazon Web Services Region, then all Search operations in that Region must explicitly specify the view to use until you configure a new default by calling the AssociateDefaultView operation.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ResourceExplorer2Client, DeleteViewCommand } from "@aws-sdk/client-resource-explorer-2"; // ES Modules import
// const { ResourceExplorer2Client, DeleteViewCommand } = require("@aws-sdk/client-resource-explorer-2"); // CommonJS import
const client = new ResourceExplorer2Client(config);
const input = { // DeleteViewInput
  ViewArn: "STRING_VALUE", // required
};
const command = new DeleteViewCommand(input);
const response = await client.send(command);
// { // DeleteViewOutput
//   ViewArn: "STRING_VALUE",
// };

DeleteViewCommand Input

See DeleteViewCommandInput for more details

Parameter
Type
Description
ViewArn
Required
string | undefined

The Amazon resource name (ARN)  of the view that you want to delete.

DeleteViewCommand Output

See DeleteViewCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ViewArn
string | undefined

The Amazon resource name (ARN)  of the view that you successfully deleted.

Throws

Name
Fault
Details
AccessDeniedException
client

The credentials that you used to call this operation don't have the minimum required permissions.

InternalServerException
server

The request failed because of internal service error. Try your request again later.

ResourceNotFoundException
client

You specified a resource that doesn't exist. Check the ID or ARN that you used to identity the resource, and try again.

ThrottlingException
client

The request failed because you exceeded a rate limit for this operation. For more information, see Quotas for Resource Explorer .

UnauthorizedException
client

The principal making the request isn't permitted to perform the operation.

ValidationException
client

You provided an invalid value for one of the operation's parameters. Check the syntax for the operation, and try again.

ResourceExplorer2ServiceException
Base exception class for all service exceptions from ResourceExplorer2 service.