Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.SecurityAttribute.getSecurityAttribute
Explore with Pulumi AI
This data source provides details about a specific Security Attribute resource in Oracle Cloud Infrastructure Security Attribute service.
Gets the specified security attribute’s information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testSecurityAttribute = oci.SecurityAttribute.getSecurityAttribute({
    securityAttributeName: testSecurityAttributeOciSecurityAttributeSecurityAttribute.name,
    securityAttributeNamespaceId: testSecurityAttributeNamespace.id,
});
import pulumi
import pulumi_oci as oci
test_security_attribute = oci.SecurityAttribute.get_security_attribute(security_attribute_name=test_security_attribute_oci_security_attribute_security_attribute["name"],
    security_attribute_namespace_id=test_security_attribute_namespace["id"])
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.GetSecurityAttribute(ctx, &securityattribute.GetSecurityAttributeArgs{
			SecurityAttributeName:        testSecurityAttributeOciSecurityAttributeSecurityAttribute.Name,
			SecurityAttributeNamespaceId: testSecurityAttributeNamespace.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 testSecurityAttribute = Oci.SecurityAttribute.GetSecurityAttribute.Invoke(new()
    {
        SecurityAttributeName = testSecurityAttributeOciSecurityAttributeSecurityAttribute.Name,
        SecurityAttributeNamespaceId = testSecurityAttributeNamespace.Id,
    });
});
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.GetSecurityAttributeArgs;
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 testSecurityAttribute = SecurityAttributeFunctions.getSecurityAttribute(GetSecurityAttributeArgs.builder()
            .securityAttributeName(testSecurityAttributeOciSecurityAttributeSecurityAttribute.name())
            .securityAttributeNamespaceId(testSecurityAttributeNamespace.id())
            .build());
    }
}
variables:
  testSecurityAttribute:
    fn::invoke:
      function: oci:SecurityAttribute:getSecurityAttribute
      arguments:
        securityAttributeName: ${testSecurityAttributeOciSecurityAttributeSecurityAttribute.name}
        securityAttributeNamespaceId: ${testSecurityAttributeNamespace.id}
Using getSecurityAttribute
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 getSecurityAttribute(args: GetSecurityAttributeArgs, opts?: InvokeOptions): Promise<GetSecurityAttributeResult>
function getSecurityAttributeOutput(args: GetSecurityAttributeOutputArgs, opts?: InvokeOptions): Output<GetSecurityAttributeResult>def get_security_attribute(security_attribute_name: Optional[str] = None,
                           security_attribute_namespace_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetSecurityAttributeResult
def get_security_attribute_output(security_attribute_name: Optional[pulumi.Input[str]] = None,
                           security_attribute_namespace_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetSecurityAttributeResult]func LookupSecurityAttribute(ctx *Context, args *LookupSecurityAttributeArgs, opts ...InvokeOption) (*LookupSecurityAttributeResult, error)
func LookupSecurityAttributeOutput(ctx *Context, args *LookupSecurityAttributeOutputArgs, opts ...InvokeOption) LookupSecurityAttributeResultOutput> Note: This function is named LookupSecurityAttribute in the Go SDK.
public static class GetSecurityAttribute 
{
    public static Task<GetSecurityAttributeResult> InvokeAsync(GetSecurityAttributeArgs args, InvokeOptions? opts = null)
    public static Output<GetSecurityAttributeResult> Invoke(GetSecurityAttributeInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecurityAttributeResult> getSecurityAttribute(GetSecurityAttributeArgs args, InvokeOptions options)
public static Output<GetSecurityAttributeResult> getSecurityAttribute(GetSecurityAttributeArgs args, InvokeOptions options)
fn::invoke:
  function: oci:SecurityAttribute/getSecurityAttribute:getSecurityAttribute
  arguments:
    # arguments dictionaryThe following arguments are supported:
- SecurityAttribute stringName 
- The name of the security attribute.
- SecurityAttribute stringNamespace Id 
- The OCID of the security attribute namespace.
- SecurityAttribute stringName 
- The name of the security attribute.
- SecurityAttribute stringNamespace Id 
- The OCID of the security attribute namespace.
- securityAttribute StringName 
- The name of the security attribute.
- securityAttribute StringNamespace Id 
- The OCID of the security attribute namespace.
- securityAttribute stringName 
- The name of the security attribute.
- securityAttribute stringNamespace Id 
- The OCID of the security attribute namespace.
- security_attribute_ strname 
- The name of the security attribute.
- security_attribute_ strnamespace_ id 
- The OCID of the security attribute namespace.
- securityAttribute StringName 
- The name of the security attribute.
- securityAttribute StringNamespace Id 
- The OCID of the security attribute namespace.
getSecurityAttribute Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment that contains the security attribute definition.
- Description string
- The description you assign to the security attribute.
- Id string
- The OCID of the security attribute definition.
- IsRetired bool
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- Name string
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- SecurityAttribute stringName 
- SecurityAttribute stringNamespace Id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- SecurityAttribute stringNamespace Name 
- The name of the security attribute namespace that contains the security attribute.
- State string
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- TimeCreated string
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- Type string
- The data type of the security attribute.
- Validators
List<GetSecurity Attribute Validator> 
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
- CompartmentId string
- The OCID of the compartment that contains the security attribute definition.
- Description string
- The description you assign to the security attribute.
- Id string
- The OCID of the security attribute definition.
- IsRetired bool
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- Name string
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- SecurityAttribute stringName 
- SecurityAttribute stringNamespace Id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- SecurityAttribute stringNamespace Name 
- The name of the security attribute namespace that contains the security attribute.
- State string
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- TimeCreated string
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- Type string
- The data type of the security attribute.
- Validators
[]GetSecurity Attribute Validator 
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
- compartmentId String
- The OCID of the compartment that contains the security attribute definition.
- description String
- The description you assign to the security attribute.
- id String
- The OCID of the security attribute definition.
- isRetired Boolean
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- name String
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- securityAttribute StringName 
- securityAttribute StringNamespace Id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- securityAttribute StringNamespace Name 
- The name of the security attribute namespace that contains the security attribute.
- state String
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- timeCreated String
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- type String
- The data type of the security attribute.
- validators
List<GetValidator> 
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
- compartmentId string
- The OCID of the compartment that contains the security attribute definition.
- description string
- The description you assign to the security attribute.
- id string
- The OCID of the security attribute definition.
- isRetired boolean
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- name string
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- securityAttribute stringName 
- securityAttribute stringNamespace Id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- securityAttribute stringNamespace Name 
- The name of the security attribute namespace that contains the security attribute.
- state string
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- timeCreated string
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- type string
- The data type of the security attribute.
- validators
GetSecurity Attribute Validator[] 
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
- compartment_id str
- The OCID of the compartment that contains the security attribute definition.
- description str
- The description you assign to the security attribute.
- id str
- The OCID of the security attribute definition.
- is_retired bool
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- name str
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- security_attribute_ strname 
- security_attribute_ strnamespace_ id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- security_attribute_ strnamespace_ name 
- The name of the security attribute namespace that contains the security attribute.
- state str
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- time_created str
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- type str
- The data type of the security attribute.
- validators
Sequence[GetSecurity Attribute Validator] 
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
- compartmentId String
- The OCID of the compartment that contains the security attribute definition.
- description String
- The description you assign to the security attribute.
- id String
- The OCID of the security attribute definition.
- isRetired Boolean
- Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
- name String
- The name assigned to the security attribute during creation. This is the security attribute key. The name must be unique within the security attribute namespace and cannot be changed.
- securityAttribute StringName 
- securityAttribute StringNamespace Id 
- The OCID of the security attribute namespace that contains the security attribute definition.
- securityAttribute StringNamespace Name 
- The name of the security attribute namespace that contains the security attribute.
- state String
- The security attribute's current state. After creating a security attribute, make sure its lifecycleStateis ACTIVE before using it. After retiring a security attribute, make sure itslifecycleStateis INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute'slifecycleStatechanges from DELETING to DELETED.
- timeCreated String
- Date and time the security attribute was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- type String
- The data type of the security attribute.
- validators List<Property Map>
- Validates a security attribute value. Each validator performs validation steps in addition to the standard validation for security attribute values. For more information, see Limits on Security Attributes.
Supporting Types
GetSecurityAttributeValidator   
- ValidatorType string
- Specifies the type of validation: a static value (no validation) or a list.
- Values List<string>
- The list of allowed values for a security attribute value.
- ValidatorType string
- Specifies the type of validation: a static value (no validation) or a list.
- Values []string
- The list of allowed values for a security attribute value.
- validatorType String
- Specifies the type of validation: a static value (no validation) or a list.
- values List<String>
- The list of allowed values for a security attribute value.
- validatorType string
- Specifies the type of validation: a static value (no validation) or a list.
- values string[]
- The list of allowed values for a security attribute value.
- validator_type str
- Specifies the type of validation: a static value (no validation) or a list.
- values Sequence[str]
- The list of allowed values for a security attribute value.
- validatorType String
- Specifies the type of validation: a static value (no validation) or a list.
- values List<String>
- The list of allowed values for a security attribute value.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.