< Back

New-GcpsTopic

Mon Jan 13, 2020 11:30 pm

NAME New-GcpsTopic



SYNOPSIS

Creates new Google Cloud PubSub topics.





SYNTAX

New-GcpsTopic [-Project <string>] [-Topic] <string[]> [<CommonParameters>]





DESCRIPTION

Creates one or more Gooogle Cloud PubSub topics. Will raise errors if the topics already exist. The cmdlet will

create the topics in the default project if -Project is not used.





PARAMETERS

-Project <string>

The project to create the topics in. If not set via PowerShell parameter processing, will default to the Cloud

SDK's DefaultProject property.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Topic <string[]>

The names of the topics to be created. Topics must not exist.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string[]>

The names of the topics to be created. Topics must not exist.



This is an alias of the Topic parameter.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



---------- EXAMPLE 1 ----------



PS C:\\> New-GcpsTopic -Topic "my-topic"



This command creates a new topic called "my-topic" in the default project.

---------- EXAMPLE 2 ----------



PS C:\\> New-GcpsTopic -Topic "topic1", "topic2" -Project "my-project"



This command creates 2 topics ("topic1" and "topic2") in the project "my-project".



RELATED LINKS

[Creating a Topic] (https://cloud.google.com/pubsub/docs/pu ... te-a-topic)