1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. Profile
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Optimizer.Profile

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Profile resource in Oracle Cloud Infrastructure Optimizer service.

    Creates a new profile.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testProfile = new oci.optimizer.Profile("test_profile", {
        compartmentId: compartmentId,
        description: profileDescription,
        levelsConfiguration: {
            items: [{
                level: profileLevelsConfigurationItemsLevel,
                recommendationId: testRecommendation.id,
            }],
        },
        name: profileName,
        aggregationIntervalInDays: profileAggregationIntervalInDays,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        freeformTags: {
            "bar-key": "value",
        },
        targetCompartments: {
            items: profileTargetCompartmentsItems,
        },
        targetTags: {
            items: [{
                tagDefinitionName: profileTargetTagsItemsTagDefinitionName,
                tagNamespaceName: testTagNamespace.name,
                tagValueType: profileTargetTagsItemsTagValueType,
                tagValues: profileTargetTagsItemsTagValues,
            }],
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_profile = oci.optimizer.Profile("test_profile",
        compartment_id=compartment_id,
        description=profile_description,
        levels_configuration={
            "items": [{
                "level": profile_levels_configuration_items_level,
                "recommendation_id": test_recommendation["id"],
            }],
        },
        name=profile_name,
        aggregation_interval_in_days=profile_aggregation_interval_in_days,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        freeform_tags={
            "bar-key": "value",
        },
        target_compartments={
            "items": profile_target_compartments_items,
        },
        target_tags={
            "items": [{
                "tag_definition_name": profile_target_tags_items_tag_definition_name,
                "tag_namespace_name": test_tag_namespace["name"],
                "tag_value_type": profile_target_tags_items_tag_value_type,
                "tag_values": profile_target_tags_items_tag_values,
            }],
        })
    
    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.NewProfile(ctx, "test_profile", &Optimizer.ProfileArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			Description:   pulumi.Any(profileDescription),
    			LevelsConfiguration: &optimizer.ProfileLevelsConfigurationArgs{
    				Items: optimizer.ProfileLevelsConfigurationItemArray{
    					&optimizer.ProfileLevelsConfigurationItemArgs{
    						Level:            pulumi.Any(profileLevelsConfigurationItemsLevel),
    						RecommendationId: pulumi.Any(testRecommendation.Id),
    					},
    				},
    			},
    			Name:                      pulumi.Any(profileName),
    			AggregationIntervalInDays: pulumi.Any(profileAggregationIntervalInDays),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    			TargetCompartments: &optimizer.ProfileTargetCompartmentsArgs{
    				Items: pulumi.Any(profileTargetCompartmentsItems),
    			},
    			TargetTags: &optimizer.ProfileTargetTagsArgs{
    				Items: optimizer.ProfileTargetTagsItemArray{
    					&optimizer.ProfileTargetTagsItemArgs{
    						TagDefinitionName: pulumi.Any(profileTargetTagsItemsTagDefinitionName),
    						TagNamespaceName:  pulumi.Any(testTagNamespace.Name),
    						TagValueType:      pulumi.Any(profileTargetTagsItemsTagValueType),
    						TagValues:         pulumi.Any(profileTargetTagsItemsTagValues),
    					},
    				},
    			},
    		})
    		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 testProfile = new Oci.Optimizer.Profile("test_profile", new()
        {
            CompartmentId = compartmentId,
            Description = profileDescription,
            LevelsConfiguration = new Oci.Optimizer.Inputs.ProfileLevelsConfigurationArgs
            {
                Items = new[]
                {
                    new Oci.Optimizer.Inputs.ProfileLevelsConfigurationItemArgs
                    {
                        Level = profileLevelsConfigurationItemsLevel,
                        RecommendationId = testRecommendation.Id,
                    },
                },
            },
            Name = profileName,
            AggregationIntervalInDays = profileAggregationIntervalInDays,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            TargetCompartments = new Oci.Optimizer.Inputs.ProfileTargetCompartmentsArgs
            {
                Items = profileTargetCompartmentsItems,
            },
            TargetTags = new Oci.Optimizer.Inputs.ProfileTargetTagsArgs
            {
                Items = new[]
                {
                    new Oci.Optimizer.Inputs.ProfileTargetTagsItemArgs
                    {
                        TagDefinitionName = profileTargetTagsItemsTagDefinitionName,
                        TagNamespaceName = testTagNamespace.Name,
                        TagValueType = profileTargetTagsItemsTagValueType,
                        TagValues = profileTargetTagsItemsTagValues,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Optimizer.Profile;
    import com.pulumi.oci.Optimizer.ProfileArgs;
    import com.pulumi.oci.Optimizer.inputs.ProfileLevelsConfigurationArgs;
    import com.pulumi.oci.Optimizer.inputs.ProfileTargetCompartmentsArgs;
    import com.pulumi.oci.Optimizer.inputs.ProfileTargetTagsArgs;
    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) {
            var testProfile = new Profile("testProfile", ProfileArgs.builder()
                .compartmentId(compartmentId)
                .description(profileDescription)
                .levelsConfiguration(ProfileLevelsConfigurationArgs.builder()
                    .items(ProfileLevelsConfigurationItemArgs.builder()
                        .level(profileLevelsConfigurationItemsLevel)
                        .recommendationId(testRecommendation.id())
                        .build())
                    .build())
                .name(profileName)
                .aggregationIntervalInDays(profileAggregationIntervalInDays)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .freeformTags(Map.of("bar-key", "value"))
                .targetCompartments(ProfileTargetCompartmentsArgs.builder()
                    .items(profileTargetCompartmentsItems)
                    .build())
                .targetTags(ProfileTargetTagsArgs.builder()
                    .items(ProfileTargetTagsItemArgs.builder()
                        .tagDefinitionName(profileTargetTagsItemsTagDefinitionName)
                        .tagNamespaceName(testTagNamespace.name())
                        .tagValueType(profileTargetTagsItemsTagValueType)
                        .tagValues(profileTargetTagsItemsTagValues)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      testProfile:
        type: oci:Optimizer:Profile
        name: test_profile
        properties:
          compartmentId: ${compartmentId}
          description: ${profileDescription}
          levelsConfiguration:
            items:
              - level: ${profileLevelsConfigurationItemsLevel}
                recommendationId: ${testRecommendation.id}
          name: ${profileName}
          aggregationIntervalInDays: ${profileAggregationIntervalInDays}
          definedTags:
            foo-namespace.bar-key: value
          freeformTags:
            bar-key: value
          targetCompartments:
            items: ${profileTargetCompartmentsItems}
          targetTags:
            items:
              - tagDefinitionName: ${profileTargetTagsItemsTagDefinitionName}
                tagNamespaceName: ${testTagNamespace.name}
                tagValueType: ${profileTargetTagsItemsTagValueType}
                tagValues: ${profileTargetTagsItemsTagValues}
    

    Create Profile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Profile(name: string, args: ProfileArgs, opts?: CustomResourceOptions);
    @overload
    def Profile(resource_name: str,
                args: ProfileArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Profile(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                compartment_id: Optional[str] = None,
                description: Optional[str] = None,
                levels_configuration: Optional[_optimizer.ProfileLevelsConfigurationArgs] = None,
                aggregation_interval_in_days: Optional[int] = None,
                defined_tags: Optional[Mapping[str, str]] = None,
                freeform_tags: Optional[Mapping[str, str]] = None,
                name: Optional[str] = None,
                target_compartments: Optional[_optimizer.ProfileTargetCompartmentsArgs] = None,
                target_tags: Optional[_optimizer.ProfileTargetTagsArgs] = None)
    func NewProfile(ctx *Context, name string, args ProfileArgs, opts ...ResourceOption) (*Profile, error)
    public Profile(string name, ProfileArgs args, CustomResourceOptions? opts = null)
    public Profile(String name, ProfileArgs args)
    public Profile(String name, ProfileArgs args, CustomResourceOptions options)
    
    type: oci:Optimizer:Profile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProfileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var profileResource = new Oci.Optimizer.Profile("profileResource", new()
    {
        CompartmentId = "string",
        Description = "string",
        LevelsConfiguration = new Oci.Optimizer.Inputs.ProfileLevelsConfigurationArgs
        {
            Items = new[]
            {
                new Oci.Optimizer.Inputs.ProfileLevelsConfigurationItemArgs
                {
                    Level = "string",
                    RecommendationId = "string",
                },
            },
        },
        AggregationIntervalInDays = 0,
        DefinedTags = 
        {
            { "string", "string" },
        },
        FreeformTags = 
        {
            { "string", "string" },
        },
        Name = "string",
        TargetCompartments = new Oci.Optimizer.Inputs.ProfileTargetCompartmentsArgs
        {
            Items = new[]
            {
                "string",
            },
        },
        TargetTags = new Oci.Optimizer.Inputs.ProfileTargetTagsArgs
        {
            Items = new[]
            {
                new Oci.Optimizer.Inputs.ProfileTargetTagsItemArgs
                {
                    TagDefinitionName = "string",
                    TagNamespaceName = "string",
                    TagValueType = "string",
                    TagValues = new[]
                    {
                        "string",
                    },
                },
            },
        },
    });
    
    example, err := Optimizer.NewProfile(ctx, "profileResource", &Optimizer.ProfileArgs{
    	CompartmentId: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	LevelsConfiguration: &optimizer.ProfileLevelsConfigurationArgs{
    		Items: optimizer.ProfileLevelsConfigurationItemArray{
    			&optimizer.ProfileLevelsConfigurationItemArgs{
    				Level:            pulumi.String("string"),
    				RecommendationId: pulumi.String("string"),
    			},
    		},
    	},
    	AggregationIntervalInDays: pulumi.Int(0),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	TargetCompartments: &optimizer.ProfileTargetCompartmentsArgs{
    		Items: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	TargetTags: &optimizer.ProfileTargetTagsArgs{
    		Items: optimizer.ProfileTargetTagsItemArray{
    			&optimizer.ProfileTargetTagsItemArgs{
    				TagDefinitionName: pulumi.String("string"),
    				TagNamespaceName:  pulumi.String("string"),
    				TagValueType:      pulumi.String("string"),
    				TagValues: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    	},
    })
    
    var profileResource = new Profile("profileResource", ProfileArgs.builder()
        .compartmentId("string")
        .description("string")
        .levelsConfiguration(ProfileLevelsConfigurationArgs.builder()
            .items(ProfileLevelsConfigurationItemArgs.builder()
                .level("string")
                .recommendationId("string")
                .build())
            .build())
        .aggregationIntervalInDays(0)
        .definedTags(Map.of("string", "string"))
        .freeformTags(Map.of("string", "string"))
        .name("string")
        .targetCompartments(ProfileTargetCompartmentsArgs.builder()
            .items("string")
            .build())
        .targetTags(ProfileTargetTagsArgs.builder()
            .items(ProfileTargetTagsItemArgs.builder()
                .tagDefinitionName("string")
                .tagNamespaceName("string")
                .tagValueType("string")
                .tagValues("string")
                .build())
            .build())
        .build());
    
    profile_resource = oci.optimizer.Profile("profileResource",
        compartment_id="string",
        description="string",
        levels_configuration={
            "items": [{
                "level": "string",
                "recommendation_id": "string",
            }],
        },
        aggregation_interval_in_days=0,
        defined_tags={
            "string": "string",
        },
        freeform_tags={
            "string": "string",
        },
        name="string",
        target_compartments={
            "items": ["string"],
        },
        target_tags={
            "items": [{
                "tag_definition_name": "string",
                "tag_namespace_name": "string",
                "tag_value_type": "string",
                "tag_values": ["string"],
            }],
        })
    
    const profileResource = new oci.optimizer.Profile("profileResource", {
        compartmentId: "string",
        description: "string",
        levelsConfiguration: {
            items: [{
                level: "string",
                recommendationId: "string",
            }],
        },
        aggregationIntervalInDays: 0,
        definedTags: {
            string: "string",
        },
        freeformTags: {
            string: "string",
        },
        name: "string",
        targetCompartments: {
            items: ["string"],
        },
        targetTags: {
            items: [{
                tagDefinitionName: "string",
                tagNamespaceName: "string",
                tagValueType: "string",
                tagValues: ["string"],
            }],
        },
    });
    
    type: oci:Optimizer:Profile
    properties:
        aggregationIntervalInDays: 0
        compartmentId: string
        definedTags:
            string: string
        description: string
        freeformTags:
            string: string
        levelsConfiguration:
            items:
                - level: string
                  recommendationId: string
        name: string
        targetCompartments:
            items:
                - string
        targetTags:
            items:
                - tagDefinitionName: string
                  tagNamespaceName: string
                  tagValueType: string
                  tagValues:
                    - string
    

    Profile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Profile resource accepts the following input properties:

    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Description string
    (Updatable) Text describing the profile. Avoid entering confidential information.
    LevelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    AggregationIntervalInDays int
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    DefinedTags Dictionary<string, string>
    (Updatable) 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"}
    FreeformTags Dictionary<string, string>
    (Updatable) 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"}
    Name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    TargetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    TargetTags ProfileTargetTags
    (Updatable) Optional. The tags specified in the profile override for a recommendation.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    Description string
    (Updatable) Text describing the profile. Avoid entering confidential information.
    LevelsConfiguration ProfileLevelsConfigurationArgs
    (Updatable) A list of configuration levels for each recommendation.
    AggregationIntervalInDays int
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    DefinedTags map[string]string
    (Updatable) 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"}
    FreeformTags map[string]string
    (Updatable) 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"}
    Name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    TargetCompartments ProfileTargetCompartmentsArgs
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    TargetTags ProfileTargetTagsArgs
    (Updatable) Optional. The tags specified in the profile override for a recommendation.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    description String
    (Updatable) Text describing the profile. Avoid entering confidential information.
    levelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    aggregationIntervalInDays Integer
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    definedTags Map<String,String>
    (Updatable) 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"}
    freeformTags Map<String,String>
    (Updatable) 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"}
    name String
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    targetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags ProfileTargetTags
    (Updatable) Optional. The tags specified in the profile override for a recommendation.
    compartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    description string
    (Updatable) Text describing the profile. Avoid entering confidential information.
    levelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    aggregationIntervalInDays number
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    definedTags {[key: string]: string}
    (Updatable) 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"}
    freeformTags {[key: string]: string}
    (Updatable) 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"}
    name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    targetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags ProfileTargetTags
    (Updatable) Optional. The tags specified in the profile override for a recommendation.
    compartment_id str
    The OCID of the tenancy. The tenancy is the root compartment.
    description str
    (Updatable) Text describing the profile. Avoid entering confidential information.
    levels_configuration optimizer.ProfileLevelsConfigurationArgs
    (Updatable) A list of configuration levels for each recommendation.
    aggregation_interval_in_days int
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    defined_tags Mapping[str, str]
    (Updatable) 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"}
    freeform_tags Mapping[str, str]
    (Updatable) 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"}
    name str
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    target_compartments optimizer.ProfileTargetCompartmentsArgs
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    target_tags optimizer.ProfileTargetTagsArgs
    (Updatable) Optional. The tags specified in the profile override for a recommendation.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    description String
    (Updatable) Text describing the profile. Avoid entering confidential information.
    levelsConfiguration Property Map
    (Updatable) A list of configuration levels for each recommendation.
    aggregationIntervalInDays Number
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    definedTags Map<String>
    (Updatable) 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"}
    freeformTags Map<String>
    (Updatable) 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"}
    name String
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    targetCompartments Property Map
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags Property Map
    (Updatable) Optional. The tags specified in the profile override for a recommendation.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Profile resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The profile's current state.
    SystemTags Dictionary<string, string>
    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The profile's current state.
    SystemTags map[string]string
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The profile's current state.
    systemTags Map<String,String>
    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.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The profile's current state.
    systemTags {[key: string]: string}
    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.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The profile's current state.
    system_tags Mapping[str, str]
    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.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The profile's current state.
    systemTags Map<String>
    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.

    Look up Existing Profile Resource

    Get an existing Profile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProfileState, opts?: CustomResourceOptions): Profile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aggregation_interval_in_days: Optional[int] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            levels_configuration: Optional[_optimizer.ProfileLevelsConfigurationArgs] = None,
            name: Optional[str] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            target_compartments: Optional[_optimizer.ProfileTargetCompartmentsArgs] = None,
            target_tags: Optional[_optimizer.ProfileTargetTagsArgs] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> Profile
    func GetProfile(ctx *Context, name string, id IDInput, state *ProfileState, opts ...ResourceOption) (*Profile, error)
    public static Profile Get(string name, Input<string> id, ProfileState? state, CustomResourceOptions? opts = null)
    public static Profile get(String name, Output<String> id, ProfileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AggregationIntervalInDays int
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    DefinedTags Dictionary<string, string>
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    (Updatable) 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"}
    LevelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    Name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    State string
    The profile's current state.
    SystemTags Dictionary<string, string>
    TargetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    TargetTags ProfileTargetTags
    (Updatable) 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
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    DefinedTags map[string]string
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    FreeformTags map[string]string
    (Updatable) 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"}
    LevelsConfiguration ProfileLevelsConfigurationArgs
    (Updatable) A list of configuration levels for each recommendation.
    Name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    State string
    The profile's current state.
    SystemTags map[string]string
    TargetCompartments ProfileTargetCompartmentsArgs
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    TargetTags ProfileTargetTagsArgs
    (Updatable) 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
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    definedTags Map<String,String>
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    freeformTags Map<String,String>
    (Updatable) 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"}
    levelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    name String
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    state String
    The profile's current state.
    systemTags Map<String,String>
    targetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags ProfileTargetTags
    (Updatable) 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
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    definedTags {[key: string]: string}
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    (Updatable) 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"}
    levelsConfiguration ProfileLevelsConfiguration
    (Updatable) A list of configuration levels for each recommendation.
    name string
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    state string
    The profile's current state.
    systemTags {[key: string]: string}
    targetCompartments ProfileTargetCompartments
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags ProfileTargetTags
    (Updatable) 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
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    compartment_id str
    The OCID of the tenancy. The tenancy is the root compartment.
    defined_tags Mapping[str, str]
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    (Updatable) 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"}
    levels_configuration optimizer.ProfileLevelsConfigurationArgs
    (Updatable) A list of configuration levels for each recommendation.
    name str
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    state str
    The profile's current state.
    system_tags Mapping[str, str]
    target_compartments optimizer.ProfileTargetCompartmentsArgs
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    target_tags optimizer.ProfileTargetTagsArgs
    (Updatable) 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
    (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    definedTags Map<String>
    (Updatable) 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
    (Updatable) Text describing the profile. Avoid entering confidential information.
    freeformTags Map<String>
    (Updatable) 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"}
    levelsConfiguration Property Map
    (Updatable) A list of configuration levels for each recommendation.
    name String
    (Updatable) The name assigned to the profile. Avoid entering confidential information.
    state String
    The profile's current state.
    systemTags Map<String>
    targetCompartments Property Map
    (Updatable) Optional. The compartments specified in the profile override for a recommendation.
    targetTags Property Map
    (Updatable) 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.

    Supporting Types

    ProfileLevelsConfiguration, ProfileLevelsConfigurationArgs

    Items List<ProfileLevelsConfigurationItem>
    (Updatable) The array of configuration levels.
    Items []ProfileLevelsConfigurationItem
    (Updatable) The array of configuration levels.
    items List<ProfileLevelsConfigurationItem>
    (Updatable) The array of configuration levels.
    items ProfileLevelsConfigurationItem[]
    (Updatable) The array of configuration levels.
    items Sequence[optimizer.ProfileLevelsConfigurationItem]
    (Updatable) The array of configuration levels.
    items List<Property Map>
    (Updatable) The array of configuration levels.

    ProfileLevelsConfigurationItem, ProfileLevelsConfigurationItemArgs

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

    ProfileTargetCompartments, ProfileTargetCompartmentsArgs

    Items List<string>
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.
    Items []string
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.
    items List<String>
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.
    items string[]
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.
    items Sequence[str]
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.
    items List<String>
    (Updatable) The list of OCIDs attached to the compartments specified in the current profile override.

    ProfileTargetTags, ProfileTargetTagsArgs

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

    ProfileTargetTagsItem, ProfileTargetTagsItemArgs

    TagDefinitionName string
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    TagNamespaceName string
    (Updatable) The name of the tag namespace.
    TagValueType string

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    TagValues List<string>

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    TagDefinitionName string
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    TagNamespaceName string
    (Updatable) The name of the tag namespace.
    TagValueType string

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    TagValues []string

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    tagDefinitionName String
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName String
    (Updatable) The name of the tag namespace.
    tagValueType String

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    tagValues List<String>

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    tagDefinitionName string
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName string
    (Updatable) The name of the tag namespace.
    tagValueType string

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    tagValues string[]

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    tag_definition_name str
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    tag_namespace_name str
    (Updatable) The name of the tag namespace.
    tag_value_type str

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    tag_values Sequence[str]

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    tagDefinitionName String
    (Updatable) The name you use to refer to the tag, also known as the tag key.
    tagNamespaceName String
    (Updatable) The name of the tag namespace.
    tagValueType String

    (Updatable) Specifies which tag value types in the tagValues field result in overrides of the recommendation criteria.

    When the value for this field is ANY, the tagValues field should be empty, which enforces overrides to the recommendation for resources with any tag values attached to them.

    When the value for this field value is VALUE, the tagValues field must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the tagValues fields.

    tagValues List<String>

    (Updatable) The list of tag values. The tag value is the value that the user applying the tag adds to the tag key.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Profiles can be imported using the id, e.g.

    $ pulumi import oci:Optimizer/profile:Profile test_profile "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi