< Back
Get-GcpsSubscription
Post
NAME Get-GcpsSubscription
SYNOPSIS
Retrieves one or more Google Cloud PubSub subscriptions.
SYNTAX
Get-GcpsSubscription [-Project <string>] [[-Subscription] <string[]>] [-Topic <string>] [<CommonParameters>]
DESCRIPTION
Retrieves one or more Google Cloud PubSub subscriptions. The cmdlet will search for subscriptions in the default
project if -Project is not used. If -Topic is used, the cmdlet will only return subscriptions belonging to the
specified topic. If -Subscription is used, the cmdlet will only return subscriptions whose names match the
subscriptions' names provided.
PARAMETERS
-Project <string>
The project to check for subscriptions. 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
-Subscription <string[]>
The names of the subscriptions to be retrieved.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string[]>
The names of the subscriptions to be retrieved.
This is an alias of the Subscription parameter.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Topic <string>
The topic to check for subscriptions.
Required? false
Position? named
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:\\> Get-GcpsSubscription
This command retrieves all subscriptions in the default project.
---------- EXAMPLE 2 ----------
PS C:\\> Get-GcpsSubscription -Topic "my-topic" -Project "my-project"
This command retrieves all subscriptions that belong to topic "my-topic" in the project "my-project".
---------- EXAMPLE 3 ----------
PS C:\\> Get-GcpsSubscription -Subscription "subscription1", "subscription2"
This command retrieves subscriptions "subscription1" and "subscription2" in the default project.
---------- EXAMPLE 4 ----------
PS C:\\> Get-GcpsSubscription -Subscription "subscription1", "subscription2" -Topic "my-topic"
This command retrieves subscriptions "subscription1" and "subscription2" in the topic "my-topic".
RELATED LINKS
[Subscription] (https://cloud.google.com/pubsub/docs/su ... scriptions)
SYNOPSIS
Retrieves one or more Google Cloud PubSub subscriptions.
SYNTAX
Get-GcpsSubscription [-Project <string>] [[-Subscription] <string[]>] [-Topic <string>] [<CommonParameters>]
DESCRIPTION
Retrieves one or more Google Cloud PubSub subscriptions. The cmdlet will search for subscriptions in the default
project if -Project is not used. If -Topic is used, the cmdlet will only return subscriptions belonging to the
specified topic. If -Subscription is used, the cmdlet will only return subscriptions whose names match the
subscriptions' names provided.
PARAMETERS
-Project <string>
The project to check for subscriptions. 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
-Subscription <string[]>
The names of the subscriptions to be retrieved.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string[]>
The names of the subscriptions to be retrieved.
This is an alias of the Subscription parameter.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Topic <string>
The topic to check for subscriptions.
Required? false
Position? named
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:\\> Get-GcpsSubscription
This command retrieves all subscriptions in the default project.
---------- EXAMPLE 2 ----------
PS C:\\> Get-GcpsSubscription -Topic "my-topic" -Project "my-project"
This command retrieves all subscriptions that belong to topic "my-topic" in the project "my-project".
---------- EXAMPLE 3 ----------
PS C:\\> Get-GcpsSubscription -Subscription "subscription1", "subscription2"
This command retrieves subscriptions "subscription1" and "subscription2" in the default project.
---------- EXAMPLE 4 ----------
PS C:\\> Get-GcpsSubscription -Subscription "subscription1", "subscription2" -Topic "my-topic"
This command retrieves subscriptions "subscription1" and "subscription2" in the topic "my-topic".
RELATED LINKS
[Subscription] (https://cloud.google.com/pubsub/docs/su ... scriptions)