Show / Hide Table of Contents

Class GetSpacesBuckets

Inheritance
System.Object
GetSpacesBuckets
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public static class GetSpacesBuckets

Methods

View Source

InvokeAsync(GetSpacesBucketsArgs, InvokeOptions)

Get information on Spaces buckets for use in other resources, with the ability to filter and sort the results. If no filters are specified, all Spaces buckets will be returned.

Note: You can use the digitalocean..SpacesBucket data source to obtain metadata about a single bucket if you already know its name and region.

{{% examples %}}

Example Usage

{{% example %}}

Use the filter block with a key string and values list to filter buckets.

Get all buckets in a region:

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var nyc3 = Output.Create(DigitalOcean.GetSpacesBuckets.InvokeAsync(new DigitalOcean.GetSpacesBucketsArgs
    {
        Filters = 
        {
            new DigitalOcean.Inputs.GetSpacesBucketsFilterArgs
            {
                Key = "region",
                Values = 
                {
                    "nyc3",
                },
            },
        },
    }));
}

}

You can sort the results as well:

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var nyc3 = Output.Create(DigitalOcean.GetSpacesBuckets.InvokeAsync(new DigitalOcean.GetSpacesBucketsArgs
    {
        Filters = 
        {
            new DigitalOcean.Inputs.GetSpacesBucketsFilterArgs
            {
                Key = "region",
                Values = 
                {
                    "nyc3",
                },
            },
        },
        Sorts = 
        {
            new DigitalOcean.Inputs.GetSpacesBucketsSortArgs
            {
                Direction = "desc",
                Key = "name",
            },
        },
    }));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetSpacesBucketsResult> InvokeAsync(GetSpacesBucketsArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetSpacesBucketsArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetSpacesBucketsResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.