- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeProtectionCommand
Lists the details of a Protection object.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ShieldClient, DescribeProtectionCommand } from "@aws-sdk/client-shield"; // ES Modules import
// const { ShieldClient, DescribeProtectionCommand } = require("@aws-sdk/client-shield"); // CommonJS import
const client = new ShieldClient(config);
const input = { // DescribeProtectionRequest
ProtectionId: "STRING_VALUE",
ResourceArn: "STRING_VALUE",
};
const command = new DescribeProtectionCommand(input);
const response = await client.send(command);
// { // DescribeProtectionResponse
// Protection: { // Protection
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// ResourceArn: "STRING_VALUE",
// HealthCheckIds: [ // HealthCheckIds
// "STRING_VALUE",
// ],
// ProtectionArn: "STRING_VALUE",
// ApplicationLayerAutomaticResponseConfiguration: { // ApplicationLayerAutomaticResponseConfiguration
// Status: "ENABLED" || "DISABLED", // required
// Action: { // ResponseAction
// Block: {},
// Count: {},
// },
// },
// },
// };
DescribeProtectionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ProtectionId | string | undefined | The unique identifier (ID) for the Protection object to describe. You must provide either the |
ResourceArn | string | undefined | The ARN (Amazon Resource Name) of the protected Amazon Web Services resource. You must provide either the |
DescribeProtectionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Protection | Protection | undefined | The Protection that you requested. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalErrorException | server | Exception that indicates that a problem occurred with the service infrastructure. You can retry the request. |
InvalidParameterException | client | Exception that indicates that the parameters passed to the API are invalid. If available, this exception includes details in additional properties. |
ResourceNotFoundException | client | Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties. |
ShieldServiceException | Base exception class for all service exceptions from Shield service. |