REST Resource: admin.projects.locations.topics

Resource: Topic

Metadata about a topic resource.

JSON representation
{
  "name": string,
  "partitionConfig": {
    object (PartitionConfig)
  },
  "retentionConfig": {
    object (RetentionConfig)
  }
}
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.

PartitionConfig

The settings for a topic's partitions.

JSON representation
{
  "count": string,
  "scale": integer
}
Fields
count

string (int64 format)

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

scale

integer

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].

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, terminated by 's'. Example: "3.5s".

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.