Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Optimizer.getRecommendation
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Recommendation resource in Oracle Cloud Infrastructure Optimizer service.
Gets the recommendation for the specified OCID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRecommendation = oci.Optimizer.getRecommendation({
recommendationId: testRecommendationOciOptimizerRecommendation.id,
});
import pulumi
import pulumi_oci as oci
test_recommendation = oci.Optimizer.get_recommendation(recommendation_id=test_recommendation_oci_optimizer_recommendation["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Optimizer"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Optimizer.GetRecommendation(ctx, &optimizer.GetRecommendationArgs{
RecommendationId: testRecommendationOciOptimizerRecommendation.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testRecommendation = Oci.Optimizer.GetRecommendation.Invoke(new()
{
RecommendationId = testRecommendationOciOptimizerRecommendation.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Optimizer.OptimizerFunctions;
import com.pulumi.oci.Optimizer.inputs.GetRecommendationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testRecommendation = OptimizerFunctions.getRecommendation(GetRecommendationArgs.builder()
.recommendationId(testRecommendationOciOptimizerRecommendation.id())
.build());
}
}
variables:
testRecommendation:
fn::invoke:
Function: oci:Optimizer:getRecommendation
Arguments:
recommendationId: ${testRecommendationOciOptimizerRecommendation.id}
Using getRecommendation
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRecommendation(args: GetRecommendationArgs, opts?: InvokeOptions): Promise<GetRecommendationResult>
function getRecommendationOutput(args: GetRecommendationOutputArgs, opts?: InvokeOptions): Output<GetRecommendationResult>
def get_recommendation(recommendation_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRecommendationResult
def get_recommendation_output(recommendation_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRecommendationResult]
func GetRecommendation(ctx *Context, args *GetRecommendationArgs, opts ...InvokeOption) (*GetRecommendationResult, error)
func GetRecommendationOutput(ctx *Context, args *GetRecommendationOutputArgs, opts ...InvokeOption) GetRecommendationResultOutput
> Note: This function is named GetRecommendation
in the Go SDK.
public static class GetRecommendation
{
public static Task<GetRecommendationResult> InvokeAsync(GetRecommendationArgs args, InvokeOptions? opts = null)
public static Output<GetRecommendationResult> Invoke(GetRecommendationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRecommendationResult> getRecommendation(GetRecommendationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Optimizer/getRecommendation:getRecommendation
arguments:
# arguments dictionary
The following arguments are supported:
- Recommendation
Id string - The unique OCID associated with the recommendation.
- Recommendation
Id string - The unique OCID associated with the recommendation.
- recommendation
Id String - The unique OCID associated with the recommendation.
- recommendation
Id string - The unique OCID associated with the recommendation.
- recommendation_
id str - The unique OCID associated with the recommendation.
- recommendation
Id String - The unique OCID associated with the recommendation.
getRecommendation Result
The following output properties are available:
- 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, object> - Additional metadata key/value pairs for the recommendation.
- Id string
- The unique OCID associated with the recommendation.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Recommendation
Id string - Resource
Counts List<GetRecommendation Resource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Status string
- The current status of the recommendation.
- Supported
Levels List<GetRecommendation 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 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 - The date and time the current status will change. 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]interface{} - Additional metadata key/value pairs for the recommendation.
- Id string
- The unique OCID associated with the recommendation.
- Importance string
- The level of importance assigned to the recommendation.
- Name string
- The name of the profile level.
- Recommendation
Id string - Resource
Counts []GetRecommendation Resource Count - An array of
ResourceCount
objects grouped by the status of the resource actions. - State string
- The recommendation's current state.
- Status string
- The current status of the recommendation.
- Supported
Levels []GetRecommendation 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 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 - The date and time the current status will change. 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,Object> - Additional metadata key/value pairs for the recommendation.
- id String
- The unique OCID associated with the recommendation.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- recommendation
Id String - resource
Counts List<GetRecommendation Resource Count> - An array of
ResourceCount
objects grouped by the status of the resource actions. - state String
- The recommendation's current state.
- status String
- The current status of the recommendation.
- supported
Levels List<GetRecommendation 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 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 - The date and time the current status will change. 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]: any} - Additional metadata key/value pairs for the recommendation.
- id string
- The unique OCID associated with the recommendation.
- importance string
- The level of importance assigned to the recommendation.
- name string
- The name of the profile level.
- recommendation
Id string - resource
Counts GetRecommendation Resource Count[] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state string
- The recommendation's current state.
- status string
- The current status of the recommendation.
- supported
Levels GetRecommendation 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 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 - The date and time the current status will change. 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, Any] - Additional metadata key/value pairs for the recommendation.
- id str
- The unique OCID associated with the recommendation.
- importance str
- The level of importance assigned to the recommendation.
- name str
- The name of the profile level.
- recommendation_
id str - resource_
counts Sequence[optimizer.Get Recommendation Resource Count] - An array of
ResourceCount
objects grouped by the status of the resource actions. - state str
- The recommendation's current state.
- status str
- The current status of the recommendation.
- supported_
levels Sequence[optimizer.Get 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_
status_ strend - The date and time the current status will change. 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<Any> - Additional metadata key/value pairs for the recommendation.
- id String
- The unique OCID associated with the recommendation.
- importance String
- The level of importance assigned to the recommendation.
- name String
- The name of the profile level.
- recommendation
Id String - 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
- The current 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 - The date and time the current status will change. 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.
Supporting Types
GetRecommendationResourceCount
GetRecommendationSupportedLevel
- Items
List<Get
Recommendation Supported Level Item> - The list of supported levels.
- Items
[]Get
Recommendation Supported Level Item - The list of supported levels.
- items
List<Get
Recommendation Supported Level Item> - The list of supported levels.
- items
Get
Recommendation Supported Level Item[] - The list of supported levels.
- items
Sequence[optimizer.
Get Recommendation Supported Level Item] - The list of supported levels.
- items List<Property Map>
- The list of supported levels.
GetRecommendationSupportedLevelItem
- 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.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi