1. Packages
  2. Scaleway
  3. API Docs
  4. ObjectItem
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.ObjectItem

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Creates and manages Scaleway object storage objects. For more information, see the documentation.

    Create ObjectItem Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ObjectItem(name: string, args: ObjectItemArgs, opts?: CustomResourceOptions);
    @overload
    def ObjectItem(resource_name: str,
                   args: ObjectItemArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ObjectItem(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   bucket: Optional[str] = None,
                   key: Optional[str] = None,
                   content: Optional[str] = None,
                   content_base64: Optional[str] = None,
                   file: Optional[str] = None,
                   hash: Optional[str] = None,
                   metadata: Optional[Mapping[str, str]] = None,
                   project_id: Optional[str] = None,
                   region: Optional[str] = None,
                   storage_class: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   visibility: Optional[str] = None)
    func NewObjectItem(ctx *Context, name string, args ObjectItemArgs, opts ...ResourceOption) (*ObjectItem, error)
    public ObjectItem(string name, ObjectItemArgs args, CustomResourceOptions? opts = null)
    public ObjectItem(String name, ObjectItemArgs args)
    public ObjectItem(String name, ObjectItemArgs args, CustomResourceOptions options)
    
    type: scaleway:ObjectItem
    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 ObjectItemArgs
    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 ObjectItemArgs
    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 ObjectItemArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ObjectItemArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ObjectItemArgs
    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 objectItemResource = new Scaleway.ObjectItem("objectItemResource", new()
    {
        Bucket = "string",
        Key = "string",
        Content = "string",
        ContentBase64 = "string",
        File = "string",
        Hash = "string",
        Metadata = 
        {
            { "string", "string" },
        },
        ProjectId = "string",
        Region = "string",
        StorageClass = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Visibility = "string",
    });
    
    example, err := scaleway.NewObjectItem(ctx, "objectItemResource", &scaleway.ObjectItemArgs{
    	Bucket:        pulumi.String("string"),
    	Key:           pulumi.String("string"),
    	Content:       pulumi.String("string"),
    	ContentBase64: pulumi.String("string"),
    	File:          pulumi.String("string"),
    	Hash:          pulumi.String("string"),
    	Metadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ProjectId:    pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	StorageClass: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Visibility: pulumi.String("string"),
    })
    
    var objectItemResource = new ObjectItem("objectItemResource", ObjectItemArgs.builder()
        .bucket("string")
        .key("string")
        .content("string")
        .contentBase64("string")
        .file("string")
        .hash("string")
        .metadata(Map.of("string", "string"))
        .projectId("string")
        .region("string")
        .storageClass("string")
        .tags(Map.of("string", "string"))
        .visibility("string")
        .build());
    
    object_item_resource = scaleway.ObjectItem("objectItemResource",
        bucket="string",
        key="string",
        content="string",
        content_base64="string",
        file="string",
        hash="string",
        metadata={
            "string": "string",
        },
        project_id="string",
        region="string",
        storage_class="string",
        tags={
            "string": "string",
        },
        visibility="string")
    
    const objectItemResource = new scaleway.ObjectItem("objectItemResource", {
        bucket: "string",
        key: "string",
        content: "string",
        contentBase64: "string",
        file: "string",
        hash: "string",
        metadata: {
            string: "string",
        },
        projectId: "string",
        region: "string",
        storageClass: "string",
        tags: {
            string: "string",
        },
        visibility: "string",
    });
    
    type: scaleway:ObjectItem
    properties:
        bucket: string
        content: string
        contentBase64: string
        file: string
        hash: string
        key: string
        metadata:
            string: string
        projectId: string
        region: string
        storageClass: string
        tags:
            string: string
        visibility: string
    

    ObjectItem 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 ObjectItem resource accepts the following input properties:

    Bucket string
    The bucket's name or regional ID.
    Key string
    The path of the object.
    Content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    ContentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    File string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    Hash string
    Hash of the file, used to trigger upload on file change
    Metadata Dictionary<string, string>
    Map of metadata used for the object, keys must be lowercase
    ProjectId string
    The project_id you want to attach the resource to
    Region string
    The Scaleway region this bucket resides in.
    StorageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    Tags Dictionary<string, string>
    Map of tags
    Visibility string
    Visibility of the object, public-read or private
    Bucket string
    The bucket's name or regional ID.
    Key string
    The path of the object.
    Content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    ContentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    File string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    Hash string
    Hash of the file, used to trigger upload on file change
    Metadata map[string]string
    Map of metadata used for the object, keys must be lowercase
    ProjectId string
    The project_id you want to attach the resource to
    Region string
    The Scaleway region this bucket resides in.
    StorageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    Tags map[string]string
    Map of tags
    Visibility string
    Visibility of the object, public-read or private
    bucket String
    The bucket's name or regional ID.
    key String
    The path of the object.
    content String
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 String
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file String
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash String
    Hash of the file, used to trigger upload on file change
    metadata Map<String,String>
    Map of metadata used for the object, keys must be lowercase
    projectId String
    The project_id you want to attach the resource to
    region String
    The Scaleway region this bucket resides in.
    storageClass String
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Map<String,String>
    Map of tags
    visibility String
    Visibility of the object, public-read or private
    bucket string
    The bucket's name or regional ID.
    key string
    The path of the object.
    content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash string
    Hash of the file, used to trigger upload on file change
    metadata {[key: string]: string}
    Map of metadata used for the object, keys must be lowercase
    projectId string
    The project_id you want to attach the resource to
    region string
    The Scaleway region this bucket resides in.
    storageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags {[key: string]: string}
    Map of tags
    visibility string
    Visibility of the object, public-read or private
    bucket str
    The bucket's name or regional ID.
    key str
    The path of the object.
    content str
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    content_base64 str
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file str
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash str
    Hash of the file, used to trigger upload on file change
    metadata Mapping[str, str]
    Map of metadata used for the object, keys must be lowercase
    project_id str
    The project_id you want to attach the resource to
    region str
    The Scaleway region this bucket resides in.
    storage_class str
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Mapping[str, str]
    Map of tags
    visibility str
    Visibility of the object, public-read or private
    bucket String
    The bucket's name or regional ID.
    key String
    The path of the object.
    content String
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 String
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file String
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash String
    Hash of the file, used to trigger upload on file change
    metadata Map<String>
    Map of metadata used for the object, keys must be lowercase
    projectId String
    The project_id you want to attach the resource to
    region String
    The Scaleway region this bucket resides in.
    storageClass String
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Map<String>
    Map of tags
    visibility String
    Visibility of the object, public-read or private

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ObjectItem resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ObjectItem Resource

    Get an existing ObjectItem 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?: ObjectItemState, opts?: CustomResourceOptions): ObjectItem
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket: Optional[str] = None,
            content: Optional[str] = None,
            content_base64: Optional[str] = None,
            file: Optional[str] = None,
            hash: Optional[str] = None,
            key: Optional[str] = None,
            metadata: Optional[Mapping[str, str]] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            storage_class: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            visibility: Optional[str] = None) -> ObjectItem
    func GetObjectItem(ctx *Context, name string, id IDInput, state *ObjectItemState, opts ...ResourceOption) (*ObjectItem, error)
    public static ObjectItem Get(string name, Input<string> id, ObjectItemState? state, CustomResourceOptions? opts = null)
    public static ObjectItem get(String name, Output<String> id, ObjectItemState 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:
    Bucket string
    The bucket's name or regional ID.
    Content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    ContentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    File string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    Hash string
    Hash of the file, used to trigger upload on file change
    Key string
    The path of the object.
    Metadata Dictionary<string, string>
    Map of metadata used for the object, keys must be lowercase
    ProjectId string
    The project_id you want to attach the resource to
    Region string
    The Scaleway region this bucket resides in.
    StorageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    Tags Dictionary<string, string>
    Map of tags
    Visibility string
    Visibility of the object, public-read or private
    Bucket string
    The bucket's name or regional ID.
    Content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    ContentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    File string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    Hash string
    Hash of the file, used to trigger upload on file change
    Key string
    The path of the object.
    Metadata map[string]string
    Map of metadata used for the object, keys must be lowercase
    ProjectId string
    The project_id you want to attach the resource to
    Region string
    The Scaleway region this bucket resides in.
    StorageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    Tags map[string]string
    Map of tags
    Visibility string
    Visibility of the object, public-read or private
    bucket String
    The bucket's name or regional ID.
    content String
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 String
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file String
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash String
    Hash of the file, used to trigger upload on file change
    key String
    The path of the object.
    metadata Map<String,String>
    Map of metadata used for the object, keys must be lowercase
    projectId String
    The project_id you want to attach the resource to
    region String
    The Scaleway region this bucket resides in.
    storageClass String
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Map<String,String>
    Map of tags
    visibility String
    Visibility of the object, public-read or private
    bucket string
    The bucket's name or regional ID.
    content string
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 string
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file string
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash string
    Hash of the file, used to trigger upload on file change
    key string
    The path of the object.
    metadata {[key: string]: string}
    Map of metadata used for the object, keys must be lowercase
    projectId string
    The project_id you want to attach the resource to
    region string
    The Scaleway region this bucket resides in.
    storageClass string
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags {[key: string]: string}
    Map of tags
    visibility string
    Visibility of the object, public-read or private
    bucket str
    The bucket's name or regional ID.
    content str
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    content_base64 str
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file str
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash str
    Hash of the file, used to trigger upload on file change
    key str
    The path of the object.
    metadata Mapping[str, str]
    Map of metadata used for the object, keys must be lowercase
    project_id str
    The project_id you want to attach the resource to
    region str
    The Scaleway region this bucket resides in.
    storage_class str
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Mapping[str, str]
    Map of tags
    visibility str
    Visibility of the object, public-read or private
    bucket String
    The bucket's name or regional ID.
    content String
    The content of the file to upload. Only one of file, content or content_base64 can be defined.
    contentBase64 String
    The base64-encoded content of the file to upload. Only one of file, content or content_base64 can be defined.
    file String
    The name of the file to upload, defaults to an empty file. Only one of file, content or content_base64 can be defined.
    hash String
    Hash of the file, used to trigger upload on file change
    key String
    The path of the object.
    metadata Map<String>
    Map of metadata used for the object, keys must be lowercase
    projectId String
    The project_id you want to attach the resource to
    region String
    The Scaleway region this bucket resides in.
    storageClass String
    Specifies the Scaleway storage class STANDARD, GLACIER, ONEZONE_IA used to store the object.
    tags Map<String>
    Map of tags
    visibility String
    Visibility of the object, public-read or private

    Import

    Objects can be imported using the {region}/{bucketName}/{objectKey} identifier, e.g.

    bash

    $ pulumi import scaleway:index/objectItem:ObjectItem some_object fr-par/some-bucket/some-file
    

    ~> Important: The project_id attribute has a particular behavior with s3 products because the s3 API is scoped by project.

    If you are using a project different from the default one, you have to specify the project ID at the end of the import command.

    bash

    $ pulumi import scaleway:index/objectItem:ObjectItem some_object fr-par/some-bucket/some-file@xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse