1. Packages
  2. Volcengine
  3. API Docs
  4. tos
  5. BucketInventories
Volcengine v0.0.28 published on Thursday, Apr 24, 2025 by Volcengine

volcengine.tos.BucketInventories

Explore with Pulumi AI

Volcengine v0.0.28 published on Thursday, Apr 24, 2025 by Volcengine

Use this data source to query detailed information of tos bucket inventories

Example Usage

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

const fooBucketInventory = new volcengine.tos.BucketInventory("fooBucketInventory", {
    bucketName: "terraform-demo",
    inventoryId: "acc-test-inventory",
    isEnabled: true,
    includedObjectVersions: "All",
    schedule: {
        frequency: "Weekly",
    },
    filter: {
        prefix: "test-tf",
    },
    optionalFields: {
        fields: [
            "Size",
            "StorageClass",
            "CRC64",
        ],
    },
    destination: {
        tosBucketDestination: {
            format: "CSV",
            accountId: "21000*****",
            bucket: "terraform-demo",
            prefix: "tf-test-prefix",
            role: "TosArchiveTOSInventory",
        },
    },
});
const fooBucketInventories = volcengine.tos.BucketInventoriesOutput({
    bucketName: "terraform-demo",
    inventoryId: fooBucketInventory.inventoryId,
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo_bucket_inventory = volcengine.tos.BucketInventory("fooBucketInventory",
    bucket_name="terraform-demo",
    inventory_id="acc-test-inventory",
    is_enabled=True,
    included_object_versions="All",
    schedule=volcengine.tos.BucketInventoryScheduleArgs(
        frequency="Weekly",
    ),
    filter=volcengine.tos.BucketInventoryFilterArgs(
        prefix="test-tf",
    ),
    optional_fields=volcengine.tos.BucketInventoryOptionalFieldsArgs(
        fields=[
            "Size",
            "StorageClass",
            "CRC64",
        ],
    ),
    destination=volcengine.tos.BucketInventoryDestinationArgs(
        tos_bucket_destination=volcengine.tos.BucketInventoryDestinationTosBucketDestinationArgs(
            format="CSV",
            account_id="21000*****",
            bucket="terraform-demo",
            prefix="tf-test-prefix",
            role="TosArchiveTOSInventory",
        ),
    ))
foo_bucket_inventories = volcengine.tos.bucket_inventories_output(bucket_name="terraform-demo",
    inventory_id=foo_bucket_inventory.inventory_id)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tos"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooBucketInventory, err := tos.NewBucketInventory(ctx, "fooBucketInventory", &tos.BucketInventoryArgs{
			BucketName:             pulumi.String("terraform-demo"),
			InventoryId:            pulumi.String("acc-test-inventory"),
			IsEnabled:              pulumi.Bool(true),
			IncludedObjectVersions: pulumi.String("All"),
			Schedule: &tos.BucketInventoryScheduleArgs{
				Frequency: pulumi.String("Weekly"),
			},
			Filter: &tos.BucketInventoryFilterArgs{
				Prefix: pulumi.String("test-tf"),
			},
			OptionalFields: &tos.BucketInventoryOptionalFieldsArgs{
				Fields: pulumi.StringArray{
					pulumi.String("Size"),
					pulumi.String("StorageClass"),
					pulumi.String("CRC64"),
				},
			},
			Destination: &tos.BucketInventoryDestinationArgs{
				TosBucketDestination: &tos.BucketInventoryDestinationTosBucketDestinationArgs{
					Format:    pulumi.String("CSV"),
					AccountId: pulumi.String("21000*****"),
					Bucket:    pulumi.String("terraform-demo"),
					Prefix:    pulumi.String("tf-test-prefix"),
					Role:      pulumi.String("TosArchiveTOSInventory"),
				},
			},
		})
		if err != nil {
			return err
		}
		_ = tos.BucketInventoriesOutput(ctx, tos.BucketInventoriesOutputArgs{
			BucketName:  pulumi.String("terraform-demo"),
			InventoryId: fooBucketInventory.InventoryId,
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var fooBucketInventory = new Volcengine.Tos.BucketInventory("fooBucketInventory", new()
    {
        BucketName = "terraform-demo",
        InventoryId = "acc-test-inventory",
        IsEnabled = true,
        IncludedObjectVersions = "All",
        Schedule = new Volcengine.Tos.Inputs.BucketInventoryScheduleArgs
        {
            Frequency = "Weekly",
        },
        Filter = new Volcengine.Tos.Inputs.BucketInventoryFilterArgs
        {
            Prefix = "test-tf",
        },
        OptionalFields = new Volcengine.Tos.Inputs.BucketInventoryOptionalFieldsArgs
        {
            Fields = new[]
            {
                "Size",
                "StorageClass",
                "CRC64",
            },
        },
        Destination = new Volcengine.Tos.Inputs.BucketInventoryDestinationArgs
        {
            TosBucketDestination = new Volcengine.Tos.Inputs.BucketInventoryDestinationTosBucketDestinationArgs
            {
                Format = "CSV",
                AccountId = "21000*****",
                Bucket = "terraform-demo",
                Prefix = "tf-test-prefix",
                Role = "TosArchiveTOSInventory",
            },
        },
    });

    var fooBucketInventories = Volcengine.Tos.BucketInventories.Invoke(new()
    {
        BucketName = "terraform-demo",
        InventoryId = fooBucketInventory.InventoryId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tos.BucketInventory;
import com.pulumi.volcengine.tos.BucketInventoryArgs;
import com.pulumi.volcengine.tos.inputs.BucketInventoryScheduleArgs;
import com.pulumi.volcengine.tos.inputs.BucketInventoryFilterArgs;
import com.pulumi.volcengine.tos.inputs.BucketInventoryOptionalFieldsArgs;
import com.pulumi.volcengine.tos.inputs.BucketInventoryDestinationArgs;
import com.pulumi.volcengine.tos.inputs.BucketInventoryDestinationTosBucketDestinationArgs;
import com.pulumi.volcengine.tos.TosFunctions;
import com.pulumi.volcengine.tos.inputs.BucketInventoriesArgs;
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 fooBucketInventory = new BucketInventory("fooBucketInventory", BucketInventoryArgs.builder()        
            .bucketName("terraform-demo")
            .inventoryId("acc-test-inventory")
            .isEnabled(true)
            .includedObjectVersions("All")
            .schedule(BucketInventoryScheduleArgs.builder()
                .frequency("Weekly")
                .build())
            .filter(BucketInventoryFilterArgs.builder()
                .prefix("test-tf")
                .build())
            .optionalFields(BucketInventoryOptionalFieldsArgs.builder()
                .fields(                
                    "Size",
                    "StorageClass",
                    "CRC64")
                .build())
            .destination(BucketInventoryDestinationArgs.builder()
                .tosBucketDestination(BucketInventoryDestinationTosBucketDestinationArgs.builder()
                    .format("CSV")
                    .accountId("21000*****")
                    .bucket("terraform-demo")
                    .prefix("tf-test-prefix")
                    .role("TosArchiveTOSInventory")
                    .build())
                .build())
            .build());

        final var fooBucketInventories = TosFunctions.BucketInventories(BucketInventoriesArgs.builder()
            .bucketName("terraform-demo")
            .inventoryId(fooBucketInventory.inventoryId())
            .build());

    }
}
Copy
resources:
  fooBucketInventory:
    type: volcengine:tos:BucketInventory
    properties:
      bucketName: terraform-demo
      inventoryId: acc-test-inventory
      isEnabled: true
      includedObjectVersions: All
      schedule:
        frequency: Weekly
      filter:
        prefix: test-tf
      optionalFields:
        fields:
          - Size
          - StorageClass
          - CRC64
      destination:
        tosBucketDestination:
          format: CSV
          accountId: 21000*****
          bucket: terraform-demo
          prefix: tf-test-prefix
          role: TosArchiveTOSInventory
variables:
  fooBucketInventories:
    fn::invoke:
      Function: volcengine:tos:BucketInventories
      Arguments:
        bucketName: terraform-demo
        inventoryId: ${fooBucketInventory.inventoryId}
Copy

Using BucketInventories

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 bucketInventories(args: BucketInventoriesArgs, opts?: InvokeOptions): Promise<BucketInventoriesResult>
function bucketInventoriesOutput(args: BucketInventoriesOutputArgs, opts?: InvokeOptions): Output<BucketInventoriesResult>
Copy
def bucket_inventories(bucket_name: Optional[str] = None,
                       inventory_id: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> BucketInventoriesResult
def bucket_inventories_output(bucket_name: Optional[pulumi.Input[str]] = None,
                       inventory_id: Optional[pulumi.Input[str]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[BucketInventoriesResult]
Copy
func BucketInventories(ctx *Context, args *BucketInventoriesArgs, opts ...InvokeOption) (*BucketInventoriesResult, error)
func BucketInventoriesOutput(ctx *Context, args *BucketInventoriesOutputArgs, opts ...InvokeOption) BucketInventoriesResultOutput
Copy
public static class BucketInventories 
{
    public static Task<BucketInventoriesResult> InvokeAsync(BucketInventoriesArgs args, InvokeOptions? opts = null)
    public static Output<BucketInventoriesResult> Invoke(BucketInventoriesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<BucketInventoriesResult> bucketInventories(BucketInventoriesArgs args, InvokeOptions options)
public static Output<BucketInventoriesResult> bucketInventories(BucketInventoriesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: volcengine:tos:BucketInventories
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BucketName This property is required. string
The name the TOS bucket.
InventoryId string
The id the TOS bucket inventory.
NameRegex string
A Name Regex of TOS bucket inventory.
OutputFile string
File name where to save data source results.
BucketName This property is required. string
The name the TOS bucket.
InventoryId string
The id the TOS bucket inventory.
NameRegex string
A Name Regex of TOS bucket inventory.
OutputFile string
File name where to save data source results.
bucketName This property is required. String
The name the TOS bucket.
inventoryId String
The id the TOS bucket inventory.
nameRegex String
A Name Regex of TOS bucket inventory.
outputFile String
File name where to save data source results.
bucketName This property is required. string
The name the TOS bucket.
inventoryId string
The id the TOS bucket inventory.
nameRegex string
A Name Regex of TOS bucket inventory.
outputFile string
File name where to save data source results.
bucket_name This property is required. str
The name the TOS bucket.
inventory_id str
The id the TOS bucket inventory.
name_regex str
A Name Regex of TOS bucket inventory.
output_file str
File name where to save data source results.
bucketName This property is required. String
The name the TOS bucket.
inventoryId String
The id the TOS bucket inventory.
nameRegex String
A Name Regex of TOS bucket inventory.
outputFile String
File name where to save data source results.

BucketInventories Result

The following output properties are available:

BucketName string
The name of the bucket.
Id string
The provider-assigned unique ID for this managed resource.
InventoryConfigurations List<BucketInventoriesInventoryConfiguration>
The collection of query.
TotalCount int
The total count of query.
InventoryId string
NameRegex string
OutputFile string
BucketName string
The name of the bucket.
Id string
The provider-assigned unique ID for this managed resource.
InventoryConfigurations []BucketInventoriesInventoryConfiguration
The collection of query.
TotalCount int
The total count of query.
InventoryId string
NameRegex string
OutputFile string
bucketName String
The name of the bucket.
id String
The provider-assigned unique ID for this managed resource.
inventoryConfigurations List<BucketInventoriesInventoryConfiguration>
The collection of query.
totalCount Integer
The total count of query.
inventoryId String
nameRegex String
outputFile String
bucketName string
The name of the bucket.
id string
The provider-assigned unique ID for this managed resource.
inventoryConfigurations BucketInventoriesInventoryConfiguration[]
The collection of query.
totalCount number
The total count of query.
inventoryId string
nameRegex string
outputFile string
bucket_name str
The name of the bucket.
id str
The provider-assigned unique ID for this managed resource.
inventory_configurations Sequence[BucketInventoriesInventoryConfiguration]
The collection of query.
total_count int
The total count of query.
inventory_id str
name_regex str
output_file str
bucketName String
The name of the bucket.
id String
The provider-assigned unique ID for this managed resource.
inventoryConfigurations List<Property Map>
The collection of query.
totalCount Number
The total count of query.
inventoryId String
nameRegex String
outputFile String

Supporting Types

BucketInventoriesInventoryConfiguration

BucketName This property is required. string
The name the TOS bucket.
Destinations This property is required. List<BucketInventoriesInventoryConfigurationDestination>
The destination information of the bucket inventory.
Filters This property is required. List<BucketInventoriesInventoryConfigurationFilter>
The filter of the bucket inventory.
Id This property is required. string
The name of the bucket inventory.
IncludedObjectVersions This property is required. string
The export version of object. Valid values: All, Current.
IsEnabled This property is required. bool
Whether to enable the bucket inventory.
OptionalFields This property is required. List<BucketInventoriesInventoryConfigurationOptionalField>
The information exported from the bucket inventory.
Schedules This property is required. List<BucketInventoriesInventoryConfigurationSchedule>
The export schedule of the bucket inventory.
BucketName This property is required. string
The name the TOS bucket.
Destinations This property is required. []BucketInventoriesInventoryConfigurationDestination
The destination information of the bucket inventory.
Filters This property is required. []BucketInventoriesInventoryConfigurationFilter
The filter of the bucket inventory.
Id This property is required. string
The name of the bucket inventory.
IncludedObjectVersions This property is required. string
The export version of object. Valid values: All, Current.
IsEnabled This property is required. bool
Whether to enable the bucket inventory.
OptionalFields This property is required. []BucketInventoriesInventoryConfigurationOptionalField
The information exported from the bucket inventory.
Schedules This property is required. []BucketInventoriesInventoryConfigurationSchedule
The export schedule of the bucket inventory.
bucketName This property is required. String
The name the TOS bucket.
destinations This property is required. List<BucketInventoriesInventoryConfigurationDestination>
The destination information of the bucket inventory.
filters This property is required. List<BucketInventoriesInventoryConfigurationFilter>
The filter of the bucket inventory.
id This property is required. String
The name of the bucket inventory.
includedObjectVersions This property is required. String
The export version of object. Valid values: All, Current.
isEnabled This property is required. Boolean
Whether to enable the bucket inventory.
optionalFields This property is required. List<BucketInventoriesInventoryConfigurationOptionalField>
The information exported from the bucket inventory.
schedules This property is required. List<BucketInventoriesInventoryConfigurationSchedule>
The export schedule of the bucket inventory.
bucketName This property is required. string
The name the TOS bucket.
destinations This property is required. BucketInventoriesInventoryConfigurationDestination[]
The destination information of the bucket inventory.
filters This property is required. BucketInventoriesInventoryConfigurationFilter[]
The filter of the bucket inventory.
id This property is required. string
The name of the bucket inventory.
includedObjectVersions This property is required. string
The export version of object. Valid values: All, Current.
isEnabled This property is required. boolean
Whether to enable the bucket inventory.
optionalFields This property is required. BucketInventoriesInventoryConfigurationOptionalField[]
The information exported from the bucket inventory.
schedules This property is required. BucketInventoriesInventoryConfigurationSchedule[]
The export schedule of the bucket inventory.
bucket_name This property is required. str
The name the TOS bucket.
destinations This property is required. Sequence[BucketInventoriesInventoryConfigurationDestination]
The destination information of the bucket inventory.
filters This property is required. Sequence[BucketInventoriesInventoryConfigurationFilter]
The filter of the bucket inventory.
id This property is required. str
The name of the bucket inventory.
included_object_versions This property is required. str
The export version of object. Valid values: All, Current.
is_enabled This property is required. bool
Whether to enable the bucket inventory.
optional_fields This property is required. Sequence[BucketInventoriesInventoryConfigurationOptionalField]
The information exported from the bucket inventory.
schedules This property is required. Sequence[BucketInventoriesInventoryConfigurationSchedule]
The export schedule of the bucket inventory.
bucketName This property is required. String
The name the TOS bucket.
destinations This property is required. List<Property Map>
The destination information of the bucket inventory.
filters This property is required. List<Property Map>
The filter of the bucket inventory.
id This property is required. String
The name of the bucket inventory.
includedObjectVersions This property is required. String
The export version of object. Valid values: All, Current.
isEnabled This property is required. Boolean
Whether to enable the bucket inventory.
optionalFields This property is required. List<Property Map>
The information exported from the bucket inventory.
schedules This property is required. List<Property Map>
The export schedule of the bucket inventory.

BucketInventoriesInventoryConfigurationDestination

TosBucketDestinations This property is required. List<BucketInventoriesInventoryConfigurationDestinationTosBucketDestination>
The destination tos bucket information of the bucket inventory.
TosBucketDestinations This property is required. []BucketInventoriesInventoryConfigurationDestinationTosBucketDestination
The destination tos bucket information of the bucket inventory.
tosBucketDestinations This property is required. List<BucketInventoriesInventoryConfigurationDestinationTosBucketDestination>
The destination tos bucket information of the bucket inventory.
tosBucketDestinations This property is required. BucketInventoriesInventoryConfigurationDestinationTosBucketDestination[]
The destination tos bucket information of the bucket inventory.
tos_bucket_destinations This property is required. Sequence[BucketInventoriesInventoryConfigurationDestinationTosBucketDestination]
The destination tos bucket information of the bucket inventory.
tosBucketDestinations This property is required. List<Property Map>
The destination tos bucket information of the bucket inventory.

BucketInventoriesInventoryConfigurationDestinationTosBucketDestination

AccountId This property is required. string
The account id of the destination tos bucket.
Bucket This property is required. string
The name of the destination tos bucket.
Format This property is required. string
The format of the bucket inventory. Valid values: CSV.
Prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
Role This property is required. string
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.
AccountId This property is required. string
The account id of the destination tos bucket.
Bucket This property is required. string
The name of the destination tos bucket.
Format This property is required. string
The format of the bucket inventory. Valid values: CSV.
Prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
Role This property is required. string
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.
accountId This property is required. String
The account id of the destination tos bucket.
bucket This property is required. String
The name of the destination tos bucket.
format This property is required. String
The format of the bucket inventory. Valid values: CSV.
prefix This property is required. String
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
role This property is required. String
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.
accountId This property is required. string
The account id of the destination tos bucket.
bucket This property is required. string
The name of the destination tos bucket.
format This property is required. string
The format of the bucket inventory. Valid values: CSV.
prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
role This property is required. string
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.
account_id This property is required. str
The account id of the destination tos bucket.
bucket This property is required. str
The name of the destination tos bucket.
format This property is required. str
The format of the bucket inventory. Valid values: CSV.
prefix This property is required. str
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
role This property is required. str
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.
accountId This property is required. String
The account id of the destination tos bucket.
bucket This property is required. String
The name of the destination tos bucket.
format This property is required. String
The format of the bucket inventory. Valid values: CSV.
prefix This property is required. String
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
role This property is required. String
The role name used to grant object storage access to read all files from the source bucket and write files to the destination bucket.

BucketInventoriesInventoryConfigurationFilter

Prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
Prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
prefix This property is required. String
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
prefix This property is required. string
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
prefix This property is required. str
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.
prefix This property is required. String
The prefix matching information of the exported object. If not set, a list of all objects in the bucket will be generated by default.

BucketInventoriesInventoryConfigurationOptionalField

Fields This property is required. List<string>
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.
Fields This property is required. []string
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.
fields This property is required. List<String>
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.
fields This property is required. string[]
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.
fields This property is required. Sequence[str]
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.
fields This property is required. List<String>
The information exported from the bucket inventory. Valid values: Size, LastModifiedDate, ETag, StorageClass, IsMultipartUploaded, EncryptionStatus, CRC64, ReplicationStatus.

BucketInventoriesInventoryConfigurationSchedule

Frequency This property is required. string
The export schedule of the bucket inventory. Valid values: Daily, Weekly.
Frequency This property is required. string
The export schedule of the bucket inventory. Valid values: Daily, Weekly.
frequency This property is required. String
The export schedule of the bucket inventory. Valid values: Daily, Weekly.
frequency This property is required. string
The export schedule of the bucket inventory. Valid values: Daily, Weekly.
frequency This property is required. str
The export schedule of the bucket inventory. Valid values: Daily, Weekly.
frequency This property is required. String
The export schedule of the bucket inventory. Valid values: Daily, Weekly.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.
Volcengine v0.0.28 published on Thursday, Apr 24, 2025 by Volcengine