1. Packages
  2. Ibm Provider
  3. API Docs
  4. getBillingSnapshotList
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getBillingSnapshotList

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source to retrieve information about a billing_snapshot_list. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const billingSnapshotList = ibm.getBillingSnapshotList({
        dateFrom: 1675209600000,
        dateTo: 1675987200000,
        month: "2023-02",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    billing_snapshot_list = ibm.get_billing_snapshot_list(date_from=1675209600000,
        date_to=1675987200000,
        month="2023-02")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetBillingSnapshotList(ctx, &ibm.GetBillingSnapshotListArgs{
    			DateFrom: pulumi.Float64Ref(1675209600000),
    			DateTo:   pulumi.Float64Ref(1675987200000),
    			Month:    "2023-02",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var billingSnapshotList = Ibm.GetBillingSnapshotList.Invoke(new()
        {
            DateFrom = 1675209600000,
            DateTo = 1675987200000,
            Month = "2023-02",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetBillingSnapshotListArgs;
    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 billingSnapshotList = IbmFunctions.getBillingSnapshotList(GetBillingSnapshotListArgs.builder()
                .dateFrom(1675209600000)
                .dateTo(1675987200000)
                .month("2023-02")
                .build());
    
        }
    }
    
    variables:
      billingSnapshotList:
        fn::invoke:
          function: ibm:getBillingSnapshotList
          arguments:
            dateFrom: 1.6752096e+12
            dateTo: 1.6759872e+12
            month: 2023-02
    

    Using getBillingSnapshotList

    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 getBillingSnapshotList(args: GetBillingSnapshotListArgs, opts?: InvokeOptions): Promise<GetBillingSnapshotListResult>
    function getBillingSnapshotListOutput(args: GetBillingSnapshotListOutputArgs, opts?: InvokeOptions): Output<GetBillingSnapshotListResult>
    def get_billing_snapshot_list(date_from: Optional[float] = None,
                                  date_to: Optional[float] = None,
                                  id: Optional[str] = None,
                                  limit: Optional[float] = None,
                                  month: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetBillingSnapshotListResult
    def get_billing_snapshot_list_output(date_from: Optional[pulumi.Input[float]] = None,
                                  date_to: Optional[pulumi.Input[float]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  limit: Optional[pulumi.Input[float]] = None,
                                  month: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetBillingSnapshotListResult]
    func GetBillingSnapshotList(ctx *Context, args *GetBillingSnapshotListArgs, opts ...InvokeOption) (*GetBillingSnapshotListResult, error)
    func GetBillingSnapshotListOutput(ctx *Context, args *GetBillingSnapshotListOutputArgs, opts ...InvokeOption) GetBillingSnapshotListResultOutput

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

    public static class GetBillingSnapshotList 
    {
        public static Task<GetBillingSnapshotListResult> InvokeAsync(GetBillingSnapshotListArgs args, InvokeOptions? opts = null)
        public static Output<GetBillingSnapshotListResult> Invoke(GetBillingSnapshotListInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBillingSnapshotListResult> getBillingSnapshotList(GetBillingSnapshotListArgs args, InvokeOptions options)
    public static Output<GetBillingSnapshotListResult> getBillingSnapshotList(GetBillingSnapshotListArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getBillingSnapshotList:getBillingSnapshotList
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    DateFrom double
    Timestamp in milliseconds for which billing report snapshot is requested.
    DateTo double
    Timestamp in milliseconds for which billing report snapshot is requested.
    Id string
    The unique identifier of the billing_snapshot_list.
    Limit double
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.
    Month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    DateFrom float64
    Timestamp in milliseconds for which billing report snapshot is requested.
    DateTo float64
    Timestamp in milliseconds for which billing report snapshot is requested.
    Id string
    The unique identifier of the billing_snapshot_list.
    Limit float64
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.
    month String
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    dateFrom Double
    Timestamp in milliseconds for which billing report snapshot is requested.
    dateTo Double
    Timestamp in milliseconds for which billing report snapshot is requested.
    id String
    The unique identifier of the billing_snapshot_list.
    limit Double
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.
    month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    dateFrom number
    Timestamp in milliseconds for which billing report snapshot is requested.
    dateTo number
    Timestamp in milliseconds for which billing report snapshot is requested.
    id string
    The unique identifier of the billing_snapshot_list.
    limit number
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.
    month str
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    date_from float
    Timestamp in milliseconds for which billing report snapshot is requested.
    date_to float
    Timestamp in milliseconds for which billing report snapshot is requested.
    id str
    The unique identifier of the billing_snapshot_list.
    limit float
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.
    month String
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    dateFrom Number
    Timestamp in milliseconds for which billing report snapshot is requested.
    dateTo Number
    Timestamp in milliseconds for which billing report snapshot is requested.
    id String
    The unique identifier of the billing_snapshot_list.
    limit Number
    Number of usage records returned. The default value is 30. Maximum value is 200.

    • Constraints: The default value is 30. The maximum value is 200. The minimum value is 1.

    getBillingSnapshotList Result

    The following output properties are available:

    Id string
    The unique identifier of the billing_snapshot_list.
    Month string
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    Snapshotcount double
    Snapshots List<GetBillingSnapshotListSnapshot>
    (List) Nested schema for snapshots:
    DateFrom double
    DateTo double
    Limit double
    Id string
    The unique identifier of the billing_snapshot_list.
    Month string
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    Snapshotcount float64
    Snapshots []GetBillingSnapshotListSnapshot
    (List) Nested schema for snapshots:
    DateFrom float64
    DateTo float64
    Limit float64
    id String
    The unique identifier of the billing_snapshot_list.
    month String
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    snapshotcount Double
    snapshots List<GetBillingSnapshotListSnapshot>
    (List) Nested schema for snapshots:
    dateFrom Double
    dateTo Double
    limit Double
    id string
    The unique identifier of the billing_snapshot_list.
    month string
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    snapshotcount number
    snapshots GetBillingSnapshotListSnapshot[]
    (List) Nested schema for snapshots:
    dateFrom number
    dateTo number
    limit number
    id str
    The unique identifier of the billing_snapshot_list.
    month str
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    snapshotcount float
    snapshots Sequence[GetBillingSnapshotListSnapshot]
    (List) Nested schema for snapshots:
    date_from float
    date_to float
    limit float
    id String
    The unique identifier of the billing_snapshot_list.
    month String
    (String) Month of captured snapshot.

    • Constraints: The value must match regular expression /^\\d{4}\\-(0?[1-9]|1[012])$/.
    snapshotcount Number
    snapshots List<Property Map>
    (List) Nested schema for snapshots:
    dateFrom Number
    dateTo Number
    limit Number

    Supporting Types

    GetBillingSnapshotListSnapshot

    AccountId string
    (String) Account ID for which billing report is captured.
    AccountType string
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    BillingPeriods List<GetBillingSnapshotListSnapshotBillingPeriod>
    (List) Period of billing in snapshot. Nested schema for billing_period:
    Bucket string
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    Charset string
    (String) Character encoding used.
    Compression string
    (String) Compression format of the snapshot report.
    ContentType string
    (String) Type of content stored in snapshot report.
    CreatedOn string
    (String) Date and time of creation of snapshot.
    ExpectedProcessedAt double
    (Integer) Timestamp of snapshot processed.
    Files List<GetBillingSnapshotListSnapshotFile>
    (List) List of location of reports. Nested schema for files:
    Month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    ProcessedAt double
    (Integer) Timestamp at which snapshot is captured.
    ReportTypes List<GetBillingSnapshotListSnapshotReportType>
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    SnapshotId string
    (String) Id of the snapshot captured.
    State string
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    Version string
    (String) Version of the snapshot.
    AccountId string
    (String) Account ID for which billing report is captured.
    AccountType string
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    BillingPeriods []GetBillingSnapshotListSnapshotBillingPeriod
    (List) Period of billing in snapshot. Nested schema for billing_period:
    Bucket string
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    Charset string
    (String) Character encoding used.
    Compression string
    (String) Compression format of the snapshot report.
    ContentType string
    (String) Type of content stored in snapshot report.
    CreatedOn string
    (String) Date and time of creation of snapshot.
    ExpectedProcessedAt float64
    (Integer) Timestamp of snapshot processed.
    Files []GetBillingSnapshotListSnapshotFile
    (List) List of location of reports. Nested schema for files:
    Month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    ProcessedAt float64
    (Integer) Timestamp at which snapshot is captured.
    ReportTypes []GetBillingSnapshotListSnapshotReportType
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    SnapshotId string
    (String) Id of the snapshot captured.
    State string
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    Version string
    (String) Version of the snapshot.
    accountId String
    (String) Account ID for which billing report is captured.
    accountType String
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    billingPeriods List<GetBillingSnapshotListSnapshotBillingPeriod>
    (List) Period of billing in snapshot. Nested schema for billing_period:
    bucket String
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    charset String
    (String) Character encoding used.
    compression String
    (String) Compression format of the snapshot report.
    contentType String
    (String) Type of content stored in snapshot report.
    createdOn String
    (String) Date and time of creation of snapshot.
    expectedProcessedAt Double
    (Integer) Timestamp of snapshot processed.
    files List<GetBillingSnapshotListSnapshotFile>
    (List) List of location of reports. Nested schema for files:
    month String
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    processedAt Double
    (Integer) Timestamp at which snapshot is captured.
    reportTypes List<GetBillingSnapshotListSnapshotReportType>
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    snapshotId String
    (String) Id of the snapshot captured.
    state String
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    version String
    (String) Version of the snapshot.
    accountId string
    (String) Account ID for which billing report is captured.
    accountType string
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    billingPeriods GetBillingSnapshotListSnapshotBillingPeriod[]
    (List) Period of billing in snapshot. Nested schema for billing_period:
    bucket string
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    charset string
    (String) Character encoding used.
    compression string
    (String) Compression format of the snapshot report.
    contentType string
    (String) Type of content stored in snapshot report.
    createdOn string
    (String) Date and time of creation of snapshot.
    expectedProcessedAt number
    (Integer) Timestamp of snapshot processed.
    files GetBillingSnapshotListSnapshotFile[]
    (List) List of location of reports. Nested schema for files:
    month string
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    processedAt number
    (Integer) Timestamp at which snapshot is captured.
    reportTypes GetBillingSnapshotListSnapshotReportType[]
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    snapshotId string
    (String) Id of the snapshot captured.
    state string
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    version string
    (String) Version of the snapshot.
    account_id str
    (String) Account ID for which billing report is captured.
    account_type str
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    billing_periods Sequence[GetBillingSnapshotListSnapshotBillingPeriod]
    (List) Period of billing in snapshot. Nested schema for billing_period:
    bucket str
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    charset str
    (String) Character encoding used.
    compression str
    (String) Compression format of the snapshot report.
    content_type str
    (String) Type of content stored in snapshot report.
    created_on str
    (String) Date and time of creation of snapshot.
    expected_processed_at float
    (Integer) Timestamp of snapshot processed.
    files Sequence[GetBillingSnapshotListSnapshotFile]
    (List) List of location of reports. Nested schema for files:
    month str
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    processed_at float
    (Integer) Timestamp at which snapshot is captured.
    report_types Sequence[GetBillingSnapshotListSnapshotReportType]
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    snapshot_id str
    (String) Id of the snapshot captured.
    state str
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    version str
    (String) Version of the snapshot.
    accountId String
    (String) Account ID for which billing report is captured.
    accountType String
    (String) Type of account. Possible values are [enterprise, account].

    • Constraints: Allowable values are: account, enterprise.
    billingPeriods List<Property Map>
    (List) Period of billing in snapshot. Nested schema for billing_period:
    bucket String
    (String) The name of the COS bucket to store the snapshot of the billing reports.
    charset String
    (String) Character encoding used.
    compression String
    (String) Compression format of the snapshot report.
    contentType String
    (String) Type of content stored in snapshot report.
    createdOn String
    (String) Date and time of creation of snapshot.
    expectedProcessedAt Number
    (Integer) Timestamp of snapshot processed.
    files List<Property Map>
    (List) List of location of reports. Nested schema for files:
    month String
    The month for which billing report snapshot is requested. Format is yyyy-mm.
    processedAt Number
    (Integer) Timestamp at which snapshot is captured.
    reportTypes List<Property Map>
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    snapshotId String
    (String) Id of the snapshot captured.
    state String
    (String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

    • Constraints: Allowable values are: enabled, disabled.
    version String
    (String) Version of the snapshot.

    GetBillingSnapshotListSnapshotBillingPeriod

    End string
    (String) Date and time of end of billing in the respective snapshot.
    Start string
    (String) Date and time of start of billing in the respective snapshot.
    End string
    (String) Date and time of end of billing in the respective snapshot.
    Start string
    (String) Date and time of start of billing in the respective snapshot.
    end String
    (String) Date and time of end of billing in the respective snapshot.
    start String
    (String) Date and time of start of billing in the respective snapshot.
    end string
    (String) Date and time of end of billing in the respective snapshot.
    start string
    (String) Date and time of start of billing in the respective snapshot.
    end str
    (String) Date and time of end of billing in the respective snapshot.
    start str
    (String) Date and time of start of billing in the respective snapshot.
    end String
    (String) Date and time of end of billing in the respective snapshot.
    start String
    (String) Date and time of start of billing in the respective snapshot.

    GetBillingSnapshotListSnapshotFile

    AccountId string
    (String) Account ID for which billing report is captured.
    Location string
    (String) Absolute path of the billing report in the COS instance.
    ReportTypes string
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    AccountId string
    (String) Account ID for which billing report is captured.
    Location string
    (String) Absolute path of the billing report in the COS instance.
    ReportTypes string
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    accountId String
    (String) Account ID for which billing report is captured.
    location String
    (String) Absolute path of the billing report in the COS instance.
    reportTypes String
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    accountId string
    (String) Account ID for which billing report is captured.
    location string
    (String) Absolute path of the billing report in the COS instance.
    reportTypes string
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    account_id str
    (String) Account ID for which billing report is captured.
    location str
    (String) Absolute path of the billing report in the COS instance.
    report_types str
    (List) List of report types configured for the snapshot. Nested schema for report_types:
    accountId String
    (String) Account ID for which billing report is captured.
    location String
    (String) Absolute path of the billing report in the COS instance.
    reportTypes String
    (List) List of report types configured for the snapshot. Nested schema for report_types:

    GetBillingSnapshotListSnapshotReportType

    Type string
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    Version string
    (String) Version of the snapshot.
    Type string
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    Version string
    (String) Version of the snapshot.
    type String
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    version String
    (String) Version of the snapshot.
    type string
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    version string
    (String) Version of the snapshot.
    type str
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    version str
    (String) Version of the snapshot.
    type String
    (String) The type of billing report of the snapshot. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

    • Constraints: Allowable values are: account_summary, enterprise_summary, account_resource_instance_usage.
    version String
    (String) Version of the snapshot.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud