Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 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.getBucketInventoriesOutput({
bucketName: "terraform-demo",
inventoryId: fooBucketInventory.inventoryId,
});
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.get_bucket_inventories_output(bucket_name="terraform-demo",
inventory_id=foo_bucket_inventory.inventory_id)
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.GetBucketInventoriesOutput(ctx, tos.GetBucketInventoriesOutputArgs{
BucketName: pulumi.String("terraform-demo"),
InventoryId: fooBucketInventory.InventoryId,
}, nil)
return nil
})
}
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.GetBucketInventories.Invoke(new()
{
BucketName = "terraform-demo",
InventoryId = fooBucketInventory.InventoryId,
});
});
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.GetBucketInventoriesArgs;
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.getBucketInventories(GetBucketInventoriesArgs.builder()
.bucketName("terraform-demo")
.inventoryId(fooBucketInventory.inventoryId())
.build());
}
}
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:getBucketInventories
Arguments:
bucketName: terraform-demo
inventoryId: ${fooBucketInventory.inventoryId}
Using getBucketInventories
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 getBucketInventories(args: GetBucketInventoriesArgs, opts?: InvokeOptions): Promise<GetBucketInventoriesResult>
function getBucketInventoriesOutput(args: GetBucketInventoriesOutputArgs, opts?: InvokeOptions): Output<GetBucketInventoriesResult>def get_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) -> GetBucketInventoriesResult
def get_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[GetBucketInventoriesResult]func GetBucketInventories(ctx *Context, args *GetBucketInventoriesArgs, opts ...InvokeOption) (*GetBucketInventoriesResult, error)
func GetBucketInventoriesOutput(ctx *Context, args *GetBucketInventoriesOutputArgs, opts ...InvokeOption) GetBucketInventoriesResultOutput> Note: This function is named GetBucketInventories in the Go SDK.
public static class GetBucketInventories
{
public static Task<GetBucketInventoriesResult> InvokeAsync(GetBucketInventoriesArgs args, InvokeOptions? opts = null)
public static Output<GetBucketInventoriesResult> Invoke(GetBucketInventoriesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBucketInventoriesResult> getBucketInventories(GetBucketInventoriesArgs args, InvokeOptions options)
public static Output<GetBucketInventoriesResult> getBucketInventories(GetBucketInventoriesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:tos/getBucketInventories:getBucketInventories
arguments:
# arguments dictionaryThe following arguments are supported:
- Bucket
Name string - The name the TOS bucket.
- Inventory
Id string - The id the TOS bucket inventory.
- Name
Regex string - A Name Regex of TOS bucket inventory.
- Output
File string - File name where to save data source results.
- Bucket
Name string - The name the TOS bucket.
- Inventory
Id string - The id the TOS bucket inventory.
- Name
Regex string - A Name Regex of TOS bucket inventory.
- Output
File string - File name where to save data source results.
- bucket
Name String - The name the TOS bucket.
- inventory
Id String - The id the TOS bucket inventory.
- name
Regex String - A Name Regex of TOS bucket inventory.
- output
File String - File name where to save data source results.
- bucket
Name string - The name the TOS bucket.
- inventory
Id string - The id the TOS bucket inventory.
- name
Regex string - A Name Regex of TOS bucket inventory.
- output
File string - File name where to save data source results.
- bucket_
name 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.
- bucket
Name String - The name the TOS bucket.
- inventory
Id String - The id the TOS bucket inventory.
- name
Regex String - A Name Regex of TOS bucket inventory.
- output
File String - File name where to save data source results.
getBucketInventories Result
The following output properties are available:
- Bucket
Name string - The name of the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Configurations List<GetBucket Inventories Inventory Configuration> - The collection of query.
- Total
Count int - The total count of query.
- Inventory
Id string - Name
Regex string - Output
File string
- Bucket
Name string - The name of the bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Inventory
Configurations []GetBucket Inventories Inventory Configuration - The collection of query.
- Total
Count int - The total count of query.
- Inventory
Id string - Name
Regex string - Output
File string
- bucket
Name String - The name of the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Configurations List<GetBucket Inventories Inventory Configuration> - The collection of query.
- total
Count Integer - The total count of query.
- inventory
Id String - name
Regex String - output
File String
- bucket
Name string - The name of the bucket.
- id string
- The provider-assigned unique ID for this managed resource.
- inventory
Configurations GetBucket Inventories Inventory Configuration[] - The collection of query.
- total
Count number - The total count of query.
- inventory
Id string - name
Regex string - output
File string
- bucket_
name str - The name of the bucket.
- id str
- The provider-assigned unique ID for this managed resource.
- inventory_
configurations Sequence[GetBucket Inventories Inventory Configuration] - The collection of query.
- total_
count int - The total count of query.
- inventory_
id str - name_
regex str - output_
file str
- bucket
Name String - The name of the bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- inventory
Configurations List<Property Map> - The collection of query.
- total
Count Number - The total count of query.
- inventory
Id String - name
Regex String - output
File String
Supporting Types
GetBucketInventoriesInventoryConfiguration
- Bucket
Name string - The name the TOS bucket.
- Destinations
List<Get
Bucket Inventories Inventory Configuration Destination> - The destination information of the bucket inventory.
- Filters
List<Get
Bucket Inventories Inventory Configuration Filter> - The filter of the bucket inventory.
- Id string
- The name of the bucket inventory.
- Included
Object stringVersions - The export version of object. Valid values:
All,Current. - Is
Enabled bool - Whether to enable the bucket inventory.
- Optional
Fields List<GetBucket Inventories Inventory Configuration Optional Field> - The information exported from the bucket inventory.
- Schedules
List<Get
Bucket Inventories Inventory Configuration Schedule> - The export schedule of the bucket inventory.
- Bucket
Name string - The name the TOS bucket.
- Destinations
[]Get
Bucket Inventories Inventory Configuration Destination - The destination information of the bucket inventory.
- Filters
[]Get
Bucket Inventories Inventory Configuration Filter - The filter of the bucket inventory.
- Id string
- The name of the bucket inventory.
- Included
Object stringVersions - The export version of object. Valid values:
All,Current. - Is
Enabled bool - Whether to enable the bucket inventory.
- Optional
Fields []GetBucket Inventories Inventory Configuration Optional Field - The information exported from the bucket inventory.
- Schedules
[]Get
Bucket Inventories Inventory Configuration Schedule - The export schedule of the bucket inventory.
- bucket
Name String - The name the TOS bucket.
- destinations
List<Get
Bucket Inventories Inventory Configuration Destination> - The destination information of the bucket inventory.
- filters
List<Get
Bucket Inventories Inventory Configuration Filter> - The filter of the bucket inventory.
- id String
- The name of the bucket inventory.
- included
Object StringVersions - The export version of object. Valid values:
All,Current. - is
Enabled Boolean - Whether to enable the bucket inventory.
- optional
Fields List<GetBucket Inventories Inventory Configuration Optional Field> - The information exported from the bucket inventory.
- schedules
List<Get
Bucket Inventories Inventory Configuration Schedule> - The export schedule of the bucket inventory.
- bucket
Name string - The name the TOS bucket.
- destinations
Get
Bucket Inventories Inventory Configuration Destination[] - The destination information of the bucket inventory.
- filters
Get
Bucket Inventories Inventory Configuration Filter[] - The filter of the bucket inventory.
- id string
- The name of the bucket inventory.
- included
Object stringVersions - The export version of object. Valid values:
All,Current. - is
Enabled boolean - Whether to enable the bucket inventory.
- optional
Fields GetBucket Inventories Inventory Configuration Optional Field[] - The information exported from the bucket inventory.
- schedules
Get
Bucket Inventories Inventory Configuration Schedule[] - The export schedule of the bucket inventory.
- bucket_
name str - The name the TOS bucket.
- destinations
Sequence[Get
Bucket Inventories Inventory Configuration Destination] - The destination information of the bucket inventory.
- filters
Sequence[Get
Bucket Inventories Inventory Configuration Filter] - The filter of the bucket inventory.
- id str
- The name of the bucket inventory.
- included_
object_ strversions - The export version of object. Valid values:
All,Current. - is_
enabled bool - Whether to enable the bucket inventory.
- optional_
fields Sequence[GetBucket Inventories Inventory Configuration Optional Field] - The information exported from the bucket inventory.
- schedules
Sequence[Get
Bucket Inventories Inventory Configuration Schedule] - The export schedule of the bucket inventory.
- bucket
Name String - The name the TOS bucket.
- destinations List<Property Map>
- The destination information of the bucket inventory.
- filters List<Property Map>
- The filter of the bucket inventory.
- id String
- The name of the bucket inventory.
- included
Object StringVersions - The export version of object. Valid values:
All,Current. - is
Enabled Boolean - Whether to enable the bucket inventory.
- optional
Fields List<Property Map> - The information exported from the bucket inventory.
- schedules List<Property Map>
- The export schedule of the bucket inventory.
GetBucketInventoriesInventoryConfigurationDestination
- Tos
Bucket List<GetDestinations Bucket Inventories Inventory Configuration Destination Tos Bucket Destination> - The destination tos bucket information of the bucket inventory.
- Tos
Bucket []GetDestinations Bucket Inventories Inventory Configuration Destination Tos Bucket Destination - The destination tos bucket information of the bucket inventory.
- tos
Bucket List<GetDestinations Bucket Inventories Inventory Configuration Destination Tos Bucket Destination> - The destination tos bucket information of the bucket inventory.
- tos
Bucket GetDestinations Bucket Inventories Inventory Configuration Destination Tos Bucket Destination[] - The destination tos bucket information of the bucket inventory.
- tos_
bucket_ Sequence[Getdestinations Bucket Inventories Inventory Configuration Destination Tos Bucket Destination] - The destination tos bucket information of the bucket inventory.
- tos
Bucket List<Property Map>Destinations - The destination tos bucket information of the bucket inventory.
GetBucketInventoriesInventoryConfigurationDestinationTosBucketDestination
- Account
Id string - The account id of the destination tos bucket.
- Bucket string
- The name of the destination tos bucket.
- Format string
- The format of the bucket inventory. Valid values:
CSV. - Prefix 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 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 string - The account id of the destination tos bucket.
- Bucket string
- The name of the destination tos bucket.
- Format string
- The format of the bucket inventory. Valid values:
CSV. - Prefix 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 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 String - The account id of the destination tos bucket.
- bucket String
- The name of the destination tos bucket.
- format String
- The format of the bucket inventory. Valid values:
CSV. - prefix 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 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 string - The account id of the destination tos bucket.
- bucket string
- The name of the destination tos bucket.
- format string
- The format of the bucket inventory. Valid values:
CSV. - prefix 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 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 str - The account id of the destination tos bucket.
- bucket str
- The name of the destination tos bucket.
- format str
- The format of the bucket inventory. Valid values:
CSV. - prefix 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 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.
- account
Id String - The account id of the destination tos bucket.
- bucket String
- The name of the destination tos bucket.
- format String
- The format of the bucket inventory. Valid values:
CSV. - prefix 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 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.
GetBucketInventoriesInventoryConfigurationFilter
- Prefix 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 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 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 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 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 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.
GetBucketInventoriesInventoryConfigurationOptionalField
- Fields List<string>
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
- Fields []string
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
- fields List<String>
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
- fields string[]
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
- fields Sequence[str]
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
- fields List<String>
- The information exported from the bucket inventory. Valid values:
Size,LastModifiedDate,ETag,StorageClass,IsMultipartUploaded,EncryptionStatus,CRC64,ReplicationStatus.
GetBucketInventoriesInventoryConfigurationSchedule
- Frequency string
- The export schedule of the bucket inventory. Valid values:
Daily,Weekly.
- Frequency string
- The export schedule of the bucket inventory. Valid values:
Daily,Weekly.
- frequency String
- The export schedule of the bucket inventory. Valid values:
Daily,Weekly.
- frequency string
- The export schedule of the bucket inventory. Valid values:
Daily,Weekly.
- frequency str
- The export schedule of the bucket inventory. Valid values:
Daily,Weekly.
- frequency 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
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
