oci.Optimizer.Recommendation
Explore with Pulumi AI
This resource provides the Recommendation resource in Oracle Cloud Infrastructure Optimizer service.
Updates the recommendation that corresponds to the specified OCID. Use this operation to implement the following actions:
- Postpone recommendation
- Dismiss recommendation
- Reactivate recommendation
Create Recommendation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Recommendation(name: string, args: RecommendationArgs, opts?: CustomResourceOptions);
@overload
def Recommendation(resource_name: str,
args: RecommendationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Recommendation(resource_name: str,
opts: Optional[ResourceOptions] = None,
recommendation_id: Optional[str] = None,
status: Optional[str] = None,
time_status_end: Optional[str] = None)
func NewRecommendation(ctx *Context, name string, args RecommendationArgs, opts ...ResourceOption) (*Recommendation, error)
public Recommendation(string name, RecommendationArgs args, CustomResourceOptions? opts = null)
public Recommendation(String name, RecommendationArgs args)
public Recommendation(String name, RecommendationArgs args, CustomResourceOptions options)
type: oci:Optimizer:Recommendation
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 RecommendationArgs
- 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 RecommendationArgs
- 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 RecommendationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RecommendationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RecommendationArgs
- 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 recommendationResource = new Oci.Optimizer.Recommendation("recommendationResource", new()
{
RecommendationId = "string",
Status = "string",
TimeStatusEnd = "string",
});
example, err := Optimizer.NewRecommendation(ctx, "recommendationResource", &Optimizer.RecommendationArgs{
RecommendationId: pulumi.String("string"),
Status: pulumi.String("string"),
TimeStatusEnd: pulumi.String("string"),
})
var recommendationResource = new Recommendation("recommendationResource", RecommendationArgs.builder()
.recommendationId("string")
.status("string")
.timeStatusEnd("string")
.build());
recommendation_resource = oci.optimizer.Recommendation("recommendationResource",
recommendation_id="string",
status="string",
time_status_end="string")
const recommendationResource = new oci.optimizer.Recommendation("recommendationResource", {
recommendationId: "string",
status: "string",
timeStatusEnd: "string",
});
type: oci:Optimizer:Recommendation
properties:
recommendationId: string
status: string
timeStatusEnd: string
Recommendation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Recommendation resource accepts the following input properties:
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Status string
- (Updatable) The status of the recommendation.
- 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 recommendation 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
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Status string
- (Updatable) The status of the recommendation.
- 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 recommendation 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
- recommendation
Id String - The unique OCID associated with the recommendation.
- status String
- (Updatable) The status of the recommendation.
- 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 recommendation 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
- recommendation
Id string - The unique OCID associated with the recommendation.
- status string
- (Updatable) The status of the recommendation.
- 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 recommendation 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
- recommendation_
id str - The unique OCID associated with the recommendation.
- status str
- (Updatable) The status of the recommendation.
- 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 recommendation 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
- recommendation
Id String - The unique OCID associated with the recommendation.
- status String
- (Updatable) The status of the recommendation.
- 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 recommendation 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 Recommendation resource produces the following output properties:
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Description string
- Text describing the recommendation.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the recommendation.
- Extended
Metadata Dictionary<string, string> - Additional metadata key/value pairs for the recommendation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Resource
Counts List<RecommendationResource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Supported
Levels List<RecommendationSupported Level> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - Time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- Time
Updated string - The date and time the recommendation details were last updated, in the format defined by RFC3339.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Description string
- Text describing the recommendation.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the recommendation.
- Extended
Metadata map[string]string - Additional metadata key/value pairs for the recommendation.
- Id string
- The provider-assigned unique ID for this managed resource.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Resource
Counts []RecommendationResource Count - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Supported
Levels []RecommendationSupported Level - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - Time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- Time
Updated string - The date and time the recommendation details were last updated, in the format defined by RFC3339.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- description String
- Text describing the recommendation.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata Map<String,String> - Additional metadata key/value pairs for the recommendation.
- id String
- The provider-assigned unique ID for this managed resource.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- resource
Counts List<RecommendationResource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - state String
- The recommendation's current state.
- supported
Levels List<RecommendationSupported Level> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created String - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- time
Updated String - The date and time the recommendation details were last updated, in the format defined by RFC3339.
- category
Id string - The unique OCID associated with the category.
- compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- description string
- Text describing the recommendation.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata {[key: string]: string} - Additional metadata key/value pairs for the recommendation.
- id string
- The provider-assigned unique ID for this managed resource.
- importance string
- The level of importance assigned to the recommendation.
- name string
- The name of the profile level.
- resource
Counts RecommendationResource Count[] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state string
- The recommendation's current state.
- supported
Levels RecommendationSupported Level[] - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status stringBegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- time
Updated string - The date and time the recommendation details were last updated, in the format defined by RFC3339.
- category_
id str - The unique OCID associated with the category.
- compartment_
id str - The OCID of the tenancy. The tenancy is the root compartment.
- description str
- Text describing the recommendation.
- estimated_
cost_ floatsaving - The estimated cost savings, in dollars, for the recommendation.
- extended_
metadata Mapping[str, str] - Additional metadata key/value pairs for the recommendation.
- id str
- The provider-assigned unique ID for this managed resource.
- importance str
- The level of importance assigned to the recommendation.
- name str
- The name of the profile level.
- resource_
counts Sequence[optimizer.Recommendation Resource Count] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state str
- The recommendation's current state.
- supported_
levels Sequence[optimizer.Recommendation Supported Level] - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time_
created str - The date and time the recommendation details were created, in the format defined by RFC3339.
- time_
status_ strbegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- time_
updated str - The date and time the recommendation details were last updated, in the format defined by RFC3339.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- description String
- Text describing the recommendation.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata Map<String> - Additional metadata key/value pairs for the recommendation.
- id String
- The provider-assigned unique ID for this managed resource.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- resource
Counts List<Property Map> - An array of
ResourceCount
objects grouped by the status of the resource actions. - state String
- The recommendation's current state.
- supported
Levels List<Property Map> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created String - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the recommendation entered its current status. The format is defined by RFC3339.
- time
Updated String - The date and time the recommendation details were last updated, in the format defined by RFC3339.
Look up Existing Recommendation Resource
Get an existing Recommendation 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?: RecommendationState, opts?: CustomResourceOptions): Recommendation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
category_id: Optional[str] = None,
compartment_id: Optional[str] = None,
description: Optional[str] = None,
estimated_cost_saving: Optional[float] = None,
extended_metadata: Optional[Mapping[str, str]] = None,
importance: Optional[str] = None,
name: Optional[str] = None,
recommendation_id: Optional[str] = None,
resource_counts: Optional[Sequence[_optimizer.RecommendationResourceCountArgs]] = None,
state: Optional[str] = None,
status: Optional[str] = None,
supported_levels: Optional[Sequence[_optimizer.RecommendationSupportedLevelArgs]] = None,
time_created: Optional[str] = None,
time_status_begin: Optional[str] = None,
time_status_end: Optional[str] = None,
time_updated: Optional[str] = None) -> Recommendation
func GetRecommendation(ctx *Context, name string, id IDInput, state *RecommendationState, opts ...ResourceOption) (*Recommendation, error)
public static Recommendation Get(string name, Input<string> id, RecommendationState? state, CustomResourceOptions? opts = null)
public static Recommendation get(String name, Output<String> id, RecommendationState 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.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Description string
- Text describing the recommendation.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the recommendation.
- Extended
Metadata Dictionary<string, string> - Additional metadata key/value pairs for the recommendation.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Counts List<RecommendationResource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Status string
- (Updatable) The status of the recommendation.
- Supported
Levels List<RecommendationSupported Level> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - Time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
- Category
Id string - The unique OCID associated with the category.
- Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Description string
- Text describing the recommendation.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the recommendation.
- Extended
Metadata map[string]string - Additional metadata key/value pairs for the recommendation.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Resource
Counts []RecommendationResource Count Args - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Status string
- (Updatable) The status of the recommendation.
- Supported
Levels []RecommendationSupported Level Args - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - Time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- Time
Status stringBegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- description String
- Text describing the recommendation.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata Map<String,String> - Additional metadata key/value pairs for the recommendation.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Counts List<RecommendationResource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - state String
- The recommendation's current state.
- status String
- (Updatable) The status of the recommendation.
- supported
Levels List<RecommendationSupported Level> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created String - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
- category
Id string - The unique OCID associated with the category.
- compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- description string
- Text describing the recommendation.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata {[key: string]: string} - Additional metadata key/value pairs for the recommendation.
- importance string
- The level of importance assigned to the recommendation.
- name string
- The name of the profile level.
- recommendation
Id string - The unique OCID associated with the recommendation.
- resource
Counts RecommendationResource Count[] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state string
- The recommendation's current state.
- status string
- (Updatable) The status of the recommendation.
- supported
Levels RecommendationSupported Level[] - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created string - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status stringBegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
- category_
id str - The unique OCID associated with the category.
- compartment_
id str - The OCID of the tenancy. The tenancy is the root compartment.
- description str
- Text describing the recommendation.
- estimated_
cost_ floatsaving - The estimated cost savings, in dollars, for the recommendation.
- extended_
metadata Mapping[str, str] - Additional metadata key/value pairs for the recommendation.
- importance str
- The level of importance assigned to the recommendation.
- name str
- The name of the profile level.
- recommendation_
id str - The unique OCID associated with the recommendation.
- resource_
counts Sequence[optimizer.Recommendation Resource Count Args] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state str
- The recommendation's current state.
- status str
- (Updatable) The status of the recommendation.
- supported_
levels Sequence[optimizer.Recommendation Supported Level Args] - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time_
created str - The date and time the recommendation details were created, in the format defined by RFC3339.
- time_
status_ strbegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
- category
Id String - The unique OCID associated with the category.
- compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- description String
- Text describing the recommendation.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the recommendation.
- extended
Metadata Map<String> - Additional metadata key/value pairs for the recommendation.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- recommendation
Id String - The unique OCID associated with the recommendation.
- resource
Counts List<Property Map> - An array of
ResourceCount
objects grouped by the status of the resource actions. - state String
- The recommendation's current state.
- status String
- (Updatable) The status of the recommendation.
- supported
Levels List<Property Map> - Optional. The profile levels supported by a recommendation. For example, profile level values could be
Low
,Medium
, andHigh
. Not all recommendations support this field. - time
Created String - The date and time the recommendation details were created, in the format defined by RFC3339.
- time
Status StringBegin - The date and time that the recommendation 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 recommendation 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 recommendation details were last updated, in the format defined by RFC3339.
Supporting Types
RecommendationResourceCount, RecommendationResourceCountArgs
RecommendationSupportedLevel, RecommendationSupportedLevelArgs
- Items
List<Recommendation
Supported Level Item> - The list of supported levels.
- Items
[]Recommendation
Supported Level Item - The list of supported levels.
- items
List<Recommendation
Supported Level Item> - The list of supported levels.
- items
Recommendation
Supported Level Item[] - The list of supported levels.
- items
Sequence[optimizer.
Recommendation Supported Level Item] - The list of supported levels.
- items List<Property Map>
- The list of supported levels.
RecommendationSupportedLevelItem, RecommendationSupportedLevelItemArgs
- Name string
- The name of the profile level.
- Name string
- The name of the profile level.
- name String
- The name of the profile level.
- name string
- The name of the profile level.
- name str
- The name of the profile level.
- name String
- The name of the profile level.
Import
Recommendations can be imported using the id
, e.g.
$ pulumi import oci:Optimizer/recommendation:Recommendation test_recommendation "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.