< Back

Get-GceForwardingRule

Mon Jan 13, 2020 11:10 pm

NAME Get-GceForwardingRule



SYNOPSIS

Gets Google Compute Engine forwarding rules.





SYNTAX

Get-GceForwardingRule [-Project <string>] [-Global <SwitchParameter>] [<CommonParameters>]



Get-GceForwardingRule [-Project <string>] -Global <SwitchParameter> [-Name] <string> [<CommonParameters>]



Get-GceForwardingRule [-Project <string>] -Region <string> [<CommonParameters>]



Get-GceForwardingRule [-Project <string>] [-Region <string>] [-Name] <string> [<CommonParameters>]





DESCRIPTION

Lists forwarding rules of a project, or gets a specific one.





PARAMETERS

-Project <string>

The project the forwarding rules belong to. Defaults to the project in the Cloud SDK config.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Global <SwitchParameter>

If set, will retrieve only global forwarding rules.



Required? true

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Region <string>

The region of the forwaring rule to get. Defaults to the region in the Cloud SDK config.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the forwarding rule to get.



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

Google.Apis.Compute.v1.Data.ForwardingRule





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



PS C:\\> Get-GceForwardingRule



This command lists all forwarding rules for the default project.

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



PS C:\\> Get-GceForwardingRule -Region us-central1



This command lists all forwarding rules in region "us-central1" for the default project.

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



PS C:\\> Get-GceForwardingRule "my-forwarding-rule"



This command gets the forwarding rule named "my-forwarding-rule" in the default project and region.

---------- EXAMPLE 4 ----------



PS C:\\> Get-GceForwardingRule -Project my-project -Global



This command lists all global forwarding rules for the project named "my-project".

---------- EXAMPLE 5 ----------



PS C:\\> Get-GceForwardingRule "my-forwarding-rule" -Gobal



This command gets the global forwarding rule named "my-forwarding-rule" in the default project.



RELATED LINKS

[Forwarding Rule resource definition]

(https://cloud.google.com/compute/docs/r ... s#resource)