Skip to content

Commit a036d8d

Browse files
committed
Add AWS CodeBuild examples (AWS SDK for JS v3)
1 parent 1219eed commit a036d8d

6 files changed

+10
-1
lines changed

ruby/example_code/sns/sns-ruby-example-create-subscription.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# - EMAIL_ADDRESS
1212

1313
# snippet-start:[sns.Ruby.createSubscription]
14+
1415
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1516

1617
def subscription_created?(sns_client, topic_arn, protocol, endpoint)

ruby/example_code/sns/sns-ruby-example-create-topic.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# - TOPIC_NAME
1111

1212
# snippet-start:[sns.Ruby.createTopic]
13+
1314
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1415

1516
def topic_created?(sns_client, topic_name)

ruby/example_code/sns/sns-ruby-example-enable-resource.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# - POLICY_NAME
1313

1414
# snippet-start:[sns.Ruby.enableResource]
15+
1516
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1617

1718
policy = '{
@@ -42,4 +43,5 @@
4243
attribute_name: "POLICY_NAME",
4344
attribute_value: policy
4445
})
46+
4547
# snippet-end:[sns.Ruby.enableResource]

ruby/example_code/sns/sns-ruby-example-send-message.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# - MESSAGE
1212

1313
# snippet-start:[sns.Ruby.sendMessage]
14+
1415
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1516

1617
def message_sent?(sns_client, topic_arn, message)
@@ -39,4 +40,5 @@ def run_me
3940
end
4041

4142
run_me if $PROGRAM_NAME == __FILE__
42-
# snippet-start:[sns.Ruby.sendMessage]
43+
44+
# snippet-end:[sns.Ruby.sendMessage]

ruby/example_code/sns/sns-ruby-example-show-subscriptions.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# - SNS_TOPIC
1111

1212
# snippet-start:[sns.Ruby.showSubscription]
13+
1314
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1415

1516
def show_subscriptions?(sns_client, topic_arn)
@@ -39,4 +40,5 @@ def run_me
3940
end
4041

4142
run_me if $PROGRAM_NAME == __FILE__
43+
4244
# snippet-end:[sns.Ruby.showSubscription]

ruby/example_code/sns/sns-ruby-example-show-topics.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# - REGION
1010

1111
# snippet-start:[sns.Ruby.showTopics]
12+
1213
require 'aws-sdk-sns' # v2: require 'aws-sdk'
1314

1415
def list_topics?(sns_client)

0 commit comments

Comments
 (0)