Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse
scaleway.getObjectBucket
Explore with Pulumi AI
The scaleway.ObjectBucket
data source is used to retrieve information about an Object Storage bucket.
Refer to the Object Storage documentation for more information.
Retrieve an Object Storage bucket
The following commands allow you to:
- retrieve a bucket by its name
- retrieve a bucket by its ID
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.ObjectBucket("main", {
name: "bucket.test.com",
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",
name="bucket.test.com",
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{
Name: pulumi.String("bucket.test.com"),
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()
{
Name = "bucket.test.com",
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()
.name("bucket.test.com")
.tags(Map.of("foo", "bar"))
.build());
final var selected = ScalewayFunctions.getObjectBucket(GetObjectBucketArgs.builder()
.name(main.id())
.build());
}
}
resources:
main:
type: scaleway:ObjectBucket
properties:
name: bucket.test.com
tags:
foo: bar
variables:
selected:
fn::invoke:
Function: scaleway:getObjectBucket
Arguments:
name: ${main.id}
Retrieve a 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 str
- project_
id str project_id
) The ID of the project with which the bucket is associated.- region str
region
) The region in which the bucket exists.
getObjectBucket Result
The following output properties are available:
- Acl string
- Api
Endpoint string - Cors
Rules List<Pulumiverse.Scaleway. Outputs. Get Object Bucket Cors Rule> - Endpoint string
- The endpoint URL of the bucket
- Force
Destroy bool - Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Rules List<Pulumiverse.Scaleway. Outputs. Get Object Bucket Lifecycle Rule> - Object
Lock boolEnabled - Dictionary<string, string>
- Versionings
List<Pulumiverse.
Scaleway. Outputs. Get Object Bucket Versioning> - Name string
- Project
Id string - Region string
- Acl string
- Api
Endpoint string - Cors
Rules []GetObject Bucket Cors Rule - Endpoint string
- The endpoint URL of the bucket
- Force
Destroy bool - Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Rules []GetObject Bucket Lifecycle Rule - Object
Lock boolEnabled - map[string]string
- Versionings
[]Get
Object Bucket Versioning - Name string
- Project
Id string - Region string
- acl String
- api
Endpoint String - cors
Rules List<GetObject Bucket Cors Rule> - endpoint String
- The endpoint URL of the bucket
- force
Destroy Boolean - id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Rules List<GetObject Bucket Lifecycle Rule> - object
Lock BooleanEnabled - Map<String,String>
- versionings
List<Get
Object Bucket Versioning> - name String
- project
Id String - region String
- acl string
- api
Endpoint string - cors
Rules GetObject Bucket Cors Rule[] - endpoint string
- The endpoint URL of the bucket
- force
Destroy boolean - id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Rules GetObject Bucket Lifecycle Rule[] - object
Lock booleanEnabled - {[key: string]: string}
- versionings
Get
Object Bucket Versioning[] - name string
- project
Id string - region string
- acl str
- api_
endpoint str - cors_
rules Sequence[GetObject Bucket Cors Rule] - endpoint str
- The endpoint URL of the bucket
- force_
destroy bool - id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
rules Sequence[GetObject Bucket Lifecycle Rule] - object_
lock_ boolenabled - Mapping[str, str]
- versionings
Sequence[Get
Object Bucket Versioning] - name str
- project_
id str - region str
- acl String
- api
Endpoint String - cors
Rules List<Property Map> - endpoint String
- The endpoint URL of the bucket
- force
Destroy Boolean - id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Rules List<Property Map> - object
Lock BooleanEnabled - Map<String>
- versionings List<Property Map>
- name String
- project
Id String - region String
Supporting Types
GetObjectBucketCorsRule
- Allowed
Headers List<string> - Allowed
Methods List<string> - Allowed
Origins List<string> - Expose
Headers List<string> - Max
Age intSeconds
- Allowed
Headers []string - Allowed
Methods []string - Allowed
Origins []string - Expose
Headers []string - Max
Age intSeconds
- allowed
Headers List<String> - allowed
Methods List<String> - allowed
Origins List<String> - expose
Headers List<String> - max
Age IntegerSeconds
- allowed
Headers string[] - allowed
Methods string[] - allowed
Origins string[] - expose
Headers string[] - max
Age numberSeconds
- allowed_
headers Sequence[str] - allowed_
methods Sequence[str] - allowed_
origins Sequence[str] - expose_
headers Sequence[str] - max_
age_ intseconds
- allowed
Headers List<String> - allowed
Methods List<String> - allowed
Origins List<String> - expose
Headers List<String> - max
Age NumberSeconds
GetObjectBucketLifecycleRule
- Abort
Incomplete intMultipart Upload Days - 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. Get Object Bucket Lifecycle Rule Expiration> - Specifies a period in the object's expire
- Id string
- The unique identifier of the bucket.
- Prefix string
- The prefix identifying one or more objects to which the rule applies
- Dictionary<string, string>
- The tags associated with the bucket lifecycle
- Transitions
List<Pulumiverse.
Scaleway. Inputs. Get Object Bucket Lifecycle Rule Transition> - Define when objects transition to another storage class
- Abort
Incomplete intMultipart Upload Days - 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
[]Get
Object Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire
- Id string
- The unique identifier of the bucket.
- Prefix string
- The prefix identifying one or more objects to which the rule applies
- map[string]string
- The tags associated with the bucket lifecycle
- Transitions
[]Get
Object Bucket Lifecycle Rule Transition - Define when objects transition to another storage class
- abort
Incomplete IntegerMultipart Upload Days - 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<Get
Object Bucket Lifecycle Rule Expiration> - Specifies a period in the object's expire
- id String
- The unique identifier of the bucket.
- prefix String
- The prefix identifying one or more objects to which the rule applies
- Map<String,String>
- The tags associated with the bucket lifecycle
- transitions
List<Get
Object Bucket Lifecycle Rule Transition> - Define when objects transition to another storage class
- abort
Incomplete numberMultipart Upload Days - 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
Get
Object Bucket Lifecycle Rule Expiration[] - Specifies a period in the object's expire
- id string
- The unique identifier of the bucket.
- prefix string
- The prefix identifying one or more objects to which the rule applies
- {[key: string]: string}
- The tags associated with the bucket lifecycle
- transitions
Get
Object Bucket Lifecycle Rule Transition[] - Define when objects transition to another storage class
- abort_
incomplete_ intmultipart_ upload_ days - 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[Get
Object Bucket Lifecycle Rule Expiration] - Specifies a period in the object's expire
- id str
- The unique identifier of the bucket.
- prefix str
- The prefix identifying one or more objects to which the rule applies
- Mapping[str, str]
- The tags associated with the bucket lifecycle
- transitions
Sequence[Get
Object Bucket Lifecycle Rule Transition] - Define when objects transition to another storage class
- abort
Incomplete NumberMultipart Upload Days - 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 identifier of the bucket.
- prefix String
- The prefix identifying one or more objects to which the rule applies
- 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
- Storage
Class 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 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
- storage
Class 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
- storage
Class 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
- storage
Class 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.