Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getNetworkSources

This data source provides the list of Network Sources in Oracle Cloud Infrastructure Identity service.

Lists the network sources in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See Where to Get the Tenancy’s OCID and User’s OCID.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testNetworkSources = Output.Create(Oci.Identity.GetNetworkSources.InvokeAsync(new Oci.Identity.GetNetworkSourcesArgs
        {
            CompartmentId = @var.Tenancy_ocid,
            Name = @var.Network_source_name,
            State = @var.Network_source_state,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Identity.GetNetworkSources(ctx, &identity.GetNetworkSourcesArgs{
			CompartmentId: _var.Tenancy_ocid,
			Name:          pulumi.StringRef(_var.Network_source_name),
			State:         pulumi.StringRef(_var.Network_source_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_network_sources = oci.Identity.get_network_sources(compartment_id=var["tenancy_ocid"],
    name=var["network_source_name"],
    state=var["network_source_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testNetworkSources = oci.Identity.getNetworkSources({
    compartmentId: _var.tenancy_ocid,
    name: _var.network_source_name,
    state: _var.network_source_state,
});

Coming soon!

Using getNetworkSources

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 getNetworkSources(args: GetNetworkSourcesArgs, opts?: InvokeOptions): Promise<GetNetworkSourcesResult>
function getNetworkSourcesOutput(args: GetNetworkSourcesOutputArgs, opts?: InvokeOptions): Output<GetNetworkSourcesResult>
def get_network_sources(compartment_id: Optional[str] = None,
                        filters: Optional[Sequence[_identity.GetNetworkSourcesFilter]] = None,
                        name: Optional[str] = None,
                        state: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNetworkSourcesResult
def get_network_sources_output(compartment_id: Optional[pulumi.Input[str]] = None,
                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetNetworkSourcesFilterArgs]]]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        state: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNetworkSourcesResult]
func GetNetworkSources(ctx *Context, args *GetNetworkSourcesArgs, opts ...InvokeOption) (*GetNetworkSourcesResult, error)
func GetNetworkSourcesOutput(ctx *Context, args *GetNetworkSourcesOutputArgs, opts ...InvokeOption) GetNetworkSourcesResultOutput

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

public static class GetNetworkSources 
{
    public static Task<GetNetworkSourcesResult> InvokeAsync(GetNetworkSourcesArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkSourcesResult> Invoke(GetNetworkSourcesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkSourcesResult> getNetworkSources(GetNetworkSourcesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Identity/getNetworkSources:getNetworkSources
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

Filters List<GetNetworkSourcesFilter>
Name string

A filter to only return resources that match the given name exactly.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

CompartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

Filters []GetNetworkSourcesFilter
Name string

A filter to only return resources that match the given name exactly.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId String

The OCID of the compartment (remember that the tenancy is simply the root compartment).

filters List<GetNetworkSourcesFilter>
name String

A filter to only return resources that match the given name exactly.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

filters GetNetworkSourcesFilter[]
name string

A filter to only return resources that match the given name exactly.

state string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartment_id str

The OCID of the compartment (remember that the tenancy is simply the root compartment).

filters GetNetworkSourcesFilter]
name str

A filter to only return resources that match the given name exactly.

state str

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

compartmentId String

The OCID of the compartment (remember that the tenancy is simply the root compartment).

filters List<Property Map>
name String

A filter to only return resources that match the given name exactly.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

getNetworkSources Result

The following output properties are available:

CompartmentId string

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

Id string

The provider-assigned unique ID for this managed resource.

NetworkSources List<GetNetworkSourcesNetworkSource>

The list of network_sources.

Filters List<GetNetworkSourcesFilter>
Name string

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

State string

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

CompartmentId string

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

Id string

The provider-assigned unique ID for this managed resource.

NetworkSources []GetNetworkSourcesNetworkSource

The list of network_sources.

Filters []GetNetworkSourcesFilter
Name string

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

State string

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

compartmentId String

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

id String

The provider-assigned unique ID for this managed resource.

networkSources List<GetNetworkSourcesNetworkSource>

The list of network_sources.

filters List<GetNetworkSourcesFilter>
name String

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

state String

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

compartmentId string

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

id string

The provider-assigned unique ID for this managed resource.

networkSources GetNetworkSourcesNetworkSource[]

The list of network_sources.

filters GetNetworkSourcesFilter[]
name string

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

state string

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

compartment_id str

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

id str

The provider-assigned unique ID for this managed resource.

network_sources GetNetworkSourcesNetworkSource]

The list of network_sources.

filters GetNetworkSourcesFilter]
name str

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

state str

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

compartmentId String

The OCID of the tenancy containing the network source. The tenancy is the root compartment.

id String

The provider-assigned unique ID for this managed resource.

networkSources List<Property Map>

The list of network_sources.

filters List<Property Map>
name String

The name you assign to the network source during creation. The name must be unique across the tenancy and cannot be changed.

state String

The network source object's current state. After creating a network source, make sure its lifecycleState changes from CREATING to ACTIVE before using it.

Supporting Types

GetNetworkSourcesFilter

Name string

A filter to only return resources that match the given name exactly.

Values List<string>
Regex bool
Name string

A filter to only return resources that match the given name exactly.

Values []string
Regex bool
name String

A filter to only return resources that match the given name exactly.

values List<String>
regex Boolean
name string

A filter to only return resources that match the given name exactly.

values string[]
regex boolean
name str

A filter to only return resources that match the given name exactly.

values Sequence[str]
regex bool
name String

A filter to only return resources that match the given name exactly.

values List<String>
regex Boolean

GetNetworkSourcesNetworkSource

CompartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

Description string

The description you assign to the network source. Does not have to be unique, and it's changeable.

FreeformTags Dictionary<string, object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the network source.

InactiveState string

The detailed status of INACTIVE lifecycleState.

Name string

A filter to only return resources that match the given name exactly.

PublicSourceLists List<string>

A list of allowed public IP addresses and CIDR ranges.

Services List<string>

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

TimeCreated string

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

VirtualSourceLists List<GetNetworkSourcesNetworkSourceVirtualSourceList>

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

CompartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

Description string

The description you assign to the network source. Does not have to be unique, and it's changeable.

FreeformTags map[string]interface{}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

Id string

The OCID of the network source.

InactiveState string

The detailed status of INACTIVE lifecycleState.

Name string

A filter to only return resources that match the given name exactly.

PublicSourceLists []string

A list of allowed public IP addresses and CIDR ranges.

Services []string

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

State string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

TimeCreated string

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

VirtualSourceLists []GetNetworkSourcesNetworkSourceVirtualSourceList

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

compartmentId String

The OCID of the compartment (remember that the tenancy is simply the root compartment).

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description String

The description you assign to the network source. Does not have to be unique, and it's changeable.

freeformTags Map<String,Object>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the network source.

inactiveState String

The detailed status of INACTIVE lifecycleState.

name String

A filter to only return resources that match the given name exactly.

publicSourceLists List<String>

A list of allowed public IP addresses and CIDR ranges.

services List<String>

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated String

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

virtualSourceLists List<GetNetworkSourcesNetworkSourceVirtualSourceList>

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

compartmentId string

The OCID of the compartment (remember that the tenancy is simply the root compartment).

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description string

The description you assign to the network source. Does not have to be unique, and it's changeable.

freeformTags {[key: string]: any}

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id string

The OCID of the network source.

inactiveState string

The detailed status of INACTIVE lifecycleState.

name string

A filter to only return resources that match the given name exactly.

publicSourceLists string[]

A list of allowed public IP addresses and CIDR ranges.

services string[]

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

state string

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated string

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

virtualSourceLists GetNetworkSourcesNetworkSourceVirtualSourceList[]

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

compartment_id str

The OCID of the compartment (remember that the tenancy is simply the root compartment).

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description str

The description you assign to the network source. Does not have to be unique, and it's changeable.

freeform_tags Mapping[str, Any]

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id str

The OCID of the network source.

inactive_state str

The detailed status of INACTIVE lifecycleState.

name str

A filter to only return resources that match the given name exactly.

public_source_lists Sequence[str]

A list of allowed public IP addresses and CIDR ranges.

services Sequence[str]

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

state str

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

time_created str

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

virtual_source_lists GetNetworkSourcesNetworkSourceVirtualSourceList]

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

compartmentId String

The OCID of the compartment (remember that the tenancy is simply the root compartment).

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}

description String

The description you assign to the network source. Does not have to be unique, and it's changeable.

freeformTags Map<Any>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

id String

The OCID of the network source.

inactiveState String

The detailed status of INACTIVE lifecycleState.

name String

A filter to only return resources that match the given name exactly.

publicSourceLists List<String>

A list of allowed public IP addresses and CIDR ranges.

services List<String>

A list of services allowed to make on-behalf-of requests. These requests can have different source IPs than those specified in the network source. Currently, only all and none are supported. The default is all.

state String

A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

timeCreated String

Date and time the group was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

virtualSourceLists List<Property Map>

A list of allowed VCN OCID and IP range pairs. Example:"vcnId": "ocid1.vcn.oc1.iad.aaaaaaaaexampleuniqueID", "ipRanges": [ "129.213.39.0/24" ]

GetNetworkSourcesNetworkSourceVirtualSourceList

IpRanges List<string>
VcnId string
IpRanges []string
VcnId string
ipRanges List<String>
vcnId String
ipRanges string[]
vcnId string
ip_ranges Sequence[str]
vcn_id str
ipRanges List<String>
vcnId String

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.