1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. getProfiles
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Optimizer.getProfiles

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Profiles in Oracle Cloud Infrastructure Optimizer service.

    Lists the existing profiles.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testProfiles = oci.Optimizer.getProfiles({
        compartmentId: compartmentId,
        name: profileName,
        state: profileState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_profiles = oci.Optimizer.get_profiles(compartment_id=compartment_id,
        name=profile_name,
        state=profile_state)
    
    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.GetProfiles(ctx, &optimizer.GetProfilesArgs{
    			CompartmentId: compartmentId,
    			Name:          pulumi.StringRef(profileName),
    			State:         pulumi.StringRef(profileState),
    		}, 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 testProfiles = Oci.Optimizer.GetProfiles.Invoke(new()
        {
            CompartmentId = compartmentId,
            Name = profileName,
            State = profileState,
        });
    
    });
    
    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.GetProfilesArgs;
    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 testProfiles = OptimizerFunctions.getProfiles(GetProfilesArgs.builder()
                .compartmentId(compartmentId)
                .name(profileName)
                .state(profileState)
                .build());
    
        }
    }
    
    variables:
      testProfiles:
        fn::invoke:
          Function: oci:Optimizer:getProfiles
          Arguments:
            compartmentId: ${compartmentId}
            name: ${profileName}
            state: ${profileState}
    

    Using getProfiles

    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 getProfiles(args: GetProfilesArgs, opts?: InvokeOptions): Promise<GetProfilesResult>
    function getProfilesOutput(args: GetProfilesOutputArgs, opts?: InvokeOptions): Output<GetProfilesResult>
    def get_profiles(compartment_id: Optional[str] = None,
                     filters: Optional[Sequence[_optimizer.GetProfilesFilter]] = None,
                     name: Optional[str] = None,
                     state: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetProfilesResult
    def get_profiles_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_optimizer.GetProfilesFilterArgs]]]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     state: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetProfilesResult]
    func GetProfiles(ctx *Context, args *GetProfilesArgs, opts ...InvokeOption) (*GetProfilesResult, error)
    func GetProfilesOutput(ctx *Context, args *GetProfilesOutputArgs, opts ...InvokeOption) GetProfilesResultOutput

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

    public static class GetProfiles 
    {
        public static Task<GetProfilesResult> InvokeAsync(GetProfilesArgs args, InvokeOptions? opts = null)
        public static Output<GetProfilesResult> Invoke(GetProfilesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProfilesResult> getProfiles(GetProfilesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Optimizer/getProfiles:getProfiles
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    Filters List<GetProfilesFilter>
    Name string
    Optional. A filter that returns results that match the name specified.
    State string
    A filter that returns results that match the lifecycle state specified.
    CompartmentId string
    The OCID of the compartment.
    Filters []GetProfilesFilter
    Name string
    Optional. A filter that returns results that match the name specified.
    State string
    A filter that returns results that match the lifecycle state specified.
    compartmentId String
    The OCID of the compartment.
    filters List<GetProfilesFilter>
    name String
    Optional. A filter that returns results that match the name specified.
    state String
    A filter that returns results that match the lifecycle state specified.
    compartmentId string
    The OCID of the compartment.
    filters GetProfilesFilter[]
    name string
    Optional. A filter that returns results that match the name specified.
    state string
    A filter that returns results that match the lifecycle state specified.
    compartment_id str
    The OCID of the compartment.
    filters Sequence[optimizer.GetProfilesFilter]
    name str
    Optional. A filter that returns results that match the name specified.
    state str
    A filter that returns results that match the lifecycle state specified.
    compartmentId String
    The OCID of the compartment.
    filters List<Property Map>
    name String
    Optional. A filter that returns results that match the name specified.
    state String
    A filter that returns results that match the lifecycle state specified.

    getProfiles Result

    The following output properties are available:

    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProfileCollections List<GetProfilesProfileCollection>
    The list of profile_collection.
    Filters List<GetProfilesFilter>
    Name string
    The name assigned to the profile. Avoid entering confidential information.
    State string
    The profile's current state.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProfileCollections []GetProfilesProfileCollection
    The list of profile_collection.
    Filters []GetProfilesFilter
    Name string
    The name assigned to the profile. Avoid entering confidential information.
    State string
    The profile's current state.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    profileCollections List<GetProfilesProfileCollection>
    The list of profile_collection.
    filters List<GetProfilesFilter>
    name String
    The name assigned to the profile. Avoid entering confidential information.
    state String
    The profile's current state.
    compartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    id string
    The provider-assigned unique ID for this managed resource.
    profileCollections GetProfilesProfileCollection[]
    The list of profile_collection.
    filters GetProfilesFilter[]
    name string
    The name assigned to the profile. Avoid entering confidential information.
    state string
    The profile's current state.
    compartment_id str
    The OCID of the tenancy. The tenancy is the root compartment.
    id str
    The provider-assigned unique ID for this managed resource.
    profile_collections Sequence[optimizer.GetProfilesProfileCollection]
    The list of profile_collection.
    filters Sequence[optimizer.GetProfilesFilter]
    name str
    The name assigned to the profile. Avoid entering confidential information.
    state str
    The profile's current state.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    id String
    The provider-assigned unique ID for this managed resource.
    profileCollections List<Property Map>
    The list of profile_collection.
    filters List<Property Map>
    name String
    The name assigned to the profile. Avoid entering confidential information.
    state String
    The profile's current state.

    Supporting Types

    GetProfilesFilter

    Name string
    Optional. A filter that returns results that match the name specified.
    Values List<string>
    Regex bool
    Name string
    Optional. A filter that returns results that match the name specified.
    Values []string
    Regex bool
    name String
    Optional. A filter that returns results that match the name specified.
    values List<String>
    regex Boolean
    name string
    Optional. A filter that returns results that match the name specified.
    values string[]
    regex boolean
    name str
    Optional. A filter that returns results that match the name specified.
    values Sequence[str]
    regex bool
    name String
    Optional. A filter that returns results that match the name specified.
    values List<String>
    regex Boolean

    GetProfilesProfileCollection

    Items List<GetProfilesProfileCollectionItem>
    The list of tags specified in the current profile override.
    Items []GetProfilesProfileCollectionItem
    The list of tags specified in the current profile override.
    items List<GetProfilesProfileCollectionItem>
    The list of tags specified in the current profile override.
    items GetProfilesProfileCollectionItem[]
    The list of tags specified in the current profile override.
    items Sequence[optimizer.GetProfilesProfileCollectionItem]
    The list of tags specified in the current profile override.
    items List<Property Map>
    The list of tags specified in the current profile override.

    GetProfilesProfileCollectionItem

    AggregationIntervalInDays int
    The time period over which to collect data for the recommendations, measured in number of days.
    CompartmentId string
    The OCID of the compartment.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Text describing the profile. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The unique OCID of the profile.
    LevelsConfigurations List<GetProfilesProfileCollectionItemLevelsConfiguration>
    A list of configuration levels for each recommendation.
    Name string
    Optional. A filter that returns results that match the name specified.
    State string
    A filter that returns results that match the lifecycle state specified.
    SystemTags Dictionary<string, string>
    TargetCompartments List<GetProfilesProfileCollectionItemTargetCompartment>
    Optional. The compartments specified in the profile override for a recommendation.
    TargetTags List<GetProfilesProfileCollectionItemTargetTag>
    Optional. The tags specified in the profile override for a recommendation.
    TimeCreated string
    The date and time the profile was created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the profile was last updated, in the format defined by RFC3339.
    AggregationIntervalInDays int
    The time period over which to collect data for the recommendations, measured in number of days.
    CompartmentId string
    The OCID of the compartment.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    Description string
    Text describing the profile. Avoid entering confidential information.
    FreeformTags map[string]string
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    The unique OCID of the profile.
    LevelsConfigurations []GetProfilesProfileCollectionItemLevelsConfiguration
    A list of configuration levels for each recommendation.
    Name string
    Optional. A filter that returns results that match the name specified.
    State string
    A filter that returns results that match the lifecycle state specified.
    SystemTags map[string]string
    TargetCompartments []GetProfilesProfileCollectionItemTargetCompartment
    Optional. The compartments specified in the profile override for a recommendation.
    TargetTags []GetProfilesProfileCollectionItemTargetTag
    Optional. The tags specified in the profile override for a recommendation.
    TimeCreated string
    The date and time the profile was created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the profile was last updated, in the format defined by RFC3339.
    aggregationIntervalInDays Integer
    The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    description String
    Text describing the profile. Avoid entering confidential information.
    freeformTags Map<String,String>
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The unique OCID of the profile.
    levelsConfigurations List<GetProfilesProfileCollectionItemLevelsConfiguration>
    A list of configuration levels for each recommendation.
    name String
    Optional. A filter that returns results that match the name specified.
    state String
    A filter that returns results that match the lifecycle state specified.
    systemTags Map<String,String>
    targetCompartments List<GetProfilesProfileCollectionItemTargetCompartment>
    Optional. The compartments specified in the profile override for a recommendation.
    targetTags List<GetProfilesProfileCollectionItemTargetTag>
    Optional. The tags specified in the profile override for a recommendation.
    timeCreated String
    The date and time the profile was created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the profile was last updated, in the format defined by RFC3339.
    aggregationIntervalInDays number
    The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId string
    The OCID of the compartment.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    description string
    Text describing the profile. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    The unique OCID of the profile.
    levelsConfigurations GetProfilesProfileCollectionItemLevelsConfiguration[]
    A list of configuration levels for each recommendation.
    name string
    Optional. A filter that returns results that match the name specified.
    state string
    A filter that returns results that match the lifecycle state specified.
    systemTags {[key: string]: string}
    targetCompartments GetProfilesProfileCollectionItemTargetCompartment[]
    Optional. The compartments specified in the profile override for a recommendation.
    targetTags GetProfilesProfileCollectionItemTargetTag[]
    Optional. The tags specified in the profile override for a recommendation.
    timeCreated string
    The date and time the profile was created, in the format defined by RFC3339.
    timeUpdated string
    The date and time the profile was last updated, in the format defined by RFC3339.
    aggregation_interval_in_days int
    The time period over which to collect data for the recommendations, measured in number of days.
    compartment_id str
    The OCID of the compartment.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    description str
    Text describing the profile. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    The unique OCID of the profile.
    levels_configurations Sequence[optimizer.GetProfilesProfileCollectionItemLevelsConfiguration]
    A list of configuration levels for each recommendation.
    name str
    Optional. A filter that returns results that match the name specified.
    state str
    A filter that returns results that match the lifecycle state specified.
    system_tags Mapping[str, str]
    target_compartments Sequence[optimizer.GetProfilesProfileCollectionItemTargetCompartment]
    Optional. The compartments specified in the profile override for a recommendation.
    target_tags Sequence[optimizer.GetProfilesProfileCollectionItemTargetTag]
    Optional. The tags specified in the profile override for a recommendation.
    time_created str
    The date and time the profile was created, in the format defined by RFC3339.
    time_updated str
    The date and time the profile was last updated, in the format defined by RFC3339.
    aggregationIntervalInDays Number
    The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    description String
    Text describing the profile. Avoid entering confidential information.
    freeformTags Map<String>
    Simple key-value pair applied without any predefined name, type, or namespace. For more information, see Resource Tags. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    The unique OCID of the profile.
    levelsConfigurations List<Property Map>
    A list of configuration levels for each recommendation.
    name String
    Optional. A filter that returns results that match the name specified.
    state String
    A filter that returns results that match the lifecycle state specified.
    systemTags Map<String>
    targetCompartments List<Property Map>
    Optional. The compartments specified in the profile override for a recommendation.
    targetTags List<Property Map>
    Optional. The tags specified in the profile override for a recommendation.
    timeCreated String
    The date and time the profile was created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the profile was last updated, in the format defined by RFC3339.

    GetProfilesProfileCollectionItemLevelsConfiguration

    Items List<GetProfilesProfileCollectionItemLevelsConfigurationItem>
    The list of tags specified in the current profile override.
    Items []GetProfilesProfileCollectionItemLevelsConfigurationItem
    The list of tags specified in the current profile override.
    items List<GetProfilesProfileCollectionItemLevelsConfigurationItem>
    The list of tags specified in the current profile override.
    items GetProfilesProfileCollectionItemLevelsConfigurationItem[]
    The list of tags specified in the current profile override.
    items Sequence[optimizer.GetProfilesProfileCollectionItemLevelsConfigurationItem]
    The list of tags specified in the current profile override.
    items List<Property Map>
    The list of tags specified in the current profile override.

    GetProfilesProfileCollectionItemLevelsConfigurationItem

    Level string
    The pre-defined profile level.
    RecommendationId string
    The unique OCID of the recommendation.
    Level string
    The pre-defined profile level.
    RecommendationId string
    The unique OCID of the recommendation.
    level String
    The pre-defined profile level.
    recommendationId String
    The unique OCID of the recommendation.
    level string
    The pre-defined profile level.
    recommendationId string
    The unique OCID of the recommendation.
    level str
    The pre-defined profile level.
    recommendation_id str
    The unique OCID of the recommendation.
    level String
    The pre-defined profile level.
    recommendationId String
    The unique OCID of the recommendation.

    GetProfilesProfileCollectionItemTargetCompartment

    Items List<string>
    The list of tags specified in the current profile override.
    Items []string
    The list of tags specified in the current profile override.
    items List<String>
    The list of tags specified in the current profile override.
    items string[]
    The list of tags specified in the current profile override.
    items Sequence[str]
    The list of tags specified in the current profile override.
    items List<String>
    The list of tags specified in the current profile override.

    GetProfilesProfileCollectionItemTargetTag

    Items List<GetProfilesProfileCollectionItemTargetTagItem>
    The list of tags specified in the current profile override.
    Items []GetProfilesProfileCollectionItemTargetTagItem
    The list of tags specified in the current profile override.
    items List<GetProfilesProfileCollectionItemTargetTagItem>
    The list of tags specified in the current profile override.
    items GetProfilesProfileCollectionItemTargetTagItem[]
    The list of tags specified in the current profile override.
    items Sequence[optimizer.GetProfilesProfileCollectionItemTargetTagItem]
    The list of tags specified in the current profile override.
    items List<Property Map>
    The list of tags specified in the current profile override.

    GetProfilesProfileCollectionItemTargetTagItem

    TagDefinitionName string
    The name you use to refer to the tag, also known as the tag key.
    TagNamespaceName string
    The name of the tag namespace.
    TagValueType string
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    TagValues List<string>
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.
    TagDefinitionName string
    The name you use to refer to the tag, also known as the tag key.
    TagNamespaceName string
    The name of the tag namespace.
    TagValueType string
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    TagValues []string
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.
    tagDefinitionName String
    The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName String
    The name of the tag namespace.
    tagValueType String
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    tagValues List<String>
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.
    tagDefinitionName string
    The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName string
    The name of the tag namespace.
    tagValueType string
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    tagValues string[]
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.
    tag_definition_name str
    The name you use to refer to the tag, also known as the tag key.
    tag_namespace_name str
    The name of the tag namespace.
    tag_value_type str
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    tag_values Sequence[str]
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.
    tagDefinitionName String
    The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName String
    The name of the tag namespace.
    tagValueType String
    Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.
    tagValues List<String>
    The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    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.11.0 published on Thursday, Sep 19, 2024 by Pulumi