Class: AWSCDK::SNS::TopicBase
- Inherits:
-
Resource
- Object
- Resource
- AWSCDK::SNS::TopicBase
- Includes:
- IAM::IEncryptedResource, ITopic
- Defined in:
- sns/topic_base.rb
Overview
Either a new or imported Topic.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#add_ssl_policy ⇒ void
Adds a SSL policy to the topic resource policy.
-
#add_subscription(topic_subscription) ⇒ AWSCDK::SNS::Subscription
Subscribe some endpoint to this topic.
-
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Adds a statement to the IAM resource policy associated with this topic.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#auto_create_policy ⇒ Boolean
Controls automatic creation of policy objects.
-
#bind_as_notification_rule_target(_scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleTargetConfig
Represents a notification target That allows SNS topic to associate with this rule target.
-
#content_based_deduplication ⇒ Boolean
Enables content-based deduplication for FIFO topics.
-
#create_ssl_policy_document ⇒ AWSCDK::IAM::PolicyStatement
Adds a statement to enforce encryption of data in transit when publishing to the topic.
-
#create_topic_policy ⇒ void
Creates a topic policy for this topic.
-
#enforce_ssl ⇒ Boolean?
Adds a statement to enforce encryption of data in transit when publishing to the topic.
- #enforce_ssl=(value) ⇒ Object
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#fifo ⇒ Boolean
Whether this topic is an Amazon SNS FIFO queue.
- #generate_physical_name ⇒ String
-
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
bucket.bucketArn). -
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
bucket.bucketName). -
#grant_on_key(grantee, *actions) ⇒ AWSCDK::IAM::GrantOnKeyResult
Gives permissions to a grantable entity to perform actions on the encryption key.
-
#grant_publish(grantee) ⇒ AWSCDK::IAM::Grant
Grant topic publishing permissions to the given identity.
-
#grant_subscribe(grantee) ⇒ AWSCDK::IAM::Grant
Grant topic subscribing permissions to the given identity.
-
#grants ⇒ AWSCDK::SNS::TopicGrants
Collection of grant methods for a Topic.
-
#initialize(scope, id, props = nil) ⇒ TopicBase
constructor
A new instance of TopicBase.
-
#master_key ⇒ AWSCDK::KMS::IKey?
A KMS Key, either managed by this CDK app, or imported.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this Topic.
-
#metric_number_of_messages_published(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages published to your Amazon SNS topics.
-
#metric_number_of_notifications_delivered(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
-
#metric_number_of_notifications_failed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that Amazon SNS failed to deliver.
-
#metric_number_of_notifications_filtered_out(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies.
-
#metric_number_of_notifications_filtered_out_invalid_attributes(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.
-
#metric_number_of_notifications_filtered_out_no_message_attributes(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies because the messages have no attributes.
-
#metric_publish_size(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the size of messages published through this topic.
-
#metric_sms_month_to_date_spent_usd(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The charges you have accrued since the start of the current calendar month for sending SMS messages.
-
#metric_sms_success_rate(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The rate of successful SMS message deliveries.
-
#node ⇒ Constructs::Node
The tree node.
-
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#topic_arn ⇒ String
The ARN of the topic.
-
#topic_name ⇒ String
The name of the topic.
-
#topic_ref ⇒ AWSCDK::Interfaces::AWSSNS::TopicReference
A reference to a Topic resource.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props = nil) ⇒ TopicBase
Returns a new instance of TopicBase.
13 14 15 16 17 18 19 |
# File 'sns/topic_base.rb', line 13 def initialize(scope, id, props = nil) props = props.is_a?(Hash) ? ::AWSCDK::ResourceProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZXNvdXJjZVByb3BzIn0=")), "props") unless props.nil? Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'sns/topic_base.rb', line 21 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :physical_name => { kind: :property, name: "physicalName", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :auto_create_policy => { kind: :property, name: "autoCreatePolicy", is_optional: false }, :content_based_deduplication => { kind: :property, name: "contentBasedDeduplication", is_optional: false }, :fifo => { kind: :property, name: "fifo", is_optional: false }, :grants => { kind: :property, name: "grants", is_optional: false }, :topic_arn => { kind: :property, name: "topicArn", is_optional: false }, :topic_name => { kind: :property, name: "topicName", is_optional: false }, :topic_ref => { kind: :property, name: "topicRef", is_optional: false }, :master_key => { kind: :property, name: "masterKey", is_optional: true }, :enforce_ssl => { kind: :property, name: "enforceSSL", is_optional: true }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false }, :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false }, :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false }, :add_ssl_policy => { kind: :method, name: "addSSLPolicy", is_optional: false }, :add_subscription => { kind: :method, name: "addSubscription", is_optional: false }, :add_to_resource_policy => { kind: :method, name: "addToResourcePolicy", is_optional: false }, :bind_as_notification_rule_target => { kind: :method, name: "bindAsNotificationRuleTarget", is_optional: false }, :create_ssl_policy_document => { kind: :method, name: "createSSLPolicyDocument", is_optional: false }, :create_topic_policy => { kind: :method, name: "createTopicPolicy", is_optional: false }, :grant_on_key => { kind: :method, name: "grantOnKey", is_optional: false }, :grant_publish => { kind: :method, name: "grantPublish", is_optional: false }, :grant_subscribe => { kind: :method, name: "grantSubscribe", is_optional: false }, :metric => { kind: :method, name: "metric", is_optional: false }, :metric_number_of_messages_published => { kind: :method, name: "metricNumberOfMessagesPublished", is_optional: false }, :metric_number_of_notifications_delivered => { kind: :method, name: "metricNumberOfNotificationsDelivered", is_optional: false }, :metric_number_of_notifications_failed => { kind: :method, name: "metricNumberOfNotificationsFailed", is_optional: false }, :metric_number_of_notifications_filtered_out => { kind: :method, name: "metricNumberOfNotificationsFilteredOut", is_optional: false }, :metric_number_of_notifications_filtered_out_invalid_attributes => { kind: :method, name: "metricNumberOfNotificationsFilteredOutInvalidAttributes", is_optional: false }, :metric_number_of_notifications_filtered_out_no_message_attributes => { kind: :method, name: "metricNumberOfNotificationsFilteredOutNoMessageAttributes", is_optional: false }, :metric_publish_size => { kind: :method, name: "metricPublishSize", is_optional: false }, :metric_sms_month_to_date_spent_usd => { kind: :method, name: "metricSMSMonthToDateSpentUSD", is_optional: false }, :metric_sms_success_rate => { kind: :method, name: "metricSMSSuccessRate", is_optional: false }, } end |
Instance Method Details
#add_ssl_policy ⇒ void
This method returns an undefined value.
Adds a SSL policy to the topic resource policy.
275 276 277 |
# File 'sns/topic_base.rb', line 275 def add_ssl_policy() jsii_call_method("addSSLPolicy", []) end |
#add_subscription(topic_subscription) ⇒ AWSCDK::SNS::Subscription
Subscribe some endpoint to this topic.
283 284 285 286 |
# File 'sns/topic_base.rb', line 283 def add_subscription(topic_subscription) Jsii::Type.check_type(topic_subscription, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpY1N1YnNjcmlwdGlvbiJ9")), "topicSubscription") jsii_call_method("addSubscription", [topic_subscription]) end |
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Adds a statement to the IAM resource policy associated with this topic.
If this topic was created in this stack (new Topic), a topic policy
will be automatically created upon the first call to add_to_resource_policy.
However, if enforce_ssl is set to true, the policy has already been created
before the first call to this method.
If the topic is imported (Topic.import), then this is a no-op.
299 300 301 302 |
# File 'sns/topic_base.rb', line 299 def add_to_resource_policy(statement) Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement") jsii_call_method("addToResourcePolicy", [statement]) end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
215 216 217 218 |
# File 'sns/topic_base.rb', line 215 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
232 233 234 235 |
# File 'sns/topic_base.rb', line 232 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#auto_create_policy ⇒ Boolean
Controls automatic creation of policy objects.
Set by subclasses.
113 114 115 |
# File 'sns/topic_base.rb', line 113 def auto_create_policy() jsii_get_property("autoCreatePolicy") end |
#bind_as_notification_rule_target(_scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleTargetConfig
Represents a notification target That allows SNS topic to associate with this rule target.
308 309 310 311 |
# File 'sns/topic_base.rb', line 308 def bind_as_notification_rule_target(_scope) Jsii::Type.check_type(_scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "_scope") jsii_call_method("bindAsNotificationRuleTarget", [_scope]) end |
#content_based_deduplication ⇒ Boolean
Enables content-based deduplication for FIFO topics.
120 121 122 |
# File 'sns/topic_base.rb', line 120 def content_based_deduplication() jsii_get_property("contentBasedDeduplication") end |
#create_ssl_policy_document ⇒ AWSCDK::IAM::PolicyStatement
Adds a statement to enforce encryption of data in transit when publishing to the topic.
For more information, see https://docs.aws.amazon.com/sns/latest/dg/sns-security-best-practices.html#enforce-encryption-data-in-transit.
318 319 320 |
# File 'sns/topic_base.rb', line 318 def create_ssl_policy_document() jsii_call_method("createSSLPolicyDocument", []) end |
#create_topic_policy ⇒ void
This method returns an undefined value.
Creates a topic policy for this topic.
325 326 327 |
# File 'sns/topic_base.rb', line 325 def create_topic_policy() jsii_call_method("createTopicPolicy", []) end |
#enforce_ssl ⇒ Boolean?
Adds a statement to enforce encryption of data in transit when publishing to the topic.
173 174 175 |
# File 'sns/topic_base.rb', line 173 def enforce_ssl() jsii_get_property("enforceSSL") end |
#enforce_ssl=(value) ⇒ Object
177 178 179 180 |
# File 'sns/topic_base.rb', line 177 def enforce_ssl=(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enforceSSL") unless value.nil? jsii_set_property("enforceSSL", value) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
83 84 85 |
# File 'sns/topic_base.rb', line 83 def env() jsii_get_property("env") end |
#fifo ⇒ Boolean
Whether this topic is an Amazon SNS FIFO queue.
If false, this is a standard topic.
129 130 131 |
# File 'sns/topic_base.rb', line 129 def fifo() jsii_get_property("fifo") end |
#generate_physical_name ⇒ String
238 239 240 |
# File 'sns/topic_base.rb', line 238 def generate_physical_name() jsii_call_method("generatePhysicalName", []) end |
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).
Normally, this token will resolve to arn_attr, but if the resource is
referenced across environments, arn_components will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arn_components.
252 253 254 255 256 257 |
# File 'sns/topic_base.rb', line 252 def get_resource_arn_attribute(arn_attr, arn_components) Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr") arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents") jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components]) end |
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).
Normally, this token will resolve to name_attr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
267 268 269 270 |
# File 'sns/topic_base.rb', line 267 def get_resource_name_attribute(name_attr) Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr") jsii_call_method("getResourceNameAttribute", [name_attr]) end |
#grant_on_key(grantee, *actions) ⇒ AWSCDK::IAM::GrantOnKeyResult
Gives permissions to a grantable entity to perform actions on the encryption key.
334 335 336 337 338 339 340 |
# File 'sns/topic_base.rb', line 334 def grant_on_key(grantee, *actions) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") actions.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]") end jsii_call_method("grantOnKey", [grantee, *actions]) end |
#grant_publish(grantee) ⇒ AWSCDK::IAM::Grant
Grant topic publishing permissions to the given identity.
The use of this method is discouraged. Please use grants.publish() instead.
[disable-awslint:no-grants]
350 351 352 353 |
# File 'sns/topic_base.rb', line 350 def grant_publish(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantPublish", [grantee]) end |
#grant_subscribe(grantee) ⇒ AWSCDK::IAM::Grant
Grant topic subscribing permissions to the given identity.
The use of this method is discouraged. Please use grants.subscribe() instead.
[disable-awslint:no-grants]
363 364 365 366 |
# File 'sns/topic_base.rb', line 363 def grant_subscribe(grantee) Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee") jsii_call_method("grantSubscribe", [grantee]) end |
#grants ⇒ AWSCDK::SNS::TopicGrants
Collection of grant methods for a Topic.
136 137 138 |
# File 'sns/topic_base.rb', line 136 def grants() jsii_get_property("grants") end |
#master_key ⇒ AWSCDK::KMS::IKey?
A KMS Key, either managed by this CDK app, or imported.
This property applies only to server-side encryption.
166 167 168 |
# File 'sns/topic_base.rb', line 166 def master_key() jsii_get_property("masterKey") end |
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this Topic.
373 374 375 376 377 378 |
# File 'sns/topic_base.rb', line 373 def metric(metric_name, props = nil) Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metric", [metric_name, props]) end |
#metric_number_of_messages_published(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages published to your Amazon SNS topics.
Sum over 5 minutes
386 387 388 389 390 |
# File 'sns/topic_base.rb', line 386 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfMessagesPublished", [props]) end |
#metric_number_of_notifications_delivered(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages successfully delivered from your Amazon SNS topics to subscribing endpoints.
Sum over 5 minutes
398 399 400 401 402 |
# File 'sns/topic_base.rb', line 398 def metric_number_of_notifications_delivered(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfNotificationsDelivered", [props]) end |
#metric_number_of_notifications_failed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that Amazon SNS failed to deliver.
Sum over 5 minutes
410 411 412 413 414 |
# File 'sns/topic_base.rb', line 410 def metric_number_of_notifications_failed(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfNotificationsFailed", [props]) end |
#metric_number_of_notifications_filtered_out(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies.
Sum over 5 minutes
422 423 424 425 426 |
# File 'sns/topic_base.rb', line 422 def metric_number_of_notifications_filtered_out(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfNotificationsFilteredOut", [props]) end |
#metric_number_of_notifications_filtered_out_invalid_attributes(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies because the messages' attributes are invalid.
Sum over 5 minutes
434 435 436 437 438 |
# File 'sns/topic_base.rb', line 434 def metric_number_of_notifications_filtered_out_invalid_attributes(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfNotificationsFilteredOutInvalidAttributes", [props]) end |
#metric_number_of_notifications_filtered_out_no_message_attributes(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The number of messages that were rejected by subscription filter policies because the messages have no attributes.
Sum over 5 minutes
446 447 448 449 450 |
# File 'sns/topic_base.rb', line 446 def (props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricNumberOfNotificationsFilteredOutNoMessageAttributes", [props]) end |
#metric_publish_size(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the size of messages published through this topic.
Average over 5 minutes
458 459 460 461 462 |
# File 'sns/topic_base.rb', line 458 def metric_publish_size(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricPublishSize", [props]) end |
#metric_sms_month_to_date_spent_usd(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The charges you have accrued since the start of the current calendar month for sending SMS messages.
Maximum over 5 minutes
470 471 472 473 474 |
# File 'sns/topic_base.rb', line 470 def metric_sms_month_to_date_spent_usd(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricSMSMonthToDateSpentUSD", [props]) end |
#metric_sms_success_rate(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The rate of successful SMS message deliveries.
Sum over 5 minutes
482 483 484 485 486 |
# File 'sns/topic_base.rb', line 482 def metric_sms_success_rate(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricSMSSuccessRate", [props]) end |
#node ⇒ Constructs::Node
The tree node.
68 69 70 |
# File 'sns/topic_base.rb', line 68 def node() jsii_get_property("node") end |
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket") undefined, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
97 98 99 |
# File 'sns/topic_base.rb', line 97 def physical_name() jsii_get_property("physicalName") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
104 105 106 |
# File 'sns/topic_base.rb', line 104 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
185 186 187 |
# File 'sns/topic_base.rb', line 185 def to_string() jsii_call_method("toString", []) end |
#topic_arn ⇒ String
The ARN of the topic.
143 144 145 |
# File 'sns/topic_base.rb', line 143 def topic_arn() jsii_get_property("topicArn") end |
#topic_name ⇒ String
The name of the topic.
150 151 152 |
# File 'sns/topic_base.rb', line 150 def topic_name() jsii_get_property("topicName") end |
#topic_ref ⇒ AWSCDK::Interfaces::AWSSNS::TopicReference
A reference to a Topic resource.
157 158 159 |
# File 'sns/topic_base.rb', line 157 def topic_ref() jsii_get_property("topicRef") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
198 199 200 201 202 203 |
# File 'sns/topic_base.rb', line 198 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |