Amazon SNS 주제 생성 - AWS 루비용 SDK

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

Amazon SNS 주제 생성

다음 예제에서는 us-west-2 리전에서 주제 MyGroovyTopic을 생성하고 결과로 얻은 주제 ARN을 표시합니다.

# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS # OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. require 'aws-sdk-sns' # v2: require 'aws-sdk' sns = Aws::SNS::Resource.new(region: 'us-west-2') topic = sns.create_topic(name: 'MyGroovyTopic') puts topic.arn