1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getNetworkSecurityGroupVnics
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.Core.getNetworkSecurityGroupVnics

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    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: oci_core_network_security_group.test_network_security_group.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_security_group_vnics = oci.Core.get_network_security_group_vnics(network_security_group_id=oci_core_network_security_group["test_network_security_group"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: oci_core_network_security_group.Test_network_security_group.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 = oci_core_network_security_group.Test_network_security_group.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(oci_core_network_security_group.test_network_security_group().id())
                .build());
    
        }
    }
    
    variables:
      testNetworkSecurityGroupVnics:
        fn::invoke:
          Function: oci:Core:getNetworkSecurityGroupVnics
          Arguments:
            networkSecurityGroupId: ${oci_core_network_security_group.test_network_security_group.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:

    networkSecurityGroupId String
    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.
    NetworkSecurityGroupId string
    NetworkSecurityGroupVnics List<GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic>
    The list of network_security_group_vnics.
    Filters List<GetNetworkSecurityGroupVnicsFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    NetworkSecurityGroupId string
    NetworkSecurityGroupVnics []GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic
    The list of network_security_group_vnics.
    Filters []GetNetworkSecurityGroupVnicsFilter
    id String
    The provider-assigned unique ID for this managed resource.
    networkSecurityGroupId String
    networkSecurityGroupVnics List<GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic>
    The list of network_security_group_vnics.
    filters List<GetNetworkSecurityGroupVnicsFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    networkSecurityGroupId string
    networkSecurityGroupVnics GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic[]
    The list of network_security_group_vnics.
    filters GetNetworkSecurityGroupVnicsFilter[]
    id String
    The provider-assigned unique ID for this managed resource.
    networkSecurityGroupId String
    networkSecurityGroupVnics List<Property Map>
    The list of network_security_group_vnics.
    filters List<Property Map>

    Supporting Types

    GetNetworkSecurityGroupVnicsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetNetworkSecurityGroupVnicsNetworkSecurityGroupVnic

    ResourceId string
    The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
    TimeAssociated 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
    VnicId string
    The OCID of the VNIC.
    ResourceId string
    The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
    TimeAssociated 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
    VnicId string
    The OCID of the VNIC.
    resourceId String
    The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
    timeAssociated 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
    vnicId String
    The OCID of the VNIC.
    resourceId string
    The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
    timeAssociated 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
    vnicId 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.
    resourceId String
    The OCID of the parent resource that the VNIC is attached to (for example, a Compute instance).
    timeAssociated 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
    vnicId 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.
    oci logo
    Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi