oci.Optimizer.getProfileLevels
Explore with Pulumi AI
This data source provides the list of Profile Levels 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 testProfileLevels = oci.Optimizer.getProfileLevels({
    compartmentId: compartmentId,
    compartmentIdInSubtree: profileLevelCompartmentIdInSubtree,
    name: profileLevelName,
    recommendationName: testRecommendation.name,
});
import pulumi
import pulumi_oci as oci
test_profile_levels = oci.Optimizer.get_profile_levels(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.GetProfileLevels(ctx, &optimizer.GetProfileLevelsArgs{
			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 testProfileLevels = Oci.Optimizer.GetProfileLevels.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.GetProfileLevelsArgs;
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 testProfileLevels = OptimizerFunctions.getProfileLevels(GetProfileLevelsArgs.builder()
            .compartmentId(compartmentId)
            .compartmentIdInSubtree(profileLevelCompartmentIdInSubtree)
            .name(profileLevelName)
            .recommendationName(testRecommendation.name())
            .build());
    }
}
variables:
  testProfileLevels:
    fn::invoke:
      function: oci:Optimizer:getProfileLevels
      arguments:
        compartmentId: ${compartmentId}
        compartmentIdInSubtree: ${profileLevelCompartmentIdInSubtree}
        name: ${profileLevelName}
        recommendationName: ${testRecommendation.name}
Using getProfileLevels
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 getProfileLevels(args: GetProfileLevelsArgs, opts?: InvokeOptions): Promise<GetProfileLevelsResult>
function getProfileLevelsOutput(args: GetProfileLevelsOutputArgs, opts?: InvokeOptions): Output<GetProfileLevelsResult>def get_profile_levels(compartment_id: Optional[str] = None,
                       compartment_id_in_subtree: Optional[bool] = None,
                       filters: Optional[Sequence[GetProfileLevelsFilter]] = None,
                       name: Optional[str] = None,
                       recommendation_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetProfileLevelsResult
def get_profile_levels_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetProfileLevelsFilterArgs]]]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       recommendation_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetProfileLevelsResult]func GetProfileLevels(ctx *Context, args *GetProfileLevelsArgs, opts ...InvokeOption) (*GetProfileLevelsResult, error)
func GetProfileLevelsOutput(ctx *Context, args *GetProfileLevelsOutputArgs, opts ...InvokeOption) GetProfileLevelsResultOutput> Note: This function is named GetProfileLevels in the Go SDK.
public static class GetProfileLevels 
{
    public static Task<GetProfileLevelsResult> InvokeAsync(GetProfileLevelsArgs args, InvokeOptions? opts = null)
    public static Output<GetProfileLevelsResult> Invoke(GetProfileLevelsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProfileLevelsResult> getProfileLevels(GetProfileLevelsArgs args, InvokeOptions options)
public static Output<GetProfileLevelsResult> getProfileLevels(GetProfileLevelsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Optimizer/getProfileLevels:getProfileLevels
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- CompartmentId boolIn Subtree 
- 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). 
- Filters
List<GetProfile Levels Filter> 
- 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.
- CompartmentId boolIn Subtree 
- 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). 
- Filters
[]GetProfile Levels Filter 
- 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.
- compartmentId BooleanIn Subtree 
- 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). 
- filters
List<GetProfile Levels Filter> 
- 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.
- compartmentId booleanIn Subtree 
- 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). 
- filters
GetProfile Levels Filter[] 
- 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_ boolin_ subtree 
- 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). 
- filters
Sequence[GetProfile Levels Filter] 
- 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.
- compartmentId BooleanIn Subtree 
- 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). 
- filters List<Property Map>
- 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.
getProfileLevels Result
The following output properties are available:
- CompartmentId string
- CompartmentId boolIn Subtree 
- Id string
- The provider-assigned unique ID for this managed resource.
- ProfileLevel List<GetCollections Profile Levels Profile Level Collection> 
- The list of profile_level_collection.
- Filters
List<GetProfile Levels Filter> 
- Name string
- A unique name for the profile level.
- RecommendationName string
- The name of the recommendation this profile level applies to.
- CompartmentId string
- CompartmentId boolIn Subtree 
- Id string
- The provider-assigned unique ID for this managed resource.
- ProfileLevel []GetCollections Profile Levels Profile Level Collection 
- The list of profile_level_collection.
- Filters
[]GetProfile Levels Filter 
- Name string
- A unique name for the profile level.
- RecommendationName string
- The name of the recommendation this profile level applies to.
- compartmentId String
- compartmentId BooleanIn Subtree 
- id String
- The provider-assigned unique ID for this managed resource.
- profileLevel List<GetCollections Profile Levels Profile Level Collection> 
- The list of profile_level_collection.
- filters
List<GetProfile Levels Filter> 
- name String
- A unique name for the profile level.
- recommendationName String
- The name of the recommendation this profile level applies to.
- compartmentId string
- compartmentId booleanIn Subtree 
- id string
- The provider-assigned unique ID for this managed resource.
- profileLevel GetCollections Profile Levels Profile Level Collection[] 
- The list of profile_level_collection.
- filters
GetProfile Levels Filter[] 
- name string
- A unique name for the profile level.
- recommendationName 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.
- profile_level_ Sequence[Getcollections Profile Levels Profile Level Collection] 
- The list of profile_level_collection.
- filters
Sequence[GetProfile Levels Filter] 
- name str
- A unique name for the profile level.
- recommendation_name str
- The name of the recommendation this profile level applies to.
- compartmentId String
- compartmentId BooleanIn Subtree 
- id String
- The provider-assigned unique ID for this managed resource.
- profileLevel List<Property Map>Collections 
- The list of profile_level_collection.
- filters List<Property Map>
- name String
- A unique name for the profile level.
- recommendationName String
- The name of the recommendation this profile level applies to.
Supporting Types
GetProfileLevelsFilter   
GetProfileLevelsProfileLevelCollection     
- Items
List<GetProfile Levels Profile Level Collection Item> 
- A collection of profile levels.
- Items
[]GetProfile Levels Profile Level Collection Item 
- A collection of profile levels.
- items
List<GetProfile Levels Profile Level Collection Item> 
- A collection of profile levels.
- items
GetProfile Levels Profile Level Collection Item[] 
- A collection of profile levels.
- items
Sequence[GetProfile Levels Profile Level Collection Item] 
- A collection of profile levels.
- items List<Property Map>
- A collection of profile levels.
GetProfileLevelsProfileLevelCollectionItem      
- DefaultInterval int
- The default aggregation interval (in days) for profiles using this profile level.
- Metrics
List<GetProfile Levels Profile Level Collection Item Metric> 
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- TimeCreated string
- The date and time the category details were created, in the format defined by RFC3339.
- TimeUpdated string
- The date and time the category details were last updated, in the format defined by RFC3339.
- ValidIntervals List<int>
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
- DefaultInterval int
- The default aggregation interval (in days) for profiles using this profile level.
- Metrics
[]GetProfile Levels Profile Level Collection Item Metric 
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- TimeCreated string
- The date and time the category details were created, in the format defined by RFC3339.
- TimeUpdated string
- The date and time the category details were last updated, in the format defined by RFC3339.
- ValidIntervals []int
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
- defaultInterval Integer
- The default aggregation interval (in days) for profiles using this profile level.
- metrics
List<GetProfile Levels Profile Level Collection Item Metric> 
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- timeCreated String
- The date and time the category details were created, in the format defined by RFC3339.
- timeUpdated String
- The date and time the category details were last updated, in the format defined by RFC3339.
- validIntervals List<Integer>
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
- defaultInterval number
- The default aggregation interval (in days) for profiles using this profile level.
- metrics
GetProfile Levels Profile Level Collection Item Metric[] 
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- timeCreated string
- The date and time the category details were created, in the format defined by RFC3339.
- timeUpdated string
- The date and time the category details were last updated, in the format defined by RFC3339.
- validIntervals number[]
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default_interval int
- The default aggregation interval (in days) for profiles using this profile level.
- metrics
Sequence[GetProfile Levels Profile Level Collection Item Metric] 
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- time_created str
- The date and time the category details were created, in the format defined by RFC3339.
- time_updated str
- The date and time the category details were last updated, in the format defined by RFC3339.
- valid_intervals Sequence[int]
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
- defaultInterval Number
- The default aggregation interval (in days) for profiles using this profile level.
- metrics List<Property Map>
- The metrics that will be evaluated by profiles using this profile level.
- 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.
- timeCreated String
- The date and time the category details were created, in the format defined by RFC3339.
- timeUpdated String
- The date and time the category details were last updated, in the format defined by RFC3339.
- validIntervals List<Number>
- An array of aggregation intervals (in days) allowed for profiles using this profile level.
GetProfileLevelsProfileLevelCollectionItemMetric       
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.