volcengine.tos.BucketObject
Explore with Pulumi AI
Provides a resource to manage tos object
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.BucketObject("default", new()
{
AccountAcls = new[]
{
new Volcengine.Tos.Inputs.BucketObjectAccountAclArgs
{
AccountId = "1",
Permission = "READ",
},
new Volcengine.Tos.Inputs.BucketObjectAccountAclArgs
{
AccountId = "2001",
Permission = "WRITE_ACP",
},
},
BucketName = "test-xym-1",
Encryption = "AES256",
FilePath = "/Users/bytedance/Work/Go/build/test.txt",
ObjectName = "demo_xym",
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.NewBucketObject(ctx, "default", &tos.BucketObjectArgs{
AccountAcls: tos.BucketObjectAccountAclArray{
&tos.BucketObjectAccountAclArgs{
AccountId: pulumi.String("1"),
Permission: pulumi.String("READ"),
},
&tos.BucketObjectAccountAclArgs{
AccountId: pulumi.String("2001"),
Permission: pulumi.String("WRITE_ACP"),
},
},
BucketName: pulumi.String("test-xym-1"),
Encryption: pulumi.String("AES256"),
FilePath: pulumi.String("/Users/bytedance/Work/Go/build/test.txt"),
ObjectName: pulumi.String("demo_xym"),
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.BucketObject;
import com.pulumi.volcengine.tos.BucketObjectArgs;
import com.pulumi.volcengine.tos.inputs.BucketObjectAccountAclArgs;
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 BucketObject("default", BucketObjectArgs.builder()
.accountAcls(
BucketObjectAccountAclArgs.builder()
.accountId("1")
.permission("READ")
.build(),
BucketObjectAccountAclArgs.builder()
.accountId("2001")
.permission("WRITE_ACP")
.build())
.bucketName("test-xym-1")
.encryption("AES256")
.filePath("/Users/bytedance/Work/Go/build/test.txt")
.objectName("demo_xym")
.publicAcl("private")
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
default = volcengine.tos.BucketObject("default",
account_acls=[
volcengine.tos.BucketObjectAccountAclArgs(
account_id="1",
permission="READ",
),
volcengine.tos.BucketObjectAccountAclArgs(
account_id="2001",
permission="WRITE_ACP",
),
],
bucket_name="test-xym-1",
encryption="AES256",
file_path="/Users/bytedance/Work/Go/build/test.txt",
object_name="demo_xym",
public_acl="private")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const _default = new volcengine.tos.BucketObject("default", {
accountAcls: [
{
accountId: "1",
permission: "READ",
},
{
accountId: "2001",
permission: "WRITE_ACP",
},
],
bucketName: "test-xym-1",
encryption: "AES256",
filePath: "/Users/bytedance/Work/Go/build/test.txt",
objectName: "demo_xym",
publicAcl: "private",
});
resources:
default:
type: volcengine:tos:BucketObject
properties:
accountAcls:
- accountId: '1'
permission: READ
- accountId: '2001'
permission: WRITE_ACP
bucketName: test-xym-1
encryption: AES256
filePath: /Users/bytedance/Work/Go/build/test.txt
objectName: demo_xym
# storage_class ="IA"
publicAcl: private
Create BucketObject Resource
new BucketObject(name: string, args: BucketObjectArgs, opts?: CustomResourceOptions);
@overload
def BucketObject(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_acls: Optional[Sequence[BucketObjectAccountAclArgs]] = None,
bucket_name: Optional[str] = None,
content_md5: Optional[str] = None,
content_type: Optional[str] = None,
encryption: Optional[str] = None,
file_path: Optional[str] = None,
object_name: Optional[str] = None,
public_acl: Optional[str] = None,
storage_class: Optional[str] = None)
@overload
def BucketObject(resource_name: str,
args: BucketObjectArgs,
opts: Optional[ResourceOptions] = None)
func NewBucketObject(ctx *Context, name string, args BucketObjectArgs, opts ...ResourceOption) (*BucketObject, error)
public BucketObject(string name, BucketObjectArgs args, CustomResourceOptions? opts = null)
public BucketObject(String name, BucketObjectArgs args)
public BucketObject(String name, BucketObjectArgs args, CustomResourceOptions options)
type: volcengine:tos:BucketObject
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketObjectArgs
- 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 BucketObjectArgs
- 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 BucketObjectArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BucketObjectArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BucketObject 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 BucketObject resource accepts the following input properties:
- Bucket
Name string The name of the bucket.
- File
Path string The file path for upload.
- Object
Name string The name of the object.
- Account
Acls List<Volcengine.Bucket Object Account Acl> The user set of grant full control.
- Content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- Content
Type string The content type of the object.
- Encryption string
The encryption of the object.Valid value is AES256.
- 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.
- Bucket
Name string The name of the bucket.
- File
Path string The file path for upload.
- Object
Name string The name of the object.
- Account
Acls []BucketObject Account Acl Args The user set of grant full control.
- Content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- Content
Type string The content type of the object.
- Encryption string
The encryption of the object.Valid value is AES256.
- 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.
- bucket
Name String The name of the bucket.
- file
Path String The file path for upload.
- object
Name String The name of the object.
- account
Acls List<BucketObject Account Acl> The user set of grant full control.
- content
Md5 String The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type String The content type of the object.
- encryption String
The encryption of the object.Valid value is AES256.
- 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.
- bucket
Name string The name of the bucket.
- file
Path string The file path for upload.
- object
Name string The name of the object.
- account
Acls BucketObject Account Acl[] The user set of grant full control.
- content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type string The content type of the object.
- encryption string
The encryption of the object.Valid value is AES256.
- 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.
- bucket_
name str The name of the bucket.
- file_
path str The file path for upload.
- object_
name str The name of the object.
- account_
acls Sequence[BucketObject Account Acl Args] The user set of grant full control.
- content_
md5 str The file md5 sum (32-bit hexadecimal string) for upload.
- content_
type str The content type of the object.
- encryption str
The encryption of the object.Valid value is AES256.
- 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.
- bucket
Name String The name of the bucket.
- file
Path String The file path for upload.
- object
Name String The name of the object.
- account
Acls List<Property Map> The user set of grant full control.
- content
Md5 String The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type String The content type of the object.
- encryption String
The encryption of the object.Valid value is AES256.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the BucketObject resource produces the following output properties:
- Content string
The content the TOS Object when content type is json or text and xml.
- Enable
Version bool The flag of enable tos version.
- Id string
The provider-assigned unique ID for this managed resource.
- Version
Ids List<string> The version ids of the object if exist.
- Content string
The content the TOS Object when content type is json or text and xml.
- Enable
Version bool The flag of enable tos version.
- Id string
The provider-assigned unique ID for this managed resource.
- Version
Ids []string The version ids of the object if exist.
- content String
The content the TOS Object when content type is json or text and xml.
- enable
Version Boolean The flag of enable tos version.
- id String
The provider-assigned unique ID for this managed resource.
- version
Ids List<String> The version ids of the object if exist.
- content string
The content the TOS Object when content type is json or text and xml.
- enable
Version boolean The flag of enable tos version.
- id string
The provider-assigned unique ID for this managed resource.
- version
Ids string[] The version ids of the object if exist.
- content str
The content the TOS Object when content type is json or text and xml.
- enable_
version bool The flag of enable tos version.
- id str
The provider-assigned unique ID for this managed resource.
- version_
ids Sequence[str] The version ids of the object if exist.
- content String
The content the TOS Object when content type is json or text and xml.
- enable
Version Boolean The flag of enable tos version.
- id String
The provider-assigned unique ID for this managed resource.
- version
Ids List<String> The version ids of the object if exist.
Look up Existing BucketObject Resource
Get an existing BucketObject 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?: BucketObjectState, opts?: CustomResourceOptions): BucketObject
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_acls: Optional[Sequence[BucketObjectAccountAclArgs]] = None,
bucket_name: Optional[str] = None,
content: Optional[str] = None,
content_md5: Optional[str] = None,
content_type: Optional[str] = None,
enable_version: Optional[bool] = None,
encryption: Optional[str] = None,
file_path: Optional[str] = None,
object_name: Optional[str] = None,
public_acl: Optional[str] = None,
storage_class: Optional[str] = None,
version_ids: Optional[Sequence[str]] = None) -> BucketObject
func GetBucketObject(ctx *Context, name string, id IDInput, state *BucketObjectState, opts ...ResourceOption) (*BucketObject, error)
public static BucketObject Get(string name, Input<string> id, BucketObjectState? state, CustomResourceOptions? opts = null)
public static BucketObject get(String name, Output<String> id, BucketObjectState 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 Object Account Acl> The user set of grant full control.
- Bucket
Name string The name of the bucket.
- Content string
The content the TOS Object when content type is json or text and xml.
- Content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- Content
Type string The content type of the object.
- Enable
Version bool The flag of enable tos version.
- Encryption string
The encryption of the object.Valid value is AES256.
- File
Path string The file path for upload.
- Object
Name string The name of the object.
- 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.
- Version
Ids List<string> The version ids of the object if exist.
- Account
Acls []BucketObject Account Acl Args The user set of grant full control.
- Bucket
Name string The name of the bucket.
- Content string
The content the TOS Object when content type is json or text and xml.
- Content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- Content
Type string The content type of the object.
- Enable
Version bool The flag of enable tos version.
- Encryption string
The encryption of the object.Valid value is AES256.
- File
Path string The file path for upload.
- Object
Name string The name of the object.
- 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.
- Version
Ids []string The version ids of the object if exist.
- account
Acls List<BucketObject Account Acl> The user set of grant full control.
- bucket
Name String The name of the bucket.
- content String
The content the TOS Object when content type is json or text and xml.
- content
Md5 String The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type String The content type of the object.
- enable
Version Boolean The flag of enable tos version.
- encryption String
The encryption of the object.Valid value is AES256.
- file
Path String The file path for upload.
- object
Name String The name of the object.
- 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.
- version
Ids List<String> The version ids of the object if exist.
- account
Acls BucketObject Account Acl[] The user set of grant full control.
- bucket
Name string The name of the bucket.
- content string
The content the TOS Object when content type is json or text and xml.
- content
Md5 string The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type string The content type of the object.
- enable
Version boolean The flag of enable tos version.
- encryption string
The encryption of the object.Valid value is AES256.
- file
Path string The file path for upload.
- object
Name string The name of the object.
- 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.
- version
Ids string[] The version ids of the object if exist.
- account_
acls Sequence[BucketObject Account Acl Args] The user set of grant full control.
- bucket_
name str The name of the bucket.
- content str
The content the TOS Object when content type is json or text and xml.
- content_
md5 str The file md5 sum (32-bit hexadecimal string) for upload.
- content_
type str The content type of the object.
- enable_
version bool The flag of enable tos version.
- encryption str
The encryption of the object.Valid value is AES256.
- file_
path str The file path for upload.
- object_
name str The name of the object.
- 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.
- version_
ids Sequence[str] The version ids of the object if exist.
- account
Acls List<Property Map> The user set of grant full control.
- bucket
Name String The name of the bucket.
- content String
The content the TOS Object when content type is json or text and xml.
- content
Md5 String The file md5 sum (32-bit hexadecimal string) for upload.
- content
Type String The content type of the object.
- enable
Version Boolean The flag of enable tos version.
- encryption String
The encryption of the object.Valid value is AES256.
- file
Path String The file path for upload.
- object
Name String The name of the object.
- 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.
- version
Ids List<String> The version ids of the object if exist.
Supporting Types
BucketObjectAccountAcl, BucketObjectAccountAclArgs
- 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 Object can be imported using the id, e.g.
$ pulumi import volcengine:tos/bucketObject:BucketObject default bucketName:objectName
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
volcengine
Terraform Provider.