Amazon SNS message data protection is no longer available to new customers. For more information and guidance on alternatives, see Amazon SNS message data protection availability change.
Retrieves the specified inline DataProtectionPolicy document that is stored in the specified Amazon SNS topic.
Parameters:
-
resource_arn
(topicARN)
–
The ARN of the topic whose DataProtectionPolicy you want to get.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Raises:
Source code in docs_src/capo_sns/_services/sns.py
| def get_data_protection_policy(
self,
resource_arn: "capo_sns.types.topic_arn.topicARN",
*,
config_overrides: Optional[SNSClientConfig] = None,
) -> "capo_sns.types.get_data_protection_policy_response.GetDataProtectionPolicyResponse":
"""<important> <p>Amazon SNS message data protection is no longer available to new customers. For more information and guidance on alternatives, see <a href="https://docs.aws.amazon.com/sns/latest/dg/sns-message-data-protection-availability-change.html">Amazon SNS message data protection availability change</a>.</p> </important> <p>Retrieves the specified inline <code>DataProtectionPolicy</code> document that is stored in the specified Amazon SNS topic. </p>
Args:
resource_arn: <p>The ARN of the topic whose <code>DataProtectionPolicy</code> you want to get.</p> <p>For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> in the Amazon Web Services General Reference.</p>
Raises:
capo_sns.errors.authorization_error_exception.AuthorizationErrorException: <p>Indicates that the user has been denied access to the requested resource.</p>
capo_sns.errors.internal_error_exception.InternalErrorException: <p>Indicates an internal service error.</p>
capo_sns.errors.invalid_parameter_exception.InvalidParameterException: <p>Indicates that a request parameter does not comply with the associated constraints.</p>
capo_sns.errors.invalid_security_exception.InvalidSecurityException: <p>The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.</p>
capo_sns.errors.not_found_exception.NotFoundException: <p>Indicates that the requested resource does not exist.</p>
capo_sns.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_sns.types.get_data_protection_policy_input.GetDataProtectionPolicyInput]",
) -> OperationResponse[
"capo_sns.types.get_data_protection_policy_response.GetDataProtectionPolicyResponse"
]:
import capo_sns._operations.amazon_simple_notification_service.get_data_protection_policy
output, http_response = (
capo_sns._operations.amazon_simple_notification_service.get_data_protection_policy.get_data_protection_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDataProtectionPolicy")
)
input_: capo_sns.types.get_data_protection_policy_input.GetDataProtectionPolicyInput = {
"resource_arn": resource_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|