yandex.VpcNetwork
Explore with Pulumi AI
Manages a network within the Yandex.Cloud. For more information, see the official documentation.
- How-to Guides
Example Usage
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var @default = new Yandex.VpcNetwork("default", new Yandex.VpcNetworkArgs
{
});
}
}
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 {
_, err := yandex.NewVpcNetwork(ctx, "default", nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
default = yandex.VpcNetwork("default")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const defaultVpcNetwork = new yandex.VpcNetwork("default", {});
Coming soon!
Create VpcNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcNetwork(name: string, args?: VpcNetworkArgs, opts?: CustomResourceOptions);
@overload
def VpcNetwork(resource_name: str,
args: Optional[VpcNetworkArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VpcNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)
func NewVpcNetwork(ctx *Context, name string, args *VpcNetworkArgs, opts ...ResourceOption) (*VpcNetwork, error)
public VpcNetwork(string name, VpcNetworkArgs? args = null, CustomResourceOptions? opts = null)
public VpcNetwork(String name, VpcNetworkArgs args)
public VpcNetwork(String name, VpcNetworkArgs args, CustomResourceOptions options)
type: yandex:VpcNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpcNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpcNetworkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpcNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcNetworkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpcNetworkResource = new Yandex.VpcNetwork("vpcNetworkResource", new()
{
Description = "string",
FolderId = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
});
example, err := yandex.NewVpcNetwork(ctx, "vpcNetworkResource", &yandex.VpcNetworkArgs{
Description: pulumi.String("string"),
FolderId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var vpcNetworkResource = new VpcNetwork("vpcNetworkResource", VpcNetworkArgs.builder()
.description("string")
.folderId("string")
.labels(Map.of("string", "string"))
.name("string")
.build());
vpc_network_resource = yandex.VpcNetwork("vpcNetworkResource",
description="string",
folder_id="string",
labels={
"string": "string",
},
name="string")
const vpcNetworkResource = new yandex.VpcNetwork("vpcNetworkResource", {
description: "string",
folderId: "string",
labels: {
string: "string",
},
name: "string",
});
type: yandex:VpcNetwork
properties:
description: string
folderId: string
labels:
string: string
name: string
VpcNetwork Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpcNetwork resource accepts the following input properties:
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- Labels to apply to this network. A list of key/value pairs.
- Name string
- Name of the network. Provided by the client when the network is created.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels map[string]string
- Labels to apply to this network. A list of key/value pairs.
- Name string
- Name of the network. Provided by the client when the network is created.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id String - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- Labels to apply to this network. A list of key/value pairs.
- name String
- Name of the network. Provided by the client when the network is created.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- Labels to apply to this network. A list of key/value pairs.
- name string
- Name of the network. Provided by the client when the network is created.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- folder_
id str - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- Labels to apply to this network. A list of key/value pairs.
- name str
- Name of the network. Provided by the client when the network is created.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id String - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String>
- Labels to apply to this network. A list of key/value pairs.
- name String
- Name of the network. Provided by the client when the network is created.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcNetwork resource produces the following output properties:
- Created
At string - Creation timestamp of the key.
- Default
Security stringGroup Id - ID of default Security Group of this network.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnet
Ids List<string>
- Created
At string - Creation timestamp of the key.
- Default
Security stringGroup Id - ID of default Security Group of this network.
- Id string
- The provider-assigned unique ID for this managed resource.
- Subnet
Ids []string
- created
At String - Creation timestamp of the key.
- default
Security StringGroup Id - ID of default Security Group of this network.
- id String
- The provider-assigned unique ID for this managed resource.
- subnet
Ids List<String>
- created
At string - Creation timestamp of the key.
- default
Security stringGroup Id - ID of default Security Group of this network.
- id string
- The provider-assigned unique ID for this managed resource.
- subnet
Ids string[]
- created_
at str - Creation timestamp of the key.
- default_
security_ strgroup_ id - ID of default Security Group of this network.
- id str
- The provider-assigned unique ID for this managed resource.
- subnet_
ids Sequence[str]
- created
At String - Creation timestamp of the key.
- default
Security StringGroup Id - ID of default Security Group of this network.
- id String
- The provider-assigned unique ID for this managed resource.
- subnet
Ids List<String>
Look up Existing VpcNetwork Resource
Get an existing VpcNetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpcNetworkState, opts?: CustomResourceOptions): VpcNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
default_security_group_id: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
subnet_ids: Optional[Sequence[str]] = None) -> VpcNetwork
func GetVpcNetwork(ctx *Context, name string, id IDInput, state *VpcNetworkState, opts ...ResourceOption) (*VpcNetwork, error)
public static VpcNetwork Get(string name, Input<string> id, VpcNetworkState? state, CustomResourceOptions? opts = null)
public static VpcNetwork get(String name, Output<String> id, VpcNetworkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - Creation timestamp of the key.
- Default
Security stringGroup Id - ID of default Security Group of this network.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels Dictionary<string, string>
- Labels to apply to this network. A list of key/value pairs.
- Name string
- Name of the network. Provided by the client when the network is created.
- Subnet
Ids List<string>
- Created
At string - Creation timestamp of the key.
- Default
Security stringGroup Id - ID of default Security Group of this network.
- Description string
- An optional description of this resource. Provide this property when you create the resource.
- Folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- Labels map[string]string
- Labels to apply to this network. A list of key/value pairs.
- Name string
- Name of the network. Provided by the client when the network is created.
- Subnet
Ids []string
- created
At String - Creation timestamp of the key.
- default
Security StringGroup Id - ID of default Security Group of this network.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id String - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String,String>
- Labels to apply to this network. A list of key/value pairs.
- name String
- Name of the network. Provided by the client when the network is created.
- subnet
Ids List<String>
- created
At string - Creation timestamp of the key.
- default
Security stringGroup Id - ID of default Security Group of this network.
- description string
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id string - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels {[key: string]: string}
- Labels to apply to this network. A list of key/value pairs.
- name string
- Name of the network. Provided by the client when the network is created.
- subnet
Ids string[]
- created_
at str - Creation timestamp of the key.
- default_
security_ strgroup_ id - ID of default Security Group of this network.
- description str
- An optional description of this resource. Provide this property when you create the resource.
- folder_
id str - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Mapping[str, str]
- Labels to apply to this network. A list of key/value pairs.
- name str
- Name of the network. Provided by the client when the network is created.
- subnet_
ids Sequence[str]
- created
At String - Creation timestamp of the key.
- default
Security StringGroup Id - ID of default Security Group of this network.
- description String
- An optional description of this resource. Provide this property when you create the resource.
- folder
Id String - ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
- labels Map<String>
- Labels to apply to this network. A list of key/value pairs.
- name String
- Name of the network. Provided by the client when the network is created.
- subnet
Ids List<String>
Import
A network can be imported using the id
of the resource, e.g.
$ pulumi import yandex:index/vpcNetwork:VpcNetwork default network_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.