oci.Identity.Policy
This resource provides the Policy resource in Oracle Cloud Infrastructure Identity service.
Creates a new policy in the specified compartment (either the tenancy or another of your compartments). If you’re new to policies, see Getting Started with Policies.
You must specify a name for the policy, which must be unique across all policies in your tenancy and cannot be changed.
You must also specify a description for the policy (although it can be an empty string). It does not have to be unique, and you can change it anytime with UpdatePolicy.
You must specify one or more policy statements in the statements array. For information about writing policies, see How Policies Work and Common Policies. New policies take effect typically within 10 seconds.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testPolicy = new oci.identity.Policy("test_policy", {
    compartmentId: tenancyOcid,
    description: policyDescription,
    name: policyName,
    statements: policyStatements,
    definedTags: {
        "Operations.CostCenter": "42",
    },
    freeformTags: {
        Department: "Finance",
    },
    versionDate: policyVersionDate,
});
import pulumi
import pulumi_oci as oci
test_policy = oci.identity.Policy("test_policy",
    compartment_id=tenancy_ocid,
    description=policy_description,
    name=policy_name,
    statements=policy_statements,
    defined_tags={
        "Operations.CostCenter": "42",
    },
    freeform_tags={
        "Department": "Finance",
    },
    version_date=policy_version_date)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.NewPolicy(ctx, "test_policy", &identity.PolicyArgs{
			CompartmentId: pulumi.Any(tenancyOcid),
			Description:   pulumi.Any(policyDescription),
			Name:          pulumi.Any(policyName),
			Statements:    pulumi.Any(policyStatements),
			DefinedTags: pulumi.StringMap{
				"Operations.CostCenter": pulumi.String("42"),
			},
			FreeformTags: pulumi.StringMap{
				"Department": pulumi.String("Finance"),
			},
			VersionDate: pulumi.Any(policyVersionDate),
		})
		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 testPolicy = new Oci.Identity.Policy("test_policy", new()
    {
        CompartmentId = tenancyOcid,
        Description = policyDescription,
        Name = policyName,
        Statements = policyStatements,
        DefinedTags = 
        {
            { "Operations.CostCenter", "42" },
        },
        FreeformTags = 
        {
            { "Department", "Finance" },
        },
        VersionDate = policyVersionDate,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.Policy;
import com.pulumi.oci.Identity.PolicyArgs;
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 testPolicy = new Policy("testPolicy", PolicyArgs.builder()
            .compartmentId(tenancyOcid)
            .description(policyDescription)
            .name(policyName)
            .statements(policyStatements)
            .definedTags(Map.of("Operations.CostCenter", "42"))
            .freeformTags(Map.of("Department", "Finance"))
            .versionDate(policyVersionDate)
            .build());
    }
}
resources:
  testPolicy:
    type: oci:Identity:Policy
    name: test_policy
    properties:
      compartmentId: ${tenancyOcid}
      description: ${policyDescription}
      name: ${policyName}
      statements: ${policyStatements}
      definedTags:
        Operations.CostCenter: '42'
      freeformTags:
        Department: Finance
      versionDate: ${policyVersionDate}
Create Policy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);@overload
def Policy(resource_name: str,
           args: PolicyArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Policy(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           compartment_id: Optional[str] = None,
           description: Optional[str] = None,
           statements: Optional[Sequence[str]] = None,
           defined_tags: Optional[Mapping[str, str]] = None,
           freeform_tags: Optional[Mapping[str, str]] = None,
           name: Optional[str] = None,
           version_date: Optional[str] = None)func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
public Policy(String name, PolicyArgs args)
public Policy(String name, PolicyArgs args, CustomResourceOptions options)
type: oci:Identity:Policy
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 PolicyArgs
- 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 PolicyArgs
- 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 PolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyArgs
- 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 policyResource = new Oci.Identity.Policy("policyResource", new()
{
    CompartmentId = "string",
    Description = "string",
    Statements = new[]
    {
        "string",
    },
    DefinedTags = 
    {
        { "string", "string" },
    },
    FreeformTags = 
    {
        { "string", "string" },
    },
    Name = "string",
    VersionDate = "string",
});
example, err := identity.NewPolicy(ctx, "policyResource", &identity.PolicyArgs{
	CompartmentId: pulumi.String("string"),
	Description:   pulumi.String("string"),
	Statements: pulumi.StringArray{
		pulumi.String("string"),
	},
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:        pulumi.String("string"),
	VersionDate: pulumi.String("string"),
})
var policyResource = new com.pulumi.oci.Identity.Policy("policyResource", com.pulumi.oci.Identity.PolicyArgs.builder()
    .compartmentId("string")
    .description("string")
    .statements("string")
    .definedTags(Map.of("string", "string"))
    .freeformTags(Map.of("string", "string"))
    .name("string")
    .versionDate("string")
    .build());
policy_resource = oci.identity.Policy("policyResource",
    compartment_id="string",
    description="string",
    statements=["string"],
    defined_tags={
        "string": "string",
    },
    freeform_tags={
        "string": "string",
    },
    name="string",
    version_date="string")
const policyResource = new oci.identity.Policy("policyResource", {
    compartmentId: "string",
    description: "string",
    statements: ["string"],
    definedTags: {
        string: "string",
    },
    freeformTags: {
        string: "string",
    },
    name: "string",
    versionDate: "string",
});
type: oci:Identity:Policy
properties:
    compartmentId: string
    definedTags:
        string: string
    description: string
    freeformTags:
        string: string
    name: string
    statements:
        - string
    versionDate: string
Policy 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 Policy resource accepts the following input properties:
- CompartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- Statements List<string>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Dictionary<string, string>
- (Updatable) 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"}
- Name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- VersionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- CompartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- Statements []string
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- map[string]string
- (Updatable) 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"}
- Name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- VersionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- compartmentId String
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- description String
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- statements List<String>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Map<String,String>
- (Updatable) 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"}
- name String
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- versionDate String
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- compartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- statements string[]
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- {[key: string]: string}
- (Updatable) 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"}
- name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- versionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- compartment_id str
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- description str
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- statements Sequence[str]
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Mapping[str, str]
- (Updatable) 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"}
- name str
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- version_date str
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- compartmentId String
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- description String
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- statements List<String>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Map<String>
- (Updatable) 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"}
- name String
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- versionDate String
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
Outputs
All input properties are implicitly available as output properties. Additionally, the Policy resource produces the following output properties:
- ETag string
- Id string
- The provider-assigned unique ID for this managed resource.
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- LastUpdate stringETag 
- PolicyHash string
- State string
- The policy's current state.
- TimeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- ETag string
- Id string
- The provider-assigned unique ID for this managed resource.
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- LastUpdate stringETag 
- PolicyHash string
- State string
- The policy's current state.
- TimeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- ETag String
- id String
- The provider-assigned unique ID for this managed resource.
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- lastUpdate StringETag 
- policyHash String
- state String
- The policy's current state.
- timeCreated String
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- ETag string
- id string
- The provider-assigned unique ID for this managed resource.
- inactiveState string
- The detailed status of INACTIVE lifecycleState.
- lastUpdate stringETag 
- policyHash string
- state string
- The policy's current state.
- timeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- e_tag str
- id str
- The provider-assigned unique ID for this managed resource.
- inactive_state str
- The detailed status of INACTIVE lifecycleState.
- last_update_ stre_ tag 
- policy_hash str
- state str
- The policy's current state.
- time_created str
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- ETag String
- id String
- The provider-assigned unique ID for this managed resource.
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- lastUpdate StringETag 
- policyHash String
- state String
- The policy's current state.
- timeCreated String
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
Look up Existing Policy Resource
Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        e_tag: Optional[str] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        inactive_state: Optional[str] = None,
        last_update_e_tag: Optional[str] = None,
        name: Optional[str] = None,
        policy_hash: Optional[str] = None,
        state: Optional[str] = None,
        statements: Optional[Sequence[str]] = None,
        time_created: Optional[str] = None,
        version_date: Optional[str] = None) -> Policyfunc GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)public static Policy get(String name, Output<String> id, PolicyState state, CustomResourceOptions options)resources:  _:    type: oci:Identity:Policy    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.
- CompartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- ETag string
- Dictionary<string, string>
- (Updatable) 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"}
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- LastUpdate stringETag 
- Name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- PolicyHash string
- State string
- The policy's current state.
- Statements List<string>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- TimeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- VersionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- CompartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- ETag string
- map[string]string
- (Updatable) 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"}
- InactiveState string
- The detailed status of INACTIVE lifecycleState.
- LastUpdate stringETag 
- Name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- PolicyHash string
- State string
- The policy's current state.
- Statements []string
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- TimeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- VersionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- ETag String
- compartmentId String
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description String
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- Map<String,String>
- (Updatable) 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"}
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- lastUpdate StringETag 
- name String
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- policyHash String
- state String
- The policy's current state.
- statements List<String>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- timeCreated String
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- versionDate String
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- ETag string
- compartmentId string
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description string
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- {[key: string]: string}
- (Updatable) 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"}
- inactiveState string
- The detailed status of INACTIVE lifecycleState.
- lastUpdate stringETag 
- name string
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- policyHash string
- state string
- The policy's current state.
- statements string[]
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- timeCreated string
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- versionDate string
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- compartment_id str
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description str
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- e_tag str
- Mapping[str, str]
- (Updatable) 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"}
- inactive_state str
- The detailed status of INACTIVE lifecycleState.
- last_update_ stre_ tag 
- name str
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- policy_hash str
- state str
- The policy's current state.
- statements Sequence[str]
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- time_created str
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- version_date str
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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 
- ETag String
- compartmentId String
- The OCID of the compartment containing the policy (either the tenancy or another compartment).
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- description String
- (Updatable) The description you assign to the policy during creation. Does not have to be unique, and it's changeable.
- Map<String>
- (Updatable) 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"}
- inactiveState String
- The detailed status of INACTIVE lifecycleState.
- lastUpdate StringETag 
- name String
- The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.
- policyHash String
- state String
- The policy's current state.
- statements List<String>
- (Updatable) An array of policy statements written in the policy language. See How Policies Work and Common Policies.
- timeCreated String
- Date and time the policy was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- versionDate String
- (Updatable) The version of the policy. If null or set to an empty string, when a request comes in for authorization, the policy will be evaluated according to the current behavior of the services at that moment. If set to a particular date (YYYY-MM-DD), the policy will be evaluated according to the behavior of the services on that date. - ** 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
Policies can be imported using the id, e.g.
$ pulumi import oci:Identity/policy:Policy test_policy "id"
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 ociTerraform Provider.
