ResourceAction

class oci.optimizer.models.ResourceAction(**kwargs)

Bases: object

The metadata associated with the resource action.

Attributes

LIFECYCLE_STATE_ACTIVE A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_ATTACHING A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_CREATING A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_DELETED A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_DELETING A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_DETACHING A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_FAILED A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_INACTIVE A constant which can be used with the lifecycle_state property of a ResourceAction.
LIFECYCLE_STATE_UPDATING A constant which can be used with the lifecycle_state property of a ResourceAction.
STATUS_DISMISSED A constant which can be used with the status property of a ResourceAction.
STATUS_IMPLEMENTED A constant which can be used with the status property of a ResourceAction.
STATUS_PENDING A constant which can be used with the status property of a ResourceAction.
STATUS_POSTPONED A constant which can be used with the status property of a ResourceAction.
action [Required] Gets the action of this ResourceAction.
category_id [Required] Gets the category_id of this ResourceAction.
compartment_id [Required] Gets the compartment_id of this ResourceAction.
compartment_name [Required] Gets the compartment_name of this ResourceAction.
estimated_cost_saving [Required] Gets the estimated_cost_saving of this ResourceAction.
extended_metadata Gets the extended_metadata of this ResourceAction.
id [Required] Gets the id of this ResourceAction.
lifecycle_state [Required] Gets the lifecycle_state of this ResourceAction.
metadata Gets the metadata of this ResourceAction.
name [Required] Gets the name of this ResourceAction.
recommendation_id [Required] Gets the recommendation_id of this ResourceAction.
resource_id [Required] Gets the resource_id of this ResourceAction.
resource_type [Required] Gets the resource_type of this ResourceAction.
status [Required] Gets the status of this ResourceAction.
time_created Gets the time_created of this ResourceAction.
time_status_begin [Required] Gets the time_status_begin of this ResourceAction.
time_status_end Gets the time_status_end of this ResourceAction.
time_updated Gets the time_updated of this ResourceAction.

Methods

__init__(**kwargs) Initializes a new ResourceAction object with values from keyword arguments.
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'

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

LIFECYCLE_STATE_ATTACHING = 'ATTACHING'

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

LIFECYCLE_STATE_CREATING = 'CREATING'

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

LIFECYCLE_STATE_DELETED = 'DELETED'

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

LIFECYCLE_STATE_DELETING = 'DELETING'

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

LIFECYCLE_STATE_DETACHING = 'DETACHING'

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

LIFECYCLE_STATE_FAILED = 'FAILED'

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

LIFECYCLE_STATE_INACTIVE = 'INACTIVE'

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

LIFECYCLE_STATE_UPDATING = 'UPDATING'

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

STATUS_DISMISSED = 'DISMISSED'

A constant which can be used with the status property of a ResourceAction. This constant has a value of “DISMISSED”

STATUS_IMPLEMENTED = 'IMPLEMENTED'

A constant which can be used with the status property of a ResourceAction. This constant has a value of “IMPLEMENTED”

STATUS_PENDING = 'PENDING'

A constant which can be used with the status property of a ResourceAction. This constant has a value of “PENDING”

STATUS_POSTPONED = 'POSTPONED'

A constant which can be used with the status property of a ResourceAction. This constant has a value of “POSTPONED”

__init__(**kwargs)

Initializes a new ResourceAction 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 ResourceAction.
  • category_id (str) – The value to assign to the category_id property of this ResourceAction.
  • recommendation_id (str) – The value to assign to the recommendation_id property of this ResourceAction.
  • resource_id (str) – The value to assign to the resource_id property of this ResourceAction.
  • name (str) – The value to assign to the name property of this ResourceAction.
  • resource_type (str) – The value to assign to the resource_type property of this ResourceAction.
  • compartment_id (str) – The value to assign to the compartment_id property of this ResourceAction.
  • compartment_name (str) – The value to assign to the compartment_name property of this ResourceAction.
  • action (oci.optimizer.models.Action) – The value to assign to the action property of this ResourceAction.
  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this ResourceAction. Allowed values for this property are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • estimated_cost_saving (float) – The value to assign to the estimated_cost_saving property of this ResourceAction.
  • status (str) – The value to assign to the status property of this ResourceAction. Allowed values for this property are: “PENDING”, “DISMISSED”, “POSTPONED”, “IMPLEMENTED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • time_status_begin (datetime) – The value to assign to the time_status_begin property of this ResourceAction.
  • time_status_end (datetime) – The value to assign to the time_status_end property of this ResourceAction.
  • metadata (dict(str, str)) – The value to assign to the metadata property of this ResourceAction.
  • extended_metadata (dict(str, object)) – The value to assign to the extended_metadata property of this ResourceAction.
  • time_created (datetime) – The value to assign to the time_created property of this ResourceAction.
  • time_updated (datetime) – The value to assign to the time_updated property of this ResourceAction.
action

[Required] Gets the action of this ResourceAction.

Returns:The action of this ResourceAction.
Return type:oci.optimizer.models.Action
category_id

[Required] Gets the category_id of this ResourceAction. The unique OCID associated with the category.

Returns:The category_id of this ResourceAction.
Return type:str
compartment_id

[Required] Gets the compartment_id of this ResourceAction. The OCID of the compartment.

Returns:The compartment_id of this ResourceAction.
Return type:str
compartment_name

[Required] Gets the compartment_name of this ResourceAction. The name associated with the compartment.

Returns:The compartment_name of this ResourceAction.
Return type:str
estimated_cost_saving

[Required] Gets the estimated_cost_saving of this ResourceAction. The estimated cost savings, in dollars, for the resource action.

Returns:The estimated_cost_saving of this ResourceAction.
Return type:float
extended_metadata

Gets the extended_metadata of this ResourceAction. Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the metadata object.

They are distinguished from metadata fields in that these can be nested JSON objects (whereas metadata fields are string/string maps only).

For example:

{“CurrentShape”: {“name”:”VM.Standard2.16”}, “RecommendedShape”: {“name”:”VM.Standard2.8”}}

Returns:The extended_metadata of this ResourceAction.
Return type:dict(str, object)
id

[Required] Gets the id of this ResourceAction. The unique OCID associated with the resource action.

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

[Required] Gets the lifecycle_state of this ResourceAction. The resource action’s current state.

Allowed values for this property are: “ACTIVE”, “FAILED”, “INACTIVE”, “ATTACHING”, “DETACHING”, “DELETING”, “DELETED”, “UPDATING”, “CREATING”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The lifecycle_state of this ResourceAction.
Return type:str
metadata

Gets the metadata of this ResourceAction. Custom metadata key/value pairs for the resource action.

Metadata Example

“metadata” : {
“cpuRecommendedShape”: “VM.Standard1.1”, “computeMemoryUtilization”: “26.05734124418388”, “currentShape”: “VM.Standard1.2”, “instanceRecommendedShape”: “VM.Standard1.1”, “computeCpuUtilization”: “7.930035319720132”, “memoryRecommendedShape”: “None”

}

Returns:The metadata of this ResourceAction.
Return type:dict(str, str)
name

[Required] Gets the name of this ResourceAction. The name assigned to the resource.

Returns:The name of this ResourceAction.
Return type:str
recommendation_id

[Required] Gets the recommendation_id of this ResourceAction. The unique OCID associated with the recommendation.

Returns:The recommendation_id of this ResourceAction.
Return type:str
resource_id

[Required] Gets the resource_id of this ResourceAction. The unique OCID associated with the resource.

Returns:The resource_id of this ResourceAction.
Return type:str
resource_type

[Required] Gets the resource_type of this ResourceAction. The kind of resource.

Returns:The resource_type of this ResourceAction.
Return type:str
status

[Required] Gets the status of this ResourceAction. The current status of the resource action.

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

Returns:The status of this ResourceAction.
Return type:str
time_created

Gets the time_created of this ResourceAction. The date and time the resource action details were created, in the format defined by RFC3339.

Returns:The time_created of this ResourceAction.
Return type:datetime
time_status_begin

[Required] Gets the time_status_begin of this ResourceAction. The date and time that the resource action entered its current status. The format is defined by RFC3339.

For example, “The status of the resource action changed from pending to current(ignored) on this date and time.”

Returns:The time_status_begin of this ResourceAction.
Return type:datetime
time_status_end

Gets the time_status_end of this ResourceAction. The date and time the current status will change. The format is defined by RFC3339.

For example, “The current postponed status of the resource action will end and change to pending on this date and time.”

Returns:The time_status_end of this ResourceAction.
Return type:datetime
time_updated

Gets the time_updated of this ResourceAction. The date and time the resource action details were last updated, in the format defined by RFC3339.

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