oci.MeteringComputation.CustomTable
Explore with Pulumi AI
This resource provides the Custom Table resource in Oracle Cloud Infrastructure Metering Computation service.
Returns the created custom table.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCustomTable = new oci.meteringcomputation.CustomTable("test_custom_table", {
compartmentId: compartmentId,
savedCustomTable: {
displayName: customTableSavedCustomTableDisplayName,
columnGroupBies: customTableSavedCustomTableColumnGroupBy,
compartmentDepth: customTableSavedCustomTableCompartmentDepth,
groupByTags: [{
key: customTableSavedCustomTableGroupByTagKey,
namespace: customTableSavedCustomTableGroupByTagNamespace,
value: customTableSavedCustomTableGroupByTagValue,
}],
rowGroupBies: customTableSavedCustomTableRowGroupBy,
version: customTableSavedCustomTableVersion,
},
savedReportId: testSavedReport.id,
});
import pulumi
import pulumi_oci as oci
test_custom_table = oci.metering_computation.CustomTable("test_custom_table",
compartment_id=compartment_id,
saved_custom_table={
"display_name": custom_table_saved_custom_table_display_name,
"column_group_bies": custom_table_saved_custom_table_column_group_by,
"compartment_depth": custom_table_saved_custom_table_compartment_depth,
"group_by_tags": [{
"key": custom_table_saved_custom_table_group_by_tag_key,
"namespace": custom_table_saved_custom_table_group_by_tag_namespace,
"value": custom_table_saved_custom_table_group_by_tag_value,
}],
"row_group_bies": custom_table_saved_custom_table_row_group_by,
"version": custom_table_saved_custom_table_version,
},
saved_report_id=test_saved_report["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/MeteringComputation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := MeteringComputation.NewCustomTable(ctx, "test_custom_table", &MeteringComputation.CustomTableArgs{
CompartmentId: pulumi.Any(compartmentId),
SavedCustomTable: &meteringcomputation.CustomTableSavedCustomTableArgs{
DisplayName: pulumi.Any(customTableSavedCustomTableDisplayName),
ColumnGroupBies: pulumi.Any(customTableSavedCustomTableColumnGroupBy),
CompartmentDepth: pulumi.Any(customTableSavedCustomTableCompartmentDepth),
GroupByTags: meteringcomputation.CustomTableSavedCustomTableGroupByTagArray{
&meteringcomputation.CustomTableSavedCustomTableGroupByTagArgs{
Key: pulumi.Any(customTableSavedCustomTableGroupByTagKey),
Namespace: pulumi.Any(customTableSavedCustomTableGroupByTagNamespace),
Value: pulumi.Any(customTableSavedCustomTableGroupByTagValue),
},
},
RowGroupBies: pulumi.Any(customTableSavedCustomTableRowGroupBy),
Version: pulumi.Any(customTableSavedCustomTableVersion),
},
SavedReportId: pulumi.Any(testSavedReport.Id),
})
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 testCustomTable = new Oci.MeteringComputation.CustomTable("test_custom_table", new()
{
CompartmentId = compartmentId,
SavedCustomTable = new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableArgs
{
DisplayName = customTableSavedCustomTableDisplayName,
ColumnGroupBies = customTableSavedCustomTableColumnGroupBy,
CompartmentDepth = customTableSavedCustomTableCompartmentDepth,
GroupByTags = new[]
{
new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableGroupByTagArgs
{
Key = customTableSavedCustomTableGroupByTagKey,
Namespace = customTableSavedCustomTableGroupByTagNamespace,
Value = customTableSavedCustomTableGroupByTagValue,
},
},
RowGroupBies = customTableSavedCustomTableRowGroupBy,
Version = customTableSavedCustomTableVersion,
},
SavedReportId = testSavedReport.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.MeteringComputation.CustomTable;
import com.pulumi.oci.MeteringComputation.CustomTableArgs;
import com.pulumi.oci.MeteringComputation.inputs.CustomTableSavedCustomTableArgs;
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 testCustomTable = new CustomTable("testCustomTable", CustomTableArgs.builder()
.compartmentId(compartmentId)
.savedCustomTable(CustomTableSavedCustomTableArgs.builder()
.displayName(customTableSavedCustomTableDisplayName)
.columnGroupBies(customTableSavedCustomTableColumnGroupBy)
.compartmentDepth(customTableSavedCustomTableCompartmentDepth)
.groupByTags(CustomTableSavedCustomTableGroupByTagArgs.builder()
.key(customTableSavedCustomTableGroupByTagKey)
.namespace(customTableSavedCustomTableGroupByTagNamespace)
.value(customTableSavedCustomTableGroupByTagValue)
.build())
.rowGroupBies(customTableSavedCustomTableRowGroupBy)
.version(customTableSavedCustomTableVersion)
.build())
.savedReportId(testSavedReport.id())
.build());
}
}
resources:
testCustomTable:
type: oci:MeteringComputation:CustomTable
name: test_custom_table
properties:
compartmentId: ${compartmentId}
savedCustomTable:
displayName: ${customTableSavedCustomTableDisplayName}
columnGroupBies: ${customTableSavedCustomTableColumnGroupBy}
compartmentDepth: ${customTableSavedCustomTableCompartmentDepth}
groupByTags:
- key: ${customTableSavedCustomTableGroupByTagKey}
namespace: ${customTableSavedCustomTableGroupByTagNamespace}
value: ${customTableSavedCustomTableGroupByTagValue}
rowGroupBies: ${customTableSavedCustomTableRowGroupBy}
version: ${customTableSavedCustomTableVersion}
savedReportId: ${testSavedReport.id}
Create CustomTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CustomTable(name: string, args: CustomTableArgs, opts?: CustomResourceOptions);
@overload
def CustomTable(resource_name: str,
args: CustomTableArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var customTableResource = new Oci.MeteringComputation.CustomTable("customTableResource", new()
{
CompartmentId = "string",
SavedCustomTable = new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableArgs
{
DisplayName = "string",
ColumnGroupBies = new[]
{
"string",
},
CompartmentDepth = 0,
GroupByTags = new[]
{
new Oci.MeteringComputation.Inputs.CustomTableSavedCustomTableGroupByTagArgs
{
Key = "string",
Namespace = "string",
Value = "string",
},
},
RowGroupBies = new[]
{
"string",
},
Version = 0,
},
SavedReportId = "string",
});
example, err := MeteringComputation.NewCustomTable(ctx, "customTableResource", &MeteringComputation.CustomTableArgs{
CompartmentId: pulumi.String("string"),
SavedCustomTable: &meteringcomputation.CustomTableSavedCustomTableArgs{
DisplayName: pulumi.String("string"),
ColumnGroupBies: pulumi.StringArray{
pulumi.String("string"),
},
CompartmentDepth: pulumi.Float64(0),
GroupByTags: meteringcomputation.CustomTableSavedCustomTableGroupByTagArray{
&meteringcomputation.CustomTableSavedCustomTableGroupByTagArgs{
Key: pulumi.String("string"),
Namespace: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
RowGroupBies: pulumi.StringArray{
pulumi.String("string"),
},
Version: pulumi.Float64(0),
},
SavedReportId: pulumi.String("string"),
})
var customTableResource = new CustomTable("customTableResource", CustomTableArgs.builder()
.compartmentId("string")
.savedCustomTable(CustomTableSavedCustomTableArgs.builder()
.displayName("string")
.columnGroupBies("string")
.compartmentDepth(0)
.groupByTags(CustomTableSavedCustomTableGroupByTagArgs.builder()
.key("string")
.namespace("string")
.value("string")
.build())
.rowGroupBies("string")
.version(0)
.build())
.savedReportId("string")
.build());
custom_table_resource = oci.metering_computation.CustomTable("customTableResource",
compartment_id="string",
saved_custom_table=oci.metering_computation.CustomTableSavedCustomTableArgs(
display_name="string",
column_group_bies=["string"],
compartment_depth=0,
group_by_tags=[oci.metering_computation.CustomTableSavedCustomTableGroupByTagArgs(
key="string",
namespace="string",
value="string",
)],
row_group_bies=["string"],
version=0,
),
saved_report_id="string")
const customTableResource = new oci.meteringcomputation.CustomTable("customTableResource", {
compartmentId: "string",
savedCustomTable: {
displayName: "string",
columnGroupBies: ["string"],
compartmentDepth: 0,
groupByTags: [{
key: "string",
namespace: "string",
value: "string",
}],
rowGroupBies: ["string"],
version: 0,
},
savedReportId: "string",
});
type: oci:MeteringComputation:CustomTable
properties:
compartmentId: string
savedCustomTable:
columnGroupBies:
- string
compartmentDepth: 0
displayName: string
groupByTags:
- key: string
namespace: string
value: string
rowGroupBies:
- string
version: 0
savedReportId: string
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:
- Compartment
Id string - The compartment OCID.
- Saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- Saved
Report stringId The associated saved report OCID.
** 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
- Compartment
Id string - The compartment OCID.
- Saved
Custom CustomTable Table Saved Custom Table Args - (Updatable) The custom table for Cost Analysis UI rendering.
- Saved
Report stringId The associated saved report OCID.
** 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
- compartment
Id String - The compartment OCID.
- saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report StringId The associated saved report OCID.
** 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
- compartment
Id string - The compartment OCID.
- saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report stringId The associated saved report OCID.
** 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
- compartment_
id str - The compartment OCID.
- saved_
custom_ meteringcomputation.table Custom Table Saved Custom Table Args - (Updatable) The custom table for Cost Analysis UI rendering.
- saved_
report_ strid The associated saved report OCID.
** 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
- compartment
Id String - The compartment OCID.
- saved
Custom Property MapTable - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report StringId The associated saved report OCID.
** 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
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 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.
- Compartment
Id string - The compartment OCID.
- Saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- Saved
Report stringId The associated saved report OCID.
** 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
- Compartment
Id string - The compartment OCID.
- Saved
Custom CustomTable Table Saved Custom Table Args - (Updatable) The custom table for Cost Analysis UI rendering.
- Saved
Report stringId The associated saved report OCID.
** 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
- compartment
Id String - The compartment OCID.
- saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report StringId The associated saved report OCID.
** 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
- compartment
Id string - The compartment OCID.
- saved
Custom CustomTable Table Saved Custom Table - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report stringId The associated saved report OCID.
** 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
- compartment_
id str - The compartment OCID.
- saved_
custom_ meteringcomputation.table Custom Table Saved Custom Table Args - (Updatable) The custom table for Cost Analysis UI rendering.
- saved_
report_ strid The associated saved report OCID.
** 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
- compartment
Id String - The compartment OCID.
- saved
Custom Property MapTable - (Updatable) The custom table for Cost Analysis UI rendering.
- saved
Report StringId The associated saved report OCID.
** 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
Supporting Types
CustomTableSavedCustomTable, CustomTableSavedCustomTableArgs
- Display
Name string - (Updatable) The name of the custom table.
- Column
Group List<string>Bies - (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 double - (Updatable) The compartment depth level.
- List<Custom
Table Saved Custom Table Group By Tag> - (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 List<string>Bies - (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.
- Display
Name string - (Updatable) The name of the custom table.
- Column
Group []stringBies - (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 float64 - (Updatable) The compartment depth level.
- []Custom
Table Saved Custom Table Group By Tag - (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 []stringBies - (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.
- display
Name String - (Updatable) The name of the custom table.
- column
Group List<String>Bies - (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 Double - (Updatable) The compartment depth level.
- List<Custom
Table Saved Custom Table Group By Tag> - (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 List<String>Bies - (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.
- display
Name string - (Updatable) The name of the custom table.
- column
Group string[]Bies - (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 number - (Updatable) The compartment depth level.
- Custom
Table Saved Custom Table Group By Tag[] - (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 string[]Bies - (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_ Sequence[str]bies - (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.
- Sequence[meteringcomputation.
Custom Table Saved Custom Table Group By Tag] - (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_ Sequence[str]bies - (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.
- display
Name String - (Updatable) The name of the custom table.
- column
Group List<String>Bies - (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 Number - (Updatable) The compartment depth level.
- 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"]
- row
Group List<String>Bies - (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, CustomTableSavedCustomTableGroupByTagArgs
Import
CustomTables can be imported using the id
, e.g.
$ pulumi import oci:MeteringComputation/customTable:CustomTable test_custom_table "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
oci
Terraform Provider.