Oracle Cloud Infrastructure
getProfileLevels
This data source provides the list of Profile Levels in Oracle Cloud Infrastructure Optimizer service.
Lists the existing profile levels.
Example Usage
using Pulumi;
using Oci = Pulumi.Oci;
class MyStack : Stack
{
public MyStack()
{
var testProfileLevels = Output.Create(Oci.Optimizer.GetProfileLevels.InvokeAsync(new Oci.Optimizer.GetProfileLevelsArgs
{
CompartmentId = @var.Compartment_id,
CompartmentIdInSubtree = @var.Profile_level_compartment_id_in_subtree,
Name = @var.Profile_level_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.GetProfileLevels(ctx, &optimizer.GetProfileLevelsArgs{
CompartmentId: _var.Compartment_id,
CompartmentIdInSubtree: _var.Profile_level_compartment_id_in_subtree,
Name: pulumi.StringRef(_var.Profile_level_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_profile_levels = oci.Optimizer.get_profile_levels(compartment_id=var["compartment_id"],
compartment_id_in_subtree=var["profile_level_compartment_id_in_subtree"],
name=var["profile_level_name"],
recommendation_name=oci_optimizer_recommendation["test_recommendation"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testProfileLevels = oci.Optimizer.getProfileLevels({
compartmentId: _var.compartment_id,
compartmentIdInSubtree: _var.profile_level_compartment_id_in_subtree,
name: _var.profile_level_name,
recommendationName: oci_optimizer_recommendation.test_recommendation.name,
});
Coming soon!
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[_optimizer.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[_optimizer.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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: oci:Optimizer/getProfileLevels:getProfileLevels
Arguments:
# Arguments dictionary
The following arguments are supported:
- Compartment
Id string 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
.- Filters
List<Get
Profile Levels Filter> - 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 string 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
.- Filters
[]Get
Profile Levels Filter - 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 String The OCID of the compartment.
- compartment
Id 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
.- filters
List<Get
Profile Levels Filter> - 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 string The OCID of the compartment.
- compartment
Id 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
.- filters
Get
Profile Levels Filter[] - 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 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
.- filters
Get
Profile 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.
- compartment
Id String The OCID of the compartment.
- compartment
Id 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
.- filters List<Property Map>
- 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.
getProfileLevels 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.
- Profile
Level List<GetCollections Profile Levels Profile Level Collection> The list of profile_level_collection.
- Filters
List<Get
Profile Levels Filter> - 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.
- Profile
Level []GetCollections Profile Levels Profile Level Collection The list of profile_level_collection.
- Filters
[]Get
Profile Levels Filter - 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.
- profile
Level List<GetCollections Profile Levels Profile Level Collection> The list of profile_level_collection.
- filters
List<Get
Profile Levels Filter> - 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.
- profile
Level GetCollections Profile Levels Profile Level Collection[] The list of profile_level_collection.
- filters
Get
Profile Levels Filter[] - 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.
- profile_
level_ Getcollections Profile Levels Profile Level Collection] The list of profile_level_collection.
- filters
Get
Profile Levels Filter] - 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.
- profile
Level List<Property Map>Collections The list of profile_level_collection.
- filters List<Property Map>
- name String
A unique name for the profile level.
- recommendation
Name String The name of the recommendation this profile level applies to.
Supporting Types
GetProfileLevelsFilter
GetProfileLevelsProfileLevelCollection
- Items
List<Get
Profile Levels Profile Level Collection Item> A collection of profile levels.
- Items
[]Get
Profile Levels Profile Level Collection Item A collection of profile levels.
- items
List<Get
Profile Levels Profile Level Collection Item> A collection of profile levels.
- items
Get
Profile Levels Profile Level Collection Item[] A collection of profile levels.
- items
Get
Profile Levels Profile Level Collection Item] A collection of profile levels.
- items List<Property Map>
A collection of profile levels.
GetProfileLevelsProfileLevelCollectionItem
- Default
Interval int The default aggregation interval (in days) for profiles using this profile level.
- Metrics
List<Get
Profile 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.
- Recommendation
Name string Optional. A filter that returns results that match the recommendation name specified.
- Time
Created string The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated string The date and time the category details were last updated, in the format defined by RFC3339.
- Valid
Intervals List<int> 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
[]Get
Profile 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.
- Recommendation
Name string Optional. A filter that returns results that match the recommendation name specified.
- Time
Created string The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated string The date and time the category details were last updated, in the format defined by RFC3339.
- Valid
Intervals []int An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default
Interval Integer The default aggregation interval (in days) for profiles using this profile level.
- metrics
List<Get
Profile 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.
- recommendation
Name String Optional. A filter that returns results that match the recommendation name specified.
- time
Created String The date and time the category details were created, in the format defined by RFC3339.
- time
Updated String The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals List<Integer> An array of aggregation intervals (in days) allowed for profiles using this profile level.
- default
Interval number The default aggregation interval (in days) for profiles using this profile level.
- metrics
Get
Profile 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.
- recommendation
Name string Optional. A filter that returns results that match the recommendation name specified.
- time
Created string The date and time the category details were created, in the format defined by RFC3339.
- time
Updated string The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals 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
Get
Profile 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.
- default
Interval 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.
- recommendation
Name String Optional. A filter that returns results that match the recommendation name specified.
- time
Created String The date and time the category details were created, in the format defined by RFC3339.
- time
Updated String The date and time the category details were last updated, in the format defined by RFC3339.
- valid
Intervals List<Number> An array of aggregation intervals (in days) allowed for profiles using this profile level.
GetProfileLevelsProfileLevelCollectionItemMetric
Package Details
- Repository
- https://github.com/pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.