< Back
Remove-GcpsSubscription
Post
NAME Remove-GcpsSubscription
SYNOPSIS
SYNTAX
Remove-GcpsSubscription [-Project <string>] [[-Subscription] <string[]>] [<CommonParameters>]
DESCRIPTION
Removes one or more Gooogle Cloud PubSub subscriptions. Will raise errors if the subscriptions do not exist. The
cmdlet will delete the subscriptions in the default project if -Project is not used.
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 removed. Subscriptions must exist.
Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <string[]>
The names of the subscriptions to be removed. Subscriptions must exist.
This is an alias of the Subscription parameter.
Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
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
System.String[]
The names of the subscriptions to be removed. Subscriptions must exist.
OUTPUTS
---------- EXAMPLE 1 ----------
PS C:\\> Remove-GcpsSubscription -Subscription "my-subscription"
This command removes subscription "my-subscription" in the default project.
---------- EXAMPLE 2 ----------
PS C:\\> Remove-GcpsTopic -Subscription "subscription1", "subscription2" -Project "my-project"
This command removes 2 topics ("subscription1" and "subscription1") in the project "my-project".
---------- EXAMPLE 3 ----------
PS C:\\> Get-GcpsSubscription -Topic "my-topic" | Remove-GcpsSubscription
This command removes all subscriptions to topic "my-topic" by pipelining from Get-GcpsSubscription.
RELATED LINKS
[Deleting a Subscription] (https://cloud.google.com/pubsub/docs/subscriber#delete)
SYNOPSIS
SYNTAX
Remove-GcpsSubscription [-Project <string>] [[-Subscription] <string[]>] [<CommonParameters>]
DESCRIPTION
Removes one or more Gooogle Cloud PubSub subscriptions. Will raise errors if the subscriptions do not exist. The
cmdlet will delete the subscriptions in the default project if -Project is not used.
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 removed. Subscriptions must exist.
Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Name <string[]>
The names of the subscriptions to be removed. Subscriptions must exist.
This is an alias of the Subscription parameter.
Required? false
Position? 0
Default value
Accept pipeline input? true (ByPropertyName)
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
System.String[]
The names of the subscriptions to be removed. Subscriptions must exist.
OUTPUTS
---------- EXAMPLE 1 ----------
PS C:\\> Remove-GcpsSubscription -Subscription "my-subscription"
This command removes subscription "my-subscription" in the default project.
---------- EXAMPLE 2 ----------
PS C:\\> Remove-GcpsTopic -Subscription "subscription1", "subscription2" -Project "my-project"
This command removes 2 topics ("subscription1" and "subscription1") in the project "my-project".
---------- EXAMPLE 3 ----------
PS C:\\> Get-GcpsSubscription -Topic "my-topic" | Remove-GcpsSubscription
This command removes all subscriptions to topic "my-topic" by pipelining from Get-GcpsSubscription.
RELATED LINKS
[Deleting a Subscription] (https://cloud.google.com/pubsub/docs/subscriber#delete)