1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getComputeBmsNicV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getComputeBmsNicV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for BMS NIC you can get at documentation portal

    Use this data source to get details about a BMS NIC based on the NIC ID from OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const bmsId = config.requireObject("bmsId");
    const nicId = config.requireObject("nicId");
    const queryBmsNic = opentelekomcloud.getComputeBmsNicV2({
        serverId: bmsId,
        id: nicId,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    bms_id = config.require_object("bmsId")
    nic_id = config.require_object("nicId")
    query_bms_nic = opentelekomcloud.get_compute_bms_nic_v2(server_id=bms_id,
        id=nic_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		bmsId := cfg.RequireObject("bmsId")
    		nicId := cfg.RequireObject("nicId")
    		_, err := opentelekomcloud.GetComputeBmsNicV2(ctx, &opentelekomcloud.GetComputeBmsNicV2Args{
    			ServerId: bmsId,
    			Id:       pulumi.StringRef(nicId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var bmsId = config.RequireObject<dynamic>("bmsId");
        var nicId = config.RequireObject<dynamic>("nicId");
        var queryBmsNic = Opentelekomcloud.GetComputeBmsNicV2.Invoke(new()
        {
            ServerId = bmsId,
            Id = nicId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetComputeBmsNicV2Args;
    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) {
            final var config = ctx.config();
            final var bmsId = config.get("bmsId");
            final var nicId = config.get("nicId");
            final var queryBmsNic = OpentelekomcloudFunctions.getComputeBmsNicV2(GetComputeBmsNicV2Args.builder()
                .serverId(bmsId)
                .id(nicId)
                .build());
    
        }
    }
    
    configuration:
      bmsId:
        type: dynamic
      nicId:
        type: dynamic
    variables:
      queryBmsNic:
        fn::invoke:
          function: opentelekomcloud:getComputeBmsNicV2
          arguments:
            serverId: ${bmsId}
            id: ${nicId}
    

    Using getComputeBmsNicV2

    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 getComputeBmsNicV2(args: GetComputeBmsNicV2Args, opts?: InvokeOptions): Promise<GetComputeBmsNicV2Result>
    function getComputeBmsNicV2Output(args: GetComputeBmsNicV2OutputArgs, opts?: InvokeOptions): Output<GetComputeBmsNicV2Result>
    def get_compute_bms_nic_v2(id: Optional[str] = None,
                               region: Optional[str] = None,
                               server_id: Optional[str] = None,
                               status: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetComputeBmsNicV2Result
    def get_compute_bms_nic_v2_output(id: Optional[pulumi.Input[str]] = None,
                               region: Optional[pulumi.Input[str]] = None,
                               server_id: Optional[pulumi.Input[str]] = None,
                               status: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetComputeBmsNicV2Result]
    func GetComputeBmsNicV2(ctx *Context, args *GetComputeBmsNicV2Args, opts ...InvokeOption) (*GetComputeBmsNicV2Result, error)
    func GetComputeBmsNicV2Output(ctx *Context, args *GetComputeBmsNicV2OutputArgs, opts ...InvokeOption) GetComputeBmsNicV2ResultOutput

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

    public static class GetComputeBmsNicV2 
    {
        public static Task<GetComputeBmsNicV2Result> InvokeAsync(GetComputeBmsNicV2Args args, InvokeOptions? opts = null)
        public static Output<GetComputeBmsNicV2Result> Invoke(GetComputeBmsNicV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetComputeBmsNicV2Result> getComputeBmsNicV2(GetComputeBmsNicV2Args args, InvokeOptions options)
    public static Output<GetComputeBmsNicV2Result> getComputeBmsNicV2(GetComputeBmsNicV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getComputeBmsNicV2:getComputeBmsNicV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ServerId string
    This is the unique BMS id.
    Id string
    The ID of the NIC.
    Region string
    Status string
    The NIC port status.
    ServerId string
    This is the unique BMS id.
    Id string
    The ID of the NIC.
    Region string
    Status string
    The NIC port status.
    serverId String
    This is the unique BMS id.
    id String
    The ID of the NIC.
    region String
    status String
    The NIC port status.
    serverId string
    This is the unique BMS id.
    id string
    The ID of the NIC.
    region string
    status string
    The NIC port status.
    server_id str
    This is the unique BMS id.
    id str
    The ID of the NIC.
    region str
    status str
    The NIC port status.
    serverId String
    This is the unique BMS id.
    id String
    The ID of the NIC.
    region String
    status String
    The NIC port status.

    getComputeBmsNicV2 Result

    The following output properties are available:

    FixedIps List<GetComputeBmsNicV2FixedIp>
    The NIC IP address.
    MacAddress string
    It is NIC's mac address.
    NetworkId string
    The ID of the network to which the NIC port belongs.
    Region string
    ServerId string
    Id string
    Status string
    FixedIps []GetComputeBmsNicV2FixedIp
    The NIC IP address.
    MacAddress string
    It is NIC's mac address.
    NetworkId string
    The ID of the network to which the NIC port belongs.
    Region string
    ServerId string
    Id string
    Status string
    fixedIps List<GetComputeBmsNicV2FixedIp>
    The NIC IP address.
    macAddress String
    It is NIC's mac address.
    networkId String
    The ID of the network to which the NIC port belongs.
    region String
    serverId String
    id String
    status String
    fixedIps GetComputeBmsNicV2FixedIp[]
    The NIC IP address.
    macAddress string
    It is NIC's mac address.
    networkId string
    The ID of the network to which the NIC port belongs.
    region string
    serverId string
    id string
    status string
    fixed_ips Sequence[GetComputeBmsNicV2FixedIp]
    The NIC IP address.
    mac_address str
    It is NIC's mac address.
    network_id str
    The ID of the network to which the NIC port belongs.
    region str
    server_id str
    id str
    status str
    fixedIps List<Property Map>
    The NIC IP address.
    macAddress String
    It is NIC's mac address.
    networkId String
    The ID of the network to which the NIC port belongs.
    region String
    serverId String
    id String
    status String

    Supporting Types

    GetComputeBmsNicV2FixedIp

    IpAddress string
    SubnetId string
    IpAddress string
    SubnetId string
    ipAddress String
    subnetId String
    ipAddress string
    subnetId string
    ipAddress String
    subnetId String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud