1. Packages
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. StorageObjectStorageBucket
Viewing docs for gcore 2.0.0-alpha.8
published on Wednesday, May 20, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.8
published on Wednesday, May 20, 2026 by g-core

    Create StorageObjectStorageBucket Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StorageObjectStorageBucket(name: string, args: StorageObjectStorageBucketArgs, opts?: CustomResourceOptions);
    @overload
    def StorageObjectStorageBucket(resource_name: str,
                                   args: StorageObjectStorageBucketArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def StorageObjectStorageBucket(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   storage_id: Optional[float] = None,
                                   cors: Optional[StorageObjectStorageBucketCorsArgs] = None,
                                   name: Optional[str] = None,
                                   policy: Optional[StorageObjectStorageBucketPolicyArgs] = None,
                                   storage_object_storage_bucket_lifecycle: Optional[StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs] = None)
    func NewStorageObjectStorageBucket(ctx *Context, name string, args StorageObjectStorageBucketArgs, opts ...ResourceOption) (*StorageObjectStorageBucket, error)
    public StorageObjectStorageBucket(string name, StorageObjectStorageBucketArgs args, CustomResourceOptions? opts = null)
    public StorageObjectStorageBucket(String name, StorageObjectStorageBucketArgs args)
    public StorageObjectStorageBucket(String name, StorageObjectStorageBucketArgs args, CustomResourceOptions options)
    
    type: gcore:StorageObjectStorageBucket
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcore_storageobjectstoragebucket" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args StorageObjectStorageBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args StorageObjectStorageBucketArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args StorageObjectStorageBucketArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args StorageObjectStorageBucketArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args StorageObjectStorageBucketArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var storageObjectStorageBucketResource = new Gcore.StorageObjectStorageBucket("storageObjectStorageBucketResource", new()
    {
        StorageId = 0,
        Cors = new Gcore.Inputs.StorageObjectStorageBucketCorsArgs
        {
            AllowedOrigins = new[]
            {
                "string",
            },
        },
        Name = "string",
        Policy = new Gcore.Inputs.StorageObjectStorageBucketPolicyArgs
        {
            IsPublic = false,
        },
        StorageObjectStorageBucketLifecycle = new Gcore.Inputs.StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs
        {
            ExpirationDays = 0,
        },
    });
    
    example, err := gcore.NewStorageObjectStorageBucket(ctx, "storageObjectStorageBucketResource", &gcore.StorageObjectStorageBucketArgs{
    	StorageId: pulumi.Float64(0),
    	Cors: &gcore.StorageObjectStorageBucketCorsArgs{
    		AllowedOrigins: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	Policy: &gcore.StorageObjectStorageBucketPolicyArgs{
    		IsPublic: pulumi.Bool(false),
    	},
    	StorageObjectStorageBucketLifecycle: &gcore.StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs{
    		ExpirationDays: pulumi.Float64(0),
    	},
    })
    
    resource "gcore_storageobjectstoragebucket" "storageObjectStorageBucketResource" {
      storage_id = 0
      cors = {
        allowed_origins = ["string"]
      }
      name = "string"
      policy = {
        is_public = false
      }
      storage_object_storage_bucket_lifecycle = {
        expiration_days = 0
      }
    }
    
    var storageObjectStorageBucketResource = new StorageObjectStorageBucket("storageObjectStorageBucketResource", StorageObjectStorageBucketArgs.builder()
        .storageId(0.0)
        .cors(StorageObjectStorageBucketCorsArgs.builder()
            .allowedOrigins("string")
            .build())
        .name("string")
        .policy(StorageObjectStorageBucketPolicyArgs.builder()
            .isPublic(false)
            .build())
        .storageObjectStorageBucketLifecycle(StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs.builder()
            .expirationDays(0.0)
            .build())
        .build());
    
    storage_object_storage_bucket_resource = gcore.StorageObjectStorageBucket("storageObjectStorageBucketResource",
        storage_id=float(0),
        cors={
            "allowed_origins": ["string"],
        },
        name="string",
        policy={
            "is_public": False,
        },
        storage_object_storage_bucket_lifecycle={
            "expiration_days": float(0),
        })
    
    const storageObjectStorageBucketResource = new gcore.StorageObjectStorageBucket("storageObjectStorageBucketResource", {
        storageId: 0,
        cors: {
            allowedOrigins: ["string"],
        },
        name: "string",
        policy: {
            isPublic: false,
        },
        storageObjectStorageBucketLifecycle: {
            expirationDays: 0,
        },
    });
    
    type: gcore:StorageObjectStorageBucket
    properties:
        cors:
            allowedOrigins:
                - string
        name: string
        policy:
            isPublic: false
        storageId: 0
        storageObjectStorageBucketLifecycle:
            expirationDays: 0
    

    StorageObjectStorageBucket Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The StorageObjectStorageBucket resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the StorageObjectStorageBucket resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing StorageObjectStorageBucket Resource

    Get an existing StorageObjectStorageBucket resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: StorageObjectStorageBucketState, opts?: CustomResourceOptions): StorageObjectStorageBucket
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cors: Optional[StorageObjectStorageBucketCorsArgs] = None,
            name: Optional[str] = None,
            policy: Optional[StorageObjectStorageBucketPolicyArgs] = None,
            storage_id: Optional[float] = None,
            storage_object_storage_bucket_lifecycle: Optional[StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs] = None) -> StorageObjectStorageBucket
    func GetStorageObjectStorageBucket(ctx *Context, name string, id IDInput, state *StorageObjectStorageBucketState, opts ...ResourceOption) (*StorageObjectStorageBucket, error)
    public static StorageObjectStorageBucket Get(string name, Input<string> id, StorageObjectStorageBucketState? state, CustomResourceOptions? opts = null)
    public static StorageObjectStorageBucket get(String name, Output<String> id, StorageObjectStorageBucketState state, CustomResourceOptions options)
    resources:  _:    type: gcore:StorageObjectStorageBucket    get:      id: ${id}
    import {
      to = gcore_storageobjectstoragebucket.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:

    Supporting Types

    StorageObjectStorageBucketCors, StorageObjectStorageBucketCorsArgs

    AllowedOrigins List<string>
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    AllowedOrigins []string
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    allowed_origins list(string)
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    allowedOrigins List<String>
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    allowedOrigins string[]
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    allowed_origins Sequence[str]
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.
    allowedOrigins List<String>
    Web domains allowed to make direct browser requests. Send an empty array to remove CORS configuration.

    StorageObjectStorageBucketPolicy, StorageObjectStorageBucketPolicyArgs

    IsPublic bool
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    IsPublic bool
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    is_public bool
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    isPublic Boolean
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    isPublic boolean
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    is_public bool
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.
    isPublic Boolean
    Set to true to allow unauthenticated object downloads, false to require valid S3 credentials.

    StorageObjectStorageBucketStorageObjectStorageBucketLifecycle, StorageObjectStorageBucketStorageObjectStorageBucketLifecycleArgs

    ExpirationDays double
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    ExpirationDays float64
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    expiration_days number
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    expirationDays Double
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    expirationDays number
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    expiration_days float
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.
    expirationDays Number
    Days before objects are automatically deleted. Set to a positive number to enable, or null/0 to remove the rule.

    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.8
    published on Wednesday, May 20, 2026 by g-core

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial