Class: Google::Apis::PubsubV1::Topic
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::Topic
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/pubsub_v1/classes.rb,
generated/google/apis/pubsub_v1/representations.rb,
generated/google/apis/pubsub_v1/representations.rb
Overview
A topic resource.
Instance Attribute Summary collapse
-
#kms_key_name ⇒ String
The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic.
- #labels ⇒ Hash<String,String>
-
#message_storage_policy ⇒ Google::Apis::PubsubV1::MessageStoragePolicy
Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored.
-
#name ⇒ String
The name of the topic.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Topic
constructor
A new instance of Topic.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ Topic
Returns a new instance of Topic.
1273 1274 1275 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1273 def initialize(**args) update!(**args) end |
Instance Attribute Details
#kms_key_name ⇒ String
The resource name of the Cloud KMS CryptoKey to be used to protect access
to messages published on this topic.
The expected format is projects/*/locations/*/keyRings/*/cryptoKeys/*
.
Corresponds to the JSON property kmsKeyName
1248 1249 1250 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1248 def kms_key_name @kms_key_name end |
#labels ⇒ Hash<String,String>
See Creating and
managing labels.
Corresponds to the JSON property labels
1254 1255 1256 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1254 def labels @labels end |
#message_storage_policy ⇒ Google::Apis::PubsubV1::MessageStoragePolicy
Policy constraining the set of Google Cloud Platform regions where messages
published to the topic may be stored. If not present, then no constraints
are in effect.
Corresponds to the JSON property messageStoragePolicy
1261 1262 1263 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1261 def @message_storage_policy end |
#name ⇒ String
The name of the topic. It must have the format
"projects/
project/topics/
topic"
. topic
must start with a letter,
and contain only letters ([A-Za-z]
), numbers ([0-9]
), dashes (-
),
underscores (_
), periods (.
), tildes (~
), plus (+
) or percent
signs (%
). It must be between 3 and 255 characters in length, and it
must not start with "goog"
.
Corresponds to the JSON property name
1271 1272 1273 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1271 def name @name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1278 1279 1280 1281 1282 1283 |
# File 'generated/google/apis/pubsub_v1/classes.rb', line 1278 def update!(**args) @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name) @labels = args[:labels] if args.key?(:labels) @message_storage_policy = args[:message_storage_policy] if args.key?(:message_storage_policy) @name = args[:name] if args.key?(:name) end |