1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Opsi
  5. getChargebackPlans
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi

    This data source provides the list of Chargeback Plans in Oracle Cloud Infrastructure Opsi service.

    Gets a list of Ops Insights chargeback plans.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testChargebackPlans = oci.Opsi.getChargebackPlans({
        chargebackplanId: testChargebackplan.id,
        compartmentId: compartmentId,
        compartmentIdInSubtree: chargebackPlanCompartmentIdInSubtree,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_chargeback_plans = oci.Opsi.get_chargeback_plans(chargebackplan_id=test_chargebackplan["id"],
        compartment_id=compartment_id,
        compartment_id_in_subtree=chargeback_plan_compartment_id_in_subtree)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/opsi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opsi.GetChargebackPlans(ctx, &opsi.GetChargebackPlansArgs{
    			ChargebackplanId:       pulumi.StringRef(testChargebackplan.Id),
    			CompartmentId:          pulumi.StringRef(compartmentId),
    			CompartmentIdInSubtree: pulumi.BoolRef(chargebackPlanCompartmentIdInSubtree),
    		}, 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 testChargebackPlans = Oci.Opsi.GetChargebackPlans.Invoke(new()
        {
            ChargebackplanId = testChargebackplan.Id,
            CompartmentId = compartmentId,
            CompartmentIdInSubtree = chargebackPlanCompartmentIdInSubtree,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Opsi.OpsiFunctions;
    import com.pulumi.oci.Opsi.inputs.GetChargebackPlansArgs;
    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 testChargebackPlans = OpsiFunctions.getChargebackPlans(GetChargebackPlansArgs.builder()
                .chargebackplanId(testChargebackplan.id())
                .compartmentId(compartmentId)
                .compartmentIdInSubtree(chargebackPlanCompartmentIdInSubtree)
                .build());
    
        }
    }
    
    variables:
      testChargebackPlans:
        fn::invoke:
          function: oci:Opsi:getChargebackPlans
          arguments:
            chargebackplanId: ${testChargebackplan.id}
            compartmentId: ${compartmentId}
            compartmentIdInSubtree: ${chargebackPlanCompartmentIdInSubtree}
    

    Using getChargebackPlans

    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 getChargebackPlans(args: GetChargebackPlansArgs, opts?: InvokeOptions): Promise<GetChargebackPlansResult>
    function getChargebackPlansOutput(args: GetChargebackPlansOutputArgs, opts?: InvokeOptions): Output<GetChargebackPlansResult>
    def get_chargeback_plans(chargebackplan_id: Optional[str] = None,
                             compartment_id: Optional[str] = None,
                             compartment_id_in_subtree: Optional[bool] = None,
                             filters: Optional[Sequence[GetChargebackPlansFilter]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetChargebackPlansResult
    def get_chargeback_plans_output(chargebackplan_id: Optional[pulumi.Input[str]] = None,
                             compartment_id: Optional[pulumi.Input[str]] = None,
                             compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                             filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetChargebackPlansFilterArgs]]]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetChargebackPlansResult]
    func GetChargebackPlans(ctx *Context, args *GetChargebackPlansArgs, opts ...InvokeOption) (*GetChargebackPlansResult, error)
    func GetChargebackPlansOutput(ctx *Context, args *GetChargebackPlansOutputArgs, opts ...InvokeOption) GetChargebackPlansResultOutput

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

    public static class GetChargebackPlans 
    {
        public static Task<GetChargebackPlansResult> InvokeAsync(GetChargebackPlansArgs args, InvokeOptions? opts = null)
        public static Output<GetChargebackPlansResult> Invoke(GetChargebackPlansInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetChargebackPlansResult> getChargebackPlans(GetChargebackPlansArgs args, InvokeOptions options)
    public static Output<GetChargebackPlansResult> getChargebackPlans(GetChargebackPlansArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Opsi/getChargebackPlans:getChargebackPlans
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ChargebackplanId string
    The OCID of the Ops Insights chargeback plan.
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    Filters List<GetChargebackPlansFilter>
    ChargebackplanId string
    The OCID of the Ops Insights chargeback plan.
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    Filters []GetChargebackPlansFilter
    chargebackplanId String
    The OCID of the Ops Insights chargeback plan.
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters List<GetChargebackPlansFilter>
    chargebackplanId string
    The OCID of the Ops Insights chargeback plan.
    compartmentId string
    The OCID of the compartment.
    compartmentIdInSubtree boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters GetChargebackPlansFilter[]
    chargebackplan_id str
    The OCID of the Ops Insights chargeback plan.
    compartment_id str
    The OCID of the compartment.
    compartment_id_in_subtree bool
    A flag to search all resources within a given compartment and all sub-compartments.
    filters Sequence[GetChargebackPlansFilter]
    chargebackplanId String
    The OCID of the Ops Insights chargeback plan.
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    A flag to search all resources within a given compartment and all sub-compartments.
    filters List<Property Map>

    getChargebackPlans Result

    The following output properties are available:

    ChargebackPlanCollections List<GetChargebackPlansChargebackPlanCollection>
    The list of chargeback_plan_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ChargebackplanId string
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    Filters List<GetChargebackPlansFilter>
    ChargebackPlanCollections []GetChargebackPlansChargebackPlanCollection
    The list of chargeback_plan_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    ChargebackplanId string
    CompartmentId string
    The OCID of the compartment.
    CompartmentIdInSubtree bool
    Filters []GetChargebackPlansFilter
    chargebackPlanCollections List<GetChargebackPlansChargebackPlanCollection>
    The list of chargeback_plan_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    chargebackplanId String
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    filters List<GetChargebackPlansFilter>
    chargebackPlanCollections GetChargebackPlansChargebackPlanCollection[]
    The list of chargeback_plan_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    chargebackplanId string
    compartmentId string
    The OCID of the compartment.
    compartmentIdInSubtree boolean
    filters GetChargebackPlansFilter[]
    chargeback_plan_collections Sequence[GetChargebackPlansChargebackPlanCollection]
    The list of chargeback_plan_collection.
    id str
    The provider-assigned unique ID for this managed resource.
    chargebackplan_id str
    compartment_id str
    The OCID of the compartment.
    compartment_id_in_subtree bool
    filters Sequence[GetChargebackPlansFilter]
    chargebackPlanCollections List<Property Map>
    The list of chargeback_plan_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    chargebackplanId String
    compartmentId String
    The OCID of the compartment.
    compartmentIdInSubtree Boolean
    filters List<Property Map>

    Supporting Types

    GetChargebackPlansChargebackPlanCollection

    GetChargebackPlansChargebackPlanCollectionItem

    CompartmentId string
    The OCID of the compartment.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    EntitySource string
    Source of the chargeback plan.
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    OCID of OPSI Chargeback plan resource.
    IsCustomizable bool
    Indicates whether the chargeback plan customization item can be customized.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    PlanCategory string
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    PlanCustomItems List<GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem>
    List of chargeback plan customizations.
    PlanDescription string
    Description of OPSI Chargeback Plan.
    PlanName string
    Name for the OPSI Chargeback plan.
    PlanType string
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    State string
    Chargeback Plan lifecycle states
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    TimeUpdated string
    The time chargeback plan was updated. An RFC3339 formatted datetime string
    CompartmentId string
    The OCID of the compartment.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    EntitySource string
    Source of the chargeback plan.
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    Id string
    OCID of OPSI Chargeback plan resource.
    IsCustomizable bool
    Indicates whether the chargeback plan customization item can be customized.
    LifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    PlanCategory string
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    PlanCustomItems []GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem
    List of chargeback plan customizations.
    PlanDescription string
    Description of OPSI Chargeback Plan.
    PlanName string
    Name for the OPSI Chargeback plan.
    PlanType string
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    State string
    Chargeback Plan lifecycle states
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    TimeUpdated string
    The time chargeback plan was updated. An RFC3339 formatted datetime string
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    entitySource String
    Source of the chargeback plan.
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    OCID of OPSI Chargeback plan resource.
    isCustomizable Boolean
    Indicates whether the chargeback plan customization item can be customized.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    planCategory String
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    planCustomItems List<GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem>
    List of chargeback plan customizations.
    planDescription String
    Description of OPSI Chargeback Plan.
    planName String
    Name for the OPSI Chargeback plan.
    planType String
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    state String
    Chargeback Plan lifecycle states
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    timeUpdated String
    The time chargeback plan was updated. An RFC3339 formatted datetime string
    compartmentId string
    The OCID of the compartment.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    entitySource string
    Source of the chargeback plan.
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id string
    OCID of OPSI Chargeback plan resource.
    isCustomizable boolean
    Indicates whether the chargeback plan customization item can be customized.
    lifecycleDetails string
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    planCategory string
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    planCustomItems GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem[]
    List of chargeback plan customizations.
    planDescription string
    Description of OPSI Chargeback Plan.
    planName string
    Name for the OPSI Chargeback plan.
    planType string
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    state string
    Chargeback Plan lifecycle states
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    timeUpdated string
    The time chargeback plan was updated. An RFC3339 formatted datetime string
    compartment_id str
    The OCID of the compartment.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    entity_source str
    Source of the chargeback plan.
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id str
    OCID of OPSI Chargeback plan resource.
    is_customizable bool
    Indicates whether the chargeback plan customization item can be customized.
    lifecycle_details str
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    plan_category str
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    plan_custom_items Sequence[GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem]
    List of chargeback plan customizations.
    plan_description str
    Description of OPSI Chargeback Plan.
    plan_name str
    Name for the OPSI Chargeback plan.
    plan_type str
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    state str
    Chargeback Plan lifecycle states
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    time_updated str
    The time chargeback plan was updated. An RFC3339 formatted datetime string
    compartmentId String
    The OCID of the compartment.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    entitySource String
    Source of the chargeback plan.
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
    id String
    OCID of OPSI Chargeback plan resource.
    isCustomizable Boolean
    Indicates whether the chargeback plan customization item can be customized.
    lifecycleDetails String
    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
    planCategory String
    Chargeback Plan category of the chargeback entity. It can be OOB, or CUSTOM.
    planCustomItems List<Property Map>
    List of chargeback plan customizations.
    planDescription String
    Description of OPSI Chargeback Plan.
    planName String
    Name for the OPSI Chargeback plan.
    planType String
    Chargeback Plan type of the chargeback entity. For an Exadata it can be WEIGHTED_ALLOCATION, EQUAL_ALLOCATION, UNUSED_ALLOCATION.
    state String
    Chargeback Plan lifecycle states
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the chargeback plan was created, in the format defined by RFC3339.
    timeUpdated String
    The time chargeback plan was updated. An RFC3339 formatted datetime string

    GetChargebackPlansChargebackPlanCollectionItemPlanCustomItem

    IsCustomizable bool
    Indicates whether the chargeback plan customization item can be customized.
    Name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    Value string
    Value of chargeback plan customization item.
    IsCustomizable bool
    Indicates whether the chargeback plan customization item can be customized.
    Name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    Value string
    Value of chargeback plan customization item.
    isCustomizable Boolean
    Indicates whether the chargeback plan customization item can be customized.
    name String
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    value String
    Value of chargeback plan customization item.
    isCustomizable boolean
    Indicates whether the chargeback plan customization item can be customized.
    name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    value string
    Value of chargeback plan customization item.
    is_customizable bool
    Indicates whether the chargeback plan customization item can be customized.
    name str
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    value str
    Value of chargeback plan customization item.
    isCustomizable Boolean
    Indicates whether the chargeback plan customization item can be customized.
    name String
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    value String
    Value of chargeback plan customization item.

    GetChargebackPlansFilter

    Name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    Values List<string>
    Regex bool
    Name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    Values []string
    Regex bool
    name String
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    values List<String>
    regex Boolean
    name string
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    values string[]
    regex boolean
    name str
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    values Sequence[str]
    regex bool
    name String
    Name of chargeback plan customization item. Example items for Exadata Insights Chargeback are statistic, percentile, infrastructureCost, additionalServerCost etc.
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.2.0
    published on Friday, Mar 6, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.