oci.Optimizer.getProfileLevel
Explore with Pulumi AI
This data source provides details about a specific Profile Level resource in Oracle Cloud Infrastructure Optimizer service.
Lists the existing profile levels.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testProfileLevel = oci.Optimizer.getProfileLevel({
compartmentId: compartmentId,
compartmentIdInSubtree: profileLevelCompartmentIdInSubtree,
name: profileLevelName,
recommendationName: testRecommendation.name,
});
import pulumi
import pulumi_oci as oci
test_profile_level = oci.Optimizer.get_profile_level(compartment_id=compartment_id,
compartment_id_in_subtree=profile_level_compartment_id_in_subtree,
name=profile_level_name,
recommendation_name=test_recommendation["name"])
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.GetProfileLevel(ctx, &optimizer.GetProfileLevelArgs{
CompartmentId: compartmentId,
CompartmentIdInSubtree: profileLevelCompartmentIdInSubtree,
Name: pulumi.StringRef(profileLevelName),
RecommendationName: pulumi.StringRef(testRecommendation.Name),
}, 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 testProfileLevel = Oci.Optimizer.GetProfileLevel.Invoke(new()
{
CompartmentId = compartmentId,
CompartmentIdInSubtree = profileLevelCompartmentIdInSubtree,
Name = profileLevelName,
RecommendationName = testRecommendation.Name,
});
});
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.GetProfileLevelArgs;
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 testProfileLevel = OptimizerFunctions.getProfileLevel(GetProfileLevelArgs.builder()
.compartmentId(compartmentId)
.compartmentIdInSubtree(profileLevelCompartmentIdInSubtree)
.name(profileLevelName)
.recommendationName(testRecommendation.name())
.build());
}
}
variables:
testProfileLevel:
fn::invoke:
function: oci:Optimizer:getProfileLevel
arguments:
compartmentId: ${compartmentId}
compartmentIdInSubtree: ${profileLevelCompartmentIdInSubtree}
name: ${profileLevelName}
recommendationName: ${testRecommendation.name}
Using getProfileLevel
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 getProfileLevel(args: GetProfileLevelArgs, opts?: InvokeOptions): Promise<GetProfileLevelResult>
function getProfileLevelOutput(args: GetProfileLevelOutputArgs, opts?: InvokeOptions): Output<GetProfileLevelResult>
def get_profile_level(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) -> GetProfileLevelResult
def get_profile_level_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[GetProfileLevelResult]
func GetProfileLevel(ctx *Context, args *GetProfileLevelArgs, opts ...InvokeOption) (*GetProfileLevelResult, error)
func GetProfileLevelOutput(ctx *Context, args *GetProfileLevelOutputArgs, opts ...InvokeOption) GetProfileLevelResultOutput
> Note: This function is named GetProfileLevel
in the Go SDK.
public static class GetProfileLevel
{
public static Task<GetProfileLevelResult> InvokeAsync(GetProfileLevelArgs args, InvokeOptions? opts = null)
public static Output<GetProfileLevelResult> Invoke(GetProfileLevelInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProfileLevelResult> getProfileLevel(GetProfileLevelArgs args, InvokeOptions options)
public static Output<GetProfileLevelResult> getProfileLevel(GetProfileLevelArgs args, InvokeOptions options)
fn::invoke:
function: oci:Optimizer/getProfileLevel:getProfileLevel
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id This property is required. string - The OCID of the compartment.
- Compartment
Id In Subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- Name string
- Optional. A filter that returns results that match the name specified.
- Recommendation
Name string - Optional. A filter that returns results that match the recommendation name specified.
- Compartment
Id This property is required. string - The OCID of the compartment.
- Compartment
Id In Subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- Name string
- Optional. A filter that returns results that match the name specified.
- Recommendation
Name string - Optional. A filter that returns results that match the recommendation name specified.
- compartment
Id This property is required. String - The OCID of the compartment.
- compartment
Id In Subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- name String
- Optional. A filter that returns results that match the name specified.
- recommendation
Name String - Optional. A filter that returns results that match the recommendation name specified.
- compartment
Id This property is required. string - The OCID of the compartment.
- compartment
Id In Subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- name string
- Optional. A filter that returns results that match the name specified.
- recommendation
Name string - Optional. A filter that returns results that match the recommendation name specified.
- compartment_
id This property is required. str - The OCID of the compartment.
- compartment_
id_ in_ subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- 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.
- compartment
Id This property is required. String - The OCID of the compartment.
- compartment
Id In Subtree This property is required. 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
.Can only be set to true when performing ListCompartments on the tenancy (root compartment).
- name String
- Optional. A filter that returns results that match the name specified.
- recommendation
Name String - Optional. A filter that returns results that match the recommendation name specified.
getProfileLevel Result
The following output properties are available:
- Compartment
Id string - Compartment
Id boolIn Subtree - Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Profile Level Item> - A collection of profile levels.
- Name string
- A unique name for the profile level.
- Recommendation
Name string - The name of the recommendation this profile level applies to.
- Compartment
Id string - Compartment
Id boolIn Subtree - Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Profile Level Item - A collection of profile levels.
- Name string
- A unique name for the profile level.
- Recommendation
Name string - The name of the recommendation this profile level applies to.
- compartment
Id String - compartment
Id BooleanIn Subtree - id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Profile Level Item> - A collection of profile levels.
- name String
- A unique name for the profile level.
- recommendation
Name String - The name of the recommendation this profile level applies to.
- compartment
Id string - compartment
Id booleanIn Subtree - id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Profile Level Item[] - A collection of profile levels.
- name string
- A unique name for the profile level.
- recommendation
Name string - The name of the recommendation this profile level applies to.
- compartment_
id str - compartment_
id_ boolin_ subtree - id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[optimizer.
Get Profile Level Item] - A collection of profile levels.
- name str
- A unique name for the profile level.
- recommendation_
name str - The name of the recommendation this profile level applies to.
- compartment
Id String - compartment
Id BooleanIn Subtree - id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- A collection of profile levels.
- name String
- A unique name for the profile level.
- recommendation
Name String - The name of the recommendation this profile level applies to.
Supporting Types
GetProfileLevelItem
- Default
Interval This property is required. int - The default aggregation interval (in days) for profiles using this profile level.
- Metrics
This property is required. List<GetProfile Level Item Metric> - The metrics that will be evaluated by profiles using this profile level.
- Name
This property is required. string - Optional. A filter that returns results that match the name specified.
- Recommendation
Name This property is required. string - Optional. A filter that returns results that match the recommendation name specified.
- Time
Created This property is required. string - The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated This property is required. string - The date and time the category details were last updated, in the format defined by RFC3339.
- Valid
Intervals This property is required. List<int> - An array of aggregation intervals (in days) allowed for profiles using this profile level.
- Default
Interval This property is required. int - The default aggregation interval (in days) for profiles using this profile level.
- Metrics
This property is required. []GetProfile Level Item Metric - The metrics that will be evaluated by profiles using this profile level.
- Name
This property is required. string - Optional. A filter that returns results that match the name specified.
- Recommendation
Name This property is required. string - Optional. A filter that returns results that match the recommendation name specified.
- Time
Created This property is required. string - The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated This property is required. string - The date and time the category details were last updated, in the format defined by RFC3339.
- Valid
Intervals This property is required. []int - An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default
Interval This property is required. Integer - The default aggregation interval (in days) for profiles using this profile level.
- metrics
This property is required. List<GetProfile Level Item Metric> - The metrics that will be evaluated by profiles using this profile level.
- name
This property is required. String - Optional. A filter that returns results that match the name specified.
- recommendation
Name This property is required. String - Optional. A filter that returns results that match the recommendation name specified.
- time
Created This property is required. String - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated This property is required. String - The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals This property is required. List<Integer> - An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default
Interval This property is required. number - The default aggregation interval (in days) for profiles using this profile level.
- metrics
This property is required. GetProfile Level Item Metric[] - The metrics that will be evaluated by profiles using this profile level.
- name
This property is required. string - Optional. A filter that returns results that match the name specified.
- recommendation
Name This property is required. string - Optional. A filter that returns results that match the recommendation name specified.
- time
Created This property is required. string - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated This property is required. string - The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals This property is required. number[] - An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default_
interval This property is required. int - The default aggregation interval (in days) for profiles using this profile level.
- metrics
This property is required. Sequence[optimizer.Get Profile Level Item Metric] - The metrics that will be evaluated by profiles using this profile level.
- name
This property is required. str - Optional. A filter that returns results that match the name specified.
- recommendation_
name This property is required. str - Optional. A filter that returns results that match the recommendation name specified.
- time_
created This property is required. str - The date and time the category details were created, in the format defined by RFC3339.
- time_
updated This property is required. str - The date and time the category details were last updated, in the format defined by RFC3339.
- valid_
intervals This property is required. Sequence[int] - An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default
Interval This property is required. Number - The default aggregation interval (in days) for profiles using this profile level.
- metrics
This property is required. List<Property Map> - The metrics that will be evaluated by profiles using this profile level.
- name
This property is required. String - Optional. A filter that returns results that match the name specified.
- recommendation
Name This property is required. String - Optional. A filter that returns results that match the recommendation name specified.
- time
Created This property is required. String - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated This property is required. String - The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals This property is required. List<Number> - An array of aggregation intervals (in days) allowed for profiles using this profile level.
GetProfileLevelItemMetric
- Name
This property is required. string - Optional. A filter that returns results that match the name specified.
- Statistic
This property is required. string - The name of the statistic (e.g.,
p95
). - Target
This property is required. double - Optional. The metric value that the recommendation will target.
- Threshold
This property is required. double - The threshold that must be crossed for the recommendation to appear.
- Name
This property is required. string - Optional. A filter that returns results that match the name specified.
- Statistic
This property is required. string - The name of the statistic (e.g.,
p95
). - Target
This property is required. float64 - Optional. The metric value that the recommendation will target.
- Threshold
This property is required. float64 - The threshold that must be crossed for the recommendation to appear.
- name
This property is required. String - Optional. A filter that returns results that match the name specified.
- statistic
This property is required. String - The name of the statistic (e.g.,
p95
). - target
This property is required. Double - Optional. The metric value that the recommendation will target.
- threshold
This property is required. Double - The threshold that must be crossed for the recommendation to appear.
- name
This property is required. string - Optional. A filter that returns results that match the name specified.
- statistic
This property is required. string - The name of the statistic (e.g.,
p95
). - target
This property is required. number - Optional. The metric value that the recommendation will target.
- threshold
This property is required. number - The threshold that must be crossed for the recommendation to appear.
- name
This property is required. str - Optional. A filter that returns results that match the name specified.
- statistic
This property is required. str - The name of the statistic (e.g.,
p95
). - target
This property is required. float - Optional. The metric value that the recommendation will target.
- threshold
This property is required. float - The threshold that must be crossed for the recommendation to appear.
- name
This property is required. String - Optional. A filter that returns results that match the name specified.
- statistic
This property is required. String - The name of the statistic (e.g.,
p95
). - target
This property is required. Number - Optional. The metric value that the recommendation will target.
- threshold
This property is required. Number - The threshold that must be crossed for the recommendation to appear.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.