Policy

class aws_cdk.aws_sns.Policy(policy_doc)

Bases: FilterOrPolicy

Policy Implementation of FilterOrPolicy.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sns as sns

# filter_or_policy: sns.FilterOrPolicy

policy = sns.Policy({
    "policy_doc_key": filter_or_policy
})

Policy constructor.

Parameters:

policy_doc (Mapping[str, FilterOrPolicy]) – policy argument to construct.

Methods

is_filter()

Check if instance is Filter type.

Return type:

bool

is_policy()

Check if instance is Policy type.

Return type:

bool

Attributes

policy_doc

policy argument to construct.

type

Type used in DFS buildFilterPolicyWithMessageBody to determine json value type.

Static Methods

classmethod filter(filter)

Filter of MessageBody.

Parameters:

filter (SubscriptionFilter) –

Return type:

Filter

classmethod policy(policy)

Policy of MessageBody.

Parameters:

policy (Mapping[str, FilterOrPolicy]) –

Return type:

Policy