GovernanceRule

class oci.governance_rules_control_plane.models.GovernanceRule(**kwargs)

Bases: object

Represents a rule in parent tenancy which governs resources in child tenancies.

Attributes

CREATION_OPTION_CLONE A constant which can be used with the creation_option property of a GovernanceRule.
CREATION_OPTION_TEMPLATE A constant which can be used with the creation_option property of a GovernanceRule.
LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a GovernanceRule.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a GovernanceRule.
TYPE_ALLOWED_REGIONS A constant which can be used with the type property of a GovernanceRule.
TYPE_QUOTA A constant which can be used with the type property of a GovernanceRule.
TYPE_TAG A constant which can be used with the type property of a GovernanceRule.
compartment_id [Required] Gets the compartment_id of this GovernanceRule.
creation_option [Required] Gets the creation_option of this GovernanceRule.
defined_tags [Required] Gets the defined_tags of this GovernanceRule.
description Gets the description of this GovernanceRule.
display_name [Required] Gets the display_name of this GovernanceRule.
freeform_tags [Required] Gets the freeform_tags of this GovernanceRule.
id [Required] Gets the id of this GovernanceRule.
lifecycle_state [Required] Gets the lifecycle_state of this GovernanceRule.
related_resource_id Gets the related_resource_id of this GovernanceRule.
system_tags Gets the system_tags of this GovernanceRule.
template [Required] Gets the template of this GovernanceRule.
time_created [Required] Gets the time_created of this GovernanceRule.
time_updated [Required] Gets the time_updated of this GovernanceRule.
type [Required] Gets the type of this GovernanceRule.

Methods

__init__(**kwargs) Initializes a new GovernanceRule object with values from keyword arguments.
CREATION_OPTION_CLONE = 'CLONE'

A constant which can be used with the creation_option property of a GovernanceRule. This constant has a value of “CLONE”

CREATION_OPTION_TEMPLATE = 'TEMPLATE'

A constant which can be used with the creation_option property of a GovernanceRule. This constant has a value of “TEMPLATE”

LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

A constant which can be used with the lifecycle_state property of a GovernanceRule. This constant has a value of “ACTIVE”

LIFECYCLE_STATE_DELETED = 'DELETED'

A constant which can be used with the lifecycle_state property of a GovernanceRule. This constant has a value of “DELETED”

TYPE_ALLOWED_REGIONS = 'ALLOWED_REGIONS'

A constant which can be used with the type property of a GovernanceRule. This constant has a value of “ALLOWED_REGIONS”

TYPE_QUOTA = 'QUOTA'

A constant which can be used with the type property of a GovernanceRule. This constant has a value of “QUOTA”

TYPE_TAG = 'TAG'

A constant which can be used with the type property of a GovernanceRule. This constant has a value of “TAG”

__init__(**kwargs)

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

Parameters:
  • id (str) – The value to assign to the id property of this GovernanceRule.
  • compartment_id (str) – The value to assign to the compartment_id property of this GovernanceRule.
  • display_name (str) – The value to assign to the display_name property of this GovernanceRule.
  • description (str) – The value to assign to the description property of this GovernanceRule.
  • type (str) – The value to assign to the type property of this GovernanceRule. Allowed values for this property are: “QUOTA”, “TAG”, “ALLOWED_REGIONS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • creation_option (str) – The value to assign to the creation_option property of this GovernanceRule. Allowed values for this property are: “TEMPLATE”, “CLONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • template (oci.governance_rules_control_plane.models.Template) – The value to assign to the template property of this GovernanceRule.
  • related_resource_id (str) – The value to assign to the related_resource_id property of this GovernanceRule.
  • time_created (datetime) – The value to assign to the time_created property of this GovernanceRule.
  • time_updated (datetime) – The value to assign to the time_updated property of this GovernanceRule.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this GovernanceRule. Allowed values for this property are: “ACTIVE”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this GovernanceRule.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this GovernanceRule.
  • system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this GovernanceRule.
compartment_id

[Required] Gets the compartment_id of this GovernanceRule. The Oracle ID (OCID) of the root compartment containing the governance rule.

Returns:The compartment_id of this GovernanceRule.
Return type:str
creation_option

[Required] Gets the creation_option of this GovernanceRule. The type of option used to create the governance rule, could be one of TEMPLATE or CLONE.

Example: TEMPLATE

Allowed values for this property are: “TEMPLATE”, “CLONE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The creation_option of this GovernanceRule.
Return type:str
defined_tags

[Required] Gets the defined_tags of this GovernanceRule. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}

Returns:The defined_tags of this GovernanceRule.
Return type:dict(str, dict(str, object))
description

Gets the description of this GovernanceRule. Description of the governance rule.

Returns:The description of this GovernanceRule.
Return type:str
display_name

[Required] Gets the display_name of this GovernanceRule. Display name of the governance rule.

Returns:The display_name of this GovernanceRule.
Return type:str
freeform_tags

[Required] Gets the freeform_tags of this GovernanceRule. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}

Returns:The freeform_tags of this GovernanceRule.
Return type:dict(str, str)
id

[Required] Gets the id of this GovernanceRule. The Oracle ID (OCID) of the governance rule.

Returns:The id of this GovernanceRule.
Return type:str
lifecycle_state

[Required] Gets the lifecycle_state of this GovernanceRule. The current state of the governance rule.

Allowed values for this property are: “ACTIVE”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this GovernanceRule.
Return type:str
related_resource_id

Gets the related_resource_id of this GovernanceRule. The Oracle ID (OCID) of the resource, which was used as a template to create this governance rule.

Returns:The related_resource_id of this GovernanceRule.
Return type:str
system_tags

Gets the system_tags of this GovernanceRule. System tags for this resource. Each key is predefined and scoped to a namespace. Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}

Returns:The system_tags of this GovernanceRule.
Return type:dict(str, dict(str, object))
template

[Required] Gets the template of this GovernanceRule.

Returns:The template of this GovernanceRule.
Return type:oci.governance_rules_control_plane.models.Template
time_created

[Required] Gets the time_created of this GovernanceRule. Date and time the governance rule was created. An RFC3339 formatted datetime string.

Example: 2016-08-25T21:10:29.600Z

Returns:The time_created of this GovernanceRule.
Return type:datetime
time_updated

[Required] Gets the time_updated of this GovernanceRule. Date and time the governance rule was updated. An RFC3339 formatted datetime string.

Example: 2016-08-25T21:10:29.600Z

Returns:The time_updated of this GovernanceRule.
Return type:datetime
type

[Required] Gets the type of this GovernanceRule. Type of the governance rule, can be one of QUOTA, TAG, ALLOWED_REGIONS.

Example: QUOTA

Allowed values for this property are: “QUOTA”, “TAG”, “ALLOWED_REGIONS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The type of this GovernanceRule.
Return type:str