< Back

Set-GcpsSubscriptionConfig

Mon Jan 13, 2020 11:53 pm

NAME Set-GcpsSubscriptionConfig



SYNOPSIS

Changes the config of a subscription.





SYNTAX

Set-GcpsSubscriptionConfig [-Project <string>] [-Subscription] <string> [-PushEndpoint] <string>

[<CommonParameters>]



Set-GcpsSubscriptionConfig [-Project <string>] [-Subscription] <string> -PullConfig <SwitchParameter>

[<CommonParameters>]





DESCRIPTION

Changes the config of a subscription from push to pull and vice versa. The cmdlet can also be used to change the

endpoint of a push subscription. Will raise error if the subscription cannot be found. No errors will be raised if

a subscription with a pull config is set to pull config again or if a subscription with push config is set to the

same endpoint.





PARAMETERS

-Project <string>

The project that the config's subscription belongs to. 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 name of the subscription that the config belongs to.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <string>

The name of the subscription that the config belongs to.



This is an alias of the Subscription parameter.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-PushEndpoint <string>

A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use

"https://example.com/push".



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PullConfig <SwitchParameter>

If set, the cmdlet will change config of the subscription to a pull config.



Required? true

Position? named

Default value False

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

System.String

The name of the subscription that the config belongs to.





OUTPUTS



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



PS C:\\> Set-GcpsSubscriptionConfig -Subscription "my-subscription" -PullConfig



This command sets the config of subscription "my-subscription" in the default project to pull config.

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



PS C:\\> Get-GcpsSubscription -Topic "my-topic" | Set-GcpsSubscriptionConfig -PullConfig



This command sets the config of all subscriptions of topic "my-topic" to pull config by pipelining.

---------- EXAMPLE 3 ----------



PS C:\\> Set-GcpsSubscriptionConfig -Subscription "my-subscription" -PushEndpoint https://www.example.com -Project

"my-project"



This command sets the config of subscription "my-subscription" in the project "my-project" to a push config with

endpoint https://www.example.com.



RELATED LINKS

[Subscription] (https://cloud.google.com/pubsub/docs/su ... scriptions)

[Push Config] (https://cloud.google.com/pubsub/docs/re ... PushConfig)