1. Packages
  2. Ibm Provider
  3. API Docs
  4. BillingReportSnapshot
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.BillingReportSnapshot

Explore with Pulumi AI

Create, update, and delete billing_report_snapshots with this resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const billingReportSnapshotInstance = new ibm.BillingReportSnapshot("billingReportSnapshotInstance", {
    cosBucket: "bucket_name",
    cosLocation: "us-south",
    cosReportsFolder: "IBMCloud-Billing-Reports",
    interval: "daily",
    versioning: "new",
});
Copy
import pulumi
import pulumi_ibm as ibm

billing_report_snapshot_instance = ibm.BillingReportSnapshot("billingReportSnapshotInstance",
    cos_bucket="bucket_name",
    cos_location="us-south",
    cos_reports_folder="IBMCloud-Billing-Reports",
    interval="daily",
    versioning="new")
Copy
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.NewBillingReportSnapshot(ctx, "billingReportSnapshotInstance", &ibm.BillingReportSnapshotArgs{
			CosBucket:        pulumi.String("bucket_name"),
			CosLocation:      pulumi.String("us-south"),
			CosReportsFolder: pulumi.String("IBMCloud-Billing-Reports"),
			Interval:         pulumi.String("daily"),
			Versioning:       pulumi.String("new"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var billingReportSnapshotInstance = new Ibm.BillingReportSnapshot("billingReportSnapshotInstance", new()
    {
        CosBucket = "bucket_name",
        CosLocation = "us-south",
        CosReportsFolder = "IBMCloud-Billing-Reports",
        Interval = "daily",
        Versioning = "new",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.BillingReportSnapshot;
import com.pulumi.ibm.BillingReportSnapshotArgs;
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 billingReportSnapshotInstance = new BillingReportSnapshot("billingReportSnapshotInstance", BillingReportSnapshotArgs.builder()
            .cosBucket("bucket_name")
            .cosLocation("us-south")
            .cosReportsFolder("IBMCloud-Billing-Reports")
            .interval("daily")
            .versioning("new")
            .build());

    }
}
Copy
resources:
  billingReportSnapshotInstance:
    type: ibm:BillingReportSnapshot
    properties:
      cosBucket: bucket_name
      cosLocation: us-south
      cosReportsFolder: IBMCloud-Billing-Reports
      interval: daily
      versioning: new
Copy

With Service-To-Service Authorization

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const policy = new ibm.IamAuthorizationPolicy("policy", {
    sourceServiceName: "billing",
    targetServiceName: "cloud-object-storage",
    targetResourceInstanceId: "cos_instance_id",
    roles: [
        "Object Writer",
        "Content Reader",
    ],
});
const billingReportSnapshotInstance = new ibm.BillingReportSnapshot("billingReportSnapshotInstance", {
    cosBucket: "bucket_name",
    cosLocation: "us-south",
    cosReportsFolder: "IBMCloud-Billing-Reports",
    interval: "daily",
    versioning: "new",
    reportTypes: [
        "account_summary",
        "account_resource_instance_usage",
    ],
}, {
    dependsOn: [policy],
});
Copy
import pulumi
import pulumi_ibm as ibm

policy = ibm.IamAuthorizationPolicy("policy",
    source_service_name="billing",
    target_service_name="cloud-object-storage",
    target_resource_instance_id="cos_instance_id",
    roles=[
        "Object Writer",
        "Content Reader",
    ])
billing_report_snapshot_instance = ibm.BillingReportSnapshot("billingReportSnapshotInstance",
    cos_bucket="bucket_name",
    cos_location="us-south",
    cos_reports_folder="IBMCloud-Billing-Reports",
    interval="daily",
    versioning="new",
    report_types=[
        "account_summary",
        "account_resource_instance_usage",
    ],
    opts = pulumi.ResourceOptions(depends_on=[policy]))
Copy
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 {
		policy, err := ibm.NewIamAuthorizationPolicy(ctx, "policy", &ibm.IamAuthorizationPolicyArgs{
			SourceServiceName:        pulumi.String("billing"),
			TargetServiceName:        pulumi.String("cloud-object-storage"),
			TargetResourceInstanceId: pulumi.String("cos_instance_id"),
			Roles: pulumi.StringArray{
				pulumi.String("Object Writer"),
				pulumi.String("Content Reader"),
			},
		})
		if err != nil {
			return err
		}
		_, err = ibm.NewBillingReportSnapshot(ctx, "billingReportSnapshotInstance", &ibm.BillingReportSnapshotArgs{
			CosBucket:        pulumi.String("bucket_name"),
			CosLocation:      pulumi.String("us-south"),
			CosReportsFolder: pulumi.String("IBMCloud-Billing-Reports"),
			Interval:         pulumi.String("daily"),
			Versioning:       pulumi.String("new"),
			ReportTypes: pulumi.StringArray{
				pulumi.String("account_summary"),
				pulumi.String("account_resource_instance_usage"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			policy,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var policy = new Ibm.IamAuthorizationPolicy("policy", new()
    {
        SourceServiceName = "billing",
        TargetServiceName = "cloud-object-storage",
        TargetResourceInstanceId = "cos_instance_id",
        Roles = new[]
        {
            "Object Writer",
            "Content Reader",
        },
    });

    var billingReportSnapshotInstance = new Ibm.BillingReportSnapshot("billingReportSnapshotInstance", new()
    {
        CosBucket = "bucket_name",
        CosLocation = "us-south",
        CosReportsFolder = "IBMCloud-Billing-Reports",
        Interval = "daily",
        Versioning = "new",
        ReportTypes = new[]
        {
            "account_summary",
            "account_resource_instance_usage",
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            policy,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IamAuthorizationPolicy;
import com.pulumi.ibm.IamAuthorizationPolicyArgs;
import com.pulumi.ibm.BillingReportSnapshot;
import com.pulumi.ibm.BillingReportSnapshotArgs;
import com.pulumi.resources.CustomResourceOptions;
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 policy = new IamAuthorizationPolicy("policy", IamAuthorizationPolicyArgs.builder()
            .sourceServiceName("billing")
            .targetServiceName("cloud-object-storage")
            .targetResourceInstanceId("cos_instance_id")
            .roles(            
                "Object Writer",
                "Content Reader")
            .build());

        var billingReportSnapshotInstance = new BillingReportSnapshot("billingReportSnapshotInstance", BillingReportSnapshotArgs.builder()
            .cosBucket("bucket_name")
            .cosLocation("us-south")
            .cosReportsFolder("IBMCloud-Billing-Reports")
            .interval("daily")
            .versioning("new")
            .reportTypes(            
                "account_summary",
                "account_resource_instance_usage")
            .build(), CustomResourceOptions.builder()
                .dependsOn(policy)
                .build());

    }
}
Copy
resources:
  policy:
    type: ibm:IamAuthorizationPolicy
    properties:
      sourceServiceName: billing
      targetServiceName: cloud-object-storage
      targetResourceInstanceId: cos_instance_id
      roles:
        - Object Writer
        - Content Reader
  billingReportSnapshotInstance:
    type: ibm:BillingReportSnapshot
    properties:
      cosBucket: bucket_name
      cosLocation: us-south
      cosReportsFolder: IBMCloud-Billing-Reports
      interval: daily
      versioning: new
      reportTypes:
        - account_summary
        - account_resource_instance_usage
    options:
      dependsOn:
        - ${policy}
Copy

If service-to-service authorization already exists in the specific COS bucket, the resource policy can be omitted and the depends_on flag can also be removed from resource billing_report_snapshot_instance. For more information, about IAM service authorizations, see using authorizations to grant access between services.

Create BillingReportSnapshot Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new BillingReportSnapshot(name: string, args: BillingReportSnapshotArgs, opts?: CustomResourceOptions);
@overload
def BillingReportSnapshot(resource_name: str,
                          args: BillingReportSnapshotArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def BillingReportSnapshot(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          cos_bucket: Optional[str] = None,
                          cos_location: Optional[str] = None,
                          interval: Optional[str] = None,
                          billing_report_snapshot_id: Optional[str] = None,
                          cos_reports_folder: Optional[str] = None,
                          report_types: Optional[Sequence[str]] = None,
                          versioning: Optional[str] = None)
func NewBillingReportSnapshot(ctx *Context, name string, args BillingReportSnapshotArgs, opts ...ResourceOption) (*BillingReportSnapshot, error)
public BillingReportSnapshot(string name, BillingReportSnapshotArgs args, CustomResourceOptions? opts = null)
public BillingReportSnapshot(String name, BillingReportSnapshotArgs args)
public BillingReportSnapshot(String name, BillingReportSnapshotArgs args, CustomResourceOptions options)
type: ibm:BillingReportSnapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BillingReportSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BillingReportSnapshotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BillingReportSnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BillingReportSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BillingReportSnapshotArgs
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 billingReportSnapshotResource = new Ibm.BillingReportSnapshot("billingReportSnapshotResource", new()
{
    CosBucket = "string",
    CosLocation = "string",
    Interval = "string",
    BillingReportSnapshotId = "string",
    CosReportsFolder = "string",
    ReportTypes = new[]
    {
        "string",
    },
    Versioning = "string",
});
Copy
example, err := ibm.NewBillingReportSnapshot(ctx, "billingReportSnapshotResource", &ibm.BillingReportSnapshotArgs{
CosBucket: pulumi.String("string"),
CosLocation: pulumi.String("string"),
Interval: pulumi.String("string"),
BillingReportSnapshotId: pulumi.String("string"),
CosReportsFolder: pulumi.String("string"),
ReportTypes: pulumi.StringArray{
pulumi.String("string"),
},
Versioning: pulumi.String("string"),
})
Copy
var billingReportSnapshotResource = new BillingReportSnapshot("billingReportSnapshotResource", BillingReportSnapshotArgs.builder()
    .cosBucket("string")
    .cosLocation("string")
    .interval("string")
    .billingReportSnapshotId("string")
    .cosReportsFolder("string")
    .reportTypes("string")
    .versioning("string")
    .build());
Copy
billing_report_snapshot_resource = ibm.BillingReportSnapshot("billingReportSnapshotResource",
    cos_bucket="string",
    cos_location="string",
    interval="string",
    billing_report_snapshot_id="string",
    cos_reports_folder="string",
    report_types=["string"],
    versioning="string")
Copy
const billingReportSnapshotResource = new ibm.BillingReportSnapshot("billingReportSnapshotResource", {
    cosBucket: "string",
    cosLocation: "string",
    interval: "string",
    billingReportSnapshotId: "string",
    cosReportsFolder: "string",
    reportTypes: ["string"],
    versioning: "string",
});
Copy
type: ibm:BillingReportSnapshot
properties:
    billingReportSnapshotId: string
    cosBucket: string
    cosLocation: string
    cosReportsFolder: string
    interval: string
    reportTypes:
        - string
    versioning: string
Copy

BillingReportSnapshot Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The BillingReportSnapshot resource accepts the following input properties:

CosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
CosLocation This property is required. string
Region of the COS instance.
Interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
BillingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
CosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
ReportTypes List<string>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
Versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
CosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
CosLocation This property is required. string
Region of the COS instance.
Interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
BillingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
CosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
ReportTypes []string
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
Versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
cosBucket This property is required. String
The name of the COS bucket to store the snapshot of the billing reports.
cosLocation This property is required. String
Region of the COS instance.
interval This property is required. String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
billingReportSnapshotId String
The unique identifier of the billing_report_snapshot.
cosReportsFolder String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
reportTypes List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
versioning String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
cosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
cosLocation This property is required. string
Region of the COS instance.
interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
billingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
cosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
reportTypes string[]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
cos_bucket This property is required. str
The name of the COS bucket to store the snapshot of the billing reports.
cos_location This property is required. str
Region of the COS instance.
interval This property is required. str
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
billing_report_snapshot_id str
The unique identifier of the billing_report_snapshot.
cos_reports_folder str
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
report_types Sequence[str]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
versioning str
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
cosBucket This property is required. String
The name of the COS bucket to store the snapshot of the billing reports.
cosLocation This property is required. String
Region of the COS instance.
interval This property is required. String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
billingReportSnapshotId String
The unique identifier of the billing_report_snapshot.
cosReportsFolder String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
reportTypes List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
versioning String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.

Outputs

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

AccountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
Compression string
(String) Compression format of the snapshot report.
ContentType string
(String) Type of content stored in snapshot report.
CosEndpoint string
(String) The endpoint of the COS instance.
CreatedAt double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
Histories List<BillingReportSnapshotHistory>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedAt double
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
State string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
AccountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
Compression string
(String) Compression format of the snapshot report.
ContentType string
(String) Type of content stored in snapshot report.
CosEndpoint string
(String) The endpoint of the COS instance.
CreatedAt float64
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
Histories []BillingReportSnapshotHistory
(List) List of previous versions of the snapshot configurations. Nested schema for history:
Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedAt float64
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
State string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
accountType String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression String
(String) Compression format of the snapshot report.
contentType String
(String) Type of content stored in snapshot report.
cosEndpoint String
(String) The endpoint of the COS instance.
createdAt Double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories List<BillingReportSnapshotHistory>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedAt Double
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
state String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
accountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression string
(String) Compression format of the snapshot report.
contentType string
(String) Type of content stored in snapshot report.
cosEndpoint string
(String) The endpoint of the COS instance.
createdAt number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories BillingReportSnapshotHistory[]
(List) List of previous versions of the snapshot configurations. Nested schema for history:
id string
The provider-assigned unique ID for this managed resource.
lastUpdatedAt number
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
state string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
account_type str
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression str
(String) Compression format of the snapshot report.
content_type str
(String) Type of content stored in snapshot report.
cos_endpoint str
(String) The endpoint of the COS instance.
created_at float
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories Sequence[BillingReportSnapshotHistory]
(List) List of previous versions of the snapshot configurations. Nested schema for history:
id str
The provider-assigned unique ID for this managed resource.
last_updated_at float
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
state str
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
accountType String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression String
(String) Compression format of the snapshot report.
contentType String
(String) Type of content stored in snapshot report.
cosEndpoint String
(String) The endpoint of the COS instance.
createdAt Number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories List<Property Map>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
id String
The provider-assigned unique ID for this managed resource.
lastUpdatedAt Number
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
state String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.

Look up Existing BillingReportSnapshot Resource

Get an existing BillingReportSnapshot 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?: BillingReportSnapshotState, opts?: CustomResourceOptions): BillingReportSnapshot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_type: Optional[str] = None,
        billing_report_snapshot_id: Optional[str] = None,
        compression: Optional[str] = None,
        content_type: Optional[str] = None,
        cos_bucket: Optional[str] = None,
        cos_endpoint: Optional[str] = None,
        cos_location: Optional[str] = None,
        cos_reports_folder: Optional[str] = None,
        created_at: Optional[float] = None,
        histories: Optional[Sequence[BillingReportSnapshotHistoryArgs]] = None,
        interval: Optional[str] = None,
        last_updated_at: Optional[float] = None,
        report_types: Optional[Sequence[str]] = None,
        state: Optional[str] = None,
        versioning: Optional[str] = None) -> BillingReportSnapshot
func GetBillingReportSnapshot(ctx *Context, name string, id IDInput, state *BillingReportSnapshotState, opts ...ResourceOption) (*BillingReportSnapshot, error)
public static BillingReportSnapshot Get(string name, Input<string> id, BillingReportSnapshotState? state, CustomResourceOptions? opts = null)
public static BillingReportSnapshot get(String name, Output<String> id, BillingReportSnapshotState state, CustomResourceOptions options)
resources:  _:    type: ibm:BillingReportSnapshot    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
BillingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
Compression string
(String) Compression format of the snapshot report.
ContentType string
(String) Type of content stored in snapshot report.
CosBucket string
The name of the COS bucket to store the snapshot of the billing reports.
CosEndpoint string
(String) The endpoint of the COS instance.
CosLocation string
Region of the COS instance.
CosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
CreatedAt double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
Histories List<BillingReportSnapshotHistory>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
Interval string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
LastUpdatedAt double
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
ReportTypes List<string>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
State string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
Versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
AccountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
BillingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
Compression string
(String) Compression format of the snapshot report.
ContentType string
(String) Type of content stored in snapshot report.
CosBucket string
The name of the COS bucket to store the snapshot of the billing reports.
CosEndpoint string
(String) The endpoint of the COS instance.
CosLocation string
Region of the COS instance.
CosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
CreatedAt float64
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
Histories []BillingReportSnapshotHistoryArgs
(List) List of previous versions of the snapshot configurations. Nested schema for history:
Interval string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
LastUpdatedAt float64
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
ReportTypes []string
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
State string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
Versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountType String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
billingReportSnapshotId String
The unique identifier of the billing_report_snapshot.
compression String
(String) Compression format of the snapshot report.
contentType String
(String) Type of content stored in snapshot report.
cosBucket String
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint String
(String) The endpoint of the COS instance.
cosLocation String
Region of the COS instance.
cosReportsFolder String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
createdAt Double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories List<BillingReportSnapshotHistory>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
interval String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
lastUpdatedAt Double
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
reportTypes List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
state String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
versioning String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountType string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
billingReportSnapshotId string
The unique identifier of the billing_report_snapshot.
compression string
(String) Compression format of the snapshot report.
contentType string
(String) Type of content stored in snapshot report.
cosBucket string
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint string
(String) The endpoint of the COS instance.
cosLocation string
Region of the COS instance.
cosReportsFolder string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
createdAt number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories BillingReportSnapshotHistory[]
(List) List of previous versions of the snapshot configurations. Nested schema for history:
interval string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
lastUpdatedAt number
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
reportTypes string[]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
state string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
versioning string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
account_type str
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
billing_report_snapshot_id str
The unique identifier of the billing_report_snapshot.
compression str
(String) Compression format of the snapshot report.
content_type str
(String) Type of content stored in snapshot report.
cos_bucket str
The name of the COS bucket to store the snapshot of the billing reports.
cos_endpoint str
(String) The endpoint of the COS instance.
cos_location str
Region of the COS instance.
cos_reports_folder str
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
created_at float
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories Sequence[BillingReportSnapshotHistoryArgs]
(List) List of previous versions of the snapshot configurations. Nested schema for history:
interval str
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
last_updated_at float
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
report_types Sequence[str]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
state str
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
versioning str
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountType String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
billingReportSnapshotId String
The unique identifier of the billing_report_snapshot.
compression String
(String) Compression format of the snapshot report.
contentType String
(String) Type of content stored in snapshot report.
cosBucket String
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint String
(String) The endpoint of the COS instance.
cosLocation String
Region of the COS instance.
cosReportsFolder String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
createdAt Number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
histories List<Property Map>
(List) List of previous versions of the snapshot configurations. Nested schema for history:
interval String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
lastUpdatedAt Number
(Integer) Timestamp in milliseconds when the snapshot configuration was last updated.
reportTypes List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
state String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
versioning String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.

Supporting Types

BillingReportSnapshotHistory
, BillingReportSnapshotHistoryArgs

AccountId This property is required. string
(String) Account ID for which billing report snapshot is configured.
AccountType This property is required. string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
Compression This property is required. string
(String) Compression format of the snapshot report.
ContentType This property is required. string
(String) Type of content stored in snapshot report.
CosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
CosEndpoint This property is required. string
(String) The endpoint of the COS instance.
CosLocation This property is required. string
Region of the COS instance.
CosReportsFolder This property is required. string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
EndTime This property is required. double
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
Interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
ReportTypes This property is required. List<string>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
StartTime This property is required. double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
State This property is required. string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
UpdatedBy This property is required. string
(String) Account that updated the billing snapshot configuration.
Versioning This property is required. string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
AccountId This property is required. string
(String) Account ID for which billing report snapshot is configured.
AccountType This property is required. string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
Compression This property is required. string
(String) Compression format of the snapshot report.
ContentType This property is required. string
(String) Type of content stored in snapshot report.
CosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
CosEndpoint This property is required. string
(String) The endpoint of the COS instance.
CosLocation This property is required. string
Region of the COS instance.
CosReportsFolder This property is required. string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
EndTime This property is required. float64
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
Interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
ReportTypes This property is required. []string
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
StartTime This property is required. float64
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
State This property is required. string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
UpdatedBy This property is required. string
(String) Account that updated the billing snapshot configuration.
Versioning This property is required. string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountId This property is required. String
(String) Account ID for which billing report snapshot is configured.
accountType This property is required. String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression This property is required. String
(String) Compression format of the snapshot report.
contentType This property is required. String
(String) Type of content stored in snapshot report.
cosBucket This property is required. String
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint This property is required. String
(String) The endpoint of the COS instance.
cosLocation This property is required. String
Region of the COS instance.
cosReportsFolder This property is required. String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
endTime This property is required. Double
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
interval This property is required. String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
reportTypes This property is required. List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
startTime This property is required. Double
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
state This property is required. String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
updatedBy This property is required. String
(String) Account that updated the billing snapshot configuration.
versioning This property is required. String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountId This property is required. string
(String) Account ID for which billing report snapshot is configured.
accountType This property is required. string
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression This property is required. string
(String) Compression format of the snapshot report.
contentType This property is required. string
(String) Type of content stored in snapshot report.
cosBucket This property is required. string
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint This property is required. string
(String) The endpoint of the COS instance.
cosLocation This property is required. string
Region of the COS instance.
cosReportsFolder This property is required. string
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
endTime This property is required. number
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
interval This property is required. string
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
reportTypes This property is required. string[]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
startTime This property is required. number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
state This property is required. string
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
updatedBy This property is required. string
(String) Account that updated the billing snapshot configuration.
versioning This property is required. string
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
account_id This property is required. str
(String) Account ID for which billing report snapshot is configured.
account_type This property is required. str
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression This property is required. str
(String) Compression format of the snapshot report.
content_type This property is required. str
(String) Type of content stored in snapshot report.
cos_bucket This property is required. str
The name of the COS bucket to store the snapshot of the billing reports.
cos_endpoint This property is required. str
(String) The endpoint of the COS instance.
cos_location This property is required. str
Region of the COS instance.
cos_reports_folder This property is required. str
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
end_time This property is required. float
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
interval This property is required. str
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
report_types This property is required. Sequence[str]
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
start_time This property is required. float
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
state This property is required. str
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
updated_by This property is required. str
(String) Account that updated the billing snapshot configuration.
versioning This property is required. str
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.
accountId This property is required. String
(String) Account ID for which billing report snapshot is configured.
accountType This property is required. String
(String) Type of account. Possible values [enterprise, account].

  • Constraints: Allowable values are: account, enterprise.
compression This property is required. String
(String) Compression format of the snapshot report.
contentType This property is required. String
(String) Type of content stored in snapshot report.
cosBucket This property is required. String
The name of the COS bucket to store the snapshot of the billing reports.
cosEndpoint This property is required. String
(String) The endpoint of the COS instance.
cosLocation This property is required. String
Region of the COS instance.
cosReportsFolder This property is required. String
The billing reports root folder to store the billing reports snapshots. Defaults to "IBMCloud-Billing-Reports".

  • Constraints: The default value is IBMCloud-Billing-Reports.
endTime This property is required. Number
(Integer) Timestamp in milliseconds when the snapshot configuration ends.
interval This property is required. String
Frequency of taking the snapshot of the billing reports.

  • Constraints: Allowable values are: daily.
reportTypes This property is required. List<String>
The type of billing reports to take snapshot of. Possible values are [account_summary, enterprise_summary, account_resource_instance_usage].

  • Constraints: Allowable list items are: account_summary, enterprise_summary, account_resource_instance_usage.
startTime This property is required. Number
(Integer) Timestamp in milliseconds when the snapshot configuration was created.
state This property is required. String
(String) Status of the billing snapshot configuration. Possible values are [enabled, disabled].

  • Constraints: Allowable values are: enabled, disabled.
updatedBy This property is required. String
(String) Account that updated the billing snapshot configuration.
versioning This property is required. String
A new version of report is created or the existing report version is overwritten with every update.

  • Constraints: The default value is new. Allowable values are: new, overwrite.

Import

You can import the ibm_billing_report_snapshot resource by using account_id. Account ID for which billing report snapshot is configured.

Syntax

```sh
$ pulumi import ibm:index/billingReportSnapshot:BillingReportSnapshot billing_report_snapshot <account_id>
```

Example

$ pulumi import ibm:index/billingReportSnapshot:BillingReportSnapshot billing_report_snapshot abc
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.