oci.Optimizer.Profile
Explore with Pulumi AI
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[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[ProfileTargetCompartmentsArgs] = None,
            target_tags: Optional[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 com.pulumi.oci.Optimizer.Profile("profileResource", com.pulumi.oci.Optimizer.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 ProfileLevels Configuration 
- (Updatable) A list of configuration levels for each recommendation.
- AggregationInterval intIn Days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- 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"}
- 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 ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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 ProfileLevels Configuration Args 
- (Updatable) A list of configuration levels for each recommendation.
- AggregationInterval intIn Days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- 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"}
- 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 ProfileTarget Compartments Args 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags Args 
- (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 ProfileLevels Configuration 
- (Updatable) A list of configuration levels for each recommendation.
- aggregationInterval IntegerIn Days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- 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"}
- 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 ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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 ProfileLevels Configuration 
- (Updatable) A list of configuration levels for each recommendation.
- aggregationInterval numberIn Days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- {[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"}
- {[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 ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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 ProfileLevels Configuration Args 
- (Updatable) A list of configuration levels for each recommendation.
- aggregation_interval_ intin_ days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- 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"}
- 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 ProfileTarget Compartments Args 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags Args 
- (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.
- aggregationInterval NumberIn Days 
- (Updatable) The time period over which to collect data for the recommendations, measured in number of days.
- 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"}
- 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.
- 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.
- 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.
- 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.
- 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.
- {[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.
- 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.
- 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[ProfileLevelsConfigurationArgs] = None,
        name: Optional[str] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, str]] = None,
        target_compartments: Optional[ProfileTargetCompartmentsArgs] = None,
        target_tags: Optional[ProfileTargetTagsArgs] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None) -> Profilefunc 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)resources:  _:    type: oci:Optimizer:Profile    get:      id: ${id}- 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.
- AggregationInterval intIn Days 
- (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.
- 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.
- 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 ProfileLevels Configuration 
- (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.
- Dictionary<string, string>
- TargetCompartments ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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.
- AggregationInterval intIn Days 
- (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.
- 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.
- 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 ProfileLevels Configuration Args 
- (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.
- map[string]string
- TargetCompartments ProfileTarget Compartments Args 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags Args 
- (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.
- aggregationInterval IntegerIn Days 
- (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.
- 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.
- 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 ProfileLevels Configuration 
- (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.
- Map<String,String>
- targetCompartments ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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.
- aggregationInterval numberIn Days 
- (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.
- {[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.
- {[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 ProfileLevels Configuration 
- (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.
- {[key: string]: string}
- targetCompartments ProfileTarget Compartments 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags 
- (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_ intin_ days 
- (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.
- 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.
- 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 ProfileLevels Configuration Args 
- (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.
- Mapping[str, str]
- target_compartments ProfileTarget Compartments Args 
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 
ProfileTarget Tags Args 
- (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.
- aggregationInterval NumberIn Days 
- (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.
- 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.
- 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.
- Map<String>
- targetCompartments Property Map
- (Updatable) Optional. The compartments specified in the profile override for a recommendation.
- 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<ProfileLevels Configuration Item> 
- (Updatable) The array of configuration levels.
- Items
[]ProfileLevels Configuration Item 
- (Updatable) The array of configuration levels.
- items
List<ProfileLevels Configuration Item> 
- (Updatable) The array of configuration levels.
- items
ProfileLevels Configuration Item[] 
- (Updatable) The array of configuration levels.
- items
Sequence[ProfileLevels Configuration Item] 
- (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<ProfileTarget Tags Item> 
- (Updatable) The list of tags specified in the current profile override.
- Items
[]ProfileTarget Tags Item 
- (Updatable) The list of tags specified in the current profile override.
- items
List<ProfileTarget Tags Item> 
- (Updatable) The list of tags specified in the current profile override.
- items
ProfileTarget Tags Item[] 
- (Updatable) The list of tags specified in the current profile override.
- items
Sequence[ProfileTarget Tags Item] 
- (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        
- TagDefinition stringName 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- TagNamespace stringName 
- (Updatable) The name of the tag namespace.
- TagValue stringType 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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 
- TagDefinition stringName 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- TagNamespace stringName 
- (Updatable) The name of the tag namespace.
- TagValue stringType 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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 
- tagDefinition StringName 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- tagNamespace StringName 
- (Updatable) The name of the tag namespace.
- tagValue StringType 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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 
- tagDefinition stringName 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- tagNamespace stringName 
- (Updatable) The name of the tag namespace.
- tagValue stringType 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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_ strname 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- tag_namespace_ strname 
- (Updatable) The name of the tag namespace.
- tag_value_ strtype 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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 
- tagDefinition StringName 
- (Updatable) The name you use to refer to the tag, also known as the tag key.
- tagNamespace StringName 
- (Updatable) The name of the tag namespace.
- tagValue StringType 
- (Updatable) Specifies which tag value types in the - tagValuesfield result in overrides of the recommendation criteria.- When the value for this field is - ANY, the- tagValuesfield 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- tagValuesfield must include a specific value or list of values. Overrides to the recommendation criteria only occur for resources that match the values in the- tagValuesfields.
- 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 ociTerraform Provider.