Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

getVpcNetwork

Get information about a Yandex VPC network. For more information, see Yandex.Cloud VPC.

import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const admin = pulumi.output(yandex.getVpcNetwork({
    networkId: "my-network-id",
}));
import pulumi
import pulumi_yandex as yandex

admin = yandex.get_vpc_network(network_id="my-network-id")
using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var admin = Output.Create(Yandex.GetVpcNetwork.InvokeAsync(new Yandex.GetVpcNetworkArgs
        {
            NetworkId = "my-network-id",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "my-network-id"
		_, err := yandex.LookupVpcNetwork(ctx, &GetVpcNetworkArgs{
			NetworkId: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

This data source is used to define [VPC Networks] that can be used by other resources.

Using getVpcNetwork

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 getVpcNetwork(args: GetVpcNetworkArgs, opts?: InvokeOptions): Promise<GetVpcNetworkResult>
function getVpcNetworkOutput(args: GetVpcNetworkOutputArgs, opts?: InvokeOptions): Output<GetVpcNetworkResult>
def get_vpc_network(folder_id: Optional[str] = None,
                    name: Optional[str] = None,
                    network_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetVpcNetworkResult
def get_vpc_network_output(folder_id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    network_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetVpcNetworkResult]
func LookupVpcNetwork(ctx *Context, args *LookupVpcNetworkArgs, opts ...InvokeOption) (*LookupVpcNetworkResult, error)
func LookupVpcNetworkOutput(ctx *Context, args *LookupVpcNetworkOutputArgs, opts ...InvokeOption) LookupVpcNetworkResultOutput

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

public static class GetVpcNetwork 
{
    public static Task<GetVpcNetworkResult> InvokeAsync(GetVpcNetworkArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcNetworkResult> Invoke(GetVpcNetworkInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcNetworkResult> getVpcNetwork(GetVpcNetworkArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: yandex:index/getVpcNetwork:getVpcNetwork
  Arguments:
    # Arguments dictionary

The following arguments are supported:

FolderId string

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

Name string

Name of the network.

NetworkId string

ID of the network.

FolderId string

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

Name string

Name of the network.

NetworkId string

ID of the network.

folderId String

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

name String

Name of the network.

networkId String

ID of the network.

folderId string

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

name string

Name of the network.

networkId string

ID of the network.

folder_id str

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

name str

Name of the network.

network_id str

ID of the network.

folderId String

Folder that the resource belongs to. If value is omitted, the default provider folder is used.

name String

Name of the network.

networkId String

ID of the network.

getVpcNetwork Result

The following output properties are available:

CreatedAt string

Creation timestamp of this network.

DefaultSecurityGroupId string

ID of default Security Group of this network.

Description string

Description of the network.

FolderId string
Id string

The provider-assigned unique ID for this managed resource.

Labels Dictionary<string, string>

Labels assigned to this network.

Name string
NetworkId string
SubnetIds List<string>
CreatedAt string

Creation timestamp of this network.

DefaultSecurityGroupId string

ID of default Security Group of this network.

Description string

Description of the network.

FolderId string
Id string

The provider-assigned unique ID for this managed resource.

Labels map[string]string

Labels assigned to this network.

Name string
NetworkId string
SubnetIds []string
createdAt String

Creation timestamp of this network.

defaultSecurityGroupId String

ID of default Security Group of this network.

description String

Description of the network.

folderId String
id String

The provider-assigned unique ID for this managed resource.

labels Map

Labels assigned to this network.

name String
networkId String
subnetIds List
createdAt string

Creation timestamp of this network.

defaultSecurityGroupId string

ID of default Security Group of this network.

description string

Description of the network.

folderId string
id string

The provider-assigned unique ID for this managed resource.

labels {[key: string]: string}

Labels assigned to this network.

name string
networkId string
subnetIds string[]
created_at str

Creation timestamp of this network.

default_security_group_id str

ID of default Security Group of this network.

description str

Description of the network.

folder_id str
id str

The provider-assigned unique ID for this managed resource.

labels Mapping[str, str]

Labels assigned to this network.

name str
network_id str
subnet_ids Sequence[str]
createdAt String

Creation timestamp of this network.

defaultSecurityGroupId String

ID of default Security Group of this network.

description String

Description of the network.

folderId String
id String

The provider-assigned unique ID for this managed resource.

labels Map

Labels assigned to this network.

name String
networkId String
subnetIds List

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.