1. Packages
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. getStorageObjectStorageBuckets
Viewing docs for gcore 2.0.0-alpha.12
published on Monday, Jul 6, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.12
published on Monday, Jul 6, 2026 by g-core

    Buckets are containers within object storage that hold files (objects) and define their CORS, lifecycle, and access policy configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleStorageObjectStorageBuckets = gcore.getStorageObjectStorageBuckets({
        storageId: 0,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_storage_object_storage_buckets = gcore.get_storage_object_storage_buckets(storage_id=0)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.GetStorageObjectStorageBuckets(ctx, &gcore.GetStorageObjectStorageBucketsArgs{
    			StorageId: 0,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleStorageObjectStorageBuckets = Gcore.GetStorageObjectStorageBuckets.Invoke(new()
        {
            StorageId = 0,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetStorageObjectStorageBucketsArgs;
    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 exampleStorageObjectStorageBuckets = GcoreFunctions.getStorageObjectStorageBuckets(GetStorageObjectStorageBucketsArgs.builder()
                .storageId(0)
                .build());
    
        }
    }
    
    variables:
      exampleStorageObjectStorageBuckets:
        fn::invoke:
          function: gcore:getStorageObjectStorageBuckets
          arguments:
            storageId: 0
    
    Example coming soon!
    

    Using getStorageObjectStorageBuckets

    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 getStorageObjectStorageBuckets(args: GetStorageObjectStorageBucketsArgs, opts?: InvokeOptions): Promise<GetStorageObjectStorageBucketsResult>
    function getStorageObjectStorageBucketsOutput(args: GetStorageObjectStorageBucketsOutputArgs, opts?: InvokeOptions): Output<GetStorageObjectStorageBucketsResult>
    def get_storage_object_storage_buckets(max_items: Optional[float] = None,
                                           storage_id: Optional[float] = None,
                                           opts: Optional[InvokeOptions] = None) -> GetStorageObjectStorageBucketsResult
    def get_storage_object_storage_buckets_output(max_items: pulumi.Input[Optional[float]] = None,
                                           storage_id: pulumi.Input[Optional[float]] = None,
                                           opts: Optional[InvokeOptions] = None) -> Output[GetStorageObjectStorageBucketsResult]
    func GetStorageObjectStorageBuckets(ctx *Context, args *GetStorageObjectStorageBucketsArgs, opts ...InvokeOption) (*GetStorageObjectStorageBucketsResult, error)
    func GetStorageObjectStorageBucketsOutput(ctx *Context, args *GetStorageObjectStorageBucketsOutputArgs, opts ...InvokeOption) GetStorageObjectStorageBucketsResultOutput

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

    public static class GetStorageObjectStorageBuckets 
    {
        public static Task<GetStorageObjectStorageBucketsResult> InvokeAsync(GetStorageObjectStorageBucketsArgs args, InvokeOptions? opts = null)
        public static Output<GetStorageObjectStorageBucketsResult> Invoke(GetStorageObjectStorageBucketsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageObjectStorageBucketsResult> getStorageObjectStorageBuckets(GetStorageObjectStorageBucketsArgs args, InvokeOptions options)
    public static Output<GetStorageObjectStorageBucketsResult> getStorageObjectStorageBuckets(GetStorageObjectStorageBucketsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getStorageObjectStorageBuckets:getStorageObjectStorageBuckets
      arguments:
        # arguments dictionary
    data "gcore_getstorageobjectstoragebuckets" "name" {
        # arguments
    }

    The following arguments are supported:

    StorageId double
    MaxItems double
    Max items to fetch, default: 1000
    StorageId float64
    MaxItems float64
    Max items to fetch, default: 1000
    storage_id number
    max_items number
    Max items to fetch, default: 1000
    storageId Double
    maxItems Double
    Max items to fetch, default: 1000
    storageId number
    maxItems number
    Max items to fetch, default: 1000
    storage_id float
    max_items float
    Max items to fetch, default: 1000
    storageId Number
    maxItems Number
    Max items to fetch, default: 1000

    getStorageObjectStorageBuckets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetStorageObjectStorageBucketsItem>
    The items returned by the data source
    StorageId double
    MaxItems double
    Max items to fetch, default: 1000
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetStorageObjectStorageBucketsItem
    The items returned by the data source
    StorageId float64
    MaxItems float64
    Max items to fetch, default: 1000
    id string
    The provider-assigned unique ID for this managed resource.
    items list(object)
    The items returned by the data source
    storage_id number
    max_items number
    Max items to fetch, default: 1000
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetStorageObjectStorageBucketsItem>
    The items returned by the data source
    storageId Double
    maxItems Double
    Max items to fetch, default: 1000
    id string
    The provider-assigned unique ID for this managed resource.
    items GetStorageObjectStorageBucketsItem[]
    The items returned by the data source
    storageId number
    maxItems number
    Max items to fetch, default: 1000
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[GetStorageObjectStorageBucketsItem]
    The items returned by the data source
    storage_id float
    max_items float
    Max items to fetch, default: 1000
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The items returned by the data source
    storageId Number
    maxItems Number
    Max items to fetch, default: 1000

    Supporting Types

    GetStorageObjectStorageBucketsItem

    Cors GetStorageObjectStorageBucketsItemCors
    Name string
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    Policy GetStorageObjectStorageBucketsItemPolicy
    StorageId double
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    StorageObjectStorageBucketLifecycle GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle
    Cors GetStorageObjectStorageBucketsItemCors
    Name string
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    Policy GetStorageObjectStorageBucketsItemPolicy
    StorageId float64
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    StorageObjectStorageBucketLifecycle GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle
    cors object
    name string
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    policy object
    storage_id number
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    storage_object_storage_bucket_lifecycle object
    cors GetStorageObjectStorageBucketsItemCors
    name String
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    policy GetStorageObjectStorageBucketsItemPolicy
    storageId Double
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    storageObjectStorageBucketLifecycle GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle
    cors GetStorageObjectStorageBucketsItemCors
    name string
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    policy GetStorageObjectStorageBucketsItemPolicy
    storageId number
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    storageObjectStorageBucketLifecycle GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle
    cors GetStorageObjectStorageBucketsItemCors
    name str
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    policy GetStorageObjectStorageBucketsItemPolicy
    storage_id float
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    storage_object_storage_bucket_lifecycle GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle
    cors Property Map
    name String
    Globally unique bucket name within the storage. Used as the path prefix when accessing objects via S3 API.
    policy Property Map
    storageId Number
    Parent storage this bucket belongs to. Use this ID in the URL path for bucket operations.
    storageObjectStorageBucketLifecycle Property Map

    GetStorageObjectStorageBucketsItemCors

    AllowedOrigins List<string>
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    AllowedOrigins []string
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    allowed_origins list(string)
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    allowedOrigins List<String>
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    allowedOrigins string[]
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    allowed_origins Sequence[str]
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.
    allowedOrigins List<String>
    Web domains allowed to make direct browser requests to this bucket (e.g., "https://myapp.com"). Use "*" to allow any origin.

    GetStorageObjectStorageBucketsItemPolicy

    IsPublic bool
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    IsPublic bool
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    is_public bool
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    isPublic Boolean
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    isPublic boolean
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    is_public bool
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.
    isPublic Boolean
    When true, anyone can download objects without credentials. When false, all requests require valid S3 authentication.

    GetStorageObjectStorageBucketsItemStorageObjectStorageBucketLifecycle

    ExpirationDays double
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    ExpirationDays float64
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    expiration_days number
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    expirationDays Double
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    expirationDays number
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    expiration_days float
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.
    expirationDays Number
    Days after upload before objects are automatically deleted. For example, 30 means files are removed 30 days after creation.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    Viewing docs for gcore 2.0.0-alpha.12
    published on Monday, Jul 6, 2026 by g-core

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial