digitalocean.SpacesBucket
Explore with Pulumi AI
Provides a bucket resource for Spaces, DigitalOcean’s object storage product.
The Spaces API was designed to be interoperable with Amazon’s AWS S3 API. This allows users to interact with the service while using the tools they already know. Spaces mirrors S3’s authentication framework and requests to Spaces require a key pair similar to Amazon’s Access ID and Secret Key.
The authentication requirement can be met by either setting the
SPACES_ACCESS_KEY_ID
and SPACES_SECRET_ACCESS_KEY
environment variables or
the provider’s spaces_access_id
and spaces_secret_key
arguments to the
access ID and secret you generate via the DigitalOcean control panel. For
example:
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const static_assets = new digitalocean.SpacesBucket("static-assets", {});
import pulumi
import pulumi_digitalocean as digitalocean
static_assets = digitalocean.SpacesBucket("static-assets")
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := digitalocean.NewSpacesBucket(ctx, "static-assets", nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var static_assets = new DigitalOcean.SpacesBucket("static-assets");
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.SpacesBucket;
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 static_assets = new SpacesBucket("static-assets");
}
}
resources:
static-assets:
type: digitalocean:SpacesBucket
For more information, See An Introduction to DigitalOcean Spaces
Example Usage
Create a New Bucket
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const foobar = new digitalocean.SpacesBucket("foobar", {
name: "foobar",
region: digitalocean.Region.NYC3,
});
import pulumi
import pulumi_digitalocean as digitalocean
foobar = digitalocean.SpacesBucket("foobar",
name="foobar",
region=digitalocean.Region.NYC3)
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := digitalocean.NewSpacesBucket(ctx, "foobar", &digitalocean.SpacesBucketArgs{
Name: pulumi.String("foobar"),
Region: pulumi.String(digitalocean.RegionNYC3),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var foobar = new DigitalOcean.SpacesBucket("foobar", new()
{
Name = "foobar",
Region = DigitalOcean.Region.NYC3,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.SpacesBucket;
import com.pulumi.digitalocean.SpacesBucketArgs;
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 foobar = new SpacesBucket("foobar", SpacesBucketArgs.builder()
.name("foobar")
.region("nyc3")
.build());
}
}
resources:
foobar:
type: digitalocean:SpacesBucket
properties:
name: foobar
region: nyc3
Create a New Bucket With CORS Rules
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const foobar = new digitalocean.SpacesBucket("foobar", {
name: "foobar",
region: digitalocean.Region.NYC3,
corsRules: [
{
allowedHeaders: ["*"],
allowedMethods: ["GET"],
allowedOrigins: ["*"],
maxAgeSeconds: 3000,
},
{
allowedHeaders: ["*"],
allowedMethods: [
"PUT",
"POST",
"DELETE",
],
allowedOrigins: ["https://www.example.com"],
maxAgeSeconds: 3000,
},
],
});
import pulumi
import pulumi_digitalocean as digitalocean
foobar = digitalocean.SpacesBucket("foobar",
name="foobar",
region=digitalocean.Region.NYC3,
cors_rules=[
digitalocean.SpacesBucketCorsRuleArgs(
allowed_headers=["*"],
allowed_methods=["GET"],
allowed_origins=["*"],
max_age_seconds=3000,
),
digitalocean.SpacesBucketCorsRuleArgs(
allowed_headers=["*"],
allowed_methods=[
"PUT",
"POST",
"DELETE",
],
allowed_origins=["https://www.example.com"],
max_age_seconds=3000,
),
])
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := digitalocean.NewSpacesBucket(ctx, "foobar", &digitalocean.SpacesBucketArgs{
Name: pulumi.String("foobar"),
Region: pulumi.String(digitalocean.RegionNYC3),
CorsRules: digitalocean.SpacesBucketCorsRuleArray{
&digitalocean.SpacesBucketCorsRuleArgs{
AllowedHeaders: pulumi.StringArray{
pulumi.String("*"),
},
AllowedMethods: pulumi.StringArray{
pulumi.String("GET"),
},
AllowedOrigins: pulumi.StringArray{
pulumi.String("*"),
},
MaxAgeSeconds: pulumi.Int(3000),
},
&digitalocean.SpacesBucketCorsRuleArgs{
AllowedHeaders: pulumi.StringArray{
pulumi.String("*"),
},
AllowedMethods: pulumi.StringArray{
pulumi.String("PUT"),
pulumi.String("POST"),
pulumi.String("DELETE"),
},
AllowedOrigins: pulumi.StringArray{
pulumi.String("https://www.example.com"),
},
MaxAgeSeconds: pulumi.Int(3000),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var foobar = new DigitalOcean.SpacesBucket("foobar", new()
{
Name = "foobar",
Region = DigitalOcean.Region.NYC3,
CorsRules = new[]
{
new DigitalOcean.Inputs.SpacesBucketCorsRuleArgs
{
AllowedHeaders = new[]
{
"*",
},
AllowedMethods = new[]
{
"GET",
},
AllowedOrigins = new[]
{
"*",
},
MaxAgeSeconds = 3000,
},
new DigitalOcean.Inputs.SpacesBucketCorsRuleArgs
{
AllowedHeaders = new[]
{
"*",
},
AllowedMethods = new[]
{
"PUT",
"POST",
"DELETE",
},
AllowedOrigins = new[]
{
"https://www.example.com",
},
MaxAgeSeconds = 3000,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.SpacesBucket;
import com.pulumi.digitalocean.SpacesBucketArgs;
import com.pulumi.digitalocean.inputs.SpacesBucketCorsRuleArgs;
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 foobar = new SpacesBucket("foobar", SpacesBucketArgs.builder()
.name("foobar")
.region("nyc3")
.corsRules(
SpacesBucketCorsRuleArgs.builder()
.allowedHeaders("*")
.allowedMethods("GET")
.allowedOrigins("*")
.maxAgeSeconds(3000)
.build(),
SpacesBucketCorsRuleArgs.builder()
.allowedHeaders("*")
.allowedMethods(
"PUT",
"POST",
"DELETE")
.allowedOrigins("https://www.example.com")
.maxAgeSeconds(3000)
.build())
.build());
}
}
resources:
foobar:
type: digitalocean:SpacesBucket
properties:
name: foobar
region: nyc3
corsRules:
- allowedHeaders:
- '*'
allowedMethods:
- GET
allowedOrigins:
- '*'
maxAgeSeconds: 3000
- allowedHeaders:
- '*'
allowedMethods:
- PUT
- POST
- DELETE
allowedOrigins:
- https://www.example.com
maxAgeSeconds: 3000
Create SpacesBucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SpacesBucket(name: string, args?: SpacesBucketArgs, opts?: CustomResourceOptions);
@overload
def SpacesBucket(resource_name: str,
args: Optional[SpacesBucketArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SpacesBucket(resource_name: str,
opts: Optional[ResourceOptions] = None,
acl: Optional[str] = None,
cors_rules: Optional[Sequence[SpacesBucketCorsRuleArgs]] = None,
force_destroy: Optional[bool] = None,
lifecycle_rules: Optional[Sequence[SpacesBucketLifecycleRuleArgs]] = None,
name: Optional[str] = None,
region: Optional[Union[str, Region]] = None,
versioning: Optional[SpacesBucketVersioningArgs] = None)
func NewSpacesBucket(ctx *Context, name string, args *SpacesBucketArgs, opts ...ResourceOption) (*SpacesBucket, error)
public SpacesBucket(string name, SpacesBucketArgs? args = null, CustomResourceOptions? opts = null)
public SpacesBucket(String name, SpacesBucketArgs args)
public SpacesBucket(String name, SpacesBucketArgs args, CustomResourceOptions options)
type: digitalocean:SpacesBucket
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SpacesBucketArgs
- 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 SpacesBucketArgs
- 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 SpacesBucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SpacesBucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SpacesBucketArgs
- 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 spacesBucketResource = new DigitalOcean.SpacesBucket("spacesBucketResource", new()
{
Acl = "string",
ForceDestroy = false,
LifecycleRules = new[]
{
new DigitalOcean.Inputs.SpacesBucketLifecycleRuleArgs
{
Enabled = false,
AbortIncompleteMultipartUploadDays = 0,
Expiration = new DigitalOcean.Inputs.SpacesBucketLifecycleRuleExpirationArgs
{
Date = "string",
Days = 0,
ExpiredObjectDeleteMarker = false,
},
Id = "string",
NoncurrentVersionExpiration = new DigitalOcean.Inputs.SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs
{
Days = 0,
},
Prefix = "string",
},
},
Name = "string",
Region = "string",
Versioning = new DigitalOcean.Inputs.SpacesBucketVersioningArgs
{
Enabled = false,
},
});
example, err := digitalocean.NewSpacesBucket(ctx, "spacesBucketResource", &digitalocean.SpacesBucketArgs{
Acl: pulumi.String("string"),
ForceDestroy: pulumi.Bool(false),
LifecycleRules: digitalocean.SpacesBucketLifecycleRuleArray{
&digitalocean.SpacesBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(false),
AbortIncompleteMultipartUploadDays: pulumi.Int(0),
Expiration: &digitalocean.SpacesBucketLifecycleRuleExpirationArgs{
Date: pulumi.String("string"),
Days: pulumi.Int(0),
ExpiredObjectDeleteMarker: pulumi.Bool(false),
},
Id: pulumi.String("string"),
NoncurrentVersionExpiration: &digitalocean.SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs{
Days: pulumi.Int(0),
},
Prefix: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Versioning: &digitalocean.SpacesBucketVersioningArgs{
Enabled: pulumi.Bool(false),
},
})
var spacesBucketResource = new SpacesBucket("spacesBucketResource", SpacesBucketArgs.builder()
.acl("string")
.forceDestroy(false)
.lifecycleRules(SpacesBucketLifecycleRuleArgs.builder()
.enabled(false)
.abortIncompleteMultipartUploadDays(0)
.expiration(SpacesBucketLifecycleRuleExpirationArgs.builder()
.date("string")
.days(0)
.expiredObjectDeleteMarker(false)
.build())
.id("string")
.noncurrentVersionExpiration(SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs.builder()
.days(0)
.build())
.prefix("string")
.build())
.name("string")
.region("string")
.versioning(SpacesBucketVersioningArgs.builder()
.enabled(false)
.build())
.build());
spaces_bucket_resource = digitalocean.SpacesBucket("spacesBucketResource",
acl="string",
force_destroy=False,
lifecycle_rules=[digitalocean.SpacesBucketLifecycleRuleArgs(
enabled=False,
abort_incomplete_multipart_upload_days=0,
expiration=digitalocean.SpacesBucketLifecycleRuleExpirationArgs(
date="string",
days=0,
expired_object_delete_marker=False,
),
id="string",
noncurrent_version_expiration=digitalocean.SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs(
days=0,
),
prefix="string",
)],
name="string",
region="string",
versioning=digitalocean.SpacesBucketVersioningArgs(
enabled=False,
))
const spacesBucketResource = new digitalocean.SpacesBucket("spacesBucketResource", {
acl: "string",
forceDestroy: false,
lifecycleRules: [{
enabled: false,
abortIncompleteMultipartUploadDays: 0,
expiration: {
date: "string",
days: 0,
expiredObjectDeleteMarker: false,
},
id: "string",
noncurrentVersionExpiration: {
days: 0,
},
prefix: "string",
}],
name: "string",
region: "string",
versioning: {
enabled: false,
},
});
type: digitalocean:SpacesBucket
properties:
acl: string
forceDestroy: false
lifecycleRules:
- abortIncompleteMultipartUploadDays: 0
enabled: false
expiration:
date: string
days: 0
expiredObjectDeleteMarker: false
id: string
noncurrentVersionExpiration:
days: 0
prefix: string
name: string
region: string
versioning:
enabled: false
SpacesBucket Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SpacesBucket resource accepts the following input properties:
- Acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - Cors
Rules List<Pulumi.Digital Ocean. Inputs. Spaces Bucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - Lifecycle
Rules List<Pulumi.Digital Ocean. Inputs. Spaces Bucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- Name string
- The name of the bucket
- Region
string | Pulumi.
Digital Ocean. Region - The region where the bucket resides (Defaults to
nyc3
) - Versioning
Pulumi.
Digital Ocean. Inputs. Spaces Bucket Versioning - A state of versioning (documented below)
- Acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - Cors
Rules []SpacesBucket Cors Rule Args - A rule of Cross-Origin Resource Sharing (documented below).
- Force
Destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - Lifecycle
Rules []SpacesBucket Lifecycle Rule Args - A configuration of object lifecycle management (documented below).
- Name string
- The name of the bucket
- Region string | Region
- The region where the bucket resides (Defaults to
nyc3
) - Versioning
Spaces
Bucket Versioning Args - A state of versioning (documented below)
- acl String
- Canned ACL applied on bucket creation (
private
orpublic-read
) - cors
Rules List<SpacesBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules List<SpacesBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- name String
- The name of the bucket
- region String | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning - A state of versioning (documented below)
- acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - cors
Rules SpacesBucket Cors Rule[] - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules SpacesBucket Lifecycle Rule[] - A configuration of object lifecycle management (documented below).
- name string
- The name of the bucket
- region string | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning - A state of versioning (documented below)
- acl str
- Canned ACL applied on bucket creation (
private
orpublic-read
) - cors_
rules Sequence[SpacesBucket Cors Rule Args] - A rule of Cross-Origin Resource Sharing (documented below).
- force_
destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle_
rules Sequence[SpacesBucket Lifecycle Rule Args] - A configuration of object lifecycle management (documented below).
- name str
- The name of the bucket
- region str | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning Args - A state of versioning (documented below)
- acl String
- Canned ACL applied on bucket creation (
private
orpublic-read
) - cors
Rules List<Property Map> - A rule of Cross-Origin Resource Sharing (documented below).
- force
Destroy Boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules List<Property Map> - A configuration of object lifecycle management (documented below).
- name String
- The name of the bucket
- region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
- The region where the bucket resides (Defaults to
nyc3
) - versioning Property Map
- A state of versioning (documented below)
Outputs
All input properties are implicitly available as output properties. Additionally, the SpacesBucket resource produces the following output properties:
- Bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- Bucket
Urn string - The uniform resource name for the bucket
- Endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- Id string
- The provider-assigned unique ID for this managed resource.
- Bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- Bucket
Urn string - The uniform resource name for the bucket
- Endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- Id string
- The provider-assigned unique ID for this managed resource.
- bucket
Domain StringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn String - The uniform resource name for the bucket
- endpoint String
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- id String
- The provider-assigned unique ID for this managed resource.
- bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn string - The uniform resource name for the bucket
- endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- id string
- The provider-assigned unique ID for this managed resource.
- bucket_
domain_ strname - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket_
urn str - The uniform resource name for the bucket
- endpoint str
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- id str
- The provider-assigned unique ID for this managed resource.
- bucket
Domain StringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn String - The uniform resource name for the bucket
- endpoint String
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SpacesBucket Resource
Get an existing SpacesBucket 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?: SpacesBucketState, opts?: CustomResourceOptions): SpacesBucket
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
acl: Optional[str] = None,
bucket_domain_name: Optional[str] = None,
bucket_urn: Optional[str] = None,
cors_rules: Optional[Sequence[SpacesBucketCorsRuleArgs]] = None,
endpoint: Optional[str] = None,
force_destroy: Optional[bool] = None,
lifecycle_rules: Optional[Sequence[SpacesBucketLifecycleRuleArgs]] = None,
name: Optional[str] = None,
region: Optional[Union[str, Region]] = None,
versioning: Optional[SpacesBucketVersioningArgs] = None) -> SpacesBucket
func GetSpacesBucket(ctx *Context, name string, id IDInput, state *SpacesBucketState, opts ...ResourceOption) (*SpacesBucket, error)
public static SpacesBucket Get(string name, Input<string> id, SpacesBucketState? state, CustomResourceOptions? opts = null)
public static SpacesBucket get(String name, Output<String> id, SpacesBucketState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - Bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- Bucket
Urn string - The uniform resource name for the bucket
- Cors
Rules List<Pulumi.Digital Ocean. Inputs. Spaces Bucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- Endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- Force
Destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - Lifecycle
Rules List<Pulumi.Digital Ocean. Inputs. Spaces Bucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- Name string
- The name of the bucket
- Region
string | Pulumi.
Digital Ocean. Region - The region where the bucket resides (Defaults to
nyc3
) - Versioning
Pulumi.
Digital Ocean. Inputs. Spaces Bucket Versioning - A state of versioning (documented below)
- Acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - Bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- Bucket
Urn string - The uniform resource name for the bucket
- Cors
Rules []SpacesBucket Cors Rule Args - A rule of Cross-Origin Resource Sharing (documented below).
- Endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- Force
Destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - Lifecycle
Rules []SpacesBucket Lifecycle Rule Args - A configuration of object lifecycle management (documented below).
- Name string
- The name of the bucket
- Region string | Region
- The region where the bucket resides (Defaults to
nyc3
) - Versioning
Spaces
Bucket Versioning Args - A state of versioning (documented below)
- acl String
- Canned ACL applied on bucket creation (
private
orpublic-read
) - bucket
Domain StringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn String - The uniform resource name for the bucket
- cors
Rules List<SpacesBucket Cors Rule> - A rule of Cross-Origin Resource Sharing (documented below).
- endpoint String
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- force
Destroy Boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules List<SpacesBucket Lifecycle Rule> - A configuration of object lifecycle management (documented below).
- name String
- The name of the bucket
- region String | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning - A state of versioning (documented below)
- acl string
- Canned ACL applied on bucket creation (
private
orpublic-read
) - bucket
Domain stringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn string - The uniform resource name for the bucket
- cors
Rules SpacesBucket Cors Rule[] - A rule of Cross-Origin Resource Sharing (documented below).
- endpoint string
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- force
Destroy boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules SpacesBucket Lifecycle Rule[] - A configuration of object lifecycle management (documented below).
- name string
- The name of the bucket
- region string | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning - A state of versioning (documented below)
- acl str
- Canned ACL applied on bucket creation (
private
orpublic-read
) - bucket_
domain_ strname - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket_
urn str - The uniform resource name for the bucket
- cors_
rules Sequence[SpacesBucket Cors Rule Args] - A rule of Cross-Origin Resource Sharing (documented below).
- endpoint str
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- force_
destroy bool - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle_
rules Sequence[SpacesBucket Lifecycle Rule Args] - A configuration of object lifecycle management (documented below).
- name str
- The name of the bucket
- region str | Region
- The region where the bucket resides (Defaults to
nyc3
) - versioning
Spaces
Bucket Versioning Args - A state of versioning (documented below)
- acl String
- Canned ACL applied on bucket creation (
private
orpublic-read
) - bucket
Domain StringName - The FQDN of the bucket (e.g. bucket-name.nyc3.digitaloceanspaces.com)
- bucket
Urn String - The uniform resource name for the bucket
- cors
Rules List<Property Map> - A rule of Cross-Origin Resource Sharing (documented below).
- endpoint String
- The FQDN of the bucket without the bucket name (e.g. nyc3.digitaloceanspaces.com)
- force
Destroy Boolean - Unless
true
, the bucket will only be destroyed if empty (Defaults tofalse
) - lifecycle
Rules List<Property Map> - A configuration of object lifecycle management (documented below).
- name String
- The name of the bucket
- region String | "nyc1" | "nyc2" | "nyc3" | "sgp1" | "lon1" | "ams2" | "ams3" | "fra1" | "tor1" | "sfo1" | "sfo2" | "sfo3" | "blr1" | "syd1"
- The region where the bucket resides (Defaults to
nyc3
) - versioning Property Map
- A state of versioning (documented below)
Supporting Types
Region, RegionArgs
- NYC1
- nyc1
- NYC2
- nyc2
- NYC3
- nyc3
- SGP1
- sgp1
- LON1
- lon1
- AMS2
- ams2
- AMS3
- ams3
- FRA1
- fra1
- TOR1
- tor1
- SFO1
- sfo1
- SFO2
- sfo2
- SFO3
- sfo3
- BLR1
- blr1
- SYD1
- syd1
- Region
NYC1 - nyc1
- Region
NYC2 - nyc2
- Region
NYC3 - nyc3
- Region
SGP1 - sgp1
- Region
LON1 - lon1
- Region
AMS2 - ams2
- Region
AMS3 - ams3
- Region
FRA1 - fra1
- Region
TOR1 - tor1
- Region
SFO1 - sfo1
- Region
SFO2 - sfo2
- Region
SFO3 - sfo3
- Region
BLR1 - blr1
- Region
SYD1 - syd1
- NYC1
- nyc1
- NYC2
- nyc2
- NYC3
- nyc3
- SGP1
- sgp1
- LON1
- lon1
- AMS2
- ams2
- AMS3
- ams3
- FRA1
- fra1
- TOR1
- tor1
- SFO1
- sfo1
- SFO2
- sfo2
- SFO3
- sfo3
- BLR1
- blr1
- SYD1
- syd1
- NYC1
- nyc1
- NYC2
- nyc2
- NYC3
- nyc3
- SGP1
- sgp1
- LON1
- lon1
- AMS2
- ams2
- AMS3
- ams3
- FRA1
- fra1
- TOR1
- tor1
- SFO1
- sfo1
- SFO2
- sfo2
- SFO3
- sfo3
- BLR1
- blr1
- SYD1
- syd1
- NYC1
- nyc1
- NYC2
- nyc2
- NYC3
- nyc3
- SGP1
- sgp1
- LON1
- lon1
- AMS2
- ams2
- AMS3
- ams3
- FRA1
- fra1
- TOR1
- tor1
- SFO1
- sfo1
- SFO2
- sfo2
- SFO3
- sfo3
- BLR1
- blr1
- SYD1
- syd1
- "nyc1"
- nyc1
- "nyc2"
- nyc2
- "nyc3"
- nyc3
- "sgp1"
- sgp1
- "lon1"
- lon1
- "ams2"
- ams2
- "ams3"
- ams3
- "fra1"
- fra1
- "tor1"
- tor1
- "sfo1"
- sfo1
- "sfo2"
- sfo2
- "sfo3"
- sfo3
- "blr1"
- blr1
- "syd1"
- syd1
SpacesBucketCorsRule, SpacesBucketCorsRuleArgs
- Allowed
Methods List<string> - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - Allowed
Origins List<string> - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- Allowed
Headers List<string> - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - Max
Age intSeconds - The time in seconds that browser can cache the response for a preflight request.
- Allowed
Methods []string - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - Allowed
Origins []string - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- Allowed
Headers []string - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - Max
Age intSeconds - The time in seconds that browser can cache the response for a preflight request.
- allowed
Methods List<String> - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - allowed
Origins List<String> - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- allowed
Headers List<String> - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - max
Age IntegerSeconds - The time in seconds that browser can cache the response for a preflight request.
- allowed
Methods string[] - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - allowed
Origins string[] - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- allowed
Headers string[] - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - max
Age numberSeconds - The time in seconds that browser can cache the response for a preflight request.
- allowed_
methods Sequence[str] - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - allowed_
origins Sequence[str] - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- allowed_
headers Sequence[str] - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - max_
age_ intseconds - The time in seconds that browser can cache the response for a preflight request.
- allowed
Methods List<String> - A list of HTTP methods (e.g.
GET
) which are allowed from the specified origin. - allowed
Origins List<String> - A list of hosts from which requests using the specified methods are allowed. A host may contain one wildcard (e.g. http://*.example.com).
- allowed
Headers List<String> - A list of headers that will be included in the CORS preflight request's
Access-Control-Request-Headers
. A header may contain one wildcard (e.g.x-amz-*
). - max
Age NumberSeconds - The time in seconds that browser can cache the response for a preflight request.
SpacesBucketLifecycleRule, SpacesBucketLifecycleRuleArgs
- Enabled bool
- Specifies lifecycle rule status.
- Abort
Incomplete intMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- Expiration
Pulumi.
Digital Ocean. Inputs. Spaces Bucket Lifecycle Rule Expiration - Specifies a time period after which applicable objects expire (documented below).
- Id string
- Unique identifier for the rule.
- Noncurrent
Version Pulumi.Expiration Digital Ocean. Inputs. Spaces Bucket Lifecycle Rule Noncurrent Version Expiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- Prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- Enabled bool
- Specifies lifecycle rule status.
- Abort
Incomplete intMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- Expiration
Spaces
Bucket Lifecycle Rule Expiration - Specifies a time period after which applicable objects expire (documented below).
- Id string
- Unique identifier for the rule.
- Noncurrent
Version SpacesExpiration Bucket Lifecycle Rule Noncurrent Version Expiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- Prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- enabled Boolean
- Specifies lifecycle rule status.
- abort
Incomplete IntegerMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- expiration
Spaces
Bucket Lifecycle Rule Expiration - Specifies a time period after which applicable objects expire (documented below).
- id String
- Unique identifier for the rule.
- noncurrent
Version SpacesExpiration Bucket Lifecycle Rule Noncurrent Version Expiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- prefix String
- Object key prefix identifying one or more objects to which the rule applies.
- enabled boolean
- Specifies lifecycle rule status.
- abort
Incomplete numberMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- expiration
Spaces
Bucket Lifecycle Rule Expiration - Specifies a time period after which applicable objects expire (documented below).
- id string
- Unique identifier for the rule.
- noncurrent
Version SpacesExpiration Bucket Lifecycle Rule Noncurrent Version Expiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- prefix string
- Object key prefix identifying one or more objects to which the rule applies.
- enabled bool
- Specifies lifecycle rule status.
- abort_
incomplete_ intmultipart_ upload_ days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- expiration
Spaces
Bucket Lifecycle Rule Expiration - Specifies a time period after which applicable objects expire (documented below).
- id str
- Unique identifier for the rule.
- noncurrent_
version_ Spacesexpiration Bucket Lifecycle Rule Noncurrent Version Expiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- prefix str
- Object key prefix identifying one or more objects to which the rule applies.
- enabled Boolean
- Specifies lifecycle rule status.
- abort
Incomplete NumberMultipart Upload Days - Specifies the number of days after initiating a multipart upload when the multipart upload must be completed or else Spaces will abort the upload.
- expiration Property Map
- Specifies a time period after which applicable objects expire (documented below).
- id String
- Unique identifier for the rule.
- noncurrent
Version Property MapExpiration Specifies when non-current object versions expire (documented below).
At least one of
expiration
ornoncurrent_version_expiration
must be specified.- prefix String
- Object key prefix identifying one or more objects to which the rule applies.
SpacesBucketLifecycleRuleExpiration, SpacesBucketLifecycleRuleExpirationArgs
- Date string
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- Days int
- Specifies the number of days after object creation when the applicable objects will expire.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
- Date string
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- Days int
- Specifies the number of days after object creation when the applicable objects will expire.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
- date String
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- days Integer
- Specifies the number of days after object creation when the applicable objects will expire.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
- date string
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- days number
- Specifies the number of days after object creation when the applicable objects will expire.
- expired
Object booleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
- date str
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- days int
- Specifies the number of days after object creation when the applicable objects will expire.
- expired_
object_ booldelete_ marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
- date String
- Specifies the date/time after which you want applicable objects to expire. The argument uses RFC3339 format, e.g. "2020-03-22T15:03:55Z" or parts thereof e.g. "2019-02-28".
- days Number
- Specifies the number of days after object creation when the applicable objects will expire.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), setting this to true directs Spaces to delete expired object delete markers.
SpacesBucketLifecycleRuleNoncurrentVersionExpiration, SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs
- Days int
- Specifies the number of days after which an object's non-current versions expire.
- Days int
- Specifies the number of days after which an object's non-current versions expire.
- days Integer
- Specifies the number of days after which an object's non-current versions expire.
- days number
- Specifies the number of days after which an object's non-current versions expire.
- days int
- Specifies the number of days after which an object's non-current versions expire.
- days Number
- Specifies the number of days after which an object's non-current versions expire.
SpacesBucketVersioning, SpacesBucketVersioningArgs
- Enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- Enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled Boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled bool
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
- enabled Boolean
- Enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket.
Import
Buckets can be imported using the region
and name
attributes (delimited by a comma):
$ pulumi import digitalocean:index/spacesBucket:SpacesBucket foobar `region`,`name`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitalocean
Terraform Provider.