Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi
google-native.pubsub/v1.getTopic
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi
Gets the configuration of a topic.
Using getTopic
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTopic(args: GetTopicArgs, opts?: InvokeOptions): Promise<GetTopicResult>
function getTopicOutput(args: GetTopicOutputArgs, opts?: InvokeOptions): Output<GetTopicResult>
def get_topic(project: Optional[str] = None,
topic_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTopicResult
def get_topic_output(project: Optional[pulumi.Input[str]] = None,
topic_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTopicResult]
func LookupTopic(ctx *Context, args *LookupTopicArgs, opts ...InvokeOption) (*LookupTopicResult, error)
func LookupTopicOutput(ctx *Context, args *LookupTopicOutputArgs, opts ...InvokeOption) LookupTopicResultOutput
> Note: This function is named LookupTopic
in the Go SDK.
public static class GetTopic
{
public static Task<GetTopicResult> InvokeAsync(GetTopicArgs args, InvokeOptions? opts = null)
public static Output<GetTopicResult> Invoke(GetTopicInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTopicResult> getTopic(GetTopicArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:pubsub/v1:getTopic
arguments:
# arguments dictionary
The following arguments are supported:
getTopic Result
The following output properties are available:
- Kms
Key stringName - Optional. 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/*
. - Labels Dictionary<string, string>
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- Message
Retention stringDuration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - Message
Storage Pulumi.Policy Google Native. Pubsub. V1. Outputs. Message Storage Policy Response - Optional. 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.
- 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"
. - Satisfies
Pzs bool - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- Schema
Settings Pulumi.Google Native. Pubsub. V1. Outputs. Schema Settings Response - Optional. Settings for validating messages published against a schema.
- Kms
Key stringName - Optional. 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/*
. - Labels map[string]string
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- Message
Retention stringDuration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - Message
Storage MessagePolicy Storage Policy Response - Optional. 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.
- 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"
. - Satisfies
Pzs bool - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- Schema
Settings SchemaSettings Response - Optional. Settings for validating messages published against a schema.
- kms
Key StringName - Optional. 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/*
. - labels Map<String,String>
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- message
Retention StringDuration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - message
Storage MessagePolicy Storage Policy Response - Optional. 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.
- 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"
. - satisfies
Pzs Boolean - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- schema
Settings SchemaSettings Response - Optional. Settings for validating messages published against a schema.
- kms
Key stringName - Optional. 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/*
. - labels {[key: string]: string}
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- message
Retention stringDuration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - message
Storage MessagePolicy Storage Policy Response - Optional. 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.
- 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"
. - satisfies
Pzs boolean - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- schema
Settings SchemaSettings Response - Optional. Settings for validating messages published against a schema.
- kms_
key_ strname - Optional. 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/*
. - labels Mapping[str, str]
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- message_
retention_ strduration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - message_
storage_ Messagepolicy Storage Policy Response - Optional. 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.
- name str
- 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"
. - satisfies_
pzs bool - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- schema_
settings SchemaSettings Response - Optional. Settings for validating messages published against a schema.
- kms
Key StringName - Optional. 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/*
. - labels Map<String>
- Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).
- message
Retention StringDuration - Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last
message_retention_duration
are always available to subscribers. For instance, it allows any attached subscription to seek to a timestamp that is up tomessage_retention_duration
in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes. - message
Storage Property MapPolicy - Optional. 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.
- 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"
. - satisfies
Pzs Boolean - Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.
- schema
Settings Property Map - Optional. Settings for validating messages published against a schema.
Supporting Types
MessageStoragePolicyResponse
- Allowed
Persistence List<string>Regions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- Enforce
In boolTransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
- Allowed
Persistence []stringRegions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- Enforce
In boolTransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
- allowed
Persistence List<String>Regions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforce
In BooleanTransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
- allowed
Persistence string[]Regions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforce
In booleanTransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
- allowed_
persistence_ Sequence[str]regions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforce_
in_ booltransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
- allowed
Persistence List<String>Regions - Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.
- enforce
In BooleanTransit - Optional. If true,
allowed_persistence_regions
is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not inallowed_persistence_regions
.
SchemaSettingsResponse
- Encoding string
- Optional. The encoding of messages validated against
schema
. - First
Revision stringId - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- Last
Revision stringId - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- Schema string
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
- Encoding string
- Optional. The encoding of messages validated against
schema
. - First
Revision stringId - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- Last
Revision stringId - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- Schema string
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
- encoding String
- Optional. The encoding of messages validated against
schema
. - first
Revision StringId - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- last
Revision StringId - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- schema String
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
- encoding string
- Optional. The encoding of messages validated against
schema
. - first
Revision stringId - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- last
Revision stringId - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- schema string
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
- encoding str
- Optional. The encoding of messages validated against
schema
. - first_
revision_ strid - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- last_
revision_ strid - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- schema str
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
- encoding String
- Optional. The encoding of messages validated against
schema
. - first
Revision StringId - Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.
- last
Revision StringId - Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.
- schema String
- The name of the schema that messages published should be validated against. Format is
projects/{project}/schemas/{schema}
. The value of this field will be_deleted-schema_
if the schema has been deleted.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi