- 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.
GetDataProtectionPolicyCommand
Retrieves the specified inline DataProtectionPolicy
document that is stored in the specified Amazon SNS topic.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { SNSClient, GetDataProtectionPolicyCommand } from "@aws-sdk/client-sns"; // ES Modules import
// const { SNSClient, GetDataProtectionPolicyCommand } = require("@aws-sdk/client-sns"); // CommonJS import
const client = new SNSClient(config);
const input = { // GetDataProtectionPolicyInput
ResourceArn: "STRING_VALUE", // required
};
const command = new GetDataProtectionPolicyCommand(input);
const response = await client.send(command);
// { // GetDataProtectionPolicyResponse
// DataProtectionPolicy: "STRING_VALUE",
// };
GetDataProtectionPolicyCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceArn Required | string | undefined | The ARN of the topic whose For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference. |
GetDataProtectionPolicyCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DataProtectionPolicy | string | undefined | Retrieves the |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AuthorizationErrorException | client | Indicates that the user has been denied access to the requested resource. |
InternalErrorException | server | Indicates an internal service error. |
InvalidParameterException | client | Indicates that a request parameter does not comply with the associated constraints. |
InvalidSecurityException | client | The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4. |
NotFoundException | client | Indicates that the requested resource does not exist. |
SNSServiceException | Base exception class for all service exceptions from SNS service. |