REST Resource: admin.projects.locations.topics

Resource: Topic

Metadata about a topic resource.

JSON representation
{
  "name": string,
  "partitionConfig": {
    object (PartitionConfig)
  },
  "retentionConfig": {
    object (RetentionConfig)
  },
  "reservationConfig": {
    object (ReservationConfig)
  }
}
Fields
name

string

The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topicId}

partitionConfig

object (PartitionConfig)

The settings for this topic's partitions.

retentionConfig

object (RetentionConfig)

The settings for this topic's message retention.

reservationConfig

object (ReservationConfig)

The settings for this topic's Reservation usage.

PartitionConfig

The settings for a topic's partitions.

JSON representation
{
  "count": string,

  // Union field dimension can be only one of the following:
  "scale": integer,
  "capacity": {
    object (Capacity)
  }
  // End of list of possible types for union field dimension.
}
Fields
count

string (int64 format)

The number of partitions in the topic. Must be at least 1.

Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity

Union field dimension. The throughput dimension of this topic. dimension can be only one of the following:
scale
(deprecated)

integer

DEPRECATED: Use capacity instead which can express a superset of configurations.

Every partition in the topic is allocated throughput equivalent to scale times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with scale of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].

capacity

object (Capacity)

The capacity configuration.

Capacity

The throughput capacity configuration for each partition.

JSON representation
{
  "publishMibPerSec": integer,
  "subscribeMibPerSec": integer
}
Fields
publishMibPerSec

integer

Publish throughput capacity per partition in MiB/s. Must be >= 4 and <= 16.

subscribeMibPerSec

integer

Subscribe throughput capacity per partition in MiB/s. Must be >= 4 and <= 32.

RetentionConfig

The settings for a topic's message retention.

JSON representation
{
  "perPartitionBytes": string,
  "period": string
}
Fields
perPartitionBytes

string (int64 format)

The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of period.

period

string (Duration format)

How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below perPartitionBytes.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

ReservationConfig

The settings for this topic's Reservation usage.

JSON representation
{
  "throughputReservation": string
}
Fields
throughputReservation

string

The Reservation to use for this topic's throughput capacity. Structured like: projects/{project_number}/locations/{location}/reservations/{reservationId}

Methods

create

Creates a new topic.

delete

Deletes the specified topic.

get

Returns the topic configuration.

getPartitions

Returns the partition information for the requested topic.

list

Returns the list of topics for the given project.

patch

Updates properties of the specified topic.