1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Optimizer
  5. getCategory
Oracle Cloud Infrastructure v2.15.0 published on Thursday, Oct 31, 2024 by Pulumi

oci.Optimizer.getCategory

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.15.0 published on Thursday, Oct 31, 2024 by Pulumi

    This data source provides details about a specific Category resource in Oracle Cloud Infrastructure Optimizer service.

    Gets the category that corresponds to the specified OCID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCategory = oci.Optimizer.getCategory({
        categoryId: testCategoryOciOptimizerCategory.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_category = oci.Optimizer.get_category(category_id=test_category_oci_optimizer_category["id"])
    
    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.GetCategory(ctx, &optimizer.GetCategoryArgs{
    			CategoryId: testCategoryOciOptimizerCategory.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testCategory = Oci.Optimizer.GetCategory.Invoke(new()
        {
            CategoryId = testCategoryOciOptimizerCategory.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Optimizer.OptimizerFunctions;
    import com.pulumi.oci.Optimizer.inputs.GetCategoryArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testCategory = OptimizerFunctions.getCategory(GetCategoryArgs.builder()
                .categoryId(testCategoryOciOptimizerCategory.id())
                .build());
    
        }
    }
    
    variables:
      testCategory:
        fn::invoke:
          Function: oci:Optimizer:getCategory
          Arguments:
            categoryId: ${testCategoryOciOptimizerCategory.id}
    

    Using getCategory

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCategory(args: GetCategoryArgs, opts?: InvokeOptions): Promise<GetCategoryResult>
    function getCategoryOutput(args: GetCategoryOutputArgs, opts?: InvokeOptions): Output<GetCategoryResult>
    def get_category(category_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetCategoryResult
    def get_category_output(category_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetCategoryResult]
    func GetCategory(ctx *Context, args *GetCategoryArgs, opts ...InvokeOption) (*GetCategoryResult, error)
    func GetCategoryOutput(ctx *Context, args *GetCategoryOutputArgs, opts ...InvokeOption) GetCategoryResultOutput

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

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

    The following arguments are supported:

    CategoryId string
    The unique OCID associated with the category.
    CategoryId string
    The unique OCID associated with the category.
    categoryId String
    The unique OCID associated with the category.
    categoryId string
    The unique OCID associated with the category.
    category_id str
    The unique OCID associated with the category.
    categoryId String
    The unique OCID associated with the category.

    getCategory Result

    The following output properties are available:

    CategoryId string
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    CompartmentName string
    The name associated with the compartment.
    Description string
    Text describing the category.
    EstimatedCostSaving double
    The estimated cost savings, in dollars, for the category.
    ExtendedMetadata Dictionary<string, string>
    Additional metadata key/value pairs for the category.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name assigned to the category.
    RecommendationCounts List<GetCategoryRecommendationCount>
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    ResourceCounts List<GetCategoryResourceCount>
    An array of ResourceCount objects grouped by the status of the recommendation.
    State string
    The category's current state.
    TimeCreated string
    The date and time the category details were created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the category details were last updated, in the format defined by RFC3339.
    CategoryId string
    CompartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    CompartmentName string
    The name associated with the compartment.
    Description string
    Text describing the category.
    EstimatedCostSaving float64
    The estimated cost savings, in dollars, for the category.
    ExtendedMetadata map[string]string
    Additional metadata key/value pairs for the category.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name assigned to the category.
    RecommendationCounts []GetCategoryRecommendationCount
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    ResourceCounts []GetCategoryResourceCount
    An array of ResourceCount objects grouped by the status of the recommendation.
    State string
    The category's current state.
    TimeCreated string
    The date and time the category details were created, in the format defined by RFC3339.
    TimeUpdated string
    The date and time the category details were last updated, in the format defined by RFC3339.
    categoryId String
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    compartmentName String
    The name associated with the compartment.
    description String
    Text describing the category.
    estimatedCostSaving Double
    The estimated cost savings, in dollars, for the category.
    extendedMetadata Map<String,String>
    Additional metadata key/value pairs for the category.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name assigned to the category.
    recommendationCounts List<GetCategoryRecommendationCount>
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    resourceCounts List<GetCategoryResourceCount>
    An array of ResourceCount objects grouped by the status of the recommendation.
    state String
    The category's current state.
    timeCreated String
    The date and time the category details were created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the category details were last updated, in the format defined by RFC3339.
    categoryId string
    compartmentId string
    The OCID of the tenancy. The tenancy is the root compartment.
    compartmentName string
    The name associated with the compartment.
    description string
    Text describing the category.
    estimatedCostSaving number
    The estimated cost savings, in dollars, for the category.
    extendedMetadata {[key: string]: string}
    Additional metadata key/value pairs for the category.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name assigned to the category.
    recommendationCounts GetCategoryRecommendationCount[]
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    resourceCounts GetCategoryResourceCount[]
    An array of ResourceCount objects grouped by the status of the recommendation.
    state string
    The category's current state.
    timeCreated string
    The date and time the category details were created, in the format defined by RFC3339.
    timeUpdated string
    The date and time the category details were last updated, in the format defined by RFC3339.
    category_id str
    compartment_id str
    The OCID of the tenancy. The tenancy is the root compartment.
    compartment_name str
    The name associated with the compartment.
    description str
    Text describing the category.
    estimated_cost_saving float
    The estimated cost savings, in dollars, for the category.
    extended_metadata Mapping[str, str]
    Additional metadata key/value pairs for the category.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name assigned to the category.
    recommendation_counts Sequence[optimizer.GetCategoryRecommendationCount]
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    resource_counts Sequence[optimizer.GetCategoryResourceCount]
    An array of ResourceCount objects grouped by the status of the recommendation.
    state str
    The category's current state.
    time_created str
    The date and time the category details were created, in the format defined by RFC3339.
    time_updated str
    The date and time the category details were last updated, in the format defined by RFC3339.
    categoryId String
    compartmentId String
    The OCID of the tenancy. The tenancy is the root compartment.
    compartmentName String
    The name associated with the compartment.
    description String
    Text describing the category.
    estimatedCostSaving Number
    The estimated cost savings, in dollars, for the category.
    extendedMetadata Map<String>
    Additional metadata key/value pairs for the category.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name assigned to the category.
    recommendationCounts List<Property Map>
    An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.
    resourceCounts List<Property Map>
    An array of ResourceCount objects grouped by the status of the recommendation.
    state String
    The category's current state.
    timeCreated String
    The date and time the category details were created, in the format defined by RFC3339.
    timeUpdated String
    The date and time the category details were last updated, in the format defined by RFC3339.

    Supporting Types

    GetCategoryRecommendationCount

    Count int
    The count of resources.
    Importance string
    The level of importance assigned to the recommendation.
    Count int
    The count of resources.
    Importance string
    The level of importance assigned to the recommendation.
    count Integer
    The count of resources.
    importance String
    The level of importance assigned to the recommendation.
    count number
    The count of resources.
    importance string
    The level of importance assigned to the recommendation.
    count int
    The count of resources.
    importance str
    The level of importance assigned to the recommendation.
    count Number
    The count of resources.
    importance String
    The level of importance assigned to the recommendation.

    GetCategoryResourceCount

    Count int
    The count of resources.
    Status string
    The recommendation status of the resource.
    Count int
    The count of resources.
    Status string
    The recommendation status of the resource.
    count Integer
    The count of resources.
    status String
    The recommendation status of the resource.
    count number
    The count of resources.
    status string
    The recommendation status of the resource.
    count int
    The count of resources.
    status str
    The recommendation status of the resource.
    count Number
    The count of resources.
    status String
    The recommendation status of the resource.

    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.15.0 published on Thursday, Oct 31, 2024 by Pulumi