volcengine.vpc.NetworkInterfaceAttach
Explore with Pulumi AI
Provides a resource to manage network interface attach
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Vpc.NetworkInterfaceAttach("foo", new()
{
InstanceId = "i-72q20hi6s082wcafdem8",
NetworkInterfaceId = "eni-274ecj646ylts7fap8t6xbba1",
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewNetworkInterfaceAttach(ctx, "foo", &vpc.NetworkInterfaceAttachArgs{
InstanceId: pulumi.String("i-72q20hi6s082wcafdem8"),
NetworkInterfaceId: pulumi.String("eni-274ecj646ylts7fap8t6xbba1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.vpc.NetworkInterfaceAttach;
import com.pulumi.volcengine.vpc.NetworkInterfaceAttachArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foo = new NetworkInterfaceAttach("foo", NetworkInterfaceAttachArgs.builder()
.instanceId("i-72q20hi6s082wcafdem8")
.networkInterfaceId("eni-274ecj646ylts7fap8t6xbba1")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.vpc.NetworkInterfaceAttach("foo",
instance_id="i-72q20hi6s082wcafdem8",
network_interface_id="eni-274ecj646ylts7fap8t6xbba1")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.vpc.NetworkInterfaceAttach("foo", {
instanceId: "i-72q20hi6s082wcafdem8",
networkInterfaceId: "eni-274ecj646ylts7fap8t6xbba1",
});
resources:
foo:
type: volcengine:vpc:NetworkInterfaceAttach
properties:
instanceId: i-72q20hi6s082wcafdem8
networkInterfaceId: eni-274ecj646ylts7fap8t6xbba1
Create NetworkInterfaceAttach Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkInterfaceAttach(name: string, args: NetworkInterfaceAttachArgs, opts?: CustomResourceOptions);
@overload
def NetworkInterfaceAttach(resource_name: str,
args: NetworkInterfaceAttachArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkInterfaceAttach(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
network_interface_id: Optional[str] = None)
func NewNetworkInterfaceAttach(ctx *Context, name string, args NetworkInterfaceAttachArgs, opts ...ResourceOption) (*NetworkInterfaceAttach, error)
public NetworkInterfaceAttach(string name, NetworkInterfaceAttachArgs args, CustomResourceOptions? opts = null)
public NetworkInterfaceAttach(String name, NetworkInterfaceAttachArgs args)
public NetworkInterfaceAttach(String name, NetworkInterfaceAttachArgs args, CustomResourceOptions options)
type: volcengine:vpc:NetworkInterfaceAttach
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 NetworkInterfaceAttachArgs
- 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 NetworkInterfaceAttachArgs
- 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 NetworkInterfaceAttachArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkInterfaceAttachArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkInterfaceAttachArgs
- 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 networkInterfaceAttachResource = new Volcengine.Vpc.NetworkInterfaceAttach("networkInterfaceAttachResource", new()
{
InstanceId = "string",
NetworkInterfaceId = "string",
});
example, err := vpc.NewNetworkInterfaceAttach(ctx, "networkInterfaceAttachResource", &vpc.NetworkInterfaceAttachArgs{
InstanceId: pulumi.String("string"),
NetworkInterfaceId: pulumi.String("string"),
})
var networkInterfaceAttachResource = new NetworkInterfaceAttach("networkInterfaceAttachResource", NetworkInterfaceAttachArgs.builder()
.instanceId("string")
.networkInterfaceId("string")
.build());
network_interface_attach_resource = volcengine.vpc.NetworkInterfaceAttach("networkInterfaceAttachResource",
instance_id="string",
network_interface_id="string")
const networkInterfaceAttachResource = new volcengine.vpc.NetworkInterfaceAttach("networkInterfaceAttachResource", {
instanceId: "string",
networkInterfaceId: "string",
});
type: volcengine:vpc:NetworkInterfaceAttach
properties:
instanceId: string
networkInterfaceId: string
NetworkInterfaceAttach 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 NetworkInterfaceAttach resource accepts the following input properties:
- Instance
Id string - The id of the instance to which the ENI is bound.
- Network
Interface stringId - The id of the ENI.
- Instance
Id string - The id of the instance to which the ENI is bound.
- Network
Interface stringId - The id of the ENI.
- instance
Id String - The id of the instance to which the ENI is bound.
- network
Interface StringId - The id of the ENI.
- instance
Id string - The id of the instance to which the ENI is bound.
- network
Interface stringId - The id of the ENI.
- instance_
id str - The id of the instance to which the ENI is bound.
- network_
interface_ strid - The id of the ENI.
- instance
Id String - The id of the instance to which the ENI is bound.
- network
Interface StringId - The id of the ENI.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkInterfaceAttach resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NetworkInterfaceAttach Resource
Get an existing NetworkInterfaceAttach 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?: NetworkInterfaceAttachState, opts?: CustomResourceOptions): NetworkInterfaceAttach
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
network_interface_id: Optional[str] = None) -> NetworkInterfaceAttach
func GetNetworkInterfaceAttach(ctx *Context, name string, id IDInput, state *NetworkInterfaceAttachState, opts ...ResourceOption) (*NetworkInterfaceAttach, error)
public static NetworkInterfaceAttach Get(string name, Input<string> id, NetworkInterfaceAttachState? state, CustomResourceOptions? opts = null)
public static NetworkInterfaceAttach get(String name, Output<String> id, NetworkInterfaceAttachState 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.
- Instance
Id string - The id of the instance to which the ENI is bound.
- Network
Interface stringId - The id of the ENI.
- Instance
Id string - The id of the instance to which the ENI is bound.
- Network
Interface stringId - The id of the ENI.
- instance
Id String - The id of the instance to which the ENI is bound.
- network
Interface StringId - The id of the ENI.
- instance
Id string - The id of the instance to which the ENI is bound.
- network
Interface stringId - The id of the ENI.
- instance_
id str - The id of the instance to which the ENI is bound.
- network_
interface_ strid - The id of the ENI.
- instance
Id String - The id of the instance to which the ENI is bound.
- network
Interface StringId - The id of the ENI.
Import
Network interface attach can be imported using the network_interface_id:instance_id.
$ pulumi import volcengine:vpc/networkInterfaceAttach:NetworkInterfaceAttach default eni-bp1fg655nh68xyz9***:i-wijfn35c****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.