GetSubnetwork
Get a subnetwork within GCE from its name and region.
Using GetSubnetwork
function getSubnetwork(args: GetSubnetworkArgs, opts?: InvokeOptions): Promise<GetSubnetworkResult>function get_subnetwork(name=None, project=None, region=None, self_link=None, opts=None)func LookupSubnetwork(ctx *Context, args *LookupSubnetworkArgs, opts ...InvokeOption) (*LookupSubnetworkResult, error)Note: This function is named
LookupSubnetworkin the Go SDK.
public static class GetSubnetwork {
public static Task<GetSubnetworkResult> InvokeAsync(GetSubnetworkArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the subnetwork. One of
nameorself_linkmust be specified.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.
- Self
Link string The self link of the subnetwork. If
self_linkis specified,name,project, andregionare ignored.
- Name string
The name of the subnetwork. One of
nameorself_linkmust be specified.- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region string
The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.
- Self
Link string The self link of the subnetwork. If
self_linkis specified,name,project, andregionare ignored.
- name string
The name of the subnetwork. One of
nameorself_linkmust be specified.- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region string
The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.
- self
Link string The self link of the subnetwork. If
self_linkis specified,name,project, andregionare ignored.
- name str
The name of the subnetwork. One of
nameorself_linkmust be specified.- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region str
The region this subnetwork has been created in. If unspecified, this defaults to the region configured in the provider.
- self_
link str The self link of the subnetwork. If
self_linkis specified,name,project, andregionare ignored.
GetSubnetwork Result
The following output properties are available:
- Description string
Description of this subnetwork.
- Gateway
Address string The IP address of the gateway.
- Id string
The provider-assigned unique ID for this managed resource.
- Ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Private
Ip boolGoogle Access Whether the VMs in this subnet can access Google services without assigned external IP addresses.
- Project string
- Region string
- Secondary
Ip List<GetRanges Subnetwork Secondary Ip Range> An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.
- Self
Link string - Name string
- Description string
Description of this subnetwork.
- Gateway
Address string The IP address of the gateway.
- Id string
The provider-assigned unique ID for this managed resource.
- Ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- Network string
The network name or resource link to the parent network of this subnetwork.
- Private
Ip boolGoogle Access Whether the VMs in this subnet can access Google services without assigned external IP addresses.
- Project string
- Region string
- Secondary
Ip []GetRanges Subnetwork Secondary Ip Range An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.
- Self
Link string - Name string
- description string
Description of this subnetwork.
- gateway
Address string The IP address of the gateway.
- id string
The provider-assigned unique ID for this managed resource.
- ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- network string
The network name or resource link to the parent network of this subnetwork.
- private
Ip booleanGoogle Access Whether the VMs in this subnet can access Google services without assigned external IP addresses.
- project string
- region string
- secondary
Ip GetRanges Subnetwork Secondary Ip Range[] An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.
- self
Link string - name string
- description str
Description of this subnetwork.
- gateway_
address str The IP address of the gateway.
- id str
The provider-assigned unique ID for this managed resource.
- ip_
cidr_ strrange The range of IP addresses belonging to this subnetwork secondary range.
- network str
The network name or resource link to the parent network of this subnetwork.
- private_
ip_ boolgoogle_ access Whether the VMs in this subnet can access Google services without assigned external IP addresses.
- project str
- region str
- secondary_
ip_ List[Getranges Subnetwork Secondary Ip Range] An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. Structure is documented below.
- self_
link str - name str
Supporting Types
GetSubnetworkSecondaryIpRange
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- Range
Name string The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.
- Ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- Range
Name string The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.
- ip
Cidr stringRange The range of IP addresses belonging to this subnetwork secondary range.
- range
Name string The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.
- ip_
cidr_ strrange The range of IP addresses belonging to this subnetwork secondary range.
- range
Name str The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.