volcengine.tos.Bucket
Explore with Pulumi AI
Provides a resource to manage tos bucket
Example Usage
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 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
})
}
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());
}
}
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",
)])
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",
}],
});
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:
- Bucket
Name string - The name of the bucket.
- Account
Acls List<BucketAccount Acl> - The user set of grant full control.
- Enable
Version bool - The flag of enable tos version.
- Project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - Public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- Storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Bucket
Tag> - Tos Bucket Tags.
- Bucket
Name string - The name of the bucket.
- Account
Acls []BucketAccount Acl Args - The user set of grant full control.
- Enable
Version bool - The flag of enable tos version.
- Project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - Public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- Storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- []Bucket
Tag Args - Tos Bucket Tags.
- bucket
Name String - The name of the bucket.
- account
Acls List<BucketAccount Acl> - The user set of grant full control.
- enable
Version Boolean - The flag of enable tos version.
- project
Name String - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl String - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class String - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Bucket
Tag> - Tos Bucket Tags.
- bucket
Name string - The name of the bucket.
- account
Acls BucketAccount Acl[] - The user set of grant full control.
- enable
Version boolean - The flag of enable tos version.
- project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- Bucket
Tag[] - 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[Bucket
Tag Args] - Tos Bucket Tags.
- bucket
Name String - The name of the bucket.
- account
Acls List<Property Map> - The user set of grant full control.
- enable
Version Boolean - The flag of enable tos version.
- project
Name String - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl String - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class 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:
- Creation
Date string - The create date of the TOS bucket.
- Extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Endpoint string - The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- Creation
Date string - The create date of the TOS bucket.
- Extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- Id string
- The provider-assigned unique ID for this managed resource.
- Intranet
Endpoint string - The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- creation
Date String - The create date of the TOS bucket.
- extranet
Endpoint String - The extranet endpoint of the TOS bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Endpoint String - The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- creation
Date string - The create date of the TOS bucket.
- extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- id string
- The provider-assigned unique ID for this managed resource.
- intranet
Endpoint 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.
- creation
Date String - The create date of the TOS bucket.
- extranet
Endpoint String - The extranet endpoint of the TOS bucket.
- id String
- The provider-assigned unique ID for this managed resource.
- intranet
Endpoint 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) -> 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.
- Account
Acls List<BucketAccount Acl> - The user set of grant full control.
- Bucket
Name string - The name of the bucket.
- Creation
Date string - The create date of the TOS bucket.
- Enable
Version bool - The flag of enable tos version.
- Extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- Intranet
Endpoint string - The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- Project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - Public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- Storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Bucket
Tag> - Tos Bucket Tags.
- Account
Acls []BucketAccount Acl Args - The user set of grant full control.
- Bucket
Name string - The name of the bucket.
- Creation
Date string - The create date of the TOS bucket.
- Enable
Version bool - The flag of enable tos version.
- Extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- Intranet
Endpoint string - The intranet endpoint the TOS bucket.
- Location string
- The location of the TOS bucket.
- Project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - Public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- Storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- []Bucket
Tag Args - Tos Bucket Tags.
- account
Acls List<BucketAccount Acl> - The user set of grant full control.
- bucket
Name String - The name of the bucket.
- creation
Date String - The create date of the TOS bucket.
- enable
Version Boolean - The flag of enable tos version.
- extranet
Endpoint String - The extranet endpoint of the TOS bucket.
- intranet
Endpoint String - The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- project
Name String - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl String - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class String - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- List<Bucket
Tag> - Tos Bucket Tags.
- account
Acls BucketAccount Acl[] - The user set of grant full control.
- bucket
Name string - The name of the bucket.
- creation
Date string - The create date of the TOS bucket.
- enable
Version boolean - The flag of enable tos version.
- extranet
Endpoint string - The extranet endpoint of the TOS bucket.
- intranet
Endpoint string - The intranet endpoint the TOS bucket.
- location string
- The location of the TOS bucket.
- project
Name string - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl string - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class string - The storage type of the object.Valid value is STANDARD|IA|ARCHIVE_FR.Default is STANDARD.
- Bucket
Tag[] - 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[Bucket
Tag Args] - Tos Bucket Tags.
- account
Acls List<Property Map> - The user set of grant full control.
- bucket
Name String - The name of the bucket.
- creation
Date String - The create date of the TOS bucket.
- enable
Version Boolean - The flag of enable tos version.
- extranet
Endpoint String - The extranet endpoint of the TOS bucket.
- intranet
Endpoint String - The intranet endpoint the TOS bucket.
- location String
- The location of the TOS bucket.
- project
Name String - The ProjectName of the Tos Bucket. Default is
default
. - public
Acl String - The public acl control of object.Valid value is private|public-read|public-read-write|authenticated-read|bucket-owner-read.
- storage
Class 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
- Account
Id string - The accountId to control.
- Permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- Acl
Type string - The acl type to control.Valid value is CanonicalUser.
- Account
Id string - The accountId to control.
- Permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- Acl
Type string - The acl type to control.Valid value is CanonicalUser.
- account
Id String - The accountId to control.
- permission String
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- acl
Type String - The acl type to control.Valid value is CanonicalUser.
- account
Id string - The accountId to control.
- permission string
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- acl
Type 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.
- account
Id String - The accountId to control.
- permission String
- The permission to control.Valid value is FULL_CONTROL|READ|READ_ACP|WRITE|WRITE_ACP.
- acl
Type 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
volcengine
Terraform Provider.