gcp logo
Google Cloud Classic v6.57.0, May 30 23

gcp.compute.getAddresses

Explore with Pulumi AI

List IP addresses in a project. For more information see the official API list and aggregated lsit documentation.

Using getAddresses

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getAddresses(args: GetAddressesArgs, opts?: InvokeOptions): Promise<GetAddressesResult>
function getAddressesOutput(args: GetAddressesOutputArgs, opts?: InvokeOptions): Output<GetAddressesResult>
def get_addresses(filter: Optional[str] = None,
                  project: Optional[str] = None,
                  region: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetAddressesResult
def get_addresses_output(filter: Optional[pulumi.Input[str]] = None,
                  project: Optional[pulumi.Input[str]] = None,
                  region: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetAddressesResult]
func GetAddresses(ctx *Context, args *GetAddressesArgs, opts ...InvokeOption) (*GetAddressesResult, error)
func GetAddressesOutput(ctx *Context, args *GetAddressesOutputArgs, opts ...InvokeOption) GetAddressesResultOutput

> Note: This function is named GetAddresses in the Go SDK.

public static class GetAddresses 
{
    public static Task<GetAddressesResult> InvokeAsync(GetAddressesArgs args, InvokeOptions? opts = null)
    public static Output<GetAddressesResult> Invoke(GetAddressesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAddressesResult> getAddresses(GetAddressesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:compute/getAddresses:getAddresses
  arguments:
    # arguments dictionary

The following arguments are supported:

Filter string

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

Project string

The google project in which addresses are listed. Defaults to provider's configuration if missing.

Region string

Region that should be considered to search addresses. All regions are considered if missing.

Filter string

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

Project string

The google project in which addresses are listed. Defaults to provider's configuration if missing.

Region string

Region that should be considered to search addresses. All regions are considered if missing.

filter String

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

project String

The google project in which addresses are listed. Defaults to provider's configuration if missing.

region String

Region that should be considered to search addresses. All regions are considered if missing.

filter string

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

project string

The google project in which addresses are listed. Defaults to provider's configuration if missing.

region string

Region that should be considered to search addresses. All regions are considered if missing.

filter str

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

project str

The google project in which addresses are listed. Defaults to provider's configuration if missing.

region str

Region that should be considered to search addresses. All regions are considered if missing.

filter String

A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either "=", "!=", ">", "<", "<=", ">=" or ":". For example, if you are filtering Compute Engine instances, you can exclude instances named "example-instance" by specifying "name != example-instance". The ":" operator can be used with string fields to match substrings. For non-string fields it is equivalent to the "=" operator. The ":" comparison can be used to test whether a key has been defined. For example, to find all objects with "owner" label use: """ labels.owner: """ You can also filter nested fields. For example, you could specify "scheduling.automaticRestart = false" to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: """ (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") """ By default, each expression is an "AND" expression. However, you can include "AND" and "OR" expressions explicitly. For example: """ (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true)

project String

The google project in which addresses are listed. Defaults to provider's configuration if missing.

region String

Region that should be considered to search addresses. All regions are considered if missing.

getAddresses Result

The following output properties are available:

Addresses List<GetAddressesAddress>

A list of addresses matching the filter. Structure is defined below.

Id string

The provider-assigned unique ID for this managed resource.

Project string
Filter string
Region string

The region in which the address resides.

Addresses []GetAddressesAddress

A list of addresses matching the filter. Structure is defined below.

Id string

The provider-assigned unique ID for this managed resource.

Project string
Filter string
Region string

The region in which the address resides.

addresses List<GetAddressesAddress>

A list of addresses matching the filter. Structure is defined below.

id String

The provider-assigned unique ID for this managed resource.

project String
filter String
region String

The region in which the address resides.

addresses GetAddressesAddress[]

A list of addresses matching the filter. Structure is defined below.

id string

The provider-assigned unique ID for this managed resource.

project string
filter string
region string

The region in which the address resides.

addresses Sequence[GetAddressesAddress]

A list of addresses matching the filter. Structure is defined below.

id str

The provider-assigned unique ID for this managed resource.

project str
filter str
region str

The region in which the address resides.

addresses List<Property Map>

A list of addresses matching the filter. Structure is defined below.

id String

The provider-assigned unique ID for this managed resource.

project String
filter String
region String

The region in which the address resides.

Supporting Types

GetAddressesAddress

Address string

The IP address (for example 1.2.3.4).

AddressType string

The IP address type, can be EXTERNAL or INTERNAL.

Description string

The IP address description.

Labels Dictionary<string, string>

(Beta only) A map containing IP labels.

Name string

The IP address name.

Region string

Region that should be considered to search addresses. All regions are considered if missing.

SelfLink string

The URI of the created resource.

Status string

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

Address string

The IP address (for example 1.2.3.4).

AddressType string

The IP address type, can be EXTERNAL or INTERNAL.

Description string

The IP address description.

Labels map[string]string

(Beta only) A map containing IP labels.

Name string

The IP address name.

Region string

Region that should be considered to search addresses. All regions are considered if missing.

SelfLink string

The URI of the created resource.

Status string

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

address String

The IP address (for example 1.2.3.4).

addressType String

The IP address type, can be EXTERNAL or INTERNAL.

description String

The IP address description.

labels Map<String,String>

(Beta only) A map containing IP labels.

name String

The IP address name.

region String

Region that should be considered to search addresses. All regions are considered if missing.

selfLink String

The URI of the created resource.

status String

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

address string

The IP address (for example 1.2.3.4).

addressType string

The IP address type, can be EXTERNAL or INTERNAL.

description string

The IP address description.

labels {[key: string]: string}

(Beta only) A map containing IP labels.

name string

The IP address name.

region string

Region that should be considered to search addresses. All regions are considered if missing.

selfLink string

The URI of the created resource.

status string

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

address str

The IP address (for example 1.2.3.4).

address_type str

The IP address type, can be EXTERNAL or INTERNAL.

description str

The IP address description.

labels Mapping[str, str]

(Beta only) A map containing IP labels.

name str

The IP address name.

region str

Region that should be considered to search addresses. All regions are considered if missing.

self_link str

The URI of the created resource.

status str

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

address String

The IP address (for example 1.2.3.4).

addressType String

The IP address type, can be EXTERNAL or INTERNAL.

description String

The IP address description.

labels Map<String>

(Beta only) A map containing IP labels.

name String

The IP address name.

region String

Region that should be considered to search addresses. All regions are considered if missing.

selfLink String

The URI of the created resource.

status String

Indicates if the address is used. Possible values are: RESERVED or IN_USE.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.