GetSpacesBucketObjects
NOTE on
max_keys: Retrieving very large numbers of keys can adversely affect this provider’s performance.
The bucket-objects data source returns keys (i.e., file names) and other metadata about objects in a Spaces bucket.
Example Usage
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
class MyStack : Stack
{
public MyStack()
{
var myObjects = Output.Create(DigitalOcean.GetSpacesBucketObjects.InvokeAsync(new DigitalOcean.GetSpacesBucketObjectsArgs
{
Bucket = "ourcorp",
Region = "nyc3",
}));
var objectInfo = Output.Tuple(myObjects.Apply(myObjects => myObjects.Keys).Length, myObjects.Apply(myObjects => myObjects.Keys)[__index], myObjects, myObjects).Apply(values =>
{
var length = values.Item1;
var keys = values.Item2;
var myObjects = values.Item3;
var myObjects1 = values.Item4;
return "TODO: ForExpression";
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
my_objects = digitalocean.get_spaces_bucket_objects(bucket="ourcorp",
region="nyc3")
object_info = [digitalocean.get_spaces_bucket_object(key=my_objects.keys[__index],
bucket=my_objects.bucket,
region=my_objects.region) for __index in range(len(my_objects.keys))]import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const myObjects = digitalocean.getSpacesBucketObjects({
bucket: "ourcorp",
region: "nyc3",
});
const objectInfo = Promise.all([myObjects.then(myObjects => myObjects.keys).length, myObjects.then(myObjects => myObjects.keys)[__index], myObjects, myObjects]).then(([length, keys, myObjects, myObjects1]) => .map(__index => digitalocean.getSpacesBucketObject({
key: keys,
bucket: myObjects.bucket,
region: myObjects1.region,
})));Using GetSpacesBucketObjects
function getSpacesBucketObjects(args: GetSpacesBucketObjectsArgs, opts?: InvokeOptions): Promise<GetSpacesBucketObjectsResult>function get_spaces_bucket_objects(bucket=None, delimiter=None, encoding_type=None, max_keys=None, prefix=None, region=None, opts=None)func GetSpacesBucketObjects(ctx *Context, args *GetSpacesBucketObjectsArgs, opts ...InvokeOption) (*GetSpacesBucketObjectsResult, error)public static class GetSpacesBucketObjects {
public static Task<GetSpacesBucketObjectsResult> InvokeAsync(GetSpacesBucketObjectsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Bucket string
Lists object keys in this Spaces bucket
- Region string
The slug of the region where the bucket is stored.
- Delimiter string
A character used to group keys (Default: none)
- Encoding
Type string Encodes keys using this method (Default: none; besides none, only “url” can be used)
- Max
Keys int Maximum object keys to return (Default: 1000)
- Prefix string
Limits results to object keys with this prefix (Default: none)
- Bucket string
Lists object keys in this Spaces bucket
- Region string
The slug of the region where the bucket is stored.
- Delimiter string
A character used to group keys (Default: none)
- Encoding
Type string Encodes keys using this method (Default: none; besides none, only “url” can be used)
- Max
Keys int Maximum object keys to return (Default: 1000)
- Prefix string
Limits results to object keys with this prefix (Default: none)
- bucket string
Lists object keys in this Spaces bucket
- region string
The slug of the region where the bucket is stored.
- delimiter string
A character used to group keys (Default: none)
- encoding
Type string Encodes keys using this method (Default: none; besides none, only “url” can be used)
- max
Keys number Maximum object keys to return (Default: 1000)
- prefix string
Limits results to object keys with this prefix (Default: none)
- bucket str
Lists object keys in this Spaces bucket
- region str
The slug of the region where the bucket is stored.
- delimiter str
A character used to group keys (Default: none)
- encoding_
type str Encodes keys using this method (Default: none; besides none, only “url” can be used)
- max_
keys float Maximum object keys to return (Default: 1000)
- prefix str
Limits results to object keys with this prefix (Default: none)
GetSpacesBucketObjects Result
The following output properties are available:
- Bucket string
- Common
Prefixes List<string> List of any keys between
prefixand the next occurrence ofdelimiter(i.e., similar to subdirectories of theprefix“directory”); the list is only returned when you specifydelimiter- Id string
The provider-assigned unique ID for this managed resource.
- Keys List<string>
List of strings representing object keys
- Owners List<string>
List of strings representing object owner IDs
- Region string
- Delimiter string
- Encoding
Type string - Max
Keys int - Prefix string
- Bucket string
- Common
Prefixes []string List of any keys between
prefixand the next occurrence ofdelimiter(i.e., similar to subdirectories of theprefix“directory”); the list is only returned when you specifydelimiter- Id string
The provider-assigned unique ID for this managed resource.
- Keys []string
List of strings representing object keys
- Owners []string
List of strings representing object owner IDs
- Region string
- Delimiter string
- Encoding
Type string - Max
Keys int - Prefix string
- bucket string
- common
Prefixes string[] List of any keys between
prefixand the next occurrence ofdelimiter(i.e., similar to subdirectories of theprefix“directory”); the list is only returned when you specifydelimiter- id string
The provider-assigned unique ID for this managed resource.
- keys string[]
List of strings representing object keys
- owners string[]
List of strings representing object owner IDs
- region string
- delimiter string
- encoding
Type string - max
Keys number - prefix string
- bucket str
- common_
prefixes List[str] List of any keys between
prefixand the next occurrence ofdelimiter(i.e., similar to subdirectories of theprefix“directory”); the list is only returned when you specifydelimiter- id str
The provider-assigned unique ID for this managed resource.
- keys List[str]
List of strings representing object keys
- owners List[str]
List of strings representing object owner IDs
- region str
- delimiter str
- encoding_
type str - max_
keys float - prefix str
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.