1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. getRecommendation
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Optimizer.getRecommendation

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 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/v2/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:

    RecommendationId string
    The unique OCID associated with the recommendation.
    RecommendationId string
    The unique OCID associated with the recommendation.
    recommendationId String
    The unique OCID associated with the recommendation.
    recommendationId string
    The unique OCID associated with the recommendation.
    recommendation_id str
    The unique OCID associated with the recommendation.
    recommendationId String
    The unique OCID associated with the recommendation.

    getRecommendation Result

    The following output properties are available:

    CategoryId string
    The unique OCID associated with the category.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Description string
    Text describing the recommendation.
    EstimatedCostSaving double
    The estimated cost savings, in dollars, for the recommendation.
    ExtendedMetadata Dictionary<string, string>
    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.
    RecommendationId string
    ResourceCounts List<GetRecommendationResourceCount>
    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.
    SupportedLevels List<GetRecommendationSupportedLevel>
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. Not all recommendations support this field.
    TimeCreated string
    The date and time the recommendation details were created, in the format defined by RFC3339.
    TimeStatusBegin string
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    TimeStatusEnd string
    The date and time the current status will change. The format is defined by RFC3339.
    TimeUpdated string
    The date and time the recommendation details were last updated, in the format defined by RFC3339.
    CategoryId string
    The unique OCID associated with the category.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Description string
    Text describing the recommendation.
    EstimatedCostSaving float64
    The estimated cost savings, in dollars, for the recommendation.
    ExtendedMetadata map[string]string
    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.
    RecommendationId string
    ResourceCounts []GetRecommendationResourceCount
    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.
    SupportedLevels []GetRecommendationSupportedLevel
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. Not all recommendations support this field.
    TimeCreated string
    The date and time the recommendation details were created, in the format defined by RFC3339.
    TimeStatusBegin string
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    TimeStatusEnd string
    The date and time the current status will change. The format is defined by RFC3339.
    TimeUpdated string
    The date and time the recommendation details were last updated, in the format defined by RFC3339.
    categoryId String
    The unique OCID associated with the category.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    description String
    Text describing the recommendation.
    estimatedCostSaving Double
    The estimated cost savings, in dollars, for the recommendation.
    extendedMetadata Map<String,String>
    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.
    recommendationId String
    resourceCounts List<GetRecommendationResourceCount>
    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.
    supportedLevels List<GetRecommendationSupportedLevel>
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. Not all recommendations support this field.
    timeCreated String
    The date and time the recommendation details were created, in the format defined by RFC3339.
    timeStatusBegin String
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    timeStatusEnd String
    The date and time the current status will change. The format is defined by RFC3339.
    timeUpdated String
    The date and time the recommendation details were last updated, in the format defined by RFC3339.
    categoryId string
    The unique OCID associated with the category.
    compartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    description string
    Text describing the recommendation.
    estimatedCostSaving number
    The estimated cost savings, in dollars, for the recommendation.
    extendedMetadata {[key: string]: string}
    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.
    recommendationId string
    resourceCounts GetRecommendationResourceCount[]
    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.
    supportedLevels GetRecommendationSupportedLevel[]
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. Not all recommendations support this field.
    timeCreated string
    The date and time the recommendation details were created, in the format defined by RFC3339.
    timeStatusBegin string
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    timeStatusEnd string
    The date and time the current status will change. The format is defined by RFC3339.
    timeUpdated 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_saving float
    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 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.GetRecommendationResourceCount]
    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.GetRecommendationSupportedLevel]
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. 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_begin str
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    time_status_end str
    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.
    categoryId String
    The unique OCID associated with the category.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    description String
    Text describing the recommendation.
    estimatedCostSaving Number
    The estimated cost savings, in dollars, for the recommendation.
    extendedMetadata Map<String>
    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.
    recommendationId String
    resourceCounts 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.
    supportedLevels List<Property Map>
    Optional. The profile levels supported by a recommendation. For example, profile level values could be Low, Medium, and High. Not all recommendations support this field.
    timeCreated String
    The date and time the recommendation details were created, in the format defined by RFC3339.
    timeStatusBegin String
    The date and time that the recommendation entered its current status. The format is defined by RFC3339.
    timeStatusEnd String
    The date and time the current status will change. The format is defined by RFC3339.
    timeUpdated String
    The date and time the recommendation details were last updated, in the format defined by RFC3339.

    Supporting Types

    GetRecommendationResourceCount

    Count int
    The count of resources.
    Status string
    The current status of the recommendation.
    Count int
    The count of resources.
    Status string
    The current status of the recommendation.
    count Integer
    The count of resources.
    status String
    The current status of the recommendation.
    count number
    The count of resources.
    status string
    The current status of the recommendation.
    count int
    The count of resources.
    status str
    The current status of the recommendation.
    count Number
    The count of resources.
    status String
    The current status of the recommendation.

    GetRecommendationSupportedLevel

    Items []GetRecommendationSupportedLevelItem
    The list of supported levels.
    items GetRecommendationSupportedLevelItem[]
    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.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi