Oracle Cloud Infrastructure

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

CustomTable

This resource provides the Custom Table resource in Oracle Cloud Infrastructure Metering Computation service.

Returns the created custom table.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testCustomTable = new Oci.MeteringComputation.CustomTable("testCustomTable", new Oci.MeteringComputation.CustomTableArgs
        {
            CompartmentId = @var.Compartment_id,
            SavedCustomTable = new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableArgs
            {
                DisplayName = @var.Custom_table_saved_custom_table_display_name,
                ColumnGroupBies = @var.Custom_table_saved_custom_table_column_group_by,
                CompartmentDepth = @var.Custom_table_saved_custom_table_compartment_depth,
                GroupByTags = 
                {
                    new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableGroupByTagArgs
                    {
                        Key = @var.Custom_table_saved_custom_table_group_by_tag_key,
                        Namespace = @var.Custom_table_saved_custom_table_group_by_tag_namespace,
                        Value = @var.Custom_table_saved_custom_table_group_by_tag_value,
                    },
                },
                RowGroupBies = @var.Custom_table_saved_custom_table_row_group_by,
                Version = @var.Custom_table_saved_custom_table_version,
            },
            SavedReportId = oci_metering_computation_saved_report.Test_saved_report.Id,
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := MeteringComputation.NewCustomTable(ctx, "testCustomTable", &MeteringComputation.CustomTableArgs{
			CompartmentId: pulumi.Any(_var.Compartment_id),
			SavedCustomTable: &meteringcomputation.CustomTableSavedCustomTableArgs{
				DisplayName:      pulumi.Any(_var.Custom_table_saved_custom_table_display_name),
				ColumnGroupBies:  pulumi.Any(_var.Custom_table_saved_custom_table_column_group_by),
				CompartmentDepth: pulumi.Any(_var.Custom_table_saved_custom_table_compartment_depth),
				GroupByTags: meteringcomputation.CustomTableSavedCustomTableGroupByTagArray{
					&meteringcomputation.CustomTableSavedCustomTableGroupByTagArgs{
						Key:       pulumi.Any(_var.Custom_table_saved_custom_table_group_by_tag_key),
						Namespace: pulumi.Any(_var.Custom_table_saved_custom_table_group_by_tag_namespace),
						Value:     pulumi.Any(_var.Custom_table_saved_custom_table_group_by_tag_value),
					},
				},
				RowGroupBies: pulumi.Any(_var.Custom_table_saved_custom_table_row_group_by),
				Version:      pulumi.Any(_var.Custom_table_saved_custom_table_version),
			},
			SavedReportId: pulumi.Any(oci_metering_computation_saved_report.Test_saved_report.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_custom_table = oci.metering_computation.CustomTable("testCustomTable",
    compartment_id=var["compartment_id"],
    saved_custom_table=oci.metering.computation.CustomTableSavedCustomTableArgs(
        display_name=var["custom_table_saved_custom_table_display_name"],
        column_group_bies=var["custom_table_saved_custom_table_column_group_by"],
        compartment_depth=var["custom_table_saved_custom_table_compartment_depth"],
        group_by_tags=[oci.metering.computation.CustomTableSavedCustomTableGroupByTagArgs(
            key=var["custom_table_saved_custom_table_group_by_tag_key"],
            namespace=var["custom_table_saved_custom_table_group_by_tag_namespace"],
            value=var["custom_table_saved_custom_table_group_by_tag_value"],
        )],
        row_group_bies=var["custom_table_saved_custom_table_row_group_by"],
        version=var["custom_table_saved_custom_table_version"],
    ),
    saved_report_id=oci_metering_computation_saved_report["test_saved_report"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCustomTable = new oci.meteringcomputation.CustomTable("testCustomTable", {
    compartmentId: _var.compartment_id,
    savedCustomTable: {
        displayName: _var.custom_table_saved_custom_table_display_name,
        columnGroupBies: _var.custom_table_saved_custom_table_column_group_by,
        compartmentDepth: _var.custom_table_saved_custom_table_compartment_depth,
        groupByTags: [{
            key: _var.custom_table_saved_custom_table_group_by_tag_key,
            namespace: _var.custom_table_saved_custom_table_group_by_tag_namespace,
            value: _var.custom_table_saved_custom_table_group_by_tag_value,
        }],
        rowGroupBies: _var.custom_table_saved_custom_table_row_group_by,
        version: _var.custom_table_saved_custom_table_version,
    },
    savedReportId: oci_metering_computation_saved_report.test_saved_report.id,
});

Coming soon!

Create a CustomTable Resource

new CustomTable(name: string, args: CustomTableArgs, opts?: CustomResourceOptions);
@overload
def CustomTable(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                compartment_id: Optional[str] = None,
                saved_custom_table: Optional[_meteringcomputation.CustomTableSavedCustomTableArgs] = None,
                saved_report_id: Optional[str] = None)
@overload
def CustomTable(resource_name: str,
                args: CustomTableArgs,
                opts: Optional[ResourceOptions] = None)
func NewCustomTable(ctx *Context, name string, args CustomTableArgs, opts ...ResourceOption) (*CustomTable, error)
public CustomTable(string name, CustomTableArgs args, CustomResourceOptions? opts = null)
public CustomTable(String name, CustomTableArgs args)
public CustomTable(String name, CustomTableArgs args, CustomResourceOptions options)
type: oci:MeteringComputation:CustomTable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CustomTableArgs
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 CustomTableArgs
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 CustomTableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CustomTableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CustomTableArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CustomTable Resource Properties

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

Inputs

The CustomTable resource accepts the following input properties:

CompartmentId string

The compartment OCID.

SavedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

SavedReportId string

The associated saved report OCID.

CompartmentId string

The compartment OCID.

SavedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

SavedReportId string

The associated saved report OCID.

compartmentId String

The compartment OCID.

savedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId String

The associated saved report OCID.

compartmentId string

The compartment OCID.

savedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId string

The associated saved report OCID.

compartment_id str

The compartment OCID.

saved_custom_table CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

saved_report_id str

The associated saved report OCID.

compartmentId String

The compartment OCID.

savedCustomTable Property Map

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId String

The associated saved report OCID.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing CustomTable Resource

Get an existing CustomTable 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?: CustomTableState, opts?: CustomResourceOptions): CustomTable
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        saved_custom_table: Optional[_meteringcomputation.CustomTableSavedCustomTableArgs] = None,
        saved_report_id: Optional[str] = None) -> CustomTable
func GetCustomTable(ctx *Context, name string, id IDInput, state *CustomTableState, opts ...ResourceOption) (*CustomTable, error)
public static CustomTable Get(string name, Input<string> id, CustomTableState? state, CustomResourceOptions? opts = null)
public static CustomTable get(String name, Output<String> id, CustomTableState 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:
CompartmentId string

The compartment OCID.

SavedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

SavedReportId string

The associated saved report OCID.

CompartmentId string

The compartment OCID.

SavedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

SavedReportId string

The associated saved report OCID.

compartmentId String

The compartment OCID.

savedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId String

The associated saved report OCID.

compartmentId string

The compartment OCID.

savedCustomTable CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId string

The associated saved report OCID.

compartment_id str

The compartment OCID.

saved_custom_table CustomTableSavedCustomTableArgs

(Updatable) The custom table for Cost Analysis UI rendering.

saved_report_id str

The associated saved report OCID.

compartmentId String

The compartment OCID.

savedCustomTable Property Map

(Updatable) The custom table for Cost Analysis UI rendering.

savedReportId String

The associated saved report OCID.

Supporting Types

CustomTableSavedCustomTable

DisplayName string

(Updatable) The name of the custom table.

ColumnGroupBies List<string>

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

CompartmentDepth double

(Updatable) The compartment depth level.

GroupByTags List<CustomTableSavedCustomTableGroupByTag>

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

RowGroupBies List<string>

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

Version double

(Updatable) The version of the custom table.

DisplayName string

(Updatable) The name of the custom table.

ColumnGroupBies []string

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

CompartmentDepth float64

(Updatable) The compartment depth level.

GroupByTags []CustomTableSavedCustomTableGroupByTag

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

RowGroupBies []string

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

Version float64

(Updatable) The version of the custom table.

displayName String

(Updatable) The name of the custom table.

columnGroupBies List<String>

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

compartmentDepth Double

(Updatable) The compartment depth level.

groupByTags List<CustomTableSavedCustomTableGroupByTag>

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

rowGroupBies List<String>

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

version Double

(Updatable) The version of the custom table.

displayName string

(Updatable) The name of the custom table.

columnGroupBies string[]

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

compartmentDepth number

(Updatable) The compartment depth level.

groupByTags CustomTableSavedCustomTableGroupByTag[]

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

rowGroupBies string[]

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

version number

(Updatable) The version of the custom table.

display_name str

(Updatable) The name of the custom table.

column_group_bies Sequence[str]

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

compartment_depth float

(Updatable) The compartment depth level.

group_by_tags CustomTableSavedCustomTableGroupByTag]

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

row_group_bies Sequence[str]

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

version float

(Updatable) The version of the custom table.

displayName String

(Updatable) The name of the custom table.

columnGroupBies List<String>

(Updatable) The column groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

compartmentDepth Number

(Updatable) The compartment depth level.

groupByTags List<Property Map>

(Updatable) GroupBy a specific tagKey. Provide the tagNamespace and tagKey in the tag object. Only one tag in the list is supported. For example: [{"namespace":"oracle", "key":"createdBy"]

rowGroupBies List<String>

(Updatable) The row groupBy key list. example: ["tagNamespace", "tagKey", "tagValue", "service", "skuName", "skuPartNumber", "unit", "compartmentName", "compartmentPath", "compartmentId", "platform", "region", "logicalAd", "resourceId", "tenantId", "tenantName"]

version Number

(Updatable) The version of the custom table.

CustomTableSavedCustomTableGroupByTag

Key string

(Updatable) The tag key.

Namespace string

(Updatable) The tag namespace.

Value string

(Updatable) The tag value.

Key string

(Updatable) The tag key.

Namespace string

(Updatable) The tag namespace.

Value string

(Updatable) The tag value.

key String

(Updatable) The tag key.

namespace String

(Updatable) The tag namespace.

value String

(Updatable) The tag value.

key string

(Updatable) The tag key.

namespace string

(Updatable) The tag namespace.

value string

(Updatable) The tag value.

key str

(Updatable) The tag key.

namespace str

(Updatable) The tag namespace.

value str

(Updatable) The tag value.

key String

(Updatable) The tag key.

namespace String

(Updatable) The tag namespace.

value String

(Updatable) The tag value.

Import

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

 $ pulumi import oci:MeteringComputation/customTable:CustomTable test_custom_table "id"

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.