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 = 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:
- Bucket
Name string The name of the bucket.
- Account
Acls List<Volcengine.Bucket Account Acl> The user set of grant full control.
- Enable
Version bool The flag of enable tos version.
- 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
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.
- 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
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.
- 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
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.
- 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_
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.
- 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.
- 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.
- 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.
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,
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.
- Account
Acls List<Volcengine.Bucket Account 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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.
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.