Class: Google::Apis::PubsubV1::BigtableConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb

Overview

Configuration for a Bigtable subscription. The Pub/Sub message will be written to a Bigtable row as follows: - row key: subscription name and message ID delimited by #. - columns: message bytes written to a single column family " data" with an empty-string column qualifier. - cell timestamp: the message publish timestamp.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BigtableConfig

Returns a new instance of BigtableConfig.



449
450
451
# File 'lib/google/apis/pubsub_v1/classes.rb', line 449

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#app_profile_idString

Optional. The app profile to use for the Bigtable writes. If not specified, the "default" application profile will be used. The app profile must use single-cluster routing. Corresponds to the JSON property appProfileId

Returns:

  • (String)


415
416
417
# File 'lib/google/apis/pubsub_v1/classes.rb', line 415

def app_profile_id
  @app_profile_id
end

#service_account_emailString

Optional. The service account to use to write to Bigtable. The subscription creator or updater that specifies this field must have iam.serviceAccounts. actAs permission on the service account. If not specified, the Pub/Sub service agent, service- project_number@gcp-sa-pubsub.iam.gserviceaccount.com, is used. Corresponds to the JSON property serviceAccountEmail

Returns:

  • (String)


424
425
426
# File 'lib/google/apis/pubsub_v1/classes.rb', line 424

def 
  @service_account_email
end

#stateString

Output only. An output-only field that indicates whether or not the subscription can receive messages. Corresponds to the JSON property state

Returns:

  • (String)


430
431
432
# File 'lib/google/apis/pubsub_v1/classes.rb', line 430

def state
  @state
end

#tableString

Optional. The unique name of the table to write messages to. Values are of the form projects//instances//tables/. Corresponds to the JSON property table

Returns:

  • (String)


436
437
438
# File 'lib/google/apis/pubsub_v1/classes.rb', line 436

def table
  @table
end

#write_metadataBoolean Also known as: write_metadata?

Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table under the pubsub_metadata column family. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column. Corresponds to the JSON property writeMetadata

Returns:

  • (Boolean)


446
447
448
# File 'lib/google/apis/pubsub_v1/classes.rb', line 446

def 
  @write_metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



454
455
456
457
458
459
460
# File 'lib/google/apis/pubsub_v1/classes.rb', line 454

def update!(**args)
  @app_profile_id = args[:app_profile_id] if args.key?(:app_profile_id)
  @service_account_email = args[:service_account_email] if args.key?(:service_account_email)
  @state = args[:state] if args.key?(:state)
  @table = args[:table] if args.key?(:table)
  @write_metadata = args[:write_metadata] if args.key?(:write_metadata)
end