1. Packages
  2. Volcengine
  3. API Docs
  4. tos
  5. Bucket
Volcengine v0.0.18 published on Wednesday, Sep 13, 2023 by Volcengine

volcengine.tos.Bucket

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.18 published on Wednesday, Sep 13, 2023 by Volcengine

    Provides a resource to manage tos bucket

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = 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 = "test-xym-1",
            EnableVersion = true,
            PublicAcl = "private",
        });
    
    });
    
    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("test-xym-1"),
    			EnableVersion: pulumi.Bool(true),
    			PublicAcl:     pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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 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("test-xym-1")
                .enableVersion(true)
                .publicAcl("private")
                .build());
    
        }
    }
    
    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="test-xym-1",
        enable_version=True,
        public_acl="private")
    
    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: "test-xym-1",
        enableVersion: true,
        publicAcl: "private",
    });
    
    resources:
      default:
        type: volcengine:tos:Bucket
        properties:
          accountAcls:
            - accountId: '1'
              permission: READ
            - accountId: '2001'
              permission: WRITE_ACP
          bucketName: test-xym-1
          enableVersion: true
          # storage_class ="IA"
          publicAcl: private
    

    Create Bucket Resource

    new Bucket(name: string, args: BucketArgs, opts?: CustomResourceOptions);
    @overload
    def Bucket(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               account_acls: Optional[Sequence[BucketAccountAclArgs]] = None,
               bucket_name: Optional[str] = None,
               enable_version: Optional[bool] = None,
               public_acl: Optional[str] = None,
               storage_class: Optional[str] = None)
    @overload
    def Bucket(resource_name: str,
               args: BucketArgs,
               opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The Bucket resource accepts the following input properties:

    BucketName string

    The name of the bucket.

    AccountAcls List<Volcengine.BucketAccountAcl>

    The user set of grant full control.

    EnableVersion bool

    The flag of enable tos version.

    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.

    BucketName string

    The name of the bucket.

    AccountAcls []BucketAccountAclArgs

    The user set of grant full control.

    EnableVersion bool

    The flag of enable tos version.

    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.

    bucketName String

    The name of the bucket.

    accountAcls List<BucketAccountAcl>

    The user set of grant full control.

    enableVersion Boolean

    The flag of enable tos version.

    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.

    bucketName string

    The name of the bucket.

    accountAcls BucketAccountAcl[]

    The user set of grant full control.

    enableVersion boolean

    The flag of enable tos version.

    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.

    bucket_name str

    The name of the bucket.

    account_acls Sequence[BucketAccountAclArgs]

    The user set of grant full control.

    enable_version bool

    The flag of enable tos version.

    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.

    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.

    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.

    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,
            public_acl: Optional[str] = None,
            storage_class: Optional[str] = None) -> Bucket
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    AccountAcls List<Volcengine.BucketAccountAcl>

    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.

    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.

    AccountAcls []BucketAccountAclArgs

    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.

    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.

    accountAcls List<BucketAccountAcl>

    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.

    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.

    accountAcls BucketAccountAcl[]

    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.

    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.

    account_acls Sequence[BucketAccountAclArgs]

    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.

    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.

    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.

    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.

    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.

    Import

    Tos Bucket can be imported using the id, e.g.

     $ pulumi import volcengine:tos/bucket:Bucket default bucketName
    

    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.18 published on Wednesday, Sep 13, 2023 by Volcengine