Add exact Number, exact String.Array and attribute key matching to SNS subscription filter policy and validate filter policy
This commit is contained in:
parent
94fd5c4128
commit
d8a922811c
5 changed files with 564 additions and 8 deletions
|
|
@ -57,7 +57,16 @@ class SNSResponse(BaseResponse):
|
|||
|
||||
transform_value = None
|
||||
if 'StringValue' in value:
|
||||
transform_value = value['StringValue']
|
||||
if data_type == 'Number':
|
||||
try:
|
||||
transform_value = float(value['StringValue'])
|
||||
except ValueError:
|
||||
raise InvalidParameterValue(
|
||||
"An error occurred (ParameterValueInvalid) "
|
||||
"when calling the Publish operation: "
|
||||
"Could not cast message attribute '{0}' value to number.".format(name))
|
||||
else:
|
||||
transform_value = value['StringValue']
|
||||
elif 'BinaryValue' in value:
|
||||
transform_value = value['BinaryValue']
|
||||
if not transform_value:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue