CreatePolicyDetails

class oci.identity.models.CreatePolicyDetails(**kwargs)

Bases: object

CreatePolicyDetails model.

Methods:

__init__(**kwargs)

Initializes a new CreatePolicyDetails object with values from keyword arguments.

Attributes:

compartment_id

[Required] Gets the compartment_id of this CreatePolicyDetails.

defined_tags

Gets the defined_tags of this CreatePolicyDetails.

description

[Required] Gets the description of this CreatePolicyDetails.

freeform_tags

Gets the freeform_tags of this CreatePolicyDetails.

name

[Required] Gets the name of this CreatePolicyDetails.

statements

[Required] Gets the statements of this CreatePolicyDetails.

version_date

Gets the version_date of this CreatePolicyDetails.

__init__(**kwargs)

Initializes a new CreatePolicyDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • compartment_id (str) – The value to assign to the compartment_id property of this CreatePolicyDetails.

  • name (str) – The value to assign to the name property of this CreatePolicyDetails.

  • statements (list[str]) – The value to assign to the statements property of this CreatePolicyDetails.

  • description (str) – The value to assign to the description property of this CreatePolicyDetails.

  • version_date (datetime) – The value to assign to the version_date property of this CreatePolicyDetails.

  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreatePolicyDetails.

  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreatePolicyDetails.

property compartment_id

[Required] Gets the compartment_id of this CreatePolicyDetails. The OCID of the compartment containing the policy (either the tenancy or another compartment).

Returns

The compartment_id of this CreatePolicyDetails.

Return type

str

property defined_tags

Gets the defined_tags of this CreatePolicyDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {“Operations”: {“CostCenter”: “42”}}

Returns

The defined_tags of this CreatePolicyDetails.

Return type

dict(str, dict(str, object))

property description

[Required] Gets the description of this CreatePolicyDetails. The description you assign to the policy during creation. Does not have to be unique, and it’s changeable.

Returns

The description of this CreatePolicyDetails.

Return type

str

property freeform_tags

Gets the freeform_tags of this CreatePolicyDetails. 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”}

Returns

The freeform_tags of this CreatePolicyDetails.

Return type

dict(str, str)

property name

[Required] Gets the name of this CreatePolicyDetails. The name you assign to the policy during creation. The name must be unique across all policies in the tenancy and cannot be changed.

Returns

The name of this CreatePolicyDetails.

Return type

str

property statements

[Required] Gets the statements of this CreatePolicyDetails. An array of policy statements written in the policy language. See How Policies Work and Common Policies.

Returns

The statements of this CreatePolicyDetails.

Return type

list[str]

property version_date

Gets the version_date of this CreatePolicyDetails. 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.

Returns

The version_date of this CreatePolicyDetails.

Return type

datetime