Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Core.getNetworkSecurityGroupVnics
Explore with Pulumi AI
This data source provides the list of Network Security Group Vnics in Oracle Cloud Infrastructure Core service.
Lists the VNICs in the specified network security group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testNetworkSecurityGroupVnics = oci.Core.getNetworkSecurityGroupVnics({
networkSecurityGroupId: testNetworkSecurityGroup.id,
});
import pulumi
import pulumi_oci as oci
test_network_security_group_vnics = oci.Core.get_network_security_group_vnics(network_security_group_id=test_network_security_group["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Core.GetNetworkSecurityGroupVnics(ctx, &core.GetNetworkSecurityGroupVnicsArgs{
NetworkSecurityGroupId: testNetworkSecurityGroup.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testNetworkSecurityGroupVnics = Oci.Core.GetNetworkSecurityGroupVnics.Invoke(new()
{
NetworkSecurityGroupId = testNetworkSecurityGroup.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetNetworkSecurityGroupVnicsArgs;
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 testNetworkSecurityGroupVnics = CoreFunctions.getNetworkSecurityGroupVnics(GetNetworkSecurityGroupVnicsArgs.builder()
.networkSecurityGroupId(testNetworkSecurityGroup.id())
.build());
}
}
variables:
testNetworkSecurityGroupVnics:
fn::invoke:
Function: oci:Core:getNetworkSecurityGroupVnics
Arguments:
networkSecurityGroupId: ${testNetworkSecurityGroup.id}
Using getNetworkSecurityGroupVnics
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 getNetworkSecurityGroupVnics(args: GetNetworkSecurityGroupVnicsArgs, opts?: InvokeOptions): Promise<GetNetworkSecurityGroupVnicsResult>
function getNetworkSecurityGroupVnicsOutput(args: GetNetworkSecurityGroupVnicsOutputArgs, opts?: InvokeOptions): Output<GetNetworkSecurityGroupVnicsResult>
def get_network_security_group_vnics(filters: Optional[Sequence[_core.GetNetworkSecurityGroupVnicsFilter]] = None,
network_security_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNetworkSecurityGroupVnicsResult
def get_network_security_group_vnics_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetNetworkSecurityGroupVnicsFilterArgs]]]] = None,
network_security_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNetworkSecurityGroupVnicsResult]
func GetNetworkSecurityGroupVnics(ctx *Context, args *GetNetworkSecurityGroupVnicsArgs, opts ...InvokeOption) (*GetNetworkSecurityGroupVnicsResult, error)
func GetNetworkSecurityGroupVnicsOutput(ctx *Context, args *GetNetworkSecurityGroupVnicsOutputArgs, opts ...InvokeOption) GetNetworkSecurityGroupVnicsResultOutput
> Note: This function is named GetNetworkSecurityGroupVnics
in the Go SDK.
public static class GetNetworkSecurityGroupVnics
{
public static Task<GetNetworkSecurityGroupVnicsResult> InvokeAsync(GetNetworkSecurityGroupVnicsArgs args, InvokeOptions? opts = null)
public static Output<GetNetworkSecurityGroupVnicsResult> Invoke(GetNetworkSecurityGroupVnicsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkSecurityGroupVnicsResult> getNetworkSecurityGroupVnics(GetNetworkSecurityGroupVnicsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getNetworkSecurityGroupVnics:getNetworkSecurityGroupVnics
arguments:
# arguments dictionary
The following arguments are supported:
- Network
Security stringGroup Id - The OCID of the network security group.
- Filters
List<Get
Network Security Group Vnics Filter>
- Network
Security stringGroup Id - The OCID of the network security group.
- Filters
[]Get
Network Security Group Vnics Filter
- network
Security StringGroup Id - The OCID of the network security group.
- filters
List<Get
Network Security Group Vnics Filter>
- network
Security stringGroup Id - The OCID of the network security group.
- filters
Get
Network Security Group Vnics Filter[]
- network_
security_ strgroup_ id - The OCID of the network security group.
- filters
Sequence[core.
Get Network Security Group Vnics Filter]
- network
Security StringGroup Id - The OCID of the network security group.
- filters List<Property Map>
getNetworkSecurityGroupVnics Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Security stringGroup Id - Network
Security List<GetGroup Vnics Network Security Group Vnics Network Security Group Vnic> - The list of network_security_group_vnics.
- Filters
List<Get
Network Security Group Vnics Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Network
Security stringGroup Id - Network
Security []GetGroup Vnics Network Security Group Vnics Network Security Group Vnic - The list of network_security_group_vnics.
- Filters
[]Get
Network Security Group Vnics Filter
- id String
- The provider-assigned unique ID for this managed resource.
- network
Security StringGroup Id - network
Security List<GetGroup Vnics Network Security Group Vnics Network Security Group Vnic> - The list of network_security_group_vnics.
- filters
List<Get
Network Security Group Vnics Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- network
Security stringGroup Id - network
Security GetGroup Vnics Network Security Group Vnics Network Security Group Vnic[] - The list of network_security_group_vnics.
- filters
Get
Network Security Group Vnics Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- network_
security_ strgroup_ id - network_
security_ Sequence[core.group_ vnics Get Network Security Group Vnics Network Security Group Vnic] - The list of network_security_group_vnics.
- filters
Sequence[core.
Get Network Security Group Vnics Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- network
Security StringGroup Id - network
Security List<Property Map>Group Vnics - The list of network_security_group_vnics.
- filters List<Property Map>
Supporting Types
GetNetworkSecurityGroupVnicsFilter
GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic
- Resource
Id string - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- Time
Associated string - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vnic
Id string - The OCID of the VNIC.
- Resource
Id string - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- Time
Associated string - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vnic
Id string - The OCID of the VNIC.
- resource
Id String - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- time
Associated String - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vnic
Id String - The OCID of the VNIC.
- resource
Id string - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- time
Associated string - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vnic
Id string - The OCID of the VNIC.
- resource_
id str - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- time_
associated str - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vnic_
id str - The OCID of the VNIC.
- resource
Id String - The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
- time
Associated String - The date and time the VNIC was added to the network security group, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vnic
Id String - The OCID of the VNIC.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.