1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. SecurityAttribute
  5. getSecurityAttributeNamespaces
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

oci.SecurityAttribute.getSecurityAttributeNamespaces

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi

This data source provides the list of Security Attribute Namespaces in Oracle Cloud Infrastructure Security Attribute service.

Lists the security attribute namespaces in the specified compartment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testSecurityAttributeNamespaces = oci.SecurityAttribute.getSecurityAttributeNamespaces({
    compartmentId: compartmentId,
    compartmentIdInSubtree: securityAttributeNamespaceCompartmentIdInSubtree,
    name: securityAttributeNamespaceName,
    state: securityAttributeNamespaceState,
});
Copy
import pulumi
import pulumi_oci as oci

test_security_attribute_namespaces = oci.SecurityAttribute.get_security_attribute_namespaces(compartment_id=compartment_id,
    compartment_id_in_subtree=security_attribute_namespace_compartment_id_in_subtree,
    name=security_attribute_namespace_name,
    state=security_attribute_namespace_state)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := securityattribute.GetSecurityAttributeNamespaces(ctx, &securityattribute.GetSecurityAttributeNamespacesArgs{
			CompartmentId:          pulumi.StringRef(compartmentId),
			CompartmentIdInSubtree: pulumi.BoolRef(securityAttributeNamespaceCompartmentIdInSubtree),
			Name:                   pulumi.StringRef(securityAttributeNamespaceName),
			State:                  pulumi.StringRef(securityAttributeNamespaceState),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testSecurityAttributeNamespaces = Oci.SecurityAttribute.GetSecurityAttributeNamespaces.Invoke(new()
    {
        CompartmentId = compartmentId,
        CompartmentIdInSubtree = securityAttributeNamespaceCompartmentIdInSubtree,
        Name = securityAttributeNamespaceName,
        State = securityAttributeNamespaceState,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.SecurityAttribute.SecurityAttributeFunctions;
import com.pulumi.oci.SecurityAttribute.inputs.GetSecurityAttributeNamespacesArgs;
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 testSecurityAttributeNamespaces = SecurityAttributeFunctions.getSecurityAttributeNamespaces(GetSecurityAttributeNamespacesArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(securityAttributeNamespaceCompartmentIdInSubtree)
            .name(securityAttributeNamespaceName)
            .state(securityAttributeNamespaceState)
            .build());

    }
}
Copy
variables:
  testSecurityAttributeNamespaces:
    fn::invoke:
      function: oci:SecurityAttribute:getSecurityAttributeNamespaces
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${securityAttributeNamespaceCompartmentIdInSubtree}
        name: ${securityAttributeNamespaceName}
        state: ${securityAttributeNamespaceState}
Copy

Using getSecurityAttributeNamespaces

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 getSecurityAttributeNamespaces(args: GetSecurityAttributeNamespacesArgs, opts?: InvokeOptions): Promise<GetSecurityAttributeNamespacesResult>
function getSecurityAttributeNamespacesOutput(args: GetSecurityAttributeNamespacesOutputArgs, opts?: InvokeOptions): Output<GetSecurityAttributeNamespacesResult>
Copy
def get_security_attribute_namespaces(compartment_id: Optional[str] = None,
                                      compartment_id_in_subtree: Optional[bool] = None,
                                      filters: Optional[Sequence[_securityattribute.GetSecurityAttributeNamespacesFilter]] = None,
                                      name: Optional[str] = None,
                                      state: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetSecurityAttributeNamespacesResult
def get_security_attribute_namespaces_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                      compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[_securityattribute.GetSecurityAttributeNamespacesFilterArgs]]]] = None,
                                      name: Optional[pulumi.Input[str]] = None,
                                      state: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetSecurityAttributeNamespacesResult]
Copy
func GetSecurityAttributeNamespaces(ctx *Context, args *GetSecurityAttributeNamespacesArgs, opts ...InvokeOption) (*GetSecurityAttributeNamespacesResult, error)
func GetSecurityAttributeNamespacesOutput(ctx *Context, args *GetSecurityAttributeNamespacesOutputArgs, opts ...InvokeOption) GetSecurityAttributeNamespacesResultOutput
Copy

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

public static class GetSecurityAttributeNamespaces 
{
    public static Task<GetSecurityAttributeNamespacesResult> InvokeAsync(GetSecurityAttributeNamespacesArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityAttributeNamespacesResult> Invoke(GetSecurityAttributeNamespacesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSecurityAttributeNamespacesResult> getSecurityAttributeNamespaces(GetSecurityAttributeNamespacesArgs args, InvokeOptions options)
public static Output<GetSecurityAttributeNamespacesResult> getSecurityAttributeNamespaces(GetSecurityAttributeNamespacesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:SecurityAttribute/getSecurityAttributeNamespaces:getSecurityAttributeNamespaces
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId string
The OCID of the compartment in which to list resources.
CompartmentIdInSubtree bool
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
Filters Changes to this property will trigger replacement. List<GetSecurityAttributeNamespacesFilter>
Name string
A filter to return only resources that match the entire display name given.
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 in which to list resources.
CompartmentIdInSubtree bool
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
Filters Changes to this property will trigger replacement. []GetSecurityAttributeNamespacesFilter
Name string
A filter to return only resources that match the entire display name given.
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 in which to list resources.
compartmentIdInSubtree Boolean
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
filters Changes to this property will trigger replacement. List<GetNamespacesFilter>
name String
A filter to return only resources that match the entire display name given.
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 in which to list resources.
compartmentIdInSubtree boolean
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
filters Changes to this property will trigger replacement. GetSecurityAttributeNamespacesFilter[]
name string
A filter to return only resources that match the entire display name given.
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 in which to list resources.
compartment_id_in_subtree bool
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
filters Changes to this property will trigger replacement. Sequence[securityattribute.GetSecurityAttributeNamespacesFilter]
name str
A filter to return only resources that match the entire display name given.
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 in which to list resources.
compartmentIdInSubtree Boolean
An optional boolean parameter indicating whether to retrieve all security attribute namespaces in subcompartments. If this parameter is not specified, only the namespaces defined in the specified compartment are retrieved.
filters Changes to this property will trigger replacement. List<Property Map>
name String
A filter to return only resources that match the entire display name given.
state String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.

getSecurityAttributeNamespaces Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
SecurityAttributeNamespaces List<GetSecurityAttributeNamespacesSecurityAttributeNamespace>
The list of security_attribute_namespaces.
CompartmentId string
The OCID of the compartment that contains the security attribute namespace.
CompartmentIdInSubtree bool
Filters List<GetSecurityAttributeNamespacesFilter>
Name string
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
State string
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.
Id string
The provider-assigned unique ID for this managed resource.
SecurityAttributeNamespaces []GetSecurityAttributeNamespacesSecurityAttributeNamespace
The list of security_attribute_namespaces.
CompartmentId string
The OCID of the compartment that contains the security attribute namespace.
CompartmentIdInSubtree bool
Filters []GetSecurityAttributeNamespacesFilter
Name string
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
State string
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.
id String
The provider-assigned unique ID for this managed resource.
securityAttributeNamespaces List<GetNamespacesNamespace>
The list of security_attribute_namespaces.
compartmentId String
The OCID of the compartment that contains the security attribute namespace.
compartmentIdInSubtree Boolean
filters List<GetNamespacesFilter>
name String
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
state String
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.
id string
The provider-assigned unique ID for this managed resource.
securityAttributeNamespaces GetSecurityAttributeNamespacesSecurityAttributeNamespace[]
The list of security_attribute_namespaces.
compartmentId string
The OCID of the compartment that contains the security attribute namespace.
compartmentIdInSubtree boolean
filters GetSecurityAttributeNamespacesFilter[]
name string
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
state string
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.
id str
The provider-assigned unique ID for this managed resource.
security_attribute_namespaces Sequence[securityattribute.GetSecurityAttributeNamespacesSecurityAttributeNamespace]
The list of security_attribute_namespaces.
compartment_id str
The OCID of the compartment that contains the security attribute namespace.
compartment_id_in_subtree bool
filters Sequence[securityattribute.GetSecurityAttributeNamespacesFilter]
name str
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
state str
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.
id String
The provider-assigned unique ID for this managed resource.
securityAttributeNamespaces List<Property Map>
The list of security_attribute_namespaces.
compartmentId String
The OCID of the compartment that contains the security attribute namespace.
compartmentIdInSubtree Boolean
filters List<Property Map>
name String
The name of the security attribute namespace. It must be unique across all security attribute namespaces in the tenancy and cannot be changed.
state String
The security attribute namespace's current state. After creating a security attribute namespace, make sure its lifecycleState is ACTIVE before using it. After retiring a security attribute namespace, make sure its lifecycleState is INACTIVE.

Supporting Types

GetSecurityAttributeNamespacesFilter

Name This property is required. string
A filter to return only resources that match the entire display name given.
Values This property is required. List<string>
Regex bool
Name This property is required. string
A filter to return only resources that match the entire display name given.
Values This property is required. []string
Regex bool
name This property is required. String
A filter to return only resources that match the entire display name given.
values This property is required. List<String>
regex Boolean
name This property is required. string
A filter to return only resources that match the entire display name given.
values This property is required. string[]
regex boolean
name This property is required. str
A filter to return only resources that match the entire display name given.
values This property is required. Sequence[str]
regex bool
name This property is required. String
A filter to return only resources that match the entire display name given.
values This property is required. List<String>
regex Boolean

GetSecurityAttributeNamespacesSecurityAttributeNamespace

CompartmentId This property is required. string
The OCID of the compartment in which to list resources.
DefinedTags This property is required. Dictionary<string, string>
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 This property is required. string
A description you create for the security attribute namespace to help you identify it.
FreeformTags This property is required. Dictionary<string, string>
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 This property is required. string
The OCID of the security attribute namespace.
IsRetired This property is required. bool
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
Modes This property is required. List<string>
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
Name This property is required. string
A filter to return only resources that match the entire display name given.
State This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
SystemTags This property is required. Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
CompartmentId This property is required. string
The OCID of the compartment in which to list resources.
DefinedTags This property is required. map[string]string
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 This property is required. string
A description you create for the security attribute namespace to help you identify it.
FreeformTags This property is required. map[string]string
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 This property is required. string
The OCID of the security attribute namespace.
IsRetired This property is required. bool
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
Modes This property is required. []string
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
Name This property is required. string
A filter to return only resources that match the entire display name given.
State This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
SystemTags This property is required. map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The OCID of the compartment in which to list resources.
definedTags This property is required. Map<String,String>
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 This property is required. String
A description you create for the security attribute namespace to help you identify it.
freeformTags This property is required. Map<String,String>
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 This property is required. String
The OCID of the security attribute namespace.
isRetired This property is required. Boolean
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
modes This property is required. List<String>
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
name This property is required. String
A filter to return only resources that match the entire display name given.
state This property is required. String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. string
The OCID of the compartment in which to list resources.
definedTags This property is required. {[key: string]: string}
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 This property is required. string
A description you create for the security attribute namespace to help you identify it.
freeformTags This property is required. {[key: string]: string}
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 This property is required. string
The OCID of the security attribute namespace.
isRetired This property is required. boolean
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
modes This property is required. string[]
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
name This property is required. string
A filter to return only resources that match the entire display name given.
state This property is required. string
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. string
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
compartment_id This property is required. str
The OCID of the compartment in which to list resources.
defined_tags This property is required. Mapping[str, str]
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 This property is required. str
A description you create for the security attribute namespace to help you identify it.
freeform_tags This property is required. Mapping[str, str]
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 This property is required. str
The OCID of the security attribute namespace.
is_retired This property is required. bool
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
modes This property is required. Sequence[str]
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
name This property is required. str
A filter to return only resources that match the entire display name given.
state This property is required. str
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
system_tags This property is required. Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created This property is required. str
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
compartmentId This property is required. String
The OCID of the compartment in which to list resources.
definedTags This property is required. Map<String>
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 This property is required. String
A description you create for the security attribute namespace to help you identify it.
freeformTags This property is required. Map<String>
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 This property is required. String
The OCID of the security attribute namespace.
isRetired This property is required. Boolean
Indicates whether the security attribute namespace is retired. See Managing Security Attribute Namespaces.
modes This property is required. List<String>
Indicates possible modes the security attributes in this namespace can be set to. This is not accepted from the user. Currently the supported values are enforce and audit.
name This property is required. String
A filter to return only resources that match the entire display name given.
state This property is required. String
A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
systemTags This property is required. Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
Date and time the security attribute namespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.30.0 published on Monday, Apr 14, 2025 by Pulumi