linode.ObjectStorageBucket
Explore with Pulumi AI
Provides a Linode Object Storage Bucket resource. This can be used to create, modify, and delete Linodes Object Storage Buckets. For more information, see the Linode APIv4 docs.
Example Usage
The following example shows how one might use this resource to create an Object Storage Bucket:
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const primary = linode.getObjectStorageCluster({
id: "us-east-1",
});
const foobar = new linode.ObjectStorageBucket("foobar", {
cluster: primary.then(primary => primary.id),
label: "mybucket",
});
import pulumi
import pulumi_linode as linode
primary = linode.get_object_storage_cluster(id="us-east-1")
foobar = linode.ObjectStorageBucket("foobar",
cluster=primary.id,
label="mybucket")
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
primary, err := linode.GetObjectStorageCluster(ctx, &linode.GetObjectStorageClusterArgs{
Id: "us-east-1",
}, nil)
if err != nil {
return err
}
_, err = linode.NewObjectStorageBucket(ctx, "foobar", &linode.ObjectStorageBucketArgs{
Cluster: pulumi.String(primary.Id),
Label: pulumi.String("mybucket"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var primary = Linode.GetObjectStorageCluster.Invoke(new()
{
Id = "us-east-1",
});
var foobar = new Linode.ObjectStorageBucket("foobar", new()
{
Cluster = primary.Apply(getObjectStorageClusterResult => getObjectStorageClusterResult.Id),
Label = "mybucket",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetObjectStorageClusterArgs;
import com.pulumi.linode.ObjectStorageBucket;
import com.pulumi.linode.ObjectStorageBucketArgs;
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 primary = LinodeFunctions.getObjectStorageCluster(GetObjectStorageClusterArgs.builder()
.id("us-east-1")
.build());
var foobar = new ObjectStorageBucket("foobar", ObjectStorageBucketArgs.builder()
.cluster(primary.applyValue(getObjectStorageClusterResult -> getObjectStorageClusterResult.id()))
.label("mybucket")
.build());
}
}
resources:
foobar:
type: linode:ObjectStorageBucket
properties:
cluster: ${primary.id}
label: mybucket
variables:
primary:
fn::invoke:
Function: linode:getObjectStorageCluster
Arguments:
id: us-east-1
Creating an Object Storage Bucket with Lifecycle rules:
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const mykey = new linode.ObjectStorageKey("mykey", {label: "image-access"});
const mybucket = new linode.ObjectStorageBucket("mybucket", {
accessKey: mykey.accessKey,
secretKey: mykey.secretKey,
cluster: "us-east-1",
label: "mybucket",
lifecycleRules: [{
id: "my-rule",
enabled: true,
abortIncompleteMultipartUploadDays: 5,
expiration: {
date: "2021-06-21",
},
}],
});
import pulumi
import pulumi_linode as linode
mykey = linode.ObjectStorageKey("mykey", label="image-access")
mybucket = linode.ObjectStorageBucket("mybucket",
access_key=mykey.access_key,
secret_key=mykey.secret_key,
cluster="us-east-1",
label="mybucket",
lifecycle_rules=[{
"id": "my-rule",
"enabled": True,
"abort_incomplete_multipart_upload_days": 5,
"expiration": {
"date": "2021-06-21",
},
}])
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mykey, err := linode.NewObjectStorageKey(ctx, "mykey", &linode.ObjectStorageKeyArgs{
Label: pulumi.String("image-access"),
})
if err != nil {
return err
}
_, err = linode.NewObjectStorageBucket(ctx, "mybucket", &linode.ObjectStorageBucketArgs{
AccessKey: mykey.AccessKey,
SecretKey: mykey.SecretKey,
Cluster: pulumi.String("us-east-1"),
Label: pulumi.String("mybucket"),
LifecycleRules: linode.ObjectStorageBucketLifecycleRuleArray{
&linode.ObjectStorageBucketLifecycleRuleArgs{
Id: pulumi.String("my-rule"),
Enabled: pulumi.Bool(true),
AbortIncompleteMultipartUploadDays: pulumi.Int(5),
Expiration: &linode.ObjectStorageBucketLifecycleRuleExpirationArgs{
Date: pulumi.String("2021-06-21"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var mykey = new Linode.ObjectStorageKey("mykey", new()
{
Label = "image-access",
});
var mybucket = new Linode.ObjectStorageBucket("mybucket", new()
{
AccessKey = mykey.AccessKey,
SecretKey = mykey.SecretKey,
Cluster = "us-east-1",
Label = "mybucket",
LifecycleRules = new[]
{
new Linode.Inputs.ObjectStorageBucketLifecycleRuleArgs
{
Id = "my-rule",
Enabled = true,
AbortIncompleteMultipartUploadDays = 5,
Expiration = new Linode.Inputs.ObjectStorageBucketLifecycleRuleExpirationArgs
{
Date = "2021-06-21",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.ObjectStorageKey;
import com.pulumi.linode.ObjectStorageKeyArgs;
import com.pulumi.linode.ObjectStorageBucket;
import com.pulumi.linode.ObjectStorageBucketArgs;
import com.pulumi.linode.inputs.ObjectStorageBucketLifecycleRuleArgs;
import com.pulumi.linode.inputs.ObjectStorageBucketLifecycleRuleExpirationArgs;
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 mykey = new ObjectStorageKey("mykey", ObjectStorageKeyArgs.builder()
.label("image-access")
.build());
var mybucket = new ObjectStorageBucket("mybucket", ObjectStorageBucketArgs.builder()
.accessKey(mykey.accessKey())
.secretKey(mykey.secretKey())
.cluster("us-east-1")
.label("mybucket")
.lifecycleRules(ObjectStorageBucketLifecycleRuleArgs.builder()
.id("my-rule")
.enabled(true)
.abortIncompleteMultipartUploadDays(5)
.expiration(ObjectStorageBucketLifecycleRuleExpirationArgs.builder()
.date("2021-06-21")
.build())
.build())
.build());
}
}
resources:
mykey:
type: linode:ObjectStorageKey
properties:
label: image-access
mybucket:
type: linode:ObjectStorageBucket
properties:
accessKey: ${mykey.accessKey}
secretKey: ${mykey.secretKey}
cluster: us-east-1
label: mybucket
lifecycleRules:
- id: my-rule
enabled: true
abortIncompleteMultipartUploadDays: 5
expiration:
date: 2021-06-21
Creating an Object Storage Bucket with Lifecycle rules using provider-level object credentials
Create ObjectStorageBucket Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ObjectStorageBucket(name: string, args: ObjectStorageBucketArgs, opts?: CustomResourceOptions);
@overload
def ObjectStorageBucket(resource_name: str,
args: ObjectStorageBucketArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ObjectStorageBucket(resource_name: str,
opts: Optional[ResourceOptions] = None,
label: Optional[str] = None,
access_key: Optional[str] = None,
acl: Optional[str] = None,
cert: Optional[ObjectStorageBucketCertArgs] = None,
cluster: Optional[str] = None,
cors_enabled: Optional[bool] = None,
lifecycle_rules: Optional[Sequence[ObjectStorageBucketLifecycleRuleArgs]] = None,
region: Optional[str] = None,
secret_key: Optional[str] = None,
versioning: Optional[bool] = None)
func NewObjectStorageBucket(ctx *Context, name string, args ObjectStorageBucketArgs, opts ...ResourceOption) (*ObjectStorageBucket, error)
public ObjectStorageBucket(string name, ObjectStorageBucketArgs args, CustomResourceOptions? opts = null)
public ObjectStorageBucket(String name, ObjectStorageBucketArgs args)
public ObjectStorageBucket(String name, ObjectStorageBucketArgs args, CustomResourceOptions options)
type: linode:ObjectStorageBucket
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 ObjectStorageBucketArgs
- 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 ObjectStorageBucketArgs
- 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 ObjectStorageBucketArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectStorageBucketArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ObjectStorageBucketArgs
- 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 objectStorageBucketResource = new Linode.ObjectStorageBucket("objectStorageBucketResource", new()
{
Label = "string",
AccessKey = "string",
Acl = "string",
Cert = new Linode.Inputs.ObjectStorageBucketCertArgs
{
Certificate = "string",
PrivateKey = "string",
},
CorsEnabled = false,
LifecycleRules = new[]
{
new Linode.Inputs.ObjectStorageBucketLifecycleRuleArgs
{
Enabled = false,
AbortIncompleteMultipartUploadDays = 0,
Expiration = new Linode.Inputs.ObjectStorageBucketLifecycleRuleExpirationArgs
{
Date = "string",
Days = 0,
ExpiredObjectDeleteMarker = false,
},
Id = "string",
NoncurrentVersionExpiration = new Linode.Inputs.ObjectStorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
{
Days = 0,
},
Prefix = "string",
},
},
Region = "string",
SecretKey = "string",
Versioning = false,
});
example, err := linode.NewObjectStorageBucket(ctx, "objectStorageBucketResource", &linode.ObjectStorageBucketArgs{
Label: pulumi.String("string"),
AccessKey: pulumi.String("string"),
Acl: pulumi.String("string"),
Cert: &linode.ObjectStorageBucketCertArgs{
Certificate: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
},
CorsEnabled: pulumi.Bool(false),
LifecycleRules: linode.ObjectStorageBucketLifecycleRuleArray{
&linode.ObjectStorageBucketLifecycleRuleArgs{
Enabled: pulumi.Bool(false),
AbortIncompleteMultipartUploadDays: pulumi.Int(0),
Expiration: &linode.ObjectStorageBucketLifecycleRuleExpirationArgs{
Date: pulumi.String("string"),
Days: pulumi.Int(0),
ExpiredObjectDeleteMarker: pulumi.Bool(false),
},
Id: pulumi.String("string"),
NoncurrentVersionExpiration: &linode.ObjectStorageBucketLifecycleRuleNoncurrentVersionExpirationArgs{
Days: pulumi.Int(0),
},
Prefix: pulumi.String("string"),
},
},
Region: pulumi.String("string"),
SecretKey: pulumi.String("string"),
Versioning: pulumi.Bool(false),
})
var objectStorageBucketResource = new ObjectStorageBucket("objectStorageBucketResource", ObjectStorageBucketArgs.builder()
.label("string")
.accessKey("string")
.acl("string")
.cert(ObjectStorageBucketCertArgs.builder()
.certificate("string")
.privateKey("string")
.build())
.corsEnabled(false)
.lifecycleRules(ObjectStorageBucketLifecycleRuleArgs.builder()
.enabled(false)
.abortIncompleteMultipartUploadDays(0)
.expiration(ObjectStorageBucketLifecycleRuleExpirationArgs.builder()
.date("string")
.days(0)
.expiredObjectDeleteMarker(false)
.build())
.id("string")
.noncurrentVersionExpiration(ObjectStorageBucketLifecycleRuleNoncurrentVersionExpirationArgs.builder()
.days(0)
.build())
.prefix("string")
.build())
.region("string")
.secretKey("string")
.versioning(false)
.build());
object_storage_bucket_resource = linode.ObjectStorageBucket("objectStorageBucketResource",
label="string",
access_key="string",
acl="string",
cert={
"certificate": "string",
"private_key": "string",
},
cors_enabled=False,
lifecycle_rules=[{
"enabled": False,
"abort_incomplete_multipart_upload_days": 0,
"expiration": {
"date": "string",
"days": 0,
"expired_object_delete_marker": False,
},
"id": "string",
"noncurrent_version_expiration": {
"days": 0,
},
"prefix": "string",
}],
region="string",
secret_key="string",
versioning=False)
const objectStorageBucketResource = new linode.ObjectStorageBucket("objectStorageBucketResource", {
label: "string",
accessKey: "string",
acl: "string",
cert: {
certificate: "string",
privateKey: "string",
},
corsEnabled: false,
lifecycleRules: [{
enabled: false,
abortIncompleteMultipartUploadDays: 0,
expiration: {
date: "string",
days: 0,
expiredObjectDeleteMarker: false,
},
id: "string",
noncurrentVersionExpiration: {
days: 0,
},
prefix: "string",
}],
region: "string",
secretKey: "string",
versioning: false,
});
type: linode:ObjectStorageBucket
properties:
accessKey: string
acl: string
cert:
certificate: string
privateKey: string
corsEnabled: false
label: string
lifecycleRules:
- abortIncompleteMultipartUploadDays: 0
enabled: false
expiration:
date: string
days: 0
expiredObjectDeleteMarker: false
id: string
noncurrentVersionExpiration:
days: 0
prefix: string
region: string
secretKey: string
versioning: false
ObjectStorageBucket 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 ObjectStorageBucket resource accepts the following input properties:
- Label string
- The label of the Linode Object Storage Bucket.
- Access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- Cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- Cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - Cors
Enabled bool - If true, the bucket will have CORS enabled for all origins.
- Lifecycle
Rules List<ObjectStorage Bucket Lifecycle Rule> - Lifecycle rules to be applied to the bucket.
- Region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - Secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- Label string
- The label of the Linode Object Storage Bucket.
- Access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- Cert
Object
Storage Bucket Cert Args - The cert used by this Object Storage Bucket.
- Cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - Cors
Enabled bool - If true, the bucket will have CORS enabled for all origins.
- Lifecycle
Rules []ObjectStorage Bucket Lifecycle Rule Args - Lifecycle rules to be applied to the bucket.
- Region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - Secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- label String
- The label of the Linode Object Storage Bucket.
- access
Key String - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl String
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- cluster String
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled Boolean - If true, the bucket will have CORS enabled for all origins.
- lifecycle
Rules List<ObjectStorage Bucket Lifecycle Rule> - Lifecycle rules to be applied to the bucket.
- region String
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key String - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning Boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- label string
- The label of the Linode Object Storage Bucket.
- access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled boolean - If true, the bucket will have CORS enabled for all origins.
- lifecycle
Rules ObjectStorage Bucket Lifecycle Rule[] - Lifecycle rules to be applied to the bucket.
- region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- label str
- The label of the Linode Object Storage Bucket.
- access_
key str - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl str
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert Args - The cert used by this Object Storage Bucket.
- cluster str
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors_
enabled bool - If true, the bucket will have CORS enabled for all origins.
- lifecycle_
rules Sequence[ObjectStorage Bucket Lifecycle Rule Args] - Lifecycle rules to be applied to the bucket.
- region str
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret_
key str - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- label String
- The label of the Linode Object Storage Bucket.
- access
Key String - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl String
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert Property Map
- The cert used by this Object Storage Bucket.
- cluster String
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled Boolean - If true, the bucket will have CORS enabled for all origins.
- lifecycle
Rules List<Property Map> - Lifecycle rules to be applied to the bucket.
- region String
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key String - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning Boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
Outputs
All input properties are implicitly available as output properties. Additionally, the ObjectStorageBucket resource produces the following output properties:
Look up Existing ObjectStorageBucket Resource
Get an existing ObjectStorageBucket 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?: ObjectStorageBucketState, opts?: CustomResourceOptions): ObjectStorageBucket
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
acl: Optional[str] = None,
cert: Optional[ObjectStorageBucketCertArgs] = None,
cluster: Optional[str] = None,
cors_enabled: Optional[bool] = None,
endpoint: Optional[str] = None,
hostname: Optional[str] = None,
label: Optional[str] = None,
lifecycle_rules: Optional[Sequence[ObjectStorageBucketLifecycleRuleArgs]] = None,
region: Optional[str] = None,
secret_key: Optional[str] = None,
versioning: Optional[bool] = None) -> ObjectStorageBucket
func GetObjectStorageBucket(ctx *Context, name string, id IDInput, state *ObjectStorageBucketState, opts ...ResourceOption) (*ObjectStorageBucket, error)
public static ObjectStorageBucket Get(string name, Input<string> id, ObjectStorageBucketState? state, CustomResourceOptions? opts = null)
public static ObjectStorageBucket get(String name, Output<String> id, ObjectStorageBucketState 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.
- Access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- Cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- Cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - Cors
Enabled bool - If true, the bucket will have CORS enabled for all origins.
- Endpoint string
- The endpoint for the bucket used for s3 connections.
- Hostname string
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- Label string
- The label of the Linode Object Storage Bucket.
- Lifecycle
Rules List<ObjectStorage Bucket Lifecycle Rule> - Lifecycle rules to be applied to the bucket.
- Region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - Secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- Access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- Cert
Object
Storage Bucket Cert Args - The cert used by this Object Storage Bucket.
- Cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - Cors
Enabled bool - If true, the bucket will have CORS enabled for all origins.
- Endpoint string
- The endpoint for the bucket used for s3 connections.
- Hostname string
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- Label string
- The label of the Linode Object Storage Bucket.
- Lifecycle
Rules []ObjectStorage Bucket Lifecycle Rule Args - Lifecycle rules to be applied to the bucket.
- Region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - Secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- Versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- access
Key String - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl String
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- cluster String
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled Boolean - If true, the bucket will have CORS enabled for all origins.
- endpoint String
- The endpoint for the bucket used for s3 connections.
- hostname String
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- label String
- The label of the Linode Object Storage Bucket.
- lifecycle
Rules List<ObjectStorage Bucket Lifecycle Rule> - Lifecycle rules to be applied to the bucket.
- region String
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key String - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning Boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- access
Key string - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl string
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert - The cert used by this Object Storage Bucket.
- cluster string
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled boolean - If true, the bucket will have CORS enabled for all origins.
- endpoint string
- The endpoint for the bucket used for s3 connections.
- hostname string
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- label string
- The label of the Linode Object Storage Bucket.
- lifecycle
Rules ObjectStorage Bucket Lifecycle Rule[] - Lifecycle rules to be applied to the bucket.
- region string
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key string - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- access_
key str - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl str
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert
Object
Storage Bucket Cert Args - The cert used by this Object Storage Bucket.
- cluster str
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors_
enabled bool - If true, the bucket will have CORS enabled for all origins.
- endpoint str
- The endpoint for the bucket used for s3 connections.
- hostname str
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- label str
- The label of the Linode Object Storage Bucket.
- lifecycle_
rules Sequence[ObjectStorage Bucket Lifecycle Rule Args] - Lifecycle rules to be applied to the bucket.
- region str
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret_
key str - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning bool
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
- access
Key String - The access key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_access_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- acl String
- The Access Control Level of the bucket using a canned ACL string. See all ACL strings in the Linode API v4 documentation.
- cert Property Map
- The cert used by this Object Storage Bucket.
- cluster String
- The cluster of the Linode Object Storage Bucket. This is deprecated in favor of
region
attribute. For example,us-mia-1
cluster can be translated intous-mia
region. Exactly one ofregion
andcluster
is required for creating a bucket. - cors
Enabled Boolean - If true, the bucket will have CORS enabled for all origins.
- endpoint String
- The endpoint for the bucket used for s3 connections.
- hostname String
- The hostname where this bucket can be accessed. This hostname can be accessed through a browser if the bucket is made public.
- label String
- The label of the Linode Object Storage Bucket.
- lifecycle
Rules List<Property Map> - Lifecycle rules to be applied to the bucket.
- region String
- The region of the Linode Object Storage Bucket. Exactly one of
region
andcluster
is required for creating a bucket. - secret
Key String - The secret key to authenticate with. If not specified with the resource, its value can be
- configured by
obj_secret_key
in the provider configuration; - or, generated implicitly at apply-time if
obj_use_temp_keys
at provider-level is set.
- configured by
- versioning Boolean
Whether to enable versioning. Once you version-enable a bucket, it can never return to an unversioned state. You can, however, suspend versioning on that bucket. (Requires
access_key
andsecret_key
)lifecycle_rule
- (Optional) Lifecycle rules to be applied to the bucket. (Requiresaccess_key
andsecret_key
)cert
- (Optional) The bucket's TLS/SSL certificate.
Supporting Types
ObjectStorageBucketCert, ObjectStorageBucketCertArgs
- Certificate string
- The Base64 encoded and PEM formatted SSL certificate.
- Private
Key string - The private key associated with the TLS/SSL certificate.
- Certificate string
- The Base64 encoded and PEM formatted SSL certificate.
- Private
Key string - The private key associated with the TLS/SSL certificate.
- certificate String
- The Base64 encoded and PEM formatted SSL certificate.
- private
Key String - The private key associated with the TLS/SSL certificate.
- certificate string
- The Base64 encoded and PEM formatted SSL certificate.
- private
Key string - The private key associated with the TLS/SSL certificate.
- certificate str
- The Base64 encoded and PEM formatted SSL certificate.
- private_
key str - The private key associated with the TLS/SSL certificate.
- certificate String
- The Base64 encoded and PEM formatted SSL certificate.
- private
Key String - The private key associated with the TLS/SSL certificate.
ObjectStorageBucketLifecycleRule, ObjectStorageBucketLifecycleRuleArgs
- Enabled bool
- Specifies whether the lifecycle rule is active.
- Abort
Incomplete intMultipart Upload Days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- Expiration
Object
Storage Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire.
- Id string
- The unique identifier for the rule.
- Noncurrent
Version ObjectExpiration Storage Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when non-current object versions expire.
- Prefix string
- The object key prefix identifying one or more objects to which the rule applies.
- Enabled bool
- Specifies whether the lifecycle rule is active.
- Abort
Incomplete intMultipart Upload Days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- Expiration
Object
Storage Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire.
- Id string
- The unique identifier for the rule.
- Noncurrent
Version ObjectExpiration Storage Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when non-current object versions expire.
- Prefix string
- The object key prefix identifying one or more objects to which the rule applies.
- enabled Boolean
- Specifies whether the lifecycle rule is active.
- abort
Incomplete IntegerMultipart Upload Days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- expiration
Object
Storage Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire.
- id String
- The unique identifier for the rule.
- noncurrent
Version ObjectExpiration Storage Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when non-current object versions expire.
- prefix String
- The object key prefix identifying one or more objects to which the rule applies.
- enabled boolean
- Specifies whether the lifecycle rule is active.
- abort
Incomplete numberMultipart Upload Days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- expiration
Object
Storage Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire.
- id string
- The unique identifier for the rule.
- noncurrent
Version ObjectExpiration Storage Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when non-current object versions expire.
- prefix string
- The object key prefix identifying one or more objects to which the rule applies.
- enabled bool
- Specifies whether the lifecycle rule is active.
- abort_
incomplete_ intmultipart_ upload_ days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- expiration
Object
Storage Bucket Lifecycle Rule Expiration - Specifies a period in the object's expire.
- id str
- The unique identifier for the rule.
- noncurrent_
version_ Objectexpiration Storage Bucket Lifecycle Rule Noncurrent Version Expiration - Specifies when non-current object versions expire.
- prefix str
- The object key prefix identifying one or more objects to which the rule applies.
- enabled Boolean
- Specifies whether the lifecycle rule is active.
- abort
Incomplete NumberMultipart Upload Days Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
expiration
- (Optional) Specifies a period in the object's expire.noncurrent_version_expiration
- (Optional) Specifies when non-current object versions expire.
- expiration Property Map
- Specifies a period in the object's expire.
- id String
- The unique identifier for the rule.
- noncurrent
Version Property MapExpiration - Specifies when non-current object versions expire.
- prefix String
- The object key prefix identifying one or more objects to which the rule applies.
ObjectStorageBucketLifecycleRuleExpiration, ObjectStorageBucketLifecycleRuleExpirationArgs
- Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
- Date string
- Specifies the date after which you want the corresponding action to take effect.
- Days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- Expired
Object boolDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
- date String
- Specifies the date after which you want the corresponding action to take effect.
- days Integer
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
- date string
- Specifies the date after which you want the corresponding action to take effect.
- days number
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object booleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
- date str
- Specifies the date after which you want the corresponding action to take effect.
- days int
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired_
object_ booldelete_ marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
- date String
- Specifies the date after which you want the corresponding action to take effect.
- days Number
- Specifies the number of days after object creation when the specific rule action takes effect.
- expired
Object BooleanDelete Marker - On a versioned bucket (versioning-enabled or versioning-suspended bucket), you can add this element in the lifecycle configuration to direct Linode Object Storage to delete expired object delete markers. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
ObjectStorageBucketLifecycleRuleNoncurrentVersionExpiration, ObjectStorageBucketLifecycleRuleNoncurrentVersionExpirationArgs
- Days int
- Specifies the number of days non-current object versions expire.
- Days int
- Specifies the number of days non-current object versions expire.
- days Integer
- Specifies the number of days non-current object versions expire.
- days number
- Specifies the number of days non-current object versions expire.
- days int
- Specifies the number of days non-current object versions expire.
- days Number
- Specifies the number of days non-current object versions expire.
Import
Linodes Object Storage Buckets can be imported using the resource id
which is made of cluster:label
, e.g.
$ pulumi import linode:index/objectStorageBucket:ObjectStorageBucket mybucket us-east-1:foobar
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.