Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getCategory

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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testCategory = Output.Create(Oci.Optimizer.GetCategory.InvokeAsync(new Oci.Optimizer.GetCategoryArgs
        {
            CategoryId = oci_optimizer_category.Test_category.Id,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Optimizer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Optimizer.GetCategory(ctx, &optimizer.GetCategoryArgs{
			CategoryId: oci_optimizer_category.Test_category.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_category = oci.Optimizer.get_category(category_id=oci_optimizer_category["test_category"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCategory = oci.Optimizer.getCategory({
    categoryId: oci_optimizer_category.test_category.id,
});

Coming soon!

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.

Description string

Text describing the category.

EstimatedCostSaving double

The estimated cost savings, in dollars, for the category.

ExtendedMetadata Dictionary<string, object>

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.

Description string

Text describing the category.

EstimatedCostSaving float64

The estimated cost savings, in dollars, for the category.

ExtendedMetadata map[string]interface{}

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.

description String

Text describing the category.

estimatedCostSaving Double

The estimated cost savings, in dollars, for the category.

extendedMetadata Map<String,Object>

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.

description string

Text describing the category.

estimatedCostSaving number

The estimated cost savings, in dollars, for the category.

extendedMetadata {[key: string]: any}

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.

description str

Text describing the category.

estimated_cost_saving float

The estimated cost savings, in dollars, for the category.

extended_metadata Mapping[str, Any]

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 GetCategoryRecommendationCount]

An array of RecommendationCount objects grouped by the level of importance assigned to the recommendation.

resource_counts 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.

description String

Text describing the category.

estimatedCostSaving Number

The estimated cost savings, in dollars, for the category.

extendedMetadata Map<Any>

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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.