Show / Hide Table of Contents

Class ResourceAction

The metadata associated with the resource action.

Inheritance
object
ResourceAction
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Oci.OptimizerService.Models
Assembly: OCI.DotNetSDK.Optimizer.dll
Syntax
public class ResourceAction

Properties

Action

Declaration
[Required(ErrorMessage = "Action is required.")]
[JsonProperty(PropertyName = "action")]
public Action Action { get; set; }
Property Value
Type Description
Action
Remarks

Required

CategoryId

Declaration
[Required(ErrorMessage = "CategoryId is required.")]
[JsonProperty(PropertyName = "categoryId")]
public string CategoryId { get; set; }
Property Value
Type Description
string

The unique OCID associated with the category.

Remarks

Required

CompartmentId

Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type Description
string

The OCID of the compartment.

Remarks

Required

CompartmentName

Declaration
[Required(ErrorMessage = "CompartmentName is required.")]
[JsonProperty(PropertyName = "compartmentName")]
public string CompartmentName { get; set; }
Property Value
Type Description
string

The name associated with the compartment.

Remarks

Required

EstimatedCostSaving

Declaration
[Required(ErrorMessage = "EstimatedCostSaving is required.")]
[JsonProperty(PropertyName = "estimatedCostSaving")]
public double EstimatedCostSaving { get; set; }
Property Value
Type Description
double

The estimated cost savings, in dollars, for the resource action.

Remarks

Required

ExtendedMetadata

Declaration
[JsonProperty(PropertyName = "extendedMetadata")]
public Dictionary<string, object> ExtendedMetadata { get; set; }
Property Value
Type Description
Dictionary<string, object>

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"}}

Id

Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type Description
string

The unique OCID associated with the resource action.

Remarks

Required

LifecycleState

Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public LifecycleState? LifecycleState { get; set; }
Property Value
Type Description
LifecycleState?

The resource action's current state.

Remarks

Required

Metadata

Declaration
[JsonProperty(PropertyName = "metadata")]
public Dictionary<string, string> Metadata { get; set; }
Property Value
Type Description
Dictionary<string, string>

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" }

Name

Declaration
[Required(ErrorMessage = "Name is required.")]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
Property Value
Type Description
string

The name assigned to the resource.

Remarks

Required

RecommendationId

Declaration
[Required(ErrorMessage = "RecommendationId is required.")]
[JsonProperty(PropertyName = "recommendationId")]
public string RecommendationId { get; set; }
Property Value
Type Description
string

The unique OCID associated with the recommendation.

Remarks

Required

ResourceId

Declaration
[Required(ErrorMessage = "ResourceId is required.")]
[JsonProperty(PropertyName = "resourceId")]
public string ResourceId { get; set; }
Property Value
Type Description
string

The unique OCID associated with the resource.

Remarks

Required

ResourceType

Declaration
[Required(ErrorMessage = "ResourceType is required.")]
[JsonProperty(PropertyName = "resourceType")]
public string ResourceType { get; set; }
Property Value
Type Description
string

The kind of resource.

Remarks

Required

Status

Declaration
[Required(ErrorMessage = "Status is required.")]
[JsonProperty(PropertyName = "status")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Status? Status { get; set; }
Property Value
Type Description
Status?

The current status of the resource action.

Remarks

Required

TimeCreated

Declaration
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type Description
DateTime?

The date and time the resource action details were created, in the format defined by RFC3339.

TimeStatusBegin

Declaration
[Required(ErrorMessage = "TimeStatusBegin is required.")]
[JsonProperty(PropertyName = "timeStatusBegin")]
public DateTime? TimeStatusBegin { get; set; }
Property Value
Type Description
DateTime?

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."

Remarks

Required

TimeStatusEnd

Declaration
[JsonProperty(PropertyName = "timeStatusEnd")]
public DateTime? TimeStatusEnd { get; set; }
Property Value
Type Description
DateTime?

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."

TimeUpdated

Declaration
[JsonProperty(PropertyName = "timeUpdated")]
public DateTime? TimeUpdated { get; set; }
Property Value
Type Description
DateTime?

The date and time the resource action details were last updated, in the format defined by RFC3339.

In this article
Back to top