volcengine.tos.Bucket
Explore with Pulumi AI
Provides a resource to manage tos bucket
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const _default = new volcengine.tos.Bucket("default", {
    accountAcls: [
        {
            accountId: "1",
            permission: "READ",
        },
        {
            accountId: "2001",
            permission: "WRITE_ACP",
        },
    ],
    bucketName: "tf-acc-test-bucket",
    enableVersion: true,
    projectName: "default",
    publicAcl: "private",
    tags: [{
        key: "k1",
        value: "v1",
    }],
});
import pulumi
import pulumi_volcengine as volcengine
default = volcengine.tos.Bucket("default",
    account_acls=[
        volcengine.tos.BucketAccountAclArgs(
            account_id="1",
            permission="READ",
        ),
        volcengine.tos.BucketAccountAclArgs(
            account_id="2001",
            permission="WRITE_ACP",
        ),
    ],
    bucket_name="tf-acc-test-bucket",
    enable_version=True,
    project_name="default",
    public_acl="private",
    tags=[volcengine.tos.BucketTagArgs(
        key="k1",
        value="v1",
    )])
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 {
		_, err := tos.NewBucket(ctx, "default", &tos.BucketArgs{
			AccountAcls: tos.BucketAccountAclArray{
				&tos.BucketAccountAclArgs{
					AccountId:  pulumi.String("1"),
					Permission: pulumi.String("READ"),
				},
				&tos.BucketAccountAclArgs{
					AccountId:  pulumi.String("2001"),
					Permission: pulumi.String("WRITE_ACP"),
				},
			},
			BucketName:    pulumi.String("tf-acc-test-bucket"),
			EnableVersion: pulumi.Bool(true),
			ProjectName:   pulumi.String("default"),
			PublicAcl:     pulumi.String("private"),
			Tags: tos.BucketTagArray{
				&tos.BucketTagArgs{
					Key:   pulumi.String("k1"),
					Value: pulumi.String("v1"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() => 
{
    var @default = new Volcengine.Tos.Bucket("default", new()
    {
        AccountAcls = new[]
        {
            new Volcengine.Tos.Inputs.BucketAccountAclArgs
            {
                AccountId = "1",
                Permission = "READ",
            },
            new Volcengine.Tos.Inputs.BucketAccountAclArgs
            {
                AccountId = "2001",
                Permission = "WRITE_ACP",
            },
        },
        BucketName = "tf-acc-test-bucket",
        EnableVersion = true,
        ProjectName = "default",
        PublicAcl = "private",
        Tags = new[]
        {
            new Volcengine.Tos.Inputs.BucketTagArgs
            {
                Key = "k1",
                Value = "v1",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.tos.Bucket;
import com.pulumi.volcengine.tos.BucketArgs;
import com.pulumi.volcengine.tos.inputs.BucketAccountAclArgs;
import com.pulumi.volcengine.tos.inputs.BucketTagArgs;
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 default_ = new Bucket("default", BucketArgs.builder()        
            .accountAcls(            
                BucketAccountAclArgs.builder()
                    .accountId("1")
                    .permission("READ")
                    .build(),
                BucketAccountAclArgs.builder()
                    .accountId("2001")
                    .permission("WRITE_ACP")
                    .build())
            .bucketName("tf-acc-test-bucket")
            .enableVersion(true)
            .projectName("default")
            .publicAcl("private")
            .tags(BucketTagArgs.builder()
                .key("k1")
                .value("v1")
                .build())
            .build());
    }
}
resources:
  default:
    type: volcengine:tos:Bucket
    properties:
      accountAcls:
        - accountId: '1'
          permission: READ
        - accountId: '2001'
          permission: WRITE_ACP
      bucketName: tf-acc-test-bucket
      enableVersion: true
      projectName: default
      # storage_class ="IA"
      publicAcl: private
      tags:
        - key: k1
          value: v1
Create Bucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);@overload
def Bucket(resource_name: str,
           args: BucketArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Bucket(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           bucket_name: Optional[str] = None,
           account_acls: Optional[Sequence[BucketAccountAclArgs]] = None,
           enable_version: Optional[bool] = None,
           project_name: Optional[str] = None,
           public_acl: Optional[str] = None,
           storage_class: Optional[str] = None,
           tags: Optional[Sequence[BucketTagArgs]] = None)func NewBucket(ctx *Context, name string, args BucketArgs, opts ...ResourceOption) (*Bucket, error)public Bucket(string name, BucketArgs args, CustomResourceOptions? opts = null)
public Bucket(String name, BucketArgs args)
public Bucket(String name, BucketArgs args, CustomResourceOptions options)
type: volcengine:tos:Bucket
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketArgs
- 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 bucketResource = new Volcengine.Tos.Bucket("bucketResource", new()
{
    BucketName = "string",
    AccountAcls = new[]
    {
        new Volcengine.Tos.Inputs.BucketAccountAclArgs
        {
            AccountId = "string",
            Permission = "string",
            AclType = "string",
        },
    },
    EnableVersion = false,
    ProjectName = "string",
    PublicAcl = "string",
    StorageClass = "string",
    Tags = new[]
    {
        new Volcengine.Tos.Inputs.BucketTagArgs
        {
            Key = "string",
            Value = "string",
        },
    },
});
example, err := tos.NewBucket(ctx, "bucketResource", &tos.BucketArgs{
	BucketName: pulumi.String("string"),
	AccountAcls: tos.BucketAccountAclArray{
		&tos.BucketAccountAclArgs{
			AccountId:  pulumi.String("string"),
			Permission: pulumi.String("string"),
			AclType:    pulumi.String("string"),
		},
	},
	EnableVersion: pulumi.Bool(false),
	ProjectName:   pulumi.String("string"),
	PublicAcl:     pulumi.String("string"),
	StorageClass:  pulumi.String("string"),
	Tags: tos.BucketTagArray{
		&tos.BucketTagArgs{
			Key:   pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
})
var bucketResource = new Bucket("bucketResource", BucketArgs.builder()
    .bucketName("string")
    .accountAcls(BucketAccountAclArgs.builder()
        .accountId("string")
        .permission("string")
        .aclType("string")
        .build())
    .enableVersion(false)
    .projectName("string")
    .publicAcl("string")
    .storageClass("string")
    .tags(BucketTagArgs.builder()
        .key("string")
        .value("string")
        .build())
    .build());
bucket_resource = volcengine.tos.Bucket("bucketResource",
    bucket_name="string",
    account_acls=[{
        "account_id": "string",
        "permission": "string",
        "acl_type": "string",
    }],
    enable_version=False,
    project_name="string",
    public_acl="string",
    storage_class="string",
    tags=[{
        "key": "string",
        "value": "string",
    }])
const bucketResource = new volcengine.tos.Bucket("bucketResource", {
    bucketName: "string",
    accountAcls: [{
        accountId: "string",
        permission: "string",
        aclType: "string",
    }],
    enableVersion: false,
    projectName: "string",
    publicAcl: "string",
    storageClass: "string",
    tags: [{
        key: "string",
        value: "string",
    }],
});
type: volcengine:tos:Bucket
properties:
    accountAcls:
        - accountId: string
          aclType: string
          permission: string
    bucketName: string
    enableVersion: false
    projectName: string
    publicAcl: string
    storageClass: string
    tags:
        - key: string
          value: string
Bucket 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 Bucket resource accepts the following input properties:
- BucketName string
- The name of the bucket.
- AccountAcls List<BucketAccount Acl> 
- The user set of grant full control.
- EnableVersion bool
- The flag of enable tos version.
- ProjectName string
- The ProjectName of the Tos Bucket. Default is default.
- PublicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- StorageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
List<BucketTag> 
- Tos Bucket Tags.
- BucketName string
- The name of the bucket.
- AccountAcls []BucketAccount Acl Args 
- The user set of grant full control.
- EnableVersion bool
- The flag of enable tos version.
- ProjectName string
- The ProjectName of the Tos Bucket. Default is default.
- PublicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- StorageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
[]BucketTag Args 
- Tos Bucket Tags.
- bucketName String
- The name of the bucket.
- accountAcls List<BucketAccount Acl> 
- The user set of grant full control.
- enableVersion Boolean
- The flag of enable tos version.
- projectName String
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl String
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass String
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
List<BucketTag> 
- Tos Bucket Tags.
- bucketName string
- The name of the bucket.
- accountAcls BucketAccount Acl[] 
- The user set of grant full control.
- enableVersion boolean
- The flag of enable tos version.
- projectName string
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
BucketTag[] 
- Tos Bucket Tags.
- bucket_name str
- The name of the bucket.
- account_acls Sequence[BucketAccount Acl Args] 
- The user set of grant full control.
- enable_version bool
- The flag of enable tos version.
- project_name str
- The ProjectName of the Tos Bucket. Default is default.
- public_acl str
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage_class str
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
Sequence[BucketTag Args] 
- Tos Bucket Tags.
- bucketName String
- The name of the bucket.
- accountAcls List<Property Map>
- The user set of grant full control.
- enableVersion Boolean
- The flag of enable tos version.
- projectName String
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl String
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass String
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Property Map>
- Tos Bucket Tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Bucket resource produces the following output properties:
- CreationDate string
- The create date of the TOS bucket.
- ExtranetEndpoint string
- The extranet endpoint of the TOS bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- IntranetEndpoint string
- The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- CreationDate string
- The create date of the TOS bucket.
- ExtranetEndpoint string
- The extranet endpoint of the TOS bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- IntranetEndpoint string
- The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- creationDate String
- The create date of the TOS bucket.
- extranetEndpoint String
- The extranet endpoint of the TOS bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- intranetEndpoint String
- The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- creationDate string
- The create date of the TOS bucket.
- extranetEndpoint string
- The extranet endpoint of the TOS bucket.
- id string
- The provider-assigned unique ID for this managed resource.
- intranetEndpoint string
- The intranet endpoint the TOS bucket.
- location string
- The location of the TOS bucket.
- creation_date str
- The create date of the TOS bucket.
- extranet_endpoint str
- The extranet endpoint of the TOS bucket.
- id str
- The provider-assigned unique ID for this managed resource.
- intranet_endpoint str
- The intranet endpoint the TOS bucket.
- location str
- The location of the TOS bucket.
- creationDate String
- The create date of the TOS bucket.
- extranetEndpoint String
- The extranet endpoint of the TOS bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- intranetEndpoint String
- The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
Look up Existing Bucket Resource
Get an existing Bucket 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?: BucketState, opts?: CustomResourceOptions): Bucket@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_acls: Optional[Sequence[BucketAccountAclArgs]] = None,
        bucket_name: Optional[str] = None,
        creation_date: Optional[str] = None,
        enable_version: Optional[bool] = None,
        extranet_endpoint: Optional[str] = None,
        intranet_endpoint: Optional[str] = None,
        location: Optional[str] = None,
        project_name: Optional[str] = None,
        public_acl: Optional[str] = None,
        storage_class: Optional[str] = None,
        tags: Optional[Sequence[BucketTagArgs]] = None) -> Bucketfunc GetBucket(ctx *Context, name string, id IDInput, state *BucketState, opts ...ResourceOption) (*Bucket, error)public static Bucket Get(string name, Input<string> id, BucketState? state, CustomResourceOptions? opts = null)public static Bucket get(String name, Output<String> id, BucketState state, CustomResourceOptions options)resources:  _:    type: volcengine:tos:Bucket    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- AccountAcls List<BucketAccount Acl> 
- The user set of grant full control.
- BucketName string
- The name of the bucket.
- CreationDate string
- The create date of the TOS bucket.
- EnableVersion bool
- The flag of enable tos version.
- ExtranetEndpoint string
- The extranet endpoint of the TOS bucket.
- IntranetEndpoint string
- The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- ProjectName string
- The ProjectName of the Tos Bucket. Default is default.
- PublicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- StorageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
List<BucketTag> 
- Tos Bucket Tags.
- AccountAcls []BucketAccount Acl Args 
- The user set of grant full control.
- BucketName string
- The name of the bucket.
- CreationDate string
- The create date of the TOS bucket.
- EnableVersion bool
- The flag of enable tos version.
- ExtranetEndpoint string
- The extranet endpoint of the TOS bucket.
- IntranetEndpoint string
- The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- ProjectName string
- The ProjectName of the Tos Bucket. Default is default.
- PublicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- StorageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
[]BucketTag Args 
- Tos Bucket Tags.
- accountAcls List<BucketAccount Acl> 
- The user set of grant full control.
- bucketName String
- The name of the bucket.
- creationDate String
- The create date of the TOS bucket.
- enableVersion Boolean
- The flag of enable tos version.
- extranetEndpoint String
- The extranet endpoint of the TOS bucket.
- intranetEndpoint String
- The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- projectName String
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl String
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass String
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
List<BucketTag> 
- Tos Bucket Tags.
- accountAcls BucketAccount Acl[] 
- The user set of grant full control.
- bucketName string
- The name of the bucket.
- creationDate string
- The create date of the TOS bucket.
- enableVersion boolean
- The flag of enable tos version.
- extranetEndpoint string
- The extranet endpoint of the TOS bucket.
- intranetEndpoint string
- The intranet endpoint the TOS bucket.
- location string
- The location of the TOS bucket.
- projectName string
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl string
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass string
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
BucketTag[] 
- Tos Bucket Tags.
- account_acls Sequence[BucketAccount Acl Args] 
- The user set of grant full control.
- bucket_name str
- The name of the bucket.
- creation_date str
- The create date of the TOS bucket.
- enable_version bool
- The flag of enable tos version.
- extranet_endpoint str
- The extranet endpoint of the TOS bucket.
- intranet_endpoint str
- The intranet endpoint the TOS bucket.
- location str
- The location of the TOS bucket.
- project_name str
- The ProjectName of the Tos Bucket. Default is default.
- public_acl str
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage_class str
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- 
Sequence[BucketTag Args] 
- Tos Bucket Tags.
- accountAcls List<Property Map>
- The user set of grant full control.
- bucketName String
- The name of the bucket.
- creationDate String
- The create date of the TOS bucket.
- enableVersion Boolean
- The flag of enable tos version.
- extranetEndpoint String
- The extranet endpoint of the TOS bucket.
- intranetEndpoint String
- The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- projectName String
- The ProjectName of the Tos Bucket. Default is default.
- publicAcl String
- The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storageClass String
- The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Property Map>
- Tos Bucket Tags.
Supporting Types
BucketAccountAcl, BucketAccountAclArgs      
- AccountId string
- The accountId to control.
- Permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- AclType string
- The acl type to control.Valid value is CanonicalUser.
- AccountId string
- The accountId to control.
- Permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- AclType string
- The acl type to control.Valid value is CanonicalUser.
- accountId String
- The accountId to control.
- permission String
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- aclType String
- The acl type to control.Valid value is CanonicalUser.
- accountId string
- The accountId to control.
- permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- aclType string
- The acl type to control.Valid value is CanonicalUser.
- account_id str
- The accountId to control.
- permission str
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- acl_type str
- The acl type to control.Valid value is CanonicalUser.
- accountId String
- The accountId to control.
- permission String
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- aclType String
- The acl type to control.Valid value is CanonicalUser.
BucketTag, BucketTagArgs    
Import
Tos Bucket can be imported using the id, e.g.
$ pulumi import volcengine:tos/bucket:Bucket default bucketName
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the volcengineTerraform Provider.