1. Packages
  2. Scaleway
  3. API Docs
  4. getObjectBucket
Scaleway v1.12.0 published on Monday, Mar 11, 2024 by pulumiverse

scaleway.getObjectBucket

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.0 published on Monday, Mar 11, 2024 by pulumiverse

    Gets information about the Bucket. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.ObjectBucket("main", {tags: {
        foo: "bar",
    }});
    const selected = scaleway.getObjectBucketOutput({
        name: main.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.ObjectBucket("main", tags={
        "foo": "bar",
    })
    selected = scaleway.get_object_bucket_output(name=main.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := scaleway.NewObjectBucket(ctx, "main", &scaleway.ObjectBucketArgs{
    			Tags: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.LookupObjectBucketOutput(ctx, scaleway.GetObjectBucketOutputArgs{
    			Name: main.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.ObjectBucket("main", new()
        {
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    
        var selected = Scaleway.GetObjectBucket.Invoke(new()
        {
            Name = main.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ObjectBucket;
    import com.pulumi.scaleway.ObjectBucketArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetObjectBucketArgs;
    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 main = new ObjectBucket("main", ObjectBucketArgs.builder()        
                .tags(Map.of("foo", "bar"))
                .build());
    
            final var selected = ScalewayFunctions.getObjectBucket(GetObjectBucketArgs.builder()
                .name(main.id())
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:ObjectBucket
        properties:
          tags:
            foo: bar
    variables:
      selected:
        fn::invoke:
          Function: scaleway:getObjectBucket
          Arguments:
            name: ${main.id}
    

    Fetching the bucket from a specific project

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const selected = scaleway.getObjectBucket({
        name: "bucket.test.com",
        projectId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    selected = scaleway.get_object_bucket(name="bucket.test.com",
        project_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupObjectBucket(ctx, &scaleway.LookupObjectBucketArgs{
    			Name:      pulumi.StringRef("bucket.test.com"),
    			ProjectId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var selected = Scaleway.GetObjectBucket.Invoke(new()
        {
            Name = "bucket.test.com",
            ProjectId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetObjectBucketArgs;
    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) {
            final var selected = ScalewayFunctions.getObjectBucket(GetObjectBucketArgs.builder()
                .name("bucket.test.com")
                .projectId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      selected:
        fn::invoke:
          Function: scaleway:getObjectBucket
          Arguments:
            name: bucket.test.com
            projectId: 11111111-1111-1111-1111-111111111111
    

    Using getObjectBucket

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getObjectBucket(args: GetObjectBucketArgs, opts?: InvokeOptions): Promise<GetObjectBucketResult>
    function getObjectBucketOutput(args: GetObjectBucketOutputArgs, opts?: InvokeOptions): Output<GetObjectBucketResult>
    def get_object_bucket(name: Optional[str] = None,
                          project_id: Optional[str] = None,
                          region: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetObjectBucketResult
    def get_object_bucket_output(name: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          region: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetObjectBucketResult]
    func LookupObjectBucket(ctx *Context, args *LookupObjectBucketArgs, opts ...InvokeOption) (*LookupObjectBucketResult, error)
    func LookupObjectBucketOutput(ctx *Context, args *LookupObjectBucketOutputArgs, opts ...InvokeOption) LookupObjectBucketResultOutput

    > Note: This function is named LookupObjectBucket in the Go SDK.

    public static class GetObjectBucket 
    {
        public static Task<GetObjectBucketResult> InvokeAsync(GetObjectBucketArgs args, InvokeOptions? opts = null)
        public static Output<GetObjectBucketResult> Invoke(GetObjectBucketInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetObjectBucketResult> getObjectBucket(GetObjectBucketArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getObjectBucket:getObjectBucket
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    ProjectId string
    project_id) The ID of the project the bucket is associated with.
    Region string
    region) The region in which the bucket exists.
    Name string
    ProjectId string
    project_id) The ID of the project the bucket is associated with.
    Region string
    region) The region in which the bucket exists.
    name String
    projectId String
    project_id) The ID of the project the bucket is associated with.
    region String
    region) The region in which the bucket exists.
    name string
    projectId string
    project_id) The ID of the project the bucket is associated with.
    region string
    region) The region in which the bucket exists.
    name str
    project_id str
    project_id) The ID of the project the bucket is associated with.
    region str
    region) The region in which the bucket exists.
    name String
    projectId String
    project_id) The ID of the project the bucket is associated with.
    region String
    region) The region in which the bucket exists.

    getObjectBucket Result

    The following output properties are available:

    Acl string
    ApiEndpoint string
    CorsRules []GetObjectBucketCorsRule
    Endpoint string
    The endpoint URL of the bucket
    ForceDestroy bool
    Id string
    The provider-assigned unique ID for this managed resource.
    LifecycleRules []GetObjectBucketLifecycleRule
    ObjectLockEnabled bool
    Tags map[string]string
    Versionings []GetObjectBucketVersioning
    Name string
    ProjectId string
    Region string
    acl String
    apiEndpoint String
    corsRules List<GetObjectBucketCorsRule>
    endpoint String
    The endpoint URL of the bucket
    forceDestroy Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleRules List<GetObjectBucketLifecycleRule>
    objectLockEnabled Boolean
    tags Map<String,String>
    versionings List<GetObjectBucketVersioning>
    name String
    projectId String
    region String
    acl string
    apiEndpoint string
    corsRules GetObjectBucketCorsRule[]
    endpoint string
    The endpoint URL of the bucket
    forceDestroy boolean
    id string
    The provider-assigned unique ID for this managed resource.
    lifecycleRules GetObjectBucketLifecycleRule[]
    objectLockEnabled boolean
    tags {[key: string]: string}
    versionings GetObjectBucketVersioning[]
    name string
    projectId string
    region string
    acl String
    apiEndpoint String
    corsRules List<Property Map>
    endpoint String
    The endpoint URL of the bucket
    forceDestroy Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    lifecycleRules List<Property Map>
    objectLockEnabled Boolean
    tags Map<String>
    versionings List<Property Map>
    name String
    projectId String
    region String

    Supporting Types

    GetObjectBucketCorsRule

    AllowedHeaders List<string>
    AllowedMethods List<string>
    AllowedOrigins List<string>
    ExposeHeaders List<string>
    MaxAgeSeconds int
    allowedHeaders List<String>
    allowedMethods List<String>
    allowedOrigins List<String>
    exposeHeaders List<String>
    maxAgeSeconds Integer
    allowed_headers Sequence[str]
    allowed_methods Sequence[str]
    allowed_origins Sequence[str]
    expose_headers Sequence[str]
    max_age_seconds int
    allowedHeaders List<String>
    allowedMethods List<String>
    allowedOrigins List<String>
    exposeHeaders List<String>
    maxAgeSeconds Number

    GetObjectBucketLifecycleRule

    AbortIncompleteMultipartUploadDays int
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    Enabled bool
    Specifies if the configuration rule is Enabled or Disabled
    Expirations List<Pulumiverse.Scaleway.Inputs.GetObjectBucketLifecycleRuleExpiration>
    Specifies a period in the object's expire
    Id string
    The unique name of the bucket.
    Prefix string
    The prefix identifying one or more objects to which the rule applies
    Tags Dictionary<string, string>
    The tags associated with the bucket lifecycle
    Transitions List<Pulumiverse.Scaleway.Inputs.GetObjectBucketLifecycleRuleTransition>
    Define when objects transition to another storage class
    AbortIncompleteMultipartUploadDays int
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    Enabled bool
    Specifies if the configuration rule is Enabled or Disabled
    Expirations []GetObjectBucketLifecycleRuleExpiration
    Specifies a period in the object's expire
    Id string
    The unique name of the bucket.
    Prefix string
    The prefix identifying one or more objects to which the rule applies
    Tags map[string]string
    The tags associated with the bucket lifecycle
    Transitions []GetObjectBucketLifecycleRuleTransition
    Define when objects transition to another storage class
    abortIncompleteMultipartUploadDays Integer
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    enabled Boolean
    Specifies if the configuration rule is Enabled or Disabled
    expirations List<GetObjectBucketLifecycleRuleExpiration>
    Specifies a period in the object's expire
    id String
    The unique name of the bucket.
    prefix String
    The prefix identifying one or more objects to which the rule applies
    tags Map<String,String>
    The tags associated with the bucket lifecycle
    transitions List<GetObjectBucketLifecycleRuleTransition>
    Define when objects transition to another storage class
    abortIncompleteMultipartUploadDays number
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    enabled boolean
    Specifies if the configuration rule is Enabled or Disabled
    expirations GetObjectBucketLifecycleRuleExpiration[]
    Specifies a period in the object's expire
    id string
    The unique name of the bucket.
    prefix string
    The prefix identifying one or more objects to which the rule applies
    tags {[key: string]: string}
    The tags associated with the bucket lifecycle
    transitions GetObjectBucketLifecycleRuleTransition[]
    Define when objects transition to another storage class
    abort_incomplete_multipart_upload_days int
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    enabled bool
    Specifies if the configuration rule is Enabled or Disabled
    expirations Sequence[GetObjectBucketLifecycleRuleExpiration]
    Specifies a period in the object's expire
    id str
    The unique name of the bucket.
    prefix str
    The prefix identifying one or more objects to which the rule applies
    tags Mapping[str, str]
    The tags associated with the bucket lifecycle
    transitions Sequence[GetObjectBucketLifecycleRuleTransition]
    Define when objects transition to another storage class
    abortIncompleteMultipartUploadDays Number
    Specifies the number of days after initiating a multipart upload when the multipart upload must be completed
    enabled Boolean
    Specifies if the configuration rule is Enabled or Disabled
    expirations List<Property Map>
    Specifies a period in the object's expire
    id String
    The unique name of the bucket.
    prefix String
    The prefix identifying one or more objects to which the rule applies
    tags Map<String>
    The tags associated with the bucket lifecycle
    transitions List<Property Map>
    Define when objects transition to another storage class

    GetObjectBucketLifecycleRuleExpiration

    Days int
    Specifies the number of days after object creation when the specific rule action takes effect
    Days int
    Specifies the number of days after object creation when the specific rule action takes effect
    days Integer
    Specifies the number of days after object creation when the specific rule action takes effect
    days number
    Specifies the number of days after object creation when the specific rule action takes effect
    days int
    Specifies the number of days after object creation when the specific rule action takes effect
    days Number
    Specifies the number of days after object creation when the specific rule action takes effect

    GetObjectBucketLifecycleRuleTransition

    Days int
    Specifies the number of days after object creation when the specific rule action takes effect
    StorageClass string
    Specifies the Scaleway Object Storage class to which you want the object to transition
    Days int
    Specifies the number of days after object creation when the specific rule action takes effect
    StorageClass string
    Specifies the Scaleway Object Storage class to which you want the object to transition
    days Integer
    Specifies the number of days after object creation when the specific rule action takes effect
    storageClass String
    Specifies the Scaleway Object Storage class to which you want the object to transition
    days number
    Specifies the number of days after object creation when the specific rule action takes effect
    storageClass string
    Specifies the Scaleway Object Storage class to which you want the object to transition
    days int
    Specifies the number of days after object creation when the specific rule action takes effect
    storage_class str
    Specifies the Scaleway Object Storage class to which you want the object to transition
    days Number
    Specifies the number of days after object creation when the specific rule action takes effect
    storageClass String
    Specifies the Scaleway Object Storage class to which you want the object to transition

    GetObjectBucketVersioning

    Enabled bool
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state
    Enabled bool
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state
    enabled Boolean
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state
    enabled boolean
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state
    enabled bool
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state
    enabled Boolean
    Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state

    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.12.0 published on Monday, Mar 11, 2024 by pulumiverse