Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getRecommendationStrategy

This data source provides details about a specific Recommendation Strategy resource in Oracle Cloud Infrastructure Optimizer service.

Lists the existing strategies.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testRecommendationStrategy = Output.Create(Oci.Optimizer.GetRecommendationStrategy.InvokeAsync(new Oci.Optimizer.GetRecommendationStrategyArgs
        {
            CompartmentId = @var.Compartment_id,
            CompartmentIdInSubtree = @var.Recommendation_strategy_compartment_id_in_subtree,
            Name = @var.Recommendation_strategy_name,
            RecommendationName = oci_optimizer_recommendation.Test_recommendation.Name,
        }));
    }

}
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.GetRecommendationStrategy(ctx, &optimizer.GetRecommendationStrategyArgs{
			CompartmentId:          _var.Compartment_id,
			CompartmentIdInSubtree: _var.Recommendation_strategy_compartment_id_in_subtree,
			Name:                   pulumi.StringRef(_var.Recommendation_strategy_name),
			RecommendationName:     pulumi.StringRef(oci_optimizer_recommendation.Test_recommendation.Name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_recommendation_strategy = oci.Optimizer.get_recommendation_strategy(compartment_id=var["compartment_id"],
    compartment_id_in_subtree=var["recommendation_strategy_compartment_id_in_subtree"],
    name=var["recommendation_strategy_name"],
    recommendation_name=oci_optimizer_recommendation["test_recommendation"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testRecommendationStrategy = oci.Optimizer.getRecommendationStrategy({
    compartmentId: _var.compartment_id,
    compartmentIdInSubtree: _var.recommendation_strategy_compartment_id_in_subtree,
    name: _var.recommendation_strategy_name,
    recommendationName: oci_optimizer_recommendation.test_recommendation.name,
});

Coming soon!

Using getRecommendationStrategy

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 getRecommendationStrategy(args: GetRecommendationStrategyArgs, opts?: InvokeOptions): Promise<GetRecommendationStrategyResult>
function getRecommendationStrategyOutput(args: GetRecommendationStrategyOutputArgs, opts?: InvokeOptions): Output<GetRecommendationStrategyResult>
def get_recommendation_strategy(compartment_id: Optional[str] = None,
                                compartment_id_in_subtree: Optional[bool] = None,
                                name: Optional[str] = None,
                                recommendation_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetRecommendationStrategyResult
def get_recommendation_strategy_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                recommendation_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetRecommendationStrategyResult]
func GetRecommendationStrategy(ctx *Context, args *GetRecommendationStrategyArgs, opts ...InvokeOption) (*GetRecommendationStrategyResult, error)
func GetRecommendationStrategyOutput(ctx *Context, args *GetRecommendationStrategyOutputArgs, opts ...InvokeOption) GetRecommendationStrategyResultOutput

> Note: This function is named GetRecommendationStrategy in the Go SDK.

public static class GetRecommendationStrategy 
{
    public static Task<GetRecommendationStrategyResult> InvokeAsync(GetRecommendationStrategyArgs args, InvokeOptions? opts = null)
    public static Output<GetRecommendationStrategyResult> Invoke(GetRecommendationStrategyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRecommendationStrategyResult> getRecommendationStrategy(GetRecommendationStrategyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Optimizer/getRecommendationStrategy:getRecommendationStrategy
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

CompartmentIdInSubtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

Name string

Optional. A filter that returns results that match the name specified.

RecommendationName string

Optional. A filter that returns results that match the recommendation name specified.

CompartmentId string

The OCID of the compartment.

CompartmentIdInSubtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

Name string

Optional. A filter that returns results that match the name specified.

RecommendationName string

Optional. A filter that returns results that match the recommendation name specified.

compartmentId String

The OCID of the compartment.

compartmentIdInSubtree Boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

name String

Optional. A filter that returns results that match the name specified.

recommendationName String

Optional. A filter that returns results that match the recommendation name specified.

compartmentId string

The OCID of the compartment.

compartmentIdInSubtree boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

name string

Optional. A filter that returns results that match the name specified.

recommendationName string

Optional. A filter that returns results that match the recommendation name specified.

compartment_id str

The OCID of the compartment.

compartment_id_in_subtree bool

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

name str

Optional. A filter that returns results that match the name specified.

recommendation_name str

Optional. A filter that returns results that match the recommendation name specified.

compartmentId String

The OCID of the compartment.

compartmentIdInSubtree Boolean

When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned depending on the the setting of accessLevel.

name String

Optional. A filter that returns results that match the name specified.

recommendationName String

Optional. A filter that returns results that match the recommendation name specified.

getRecommendationStrategy Result

The following output properties are available:

CompartmentId string
CompartmentIdInSubtree bool
Id string

The provider-assigned unique ID for this managed resource.

Items List<GetRecommendationStrategyItem>

A collection of recommendation strategy summaries.

Name string

The name of the strategy parameter.

RecommendationName string
CompartmentId string
CompartmentIdInSubtree bool
Id string

The provider-assigned unique ID for this managed resource.

Items []GetRecommendationStrategyItem

A collection of recommendation strategy summaries.

Name string

The name of the strategy parameter.

RecommendationName string
compartmentId String
compartmentIdInSubtree Boolean
id String

The provider-assigned unique ID for this managed resource.

items List<GetRecommendationStrategyItem>

A collection of recommendation strategy summaries.

name String

The name of the strategy parameter.

recommendationName String
compartmentId string
compartmentIdInSubtree boolean
id string

The provider-assigned unique ID for this managed resource.

items GetRecommendationStrategyItem[]

A collection of recommendation strategy summaries.

name string

The name of the strategy parameter.

recommendationName string
compartment_id str
compartment_id_in_subtree bool
id str

The provider-assigned unique ID for this managed resource.

items GetRecommendationStrategyItem]

A collection of recommendation strategy summaries.

name str

The name of the strategy parameter.

recommendation_name str
compartmentId String
compartmentIdInSubtree Boolean
id String

The provider-assigned unique ID for this managed resource.

items List<Property Map>

A collection of recommendation strategy summaries.

name String

The name of the strategy parameter.

recommendationName String

Supporting Types

GetRecommendationStrategyItem

Name string

Optional. A filter that returns results that match the name specified.

Strategies List<GetRecommendationStrategyItemStrategy>

The list of strategies used.

Name string

Optional. A filter that returns results that match the name specified.

Strategies []GetRecommendationStrategyItemStrategy

The list of strategies used.

name String

Optional. A filter that returns results that match the name specified.

strategies List<GetRecommendationStrategyItemStrategy>

The list of strategies used.

name string

Optional. A filter that returns results that match the name specified.

strategies GetRecommendationStrategyItemStrategy[]

The list of strategies used.

name str

Optional. A filter that returns results that match the name specified.

strategies GetRecommendationStrategyItemStrategy]

The list of strategies used.

name String

Optional. A filter that returns results that match the name specified.

strategies List<Property Map>

The list of strategies used.

GetRecommendationStrategyItemStrategy

IsDefault bool

Whether this is the default recommendation strategy.

ParametersDefinitions List<GetRecommendationStrategyItemStrategyParametersDefinition>

The list of strategies for the parameters.

StrategyName string

The name of the strategy.

IsDefault bool

Whether this is the default recommendation strategy.

ParametersDefinitions []GetRecommendationStrategyItemStrategyParametersDefinition

The list of strategies for the parameters.

StrategyName string

The name of the strategy.

isDefault Boolean

Whether this is the default recommendation strategy.

parametersDefinitions List<GetRecommendationStrategyItemStrategyParametersDefinition>

The list of strategies for the parameters.

strategyName String

The name of the strategy.

isDefault boolean

Whether this is the default recommendation strategy.

parametersDefinitions GetRecommendationStrategyItemStrategyParametersDefinition[]

The list of strategies for the parameters.

strategyName string

The name of the strategy.

is_default bool

Whether this is the default recommendation strategy.

parameters_definitions GetRecommendationStrategyItemStrategyParametersDefinition]

The list of strategies for the parameters.

strategy_name str

The name of the strategy.

isDefault Boolean

Whether this is the default recommendation strategy.

parametersDefinitions List<Property Map>

The list of strategies for the parameters.

strategyName String

The name of the strategy.

GetRecommendationStrategyItemStrategyParametersDefinition

DefaultValues List<object>

A default value used for the strategy parameter.

Description string

Text describing the strategy parameter.

IsRequired bool

Whether this parameter is required.

Name string

Optional. A filter that returns results that match the name specified.

PossibleValues List<object>

The list of possible values used for these strategy parameters.

Type string

The type of strategy parameter.

DefaultValues []interface{}

A default value used for the strategy parameter.

Description string

Text describing the strategy parameter.

IsRequired bool

Whether this parameter is required.

Name string

Optional. A filter that returns results that match the name specified.

PossibleValues []interface{}

The list of possible values used for these strategy parameters.

Type string

The type of strategy parameter.

defaultValues List<Object>

A default value used for the strategy parameter.

description String

Text describing the strategy parameter.

isRequired Boolean

Whether this parameter is required.

name String

Optional. A filter that returns results that match the name specified.

possibleValues List<Object>

The list of possible values used for these strategy parameters.

type String

The type of strategy parameter.

defaultValues any[]

A default value used for the strategy parameter.

description string

Text describing the strategy parameter.

isRequired boolean

Whether this parameter is required.

name string

Optional. A filter that returns results that match the name specified.

possibleValues any[]

The list of possible values used for these strategy parameters.

type string

The type of strategy parameter.

default_values Sequence[Any]

A default value used for the strategy parameter.

description str

Text describing the strategy parameter.

is_required bool

Whether this parameter is required.

name str

Optional. A filter that returns results that match the name specified.

possible_values Sequence[Any]

The list of possible values used for these strategy parameters.

type str

The type of strategy parameter.

defaultValues List<Any>

A default value used for the strategy parameter.

description String

Text describing the strategy parameter.

isRequired Boolean

Whether this parameter is required.

name String

Optional. A filter that returns results that match the name specified.

possibleValues List<Any>

The list of possible values used for these strategy parameters.

type String

The type of strategy parameter.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.