1. Packages
  2. Google Cloud Native
  3. API Docs
  4. pubsub
  5. pubsub/v1beta2
  6. Topic

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/v1beta2.Topic

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

Creates the given topic with the given name.

Create Topic Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Topic(name: string, args: TopicArgs, opts?: CustomResourceOptions);
@overload
def Topic(resource_name: str,
          args: TopicArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Topic(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          topic_id: Optional[str] = None,
          name: Optional[str] = None,
          project: Optional[str] = None)
func NewTopic(ctx *Context, name string, args TopicArgs, opts ...ResourceOption) (*Topic, error)
public Topic(string name, TopicArgs args, CustomResourceOptions? opts = null)
public Topic(String name, TopicArgs args)
public Topic(String name, TopicArgs args, CustomResourceOptions options)
type: google-native:pubsub/v1beta2:Topic
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TopicArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TopicArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TopicArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TopicArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var exampletopicResourceResourceFromPubsubv1beta2 = new GoogleNative.Pubsub.V1Beta2.Topic("exampletopicResourceResourceFromPubsubv1beta2", new()
{
    TopicId = "string",
    Name = "string",
    Project = "string",
});
Copy
example, err := pubsubv1beta2.NewTopic(ctx, "exampletopicResourceResourceFromPubsubv1beta2", &pubsubv1beta2.TopicArgs{
	TopicId: pulumi.String("string"),
	Name:    pulumi.String("string"),
	Project: pulumi.String("string"),
})
Copy
var exampletopicResourceResourceFromPubsubv1beta2 = new Topic("exampletopicResourceResourceFromPubsubv1beta2", TopicArgs.builder()
    .topicId("string")
    .name("string")
    .project("string")
    .build());
Copy
exampletopic_resource_resource_from_pubsubv1beta2 = google_native.pubsub.v1beta2.Topic("exampletopicResourceResourceFromPubsubv1beta2",
    topic_id="string",
    name="string",
    project="string")
Copy
const exampletopicResourceResourceFromPubsubv1beta2 = new google_native.pubsub.v1beta2.Topic("exampletopicResourceResourceFromPubsubv1beta2", {
    topicId: "string",
    name: "string",
    project: "string",
});
Copy
type: google-native:pubsub/v1beta2:Topic
properties:
    name: string
    project: string
    topicId: string
Copy

Topic Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Topic resource accepts the following input properties:

TopicId
This property is required.
Changes to this property will trigger replacement.
string
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".
Project Changes to this property will trigger replacement. string
TopicId
This property is required.
Changes to this property will trigger replacement.
string
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".
Project Changes to this property will trigger replacement. string
topicId
This property is required.
Changes to this property will trigger replacement.
String
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".
project Changes to this property will trigger replacement. String
topicId
This property is required.
Changes to this property will trigger replacement.
string
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".
project Changes to this property will trigger replacement. string
topic_id
This property is required.
Changes to this property will trigger replacement.
str
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".
project Changes to this property will trigger replacement. str
topicId
This property is required.
Changes to this property will trigger replacement.
String
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".
project Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the Topic resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

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