oci logo
Oracle Cloud Infrastructure v0.19.0, May 26 23

oci.CloudGuard.getManagedLists

Explore with Pulumi AI

This data source provides the list of Managed Lists in Oracle Cloud Infrastructure Cloud Guard service.

Returns a list of ListManagedLists. The ListManagedLists operation returns only the managed lists in compartmentId passed. The list does not include any subcompartments of the compartmentId passed.

The parameter accessLevel specifies whether to return ManagedLists in only those compartments for which the requestor has INSPECT permissions on at least one resource directly or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if Principal doesn’t have access to even one of the child compartments. This is valid only when compartmentIdInSubtree is set to true.

The parameter compartmentIdInSubtree applies when you perform ListManagedLists on the compartmentId passed and when it is set to true, the entire hierarchy of compartments can be returned. To get a full list of all compartments and subcompartments in the tenancy (root compartment), set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testManagedLists = Oci.CloudGuard.GetManagedLists.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        AccessLevel = @var.Managed_list_access_level,
        CompartmentIdInSubtree = @var.Managed_list_compartment_id_in_subtree,
        DisplayName = @var.Managed_list_display_name,
        ListType = @var.Managed_list_list_type,
        ResourceMetadataOnly = @var.Managed_list_resource_metadata_only,
        State = @var.Managed_list_state,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := CloudGuard.GetManagedLists(ctx, &cloudguard.GetManagedListsArgs{
			CompartmentId:          _var.Compartment_id,
			AccessLevel:            pulumi.StringRef(_var.Managed_list_access_level),
			CompartmentIdInSubtree: pulumi.BoolRef(_var.Managed_list_compartment_id_in_subtree),
			DisplayName:            pulumi.StringRef(_var.Managed_list_display_name),
			ListType:               pulumi.StringRef(_var.Managed_list_list_type),
			ResourceMetadataOnly:   pulumi.BoolRef(_var.Managed_list_resource_metadata_only),
			State:                  pulumi.StringRef(_var.Managed_list_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.CloudGuard.CloudGuardFunctions;
import com.pulumi.oci.CloudGuard.inputs.GetManagedListsArgs;
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 testManagedLists = CloudGuardFunctions.getManagedLists(GetManagedListsArgs.builder()
            .compartmentId(var_.compartment_id())
            .accessLevel(var_.managed_list_access_level())
            .compartmentIdInSubtree(var_.managed_list_compartment_id_in_subtree())
            .displayName(var_.managed_list_display_name())
            .listType(var_.managed_list_list_type())
            .resourceMetadataOnly(var_.managed_list_resource_metadata_only())
            .state(var_.managed_list_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_lists = oci.CloudGuard.get_managed_lists(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    access_level=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    compartment_id_in_subtree=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    list_type=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    resource_metadata_only=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    state=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedLists = oci.CloudGuard.getManagedLists({
    compartmentId: _var.compartment_id,
    accessLevel: _var.managed_list_access_level,
    compartmentIdInSubtree: _var.managed_list_compartment_id_in_subtree,
    displayName: _var.managed_list_display_name,
    listType: _var.managed_list_list_type,
    resourceMetadataOnly: _var.managed_list_resource_metadata_only,
    state: _var.managed_list_state,
});
variables:
  testManagedLists:
    fn::invoke:
      Function: oci:CloudGuard:getManagedLists
      Arguments:
        compartmentId: ${var.compartment_id}
        accessLevel: ${var.managed_list_access_level}
        compartmentIdInSubtree: ${var.managed_list_compartment_id_in_subtree}
        displayName: ${var.managed_list_display_name}
        listType: ${var.managed_list_list_type}
        resourceMetadataOnly: ${var.managed_list_resource_metadata_only}
        state: ${var.managed_list_state}

Using getManagedLists

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 getManagedLists(args: GetManagedListsArgs, opts?: InvokeOptions): Promise<GetManagedListsResult>
function getManagedListsOutput(args: GetManagedListsOutputArgs, opts?: InvokeOptions): Output<GetManagedListsResult>
def get_managed_lists(access_level: Optional[str] = None,
                      compartment_id: Optional[str] = None,
                      compartment_id_in_subtree: Optional[bool] = None,
                      display_name: Optional[str] = None,
                      filters: Optional[Sequence[_cloudguard.GetManagedListsFilter]] = None,
                      list_type: Optional[str] = None,
                      resource_metadata_only: Optional[bool] = None,
                      state: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetManagedListsResult
def get_managed_lists_output(access_level: Optional[pulumi.Input[str]] = None,
                      compartment_id: Optional[pulumi.Input[str]] = None,
                      compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                      display_name: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudguard.GetManagedListsFilterArgs]]]] = None,
                      list_type: Optional[pulumi.Input[str]] = None,
                      resource_metadata_only: Optional[pulumi.Input[bool]] = None,
                      state: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetManagedListsResult]
func GetManagedLists(ctx *Context, args *GetManagedListsArgs, opts ...InvokeOption) (*GetManagedListsResult, error)
func GetManagedListsOutput(ctx *Context, args *GetManagedListsOutputArgs, opts ...InvokeOption) GetManagedListsResultOutput

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

public static class GetManagedLists 
{
    public static Task<GetManagedListsResult> InvokeAsync(GetManagedListsArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedListsResult> Invoke(GetManagedListsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedListsResult> getManagedLists(GetManagedListsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:CloudGuard/getManagedLists:getManagedLists
  arguments:
    # arguments dictionary

The following arguments are supported:

CompartmentId string

The ID of the compartment in which to list resources.

AccessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

CompartmentIdInSubtree bool

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

DisplayName string

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

Filters List<GetManagedListsFilter>
ListType string

The type of the ManagedList.

ResourceMetadataOnly bool

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

CompartmentId string

The ID of the compartment in which to list resources.

AccessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

CompartmentIdInSubtree bool

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

DisplayName string

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

Filters []GetManagedListsFilter
ListType string

The type of the ManagedList.

ResourceMetadataOnly bool

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

compartmentId String

The ID of the compartment in which to list resources.

accessLevel String

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

compartmentIdInSubtree Boolean

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

displayName String

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

filters List<GetManagedListsFilter>
listType String

The type of the ManagedList.

resourceMetadataOnly Boolean

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

compartmentId string

The ID of the compartment in which to list resources.

accessLevel string

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

compartmentIdInSubtree boolean

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

displayName string

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

filters GetManagedListsFilter[]
listType string

The type of the ManagedList.

resourceMetadataOnly boolean

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

state string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

compartment_id str

The ID of the compartment in which to list resources.

access_level str

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

compartment_id_in_subtree bool

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

display_name str

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

filters GetManagedListsFilter]
list_type str

The type of the ManagedList.

resource_metadata_only bool

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

state str

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

compartmentId String

The ID of the compartment in which to list resources.

accessLevel String

Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. Setting this to ACCESSIBLE returns only those compartments for which the user has INSPECT permissions directly or indirectly (permissions can be on a resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed.

compartmentIdInSubtree Boolean

Default is false. When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

displayName String

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

filters List<Property Map>
listType String

The type of the ManagedList.

resourceMetadataOnly Boolean

Default is false. When set to true, the list of all Oracle Managed Resources Metadata supported by Cloud Guard are returned.

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

getManagedLists Result

The following output properties are available:

CompartmentId string

Compartment Identifier where the resource is created

Id string

The provider-assigned unique ID for this managed resource.

ManagedListCollections List<GetManagedListsManagedListCollection>

The list of managed_list_collection.

AccessLevel string
CompartmentIdInSubtree bool
DisplayName string

ManagedList display name.

Filters List<GetManagedListsFilter>
ListType string

type of the list

ResourceMetadataOnly bool
State string

The current state of the resource.

CompartmentId string

Compartment Identifier where the resource is created

Id string

The provider-assigned unique ID for this managed resource.

ManagedListCollections []GetManagedListsManagedListCollection

The list of managed_list_collection.

AccessLevel string
CompartmentIdInSubtree bool
DisplayName string

ManagedList display name.

Filters []GetManagedListsFilter
ListType string

type of the list

ResourceMetadataOnly bool
State string

The current state of the resource.

compartmentId String

Compartment Identifier where the resource is created

id String

The provider-assigned unique ID for this managed resource.

managedListCollections List<GetManagedListsManagedListCollection>

The list of managed_list_collection.

accessLevel String
compartmentIdInSubtree Boolean
displayName String

ManagedList display name.

filters List<GetManagedListsFilter>
listType String

type of the list

resourceMetadataOnly Boolean
state String

The current state of the resource.

compartmentId string

Compartment Identifier where the resource is created

id string

The provider-assigned unique ID for this managed resource.

managedListCollections GetManagedListsManagedListCollection[]

The list of managed_list_collection.

accessLevel string
compartmentIdInSubtree boolean
displayName string

ManagedList display name.

filters GetManagedListsFilter[]
listType string

type of the list

resourceMetadataOnly boolean
state string

The current state of the resource.

compartment_id str

Compartment Identifier where the resource is created

id str

The provider-assigned unique ID for this managed resource.

managed_list_collections GetManagedListsManagedListCollection]

The list of managed_list_collection.

access_level str
compartment_id_in_subtree bool
display_name str

ManagedList display name.

filters GetManagedListsFilter]
list_type str

type of the list

resource_metadata_only bool
state str

The current state of the resource.

compartmentId String

Compartment Identifier where the resource is created

id String

The provider-assigned unique ID for this managed resource.

managedListCollections List<Property Map>

The list of managed_list_collection.

accessLevel String
compartmentIdInSubtree Boolean
displayName String

ManagedList display name.

filters List<Property Map>
listType String

type of the list

resourceMetadataOnly Boolean
state String

The current state of the resource.

Supporting Types

GetManagedListsFilter

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

GetManagedListsManagedListCollection

GetManagedListsManagedListCollectionItem

CompartmentId string

The ID of the compartment in which to list resources.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

ManagedList description.

DisplayName string

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

FeedProvider string

provider of the feed

FreeformTags Dictionary<string, object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Id string

Unique identifier that is immutable on creation

IsEditable bool

If this list is editable or not

LifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

ListItems List<string>

List of ManagedListItem

ListType string

The type of the ManagedList.

SourceManagedListId string

OCID of the Source ManagedList

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

SystemTags Dictionary<string, object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The date and time the managed list was created. Format defined by RFC3339.

TimeUpdated string

The date and time the managed list was updated. Format defined by RFC3339.

CompartmentId string

The ID of the compartment in which to list resources.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

Description string

ManagedList description.

DisplayName string

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

FeedProvider string

provider of the feed

FreeformTags map[string]interface{}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

Id string

Unique identifier that is immutable on creation

IsEditable bool

If this list is editable or not

LifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

ListItems []string

List of ManagedListItem

ListType string

The type of the ManagedList.

SourceManagedListId string

OCID of the Source ManagedList

State string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

SystemTags map[string]interface{}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The date and time the managed list was created. Format defined by RFC3339.

TimeUpdated string

The date and time the managed list was updated. Format defined by RFC3339.

compartmentId String

The ID of the compartment in which to list resources.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

ManagedList description.

displayName String

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

feedProvider String

provider of the feed

freeformTags Map<String,Object>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id String

Unique identifier that is immutable on creation

isEditable Boolean

If this list is editable or not

lifecyleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

listItems List<String>

List of ManagedListItem

listType String

The type of the ManagedList.

sourceManagedListId String

OCID of the Source ManagedList

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags Map<String,Object>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The date and time the managed list was created. Format defined by RFC3339.

timeUpdated String

The date and time the managed list was updated. Format defined by RFC3339.

compartmentId string

The ID of the compartment in which to list resources.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description string

ManagedList description.

displayName string

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

feedProvider string

provider of the feed

freeformTags {[key: string]: any}

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id string

Unique identifier that is immutable on creation

isEditable boolean

If this list is editable or not

lifecyleDetails string

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

listItems string[]

List of ManagedListItem

listType string

The type of the ManagedList.

sourceManagedListId string

OCID of the Source ManagedList

state string

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags {[key: string]: any}

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated string

The date and time the managed list was created. Format defined by RFC3339.

timeUpdated string

The date and time the managed list was updated. Format defined by RFC3339.

compartment_id str

The ID of the compartment in which to list resources.

defined_tags Mapping[str, Any]

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description str

ManagedList description.

display_name str

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

feed_provider str

provider of the feed

freeform_tags Mapping[str, Any]

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id str

Unique identifier that is immutable on creation

is_editable bool

If this list is editable or not

lifecyle_details str

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

list_items Sequence[str]

List of ManagedListItem

list_type str

The type of the ManagedList.

source_managed_list_id str

OCID of the Source ManagedList

state str

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

system_tags Mapping[str, Any]

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

time_created str

The date and time the managed list was created. Format defined by RFC3339.

time_updated str

The date and time the managed list was updated. Format defined by RFC3339.

compartmentId String

The ID of the compartment in which to list resources.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

description String

ManagedList description.

displayName String

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

feedProvider String

provider of the feed

freeformTags Map<Any>

Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

id String

Unique identifier that is immutable on creation

isEditable Boolean

If this list is editable or not

lifecyleDetails String

A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

listItems List<String>

List of ManagedListItem

listType String

The type of the ManagedList.

sourceManagedListId String

OCID of the Source ManagedList

state String

The field life cycle state. Only one state can be provided. Default value for state is active. If no value is specified state is active.

systemTags Map<Any>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The date and time the managed list was created. Format defined by RFC3339.

timeUpdated String

The date and time the managed list was updated. Format defined by RFC3339.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.