Class: Aws::SNS::PlatformApplication
- Inherits:
-
Object
- Object
- Aws::SNS::PlatformApplication
- Extended by:
- Deprecations
- Defined in:
- sig/platform_application.rbs,
lib/aws-sdk-sns/platform_application.rb
Overview
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
Actions collapse
- #create_platform_endpoint(options = {}) ⇒ Object
- #delete(options = {}) ⇒ Object
- #set_attributes(options = {}) ⇒ Object
Associations collapse
- #endpoints(options = {}) ⇒ Object
- #identifiers ⇒ Object deprecated private Deprecated.
Instance Method Summary collapse
- #client ⇒ Client
- #data ⇒ Types::GetPlatformApplicationAttributesResponse
- #data_loaded? ⇒ Boolean
- #initialize(*args) ⇒ PlatformApplication constructor
- #load ⇒ self (also: #reload)
Constructor Details
#initialize(arn, options) ⇒ void #initialize(arn:, client:) ⇒ void #initialize(args) ⇒ void
22 23 24 25 26 27 28 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 22 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @arn = extract_arn(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() @waiter_block_warned = false end |
Instance Method Details
#arn ⇒ String
33 34 35 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 33 def arn @arn end |
#attributes ⇒ ::Hash[::String, ::String]
68 69 70 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 68 def attributes data[:attributes] end |
#client ⇒ Client
75 76 77 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 75 def client @client end |
#create_platform_endpoint(options = {}) ⇒ Object
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 138 def create_platform_endpoint( = {}) = .merge(platform_application_arn: @arn) resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.create_platform_endpoint() end PlatformEndpoint.new( arn: resp.data.endpoint_arn, client: @client ) end |
#data ⇒ Types::GetPlatformApplicationAttributesResponse
97 98 99 100 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 97 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
105 106 107 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 105 def data_loaded? !!@data end |
#delete(options = {}) ⇒ Object
154 155 156 157 158 159 160 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 154 def delete( = {}) = .merge(platform_application_arn: @arn) resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.delete_platform_application() end resp.data end |
#endpoints(options = {}) ⇒ Object
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 258 def endpoints( = {}) batches = Enumerator.new do |y| = .merge(platform_application_arn: @arn) resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.list_endpoints_by_platform_application() end resp.each_page do |page| batch = [] page.data.endpoints.each do |e| batch << PlatformEndpoint.new( arn: e.endpoint_arn, client: @client ) end y.yield(batch) end end PlatformEndpoint::Collection.new(batches) end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deprecated.
280 281 282 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 280 def identifiers { arn: @arn } end |
#load ⇒ self Also known as: reload
85 86 87 88 89 90 91 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 85 def load resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.get_platform_application_attributes(platform_application_arn: @arn) end @data = resp.data self end |
#set_attributes(options = {}) ⇒ Object
243 244 245 246 247 248 249 |
# File 'lib/aws-sdk-sns/platform_application.rb', line 243 def set_attributes( = {}) = .merge(platform_application_arn: @arn) resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do @client.set_platform_application_attributes() end resp.data end |