Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Optimizer.getCategory
Explore with Pulumi AI
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:
- Category
Id string - The unique OCID associated with the category.
- Category
Id string - The unique OCID associated with the category.
- category
Id String - The unique OCID associated with the category.
- category
Id string - The unique OCID associated with the category.
- category_
id str - The unique OCID associated with the category.
- category
Id String - The unique OCID associated with the category.
getCategory Result
The following output properties are available:
- Category
Id string - Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Compartment
Name string - The name associated with the compartment.
- Description string
- Text describing the category.
- Estimated
Cost doubleSaving - The estimated cost savings, in dollars, for the category.
- Extended
Metadata 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.
- Recommendation
Counts List<GetCategory Recommendation Count> - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - Resource
Counts List<GetCategory Resource Count> - An array of
ResourceCount
objects grouped by the status of the recommendation. - State string
- The category's current state.
- Time
Created string - The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated string - The date and time the category details were last updated, in the format defined by RFC3339.
- Category
Id string - Compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- Compartment
Name string - The name associated with the compartment.
- Description string
- Text describing the category.
- Estimated
Cost float64Saving - The estimated cost savings, in dollars, for the category.
- Extended
Metadata 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.
- Recommendation
Counts []GetCategory Recommendation Count - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - Resource
Counts []GetCategory Resource Count - An array of
ResourceCount
objects grouped by the status of the recommendation. - State string
- The category's current state.
- Time
Created string - The date and time the category details were created, in the format defined by RFC3339.
- Time
Updated string - The date and time the category details were last updated, in the format defined by RFC3339.
- category
Id String - compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- compartment
Name String - The name associated with the compartment.
- description String
- Text describing the category.
- estimated
Cost DoubleSaving - The estimated cost savings, in dollars, for the category.
- extended
Metadata 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.
- recommendation
Counts List<GetCategory Recommendation Count> - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - resource
Counts List<GetCategory Resource Count> - An array of
ResourceCount
objects grouped by the status of the recommendation. - state String
- The category's current state.
- time
Created String - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated String - The date and time the category details were last updated, in the format defined by RFC3339.
- category
Id string - compartment
Id string - The OCID of the tenancy. The tenancy is the root compartment.
- compartment
Name string - The name associated with the compartment.
- description string
- Text describing the category.
- estimated
Cost numberSaving - The estimated cost savings, in dollars, for the category.
- extended
Metadata {[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.
- recommendation
Counts GetCategory Recommendation Count[] - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - resource
Counts GetCategory Resource Count[] - An array of
ResourceCount
objects grouped by the status of the recommendation. - state string
- The category's current state.
- time
Created string - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated 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_ floatsaving - 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.Get Category Recommendation Count] - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - resource_
counts Sequence[optimizer.Get Category Resource Count] - 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.
- category
Id String - compartment
Id String - The OCID of the tenancy. The tenancy is the root compartment.
- compartment
Name String - The name associated with the compartment.
- description String
- Text describing the category.
- estimated
Cost NumberSaving - The estimated cost savings, in dollars, for the category.
- extended
Metadata 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.
- recommendation
Counts List<Property Map> - An array of
RecommendationCount
objects grouped by the level of importance assigned to the recommendation. - resource
Counts List<Property Map> - An array of
ResourceCount
objects grouped by the status of the recommendation. - state String
- The category's current state.
- time
Created String - The date and time the category details were created, in the format defined by RFC3339.
- time
Updated 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
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.