1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. SecurityAttribute
  5. SecurityAttribute
Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi

oci.SecurityAttribute.SecurityAttribute

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi

    This resource provides the Security Attribute resource in Oracle Cloud Infrastructure Security Attribute service.

    Creates a new security attribute in the specified security attribute namespace.

    The security attribute requires either the OCID or the name of the security attribute namespace that will contain this security attribute.

    You must specify a name for the attribute, which must be unique across all attributes in the security attribute namespace and cannot be changed. The only valid characters for security attribute names are: 0-9, A-Z, a-z, -, _ characters. Names are case insensitive. That means, for example, “mySecurityAttribute” and “mysecurityattribute” are not allowed in the same namespace. If you specify a name that’s already in use in the security attribute namespace, a 409 error is returned.

    The security attribute must have a description. It does not have to be unique, and you can change it with UpdateSecurityAttribute.

    When a validator is specified, The security attribute must have a value type. Security attribute can use either a static value or a list of possible values. Static values are entered by a user when applying the security attribute to a resource. Lists are created by the user and the user must apply a value from the list. Lists are validated.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testSecurityAttribute = new oci.securityattribute.SecurityAttribute("test_security_attribute", {
        description: securityAttributeDescription,
        name: securityAttributeName,
        securityAttributeNamespaceId: testSecurityAttributeNamespace.id,
        validator: {
            validatorType: securityAttributeValidatorValidatorType,
            values: securityAttributeValidatorValues,
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_security_attribute = oci.security_attribute.SecurityAttribute("test_security_attribute",
        description=security_attribute_description,
        name=security_attribute_name,
        security_attribute_namespace_id=test_security_attribute_namespace["id"],
        validator={
            "validator_type": security_attribute_validator_validator_type,
            "values": security_attribute_validator_values,
        })
    
    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.NewSecurityAttribute(ctx, "test_security_attribute", &securityattribute.SecurityAttributeArgs{
    			Description:                  pulumi.Any(securityAttributeDescription),
    			Name:                         pulumi.Any(securityAttributeName),
    			SecurityAttributeNamespaceId: pulumi.Any(testSecurityAttributeNamespace.Id),
    			Validator: &securityattribute.SecurityAttributeValidatorArgs{
    				ValidatorType: pulumi.Any(securityAttributeValidatorValidatorType),
    				Values:        pulumi.Any(securityAttributeValidatorValues),
    			},
    		})
    		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 = new Oci.SecurityAttribute.SecurityAttribute("test_security_attribute", new()
        {
            Description = securityAttributeDescription,
            Name = securityAttributeName,
            SecurityAttributeNamespaceId = testSecurityAttributeNamespace.Id,
            Validator = new Oci.SecurityAttribute.Inputs.SecurityAttributeValidatorArgs
            {
                ValidatorType = securityAttributeValidatorValidatorType,
                Values = securityAttributeValidatorValues,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.SecurityAttribute.SecurityAttribute;
    import com.pulumi.oci.SecurityAttribute.SecurityAttributeArgs;
    import com.pulumi.oci.SecurityAttribute.inputs.SecurityAttributeValidatorArgs;
    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) {
            var testSecurityAttribute = new SecurityAttribute("testSecurityAttribute", SecurityAttributeArgs.builder()
                .description(securityAttributeDescription)
                .name(securityAttributeName)
                .securityAttributeNamespaceId(testSecurityAttributeNamespace.id())
                .validator(SecurityAttributeValidatorArgs.builder()
                    .validatorType(securityAttributeValidatorValidatorType)
                    .values(securityAttributeValidatorValues)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testSecurityAttribute:
        type: oci:SecurityAttribute:SecurityAttribute
        name: test_security_attribute
        properties:
          description: ${securityAttributeDescription}
          name: ${securityAttributeName}
          securityAttributeNamespaceId: ${testSecurityAttributeNamespace.id}
          validator:
            validatorType: ${securityAttributeValidatorValidatorType}
            values: ${securityAttributeValidatorValues}
    

    Create SecurityAttribute Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecurityAttribute(name: string, args: SecurityAttributeArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityAttribute(resource_name: str,
                          args: SecurityAttributeArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityAttribute(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          description: Optional[str] = None,
                          security_attribute_namespace_id: Optional[str] = None,
                          is_retired: Optional[bool] = None,
                          name: Optional[str] = None,
                          validator: Optional[_securityattribute.SecurityAttributeValidatorArgs] = None)
    func NewSecurityAttribute(ctx *Context, name string, args SecurityAttributeArgs, opts ...ResourceOption) (*SecurityAttribute, error)
    public SecurityAttribute(string name, SecurityAttributeArgs args, CustomResourceOptions? opts = null)
    public SecurityAttribute(String name, SecurityAttributeArgs args)
    public SecurityAttribute(String name, SecurityAttributeArgs args, CustomResourceOptions options)
    
    type: oci:SecurityAttribute:SecurityAttribute
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecurityAttributeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecurityAttributeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecurityAttributeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityAttributeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityAttributeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var securityAttributeResource = new Oci.SecurityAttribute.SecurityAttribute("securityAttributeResource", new()
    {
        Description = "string",
        SecurityAttributeNamespaceId = "string",
        IsRetired = false,
        Name = "string",
        Validator = new Oci.SecurityAttribute.Inputs.SecurityAttributeValidatorArgs
        {
            ValidatorType = "string",
            Values = new[]
            {
                "string",
            },
        },
    });
    
    example, err := SecurityAttribute.NewSecurityAttribute(ctx, "securityAttributeResource", &SecurityAttribute.SecurityAttributeArgs{
    	Description:                  pulumi.String("string"),
    	SecurityAttributeNamespaceId: pulumi.String("string"),
    	IsRetired:                    pulumi.Bool(false),
    	Name:                         pulumi.String("string"),
    	Validator: &securityattribute.SecurityAttributeValidatorArgs{
    		ValidatorType: pulumi.String("string"),
    		Values: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var securityAttributeResource = new SecurityAttribute("securityAttributeResource", SecurityAttributeArgs.builder()
        .description("string")
        .securityAttributeNamespaceId("string")
        .isRetired(false)
        .name("string")
        .validator(SecurityAttributeValidatorArgs.builder()
            .validatorType("string")
            .values("string")
            .build())
        .build());
    
    security_attribute_resource = oci.security_attribute.SecurityAttribute("securityAttributeResource",
        description="string",
        security_attribute_namespace_id="string",
        is_retired=False,
        name="string",
        validator={
            "validator_type": "string",
            "values": ["string"],
        })
    
    const securityAttributeResource = new oci.securityattribute.SecurityAttribute("securityAttributeResource", {
        description: "string",
        securityAttributeNamespaceId: "string",
        isRetired: false,
        name: "string",
        validator: {
            validatorType: "string",
            values: ["string"],
        },
    });
    
    type: oci:SecurityAttribute:SecurityAttribute
    properties:
        description: string
        isRetired: false
        name: string
        securityAttributeNamespaceId: string
        validator:
            validatorType: string
            values:
                - string
    

    SecurityAttribute Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SecurityAttribute resource accepts the following input properties:

    Description string
    (Updatable) The description you assign to the security attribute during creation.
    SecurityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    IsRetired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    Name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    Validator SecurityAttributeValidator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    Description string
    (Updatable) The description you assign to the security attribute during creation.
    SecurityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    IsRetired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    Name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    Validator SecurityAttributeValidatorArgs

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    description String
    (Updatable) The description you assign to the security attribute during creation.
    securityAttributeNamespaceId String
    The OCID of the security attribute namespace.
    isRetired Boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name String
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    validator Validator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    description string
    (Updatable) The description you assign to the security attribute during creation.
    securityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    isRetired boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    validator SecurityAttributeValidator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    description str
    (Updatable) The description you assign to the security attribute during creation.
    security_attribute_namespace_id str
    The OCID of the security attribute namespace.
    is_retired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name str
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    validator securityattribute.SecurityAttributeValidatorArgs

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    description String
    (Updatable) The description you assign to the security attribute during creation.
    securityAttributeNamespaceId String
    The OCID of the security attribute namespace.
    isRetired Boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name String
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    validator Property Map

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityAttribute resource produces the following output properties:

    CompartmentId string
    The OCID of the compartment that contains the security attribute definition.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecurityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    CompartmentId string
    The OCID of the compartment that contains the security attribute definition.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecurityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    compartmentId String
    The OCID of the compartment that contains the security attribute definition.
    id String
    The provider-assigned unique ID for this managed resource.
    securityAttributeNamespaceName String
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    compartmentId string
    The OCID of the compartment that contains the security attribute definition.
    id string
    The provider-assigned unique ID for this managed resource.
    securityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    compartment_id str
    The OCID of the compartment that contains the security attribute definition.
    id str
    The provider-assigned unique ID for this managed resource.
    security_attribute_namespace_name str
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    compartmentId String
    The OCID of the compartment that contains the security attribute definition.
    id String
    The provider-assigned unique ID for this managed resource.
    securityAttributeNamespaceName String
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.

    Look up Existing SecurityAttribute Resource

    Get an existing SecurityAttribute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecurityAttributeState, opts?: CustomResourceOptions): SecurityAttribute
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            description: Optional[str] = None,
            is_retired: Optional[bool] = None,
            name: Optional[str] = None,
            security_attribute_namespace_id: Optional[str] = None,
            security_attribute_namespace_name: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None,
            type: Optional[str] = None,
            validator: Optional[_securityattribute.SecurityAttributeValidatorArgs] = None) -> SecurityAttribute
    func GetSecurityAttribute(ctx *Context, name string, id IDInput, state *SecurityAttributeState, opts ...ResourceOption) (*SecurityAttribute, error)
    public static SecurityAttribute Get(string name, Input<string> id, SecurityAttributeState? state, CustomResourceOptions? opts = null)
    public static SecurityAttribute get(String name, Output<String> id, SecurityAttributeState state, CustomResourceOptions options)
    resources:  _:    type: oci:SecurityAttribute:SecurityAttribute    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompartmentId string
    The OCID of the compartment that contains the security attribute definition.
    Description string
    (Updatable) The description you assign to the security attribute during creation.
    IsRetired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    Name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    SecurityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    SecurityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    Validator SecurityAttributeValidator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    CompartmentId string
    The OCID of the compartment that contains the security attribute definition.
    Description string
    (Updatable) The description you assign to the security attribute during creation.
    IsRetired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    Name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    SecurityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    SecurityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    Validator SecurityAttributeValidatorArgs

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    compartmentId String
    The OCID of the compartment that contains the security attribute definition.
    description String
    (Updatable) The description you assign to the security attribute during creation.
    isRetired Boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name String
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    securityAttributeNamespaceId String
    The OCID of the security attribute namespace.
    securityAttributeNamespaceName String
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    validator Validator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    compartmentId string
    The OCID of the compartment that contains the security attribute definition.
    description string
    (Updatable) The description you assign to the security attribute during creation.
    isRetired boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name string
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    securityAttributeNamespaceId string
    The OCID of the security attribute namespace.
    securityAttributeNamespaceName string
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    validator SecurityAttributeValidator

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    compartment_id str
    The OCID of the compartment that contains the security attribute definition.
    description str
    (Updatable) The description you assign to the security attribute during creation.
    is_retired bool
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name str
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    security_attribute_namespace_id str
    The OCID of the security attribute namespace.
    security_attribute_namespace_name str
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    validator securityattribute.SecurityAttributeValidatorArgs

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    compartmentId String
    The OCID of the compartment that contains the security attribute definition.
    description String
    (Updatable) The description you assign to the security attribute during creation.
    isRetired Boolean
    Indicates whether the security attribute is retired. See Managing Security Attribute Namespaces.
    name String
    The name you assign to the security attribute during creation. This is the security attribute key. The name must be unique within the namespace and cannot be changed.
    securityAttributeNamespaceId String
    The OCID of the security attribute namespace.
    securityAttributeNamespaceName String
    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 lifecycleState is ACTIVE before using it. After retiring a security attribute, make sure its lifecycleState is INACTIVE before using it. If you delete a security attribute, you cannot delete another security attribute until the deleted security attribute's lifecycleState changes 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.
    validator Property Map

    (Updatable) 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.

    If you define a validator after a value has been set for a security attribute, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid security attribute.

    To clear the validator call UpdateSecurityAttribute with DefaultSecuirtyAttributeValidator.

    Supporting Types

    SecurityAttributeValidator, SecurityAttributeValidatorArgs

    ValidatorType string
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    Values List<string>

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    ValidatorType string
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    Values []string

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    validatorType String
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    values List<String>

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    validatorType string
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    values string[]

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    validator_type str
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    values Sequence[str]

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    validatorType String
    (Updatable) Specifies the type of validation: a static value (no validation) or a list.
    values List<String>

    (Updatable) The list of allowed values for a security attribute value.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    SecurityAttributes can be imported using the id, e.g.

    $ pulumi import oci:SecurityAttribute/securityAttribute:SecurityAttribute test_security_attribute "securityAttributeNamespaces/{securityAttributeNamespaceId}/securityAttributes/{securityAttributeName}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.27.0 published on Thursday, Mar 20, 2025 by Pulumi