Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse
scaleway.getInstancePrivateNic
Explore with Pulumi AI
Gets information about an instance private NIC.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const byNicId = scaleway.getInstancePrivateNic({
privateNicId: "11111111-1111-1111-1111-111111111111",
serverId: "11111111-1111-1111-1111-111111111111",
});
const byPnId = scaleway.getInstancePrivateNic({
privateNetworkId: "11111111-1111-1111-1111-111111111111",
serverId: "11111111-1111-1111-1111-111111111111",
});
const byTags = scaleway.getInstancePrivateNic({
serverId: "11111111-1111-1111-1111-111111111111",
tags: ["mytag"],
});
import pulumi
import pulumi_scaleway as scaleway
by_nic_id = scaleway.get_instance_private_nic(private_nic_id="11111111-1111-1111-1111-111111111111",
server_id="11111111-1111-1111-1111-111111111111")
by_pn_id = scaleway.get_instance_private_nic(private_network_id="11111111-1111-1111-1111-111111111111",
server_id="11111111-1111-1111-1111-111111111111")
by_tags = scaleway.get_instance_private_nic(server_id="11111111-1111-1111-1111-111111111111",
tags=["mytag"])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupInstancePrivateNic(ctx, &scaleway.LookupInstancePrivateNicArgs{
PrivateNicId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
ServerId: "11111111-1111-1111-1111-111111111111",
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupInstancePrivateNic(ctx, &scaleway.LookupInstancePrivateNicArgs{
PrivateNetworkId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
ServerId: "11111111-1111-1111-1111-111111111111",
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupInstancePrivateNic(ctx, &scaleway.LookupInstancePrivateNicArgs{
ServerId: "11111111-1111-1111-1111-111111111111",
Tags: []string{
"mytag",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var byNicId = Scaleway.GetInstancePrivateNic.Invoke(new()
{
PrivateNicId = "11111111-1111-1111-1111-111111111111",
ServerId = "11111111-1111-1111-1111-111111111111",
});
var byPnId = Scaleway.GetInstancePrivateNic.Invoke(new()
{
PrivateNetworkId = "11111111-1111-1111-1111-111111111111",
ServerId = "11111111-1111-1111-1111-111111111111",
});
var byTags = Scaleway.GetInstancePrivateNic.Invoke(new()
{
ServerId = "11111111-1111-1111-1111-111111111111",
Tags = new[]
{
"mytag",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetInstancePrivateNicArgs;
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 byNicId = ScalewayFunctions.getInstancePrivateNic(GetInstancePrivateNicArgs.builder()
.privateNicId("11111111-1111-1111-1111-111111111111")
.serverId("11111111-1111-1111-1111-111111111111")
.build());
final var byPnId = ScalewayFunctions.getInstancePrivateNic(GetInstancePrivateNicArgs.builder()
.privateNetworkId("11111111-1111-1111-1111-111111111111")
.serverId("11111111-1111-1111-1111-111111111111")
.build());
final var byTags = ScalewayFunctions.getInstancePrivateNic(GetInstancePrivateNicArgs.builder()
.serverId("11111111-1111-1111-1111-111111111111")
.tags("mytag")
.build());
}
}
variables:
byNicId:
fn::invoke:
Function: scaleway:getInstancePrivateNic
Arguments:
privateNicId: 11111111-1111-1111-1111-111111111111
serverId: 11111111-1111-1111-1111-111111111111
byPnId:
fn::invoke:
Function: scaleway:getInstancePrivateNic
Arguments:
privateNetworkId: 11111111-1111-1111-1111-111111111111
serverId: 11111111-1111-1111-1111-111111111111
byTags:
fn::invoke:
Function: scaleway:getInstancePrivateNic
Arguments:
serverId: 11111111-1111-1111-1111-111111111111
tags:
- mytag
Using getInstancePrivateNic
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 getInstancePrivateNic(args: GetInstancePrivateNicArgs, opts?: InvokeOptions): Promise<GetInstancePrivateNicResult>
function getInstancePrivateNicOutput(args: GetInstancePrivateNicOutputArgs, opts?: InvokeOptions): Output<GetInstancePrivateNicResult>
def get_instance_private_nic(private_network_id: Optional[str] = None,
private_nic_id: Optional[str] = None,
server_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancePrivateNicResult
def get_instance_private_nic_output(private_network_id: Optional[pulumi.Input[str]] = None,
private_nic_id: Optional[pulumi.Input[str]] = None,
server_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancePrivateNicResult]
func LookupInstancePrivateNic(ctx *Context, args *LookupInstancePrivateNicArgs, opts ...InvokeOption) (*LookupInstancePrivateNicResult, error)
func LookupInstancePrivateNicOutput(ctx *Context, args *LookupInstancePrivateNicOutputArgs, opts ...InvokeOption) LookupInstancePrivateNicResultOutput
> Note: This function is named LookupInstancePrivateNic
in the Go SDK.
public static class GetInstancePrivateNic
{
public static Task<GetInstancePrivateNicResult> InvokeAsync(GetInstancePrivateNicArgs args, InvokeOptions? opts = null)
public static Output<GetInstancePrivateNicResult> Invoke(GetInstancePrivateNicInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancePrivateNicResult> getInstancePrivateNic(GetInstancePrivateNicArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getInstancePrivateNic:getInstancePrivateNic
arguments:
# arguments dictionary
The following arguments are supported:
- Server
Id string - The server's id
- Private
Network stringId - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - Private
Nic stringId - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - List<string>
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- Zone string
zone
) The zone in which the private nic exists.
- Server
Id string - The server's id
- Private
Network stringId - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - Private
Nic stringId - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - []string
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- Zone string
zone
) The zone in which the private nic exists.
- server
Id String - The server's id
- private
Network StringId - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - private
Nic StringId - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - List<String>
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- zone String
zone
) The zone in which the private nic exists.
- server
Id string - The server's id
- private
Network stringId - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - private
Nic stringId - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - string[]
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- zone string
zone
) The zone in which the private nic exists.
- server_
id str - The server's id
- private_
network_ strid - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - private_
nic_ strid - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - Sequence[str]
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- zone str
zone
) The zone in which the private nic exists.
- server
Id String - The server's id
- private
Network StringId - The ID of the private network
Only one of
private_nic_id
andprivate_network_id
should be specified. - private
Nic StringId - The ID of the instance server private nic
Only one of
private_nic_id
andprivate_network_id
should be specified. - List<String>
- The tags associated with the private NIC. As datasource only returns one private NIC, the search with given tags must return only one result
- zone String
zone
) The zone in which the private nic exists.
getInstancePrivateNic Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Ids List<string> - Mac
Address string - Server
Id string - Private
Network stringId - Private
Nic stringId - List<string>
- Zone string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Ids []string - Mac
Address string - Server
Id string - Private
Network stringId - Private
Nic stringId - []string
- Zone string
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Ids List<String> - mac
Address String - server
Id String - private
Network StringId - private
Nic StringId - List<String>
- zone String
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Ids string[] - mac
Address string - server
Id string - private
Network stringId - private
Nic stringId - string[]
- zone string
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
ids Sequence[str] - mac_
address str - server_
id str - private_
network_ strid - private_
nic_ strid - Sequence[str]
- zone str
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Ids List<String> - mac
Address String - server
Id String - private
Network StringId - private
Nic StringId - List<String>
- zone String
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.