oci.Optimizer.ResourceAction
Explore with Pulumi AI
This resource provides the Resource Action resource in Oracle Cloud Infrastructure Optimizer service.
Updates the resource action that corresponds to the specified OCID. Use this operation to implement the following actions:
- Postpone resource action
- Ignore resource action
- Reactivate resource action
Create ResourceAction Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceAction(name: string, args: ResourceActionArgs, opts?: CustomResourceOptions);
@overload
def ResourceAction(resource_name: str,
args: ResourceActionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceAction(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_action_id: Optional[str] = None,
status: Optional[str] = None,
time_status_end: Optional[str] = None)
func NewResourceAction(ctx *Context, name string, args ResourceActionArgs, opts ...ResourceOption) (*ResourceAction, error)
public ResourceAction(string name, ResourceActionArgs args, CustomResourceOptions? opts = null)
public ResourceAction(String name, ResourceActionArgs args)
public ResourceAction(String name, ResourceActionArgs args, CustomResourceOptions options)
type: oci:Optimizer:ResourceAction
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 ResourceActionArgs
- 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 ResourceActionArgs
- 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 ResourceActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceActionArgs
- 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 resourceActionResource = new Oci.Optimizer.ResourceAction("resourceActionResource", new()
{
ResourceActionId = "string",
Status = "string",
TimeStatusEnd = "string",
});
example, err := Optimizer.NewResourceAction(ctx, "resourceActionResource", &Optimizer.ResourceActionArgs{
ResourceActionId: pulumi.String("string"),
Status: pulumi.String("string"),
TimeStatusEnd: pulumi.String("string"),
})
var resourceActionResource = new ResourceAction("resourceActionResource", ResourceActionArgs.builder()
.resourceActionId("string")
.status("string")
.timeStatusEnd("string")
.build());
resource_action_resource = oci.optimizer.ResourceAction("resourceActionResource",
resource_action_id="string",
status="string",
time_status_end="string")
const resourceActionResource = new oci.optimizer.ResourceAction("resourceActionResource", {
resourceActionId: "string",
status: "string",
timeStatusEnd: "string",
});
type: oci:Optimizer:ResourceAction
properties:
resourceActionId: string
status: string
timeStatusEnd: string
ResourceAction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ResourceAction resource accepts the following input properties:
- Resource
Action stringId - The unique OCID associated with the resource action.
- Status string
- (Updatable) The status of the resource action.
- Time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- Resource
Action stringId - The unique OCID associated with the resource action.
- Status string
- (Updatable) The status of the resource action.
- Time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- resource
Action StringId - The unique OCID associated with the resource action.
- status String
- (Updatable) The status of the resource action.
- time
Status StringEnd (Updatable) 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 topending
on this date and time."** 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
- resource
Action stringId - The unique OCID associated with the resource action.
- status string
- (Updatable) The status of the resource action.
- time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- resource_
action_ strid - The unique OCID associated with the resource action.
- status str
- (Updatable) The status of the resource action.
- time_
status_ strend (Updatable) 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 topending
on this date and time."** 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
- resource
Action StringId - The unique OCID associated with the resource action.
- status String
- (Updatable) The status of the resource action.
- time
Status StringEnd (Updatable) 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 topending
on this date and time."** 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 ResourceAction resource produces the following output properties:
- Actions
List<Resource
Action Action> - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata Dictionary<string, object> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, object>
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- Actions
[]Resource
Action Action - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata map[string]interface{} - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Id string
- The provider-assigned unique ID for this managed resource.
- Metadata map[string]interface{}
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
List<Resource
Action Action> - Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<String,Object> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<String,Object>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
Resource
Action Action[] - Details about the recommended action.
- category
Id string - The unique OCID associated with the category.
- compartment
Id string - The OCID of the compartment.
- compartment
Name string - The name associated with the compartment.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata {[key: string]: any} - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: any}
- Custom metadata key/value pairs for the resource action.
- name string
- The name assigned to the resource.
- recommendation
Id string - The unique OCID associated with the recommendation.
- resource
Id string - The unique OCID associated with the resource.
- resource
Type string - The kind of resource.
- state string
- The resource action's current state.
- time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
Sequence[optimizer.
Resource Action Action] - Details about the recommended action.
- category_
id str - The unique OCID associated with the category.
- compartment_
id str - The OCID of the compartment.
- compartment_
name str - The name associated with the compartment.
- estimated_
cost_ floatsaving - The estimated cost savings, in dollars, for the resource action.
- extended_
metadata Mapping[str, Any] - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id str
- The provider-assigned unique ID for this managed resource.
- metadata Mapping[str, Any]
- Custom metadata key/value pairs for the resource action.
- name str
- The name assigned to the resource.
- recommendation_
id str - The unique OCID associated with the recommendation.
- resource_
id str - The unique OCID associated with the resource.
- resource_
type str - The kind of resource.
- state str
- The resource action's current state.
- time_
created str - The date and time the resource action details were created, in the format defined by RFC3339.
- time_
status_ strbegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time_
updated str - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions List<Property Map>
- Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<Any> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - id String
- The provider-assigned unique ID for this managed resource.
- metadata Map<Any>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
Look up Existing ResourceAction Resource
Get an existing ResourceAction 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?: ResourceActionState, opts?: CustomResourceOptions): ResourceAction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[_optimizer.ResourceActionActionArgs]] = None,
category_id: Optional[str] = None,
compartment_id: Optional[str] = None,
compartment_name: Optional[str] = None,
estimated_cost_saving: Optional[float] = None,
extended_metadata: Optional[Mapping[str, Any]] = None,
metadata: Optional[Mapping[str, Any]] = None,
name: Optional[str] = None,
recommendation_id: Optional[str] = None,
resource_action_id: Optional[str] = None,
resource_id: Optional[str] = None,
resource_type: Optional[str] = None,
state: Optional[str] = None,
status: Optional[str] = None,
time_created: Optional[str] = None,
time_status_begin: Optional[str] = None,
time_status_end: Optional[str] = None,
time_updated: Optional[str] = None) -> ResourceAction
func GetResourceAction(ctx *Context, name string, id IDInput, state *ResourceActionState, opts ...ResourceOption) (*ResourceAction, error)
public static ResourceAction Get(string name, Input<string> id, ResourceActionState? state, CustomResourceOptions? opts = null)
public static ResourceAction get(String name, Output<String> id, ResourceActionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Actions
List<Resource
Action Action> - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata Dictionary<string, object> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Metadata Dictionary<string, object>
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Action stringId - The unique OCID associated with the resource action.
- Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Status string
- (Updatable) The status of the resource action.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- Actions
[]Resource
Action Action Args - Details about the recommended action.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the compartment.
- Compartment
Name string - The name associated with the compartment.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the resource action.
- Extended
Metadata map[string]interface{} - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - Metadata map[string]interface{}
- Custom metadata key/value pairs for the resource action.
- Name string
- The name assigned to the resource.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Action stringId - The unique OCID associated with the resource action.
- Resource
Id string - The unique OCID associated with the resource.
- Resource
Type string - The kind of resource.
- State string
- The resource action's current state.
- Status string
- (Updatable) The status of the resource action.
- Time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- Time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- Time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
List<Resource
Action Action> - Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<String,Object> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - metadata Map<String,Object>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Action StringId - The unique OCID associated with the resource action.
- resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- status String
- (Updatable) The status of the resource action.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status StringEnd (Updatable) 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 topending
on this date and time."** 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
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
Resource
Action Action[] - Details about the recommended action.
- category
Id string - The unique OCID associated with the category.
- compartment
Id string - The OCID of the compartment.
- compartment
Name string - The name associated with the compartment.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata {[key: string]: any} - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - metadata {[key: string]: any}
- Custom metadata key/value pairs for the resource action.
- name string
- The name assigned to the resource.
- recommendation
Id string - The unique OCID associated with the recommendation.
- resource
Action stringId - The unique OCID associated with the resource action.
- resource
Id string - The unique OCID associated with the resource.
- resource
Type string - The kind of resource.
- state string
- The resource action's current state.
- status string
- (Updatable) The status of the resource action.
- time
Created string - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status stringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status stringEnd (Updatable) 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 topending
on this date and time."** 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
- time
Updated string - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions
Sequence[optimizer.
Resource Action Action Args] - Details about the recommended action.
- category_
id str - The unique OCID associated with the category.
- compartment_
id str - The OCID of the compartment.
- compartment_
name str - The name associated with the compartment.
- estimated_
cost_ floatsaving - The estimated cost savings, in dollars, for the resource action.
- extended_
metadata Mapping[str, Any] - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - metadata Mapping[str, Any]
- Custom metadata key/value pairs for the resource action.
- name str
- The name assigned to the resource.
- recommendation_
id str - The unique OCID associated with the recommendation.
- resource_
action_ strid - The unique OCID associated with the resource action.
- resource_
id str - The unique OCID associated with the resource.
- resource_
type str - The kind of resource.
- state str
- The resource action's current state.
- status str
- (Updatable) The status of the resource action.
- time_
created str - The date and time the resource action details were created, in the format defined by RFC3339.
- time_
status_ strbegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time_
status_ strend (Updatable) 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 topending
on this date and time."** 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
- time_
updated str - The date and time the resource action details were last updated, in the format defined by RFC3339.
- actions List<Property Map>
- Details about the recommended action.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the compartment.
- compartment
Name String - The name associated with the compartment.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the resource action.
- extended
Metadata Map<Any> - Additional metadata key/value pairs that you provide. They serve the same purpose and functionality as fields in the
metadata
object. - metadata Map<Any>
- Custom metadata key/value pairs for the resource action.
- name String
- The name assigned to the resource.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Action StringId - The unique OCID associated with the resource action.
- resource
Id String - The unique OCID associated with the resource.
- resource
Type String - The kind of resource.
- state String
- The resource action's current state.
- status String
- (Updatable) The status of the resource action.
- time
Created String - The date and time the resource action details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the resource action entered its current status. The format is defined by RFC3339.
- time
Status StringEnd (Updatable) 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 topending
on this date and time."** 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
- time
Updated String - The date and time the resource action details were last updated, in the format defined by RFC3339.
Supporting Types
ResourceActionAction, ResourceActionActionArgs
- Description string
- Text describing the recommended action.
- Type string
- The status of the resource action.
- Url string
- The URL path to documentation that explains how to perform the action.
- Description string
- Text describing the recommended action.
- Type string
- The status of the resource action.
- Url string
- The URL path to documentation that explains how to perform the action.
- description String
- Text describing the recommended action.
- type String
- The status of the resource action.
- url String
- The URL path to documentation that explains how to perform the action.
- description string
- Text describing the recommended action.
- type string
- The status of the resource action.
- url string
- The URL path to documentation that explains how to perform the action.
- description str
- Text describing the recommended action.
- type str
- The status of the resource action.
- url str
- The URL path to documentation that explains how to perform the action.
- description String
- Text describing the recommended action.
- type String
- The status of the resource action.
- url String
- The URL path to documentation that explains how to perform the action.
Import
ResourceActions can be imported using the id
, e.g.
$ pulumi import oci:Optimizer/resourceAction:ResourceAction test_resource_action "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
oci
Terraform Provider.