1. Packages
  2. Volcengine
  3. API Docs
  4. tos
  5. BucketInventories
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine

volcengine.tos.BucketInventories

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine
    Deprecated: volcengine.tos.BucketInventories has been deprecated in favor of volcengine.tos.getBucketInventories

    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 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>
    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]
    func BucketInventories(ctx *Context, args *BucketInventoriesArgs, opts ...InvokeOption) (*BucketInventoriesResult, error)
    func BucketInventoriesOutput(ctx *Context, args *BucketInventoriesOutputArgs, opts ...InvokeOption) BucketInventoriesResultOutput
    public static class BucketInventories 
    {
        public static Task<BucketInventoriesResult> InvokeAsync(BucketInventoriesArgs args, InvokeOptions? opts = null)
        public static Output<BucketInventoriesResult> Invoke(BucketInventoriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<BucketInventoriesResult> bucketInventories(BucketInventoriesArgs args, InvokeOptions options)
    public static Output<BucketInventoriesResult> bucketInventories(BucketInventoriesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:tos:BucketInventories
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    BucketInventoriesInventoryConfigurationDestination

    TosBucketDestinations []BucketInventoriesInventoryConfigurationDestinationTosBucketDestination
    The destination tos bucket information of the bucket inventory.
    tosBucketDestinations BucketInventoriesInventoryConfigurationDestinationTosBucketDestination[]
    The destination tos bucket information of the bucket inventory.
    tosBucketDestinations List<Property Map>
    The destination tos bucket information of the bucket inventory.

    BucketInventoriesInventoryConfigurationDestinationTosBucketDestination

    AccountId 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.
    AccountId 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.
    accountId 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.
    accountId 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.
    accountId 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.

    BucketInventoriesInventoryConfigurationFilter

    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.

    BucketInventoriesInventoryConfigurationOptionalField

    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.

    BucketInventoriesInventoryConfigurationSchedule

    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 volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine