Class: Aws::SNS::PlatformApplication
- Inherits:
 - 
      Object
      
        
- Object
 - Aws::SNS::PlatformApplication
 
 
- Extended by:
 - Deprecations
 
- Defined in:
 - lib/aws-sdk-sns/platform_application.rb
 
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
- #arn ⇒ String
 - 
  
    
      #attributes  ⇒ Hash<String,String> 
    
    
  
  
  
  
  
  
  
  
  
    
Attributes include the following:.
 
Actions collapse
- #create_platform_endpoint(options = {}) ⇒ PlatformEndpoint
 - #delete(options = {}) ⇒ EmptyStructure
 - #set_attributes(options = {}) ⇒ EmptyStructure
 
Associations collapse
- #endpoints(options = {}) ⇒ PlatformEndpoint::Collection
 - #identifiers ⇒ Object deprecated private Deprecated.
 
Instance Method Summary collapse
- #client ⇒ Client
 - 
  
    
      #data  ⇒ Types::GetPlatformApplicationAttributesResponse 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the data for this PlatformApplication.
 - 
  
    
      #data_loaded?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
Returns ‘true` if this resource is loaded.
 - 
  
    
      #initialize(*args)  ⇒ PlatformApplication 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of PlatformApplication.
 - 
  
    
      #load  ⇒ self 
    
    
      (also: #reload)
    
  
  
  
  
  
  
  
  
  
    
Loads, or reloads #data for the current PlatformApplication.
 
Constructor Details
#initialize(arn, options = {}) ⇒ PlatformApplication #initialize(options = {}) ⇒ PlatformApplication
Returns a new instance of PlatformApplication.
      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>
Attributes include the following:
- 
‘AppleCertificateExpiryDate` – The expiry date of the SSL certificate used to configure certificate-based authentication.
 - 
‘ApplePlatformTeamID` – The Apple developer account ID used to configure token-based authentication.
 - 
‘ApplePlatformBundleID` – The app identifier used to configure token-based authentication.
 - 
‘AuthenticationMethod` – Returns the credential type used when sending push notifications from application to APNS/APNS_Sandbox, or application to GCM.
- 
APNS – Returns the token or certificate.
 - 
GCM – Returns the token or key.
 
 - 
 - 
‘EventEndpointCreated` – Topic ARN to which EndpointCreated event notifications should be sent.
 - 
‘EventEndpointDeleted` – Topic ARN to which EndpointDeleted event notifications should be sent.
 - 
‘EventEndpointUpdated` – Topic ARN to which EndpointUpdate event notifications should be sent.
 - 
‘EventDeliveryFailure` – Topic ARN to which DeliveryFailure event notifications should be sent upon Direct Publish delivery failure (permanent) to one of the application’s endpoints.
 
      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 = {}) ⇒ PlatformEndpoint
      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
Returns the data for this Aws::SNS::PlatformApplication. Calls Client#get_platform_application_attributes if #data_loaded? is ‘false`.
      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 = {}) ⇒ EmptyStructure
      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 = {}) ⇒ PlatformEndpoint::Collection
      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.
      280 281 282  | 
    
      # File 'lib/aws-sdk-sns/platform_application.rb', line 280 def identifiers { arn: @arn } end  | 
  
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::SNS::PlatformApplication. Returns ‘self` making it possible to chain methods.
platform_application.reload.data
  
      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 = {}) ⇒ EmptyStructure
      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  |