linode.ObjectStorageKey
Explore with Pulumi AI
Provides a Linode Object Storage Key resource. This can be used to create, modify, and delete Linodes Object Storage Keys. 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 Key.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const foo = new linode.ObjectStorageKey("foo", {label: "image-access"});
import pulumi
import pulumi_linode as linode
foo = linode.ObjectStorageKey("foo", label="image-access")
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 {
_, err := linode.NewObjectStorageKey(ctx, "foo", &linode.ObjectStorageKeyArgs{
Label: pulumi.String("image-access"),
})
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 foo = new Linode.ObjectStorageKey("foo", new()
{
Label = "image-access",
});
});
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 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 foo = new ObjectStorageKey("foo", ObjectStorageKeyArgs.builder()
.label("image-access")
.build());
}
}
resources:
foo:
type: linode:ObjectStorageKey
properties:
label: image-access
The following example shows a key with limited access.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const foobar = new linode.ObjectStorageKey("foobar", {
label: "my-key",
bucketAccesses: [{
bucketName: "my-bucket-name",
region: "us-mia",
permissions: "read_write",
}],
});
import pulumi
import pulumi_linode as linode
foobar = linode.ObjectStorageKey("foobar",
label="my-key",
bucket_accesses=[{
"bucket_name": "my-bucket-name",
"region": "us-mia",
"permissions": "read_write",
}])
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 {
_, err := linode.NewObjectStorageKey(ctx, "foobar", &linode.ObjectStorageKeyArgs{
Label: pulumi.String("my-key"),
BucketAccesses: linode.ObjectStorageKeyBucketAccessArray{
&linode.ObjectStorageKeyBucketAccessArgs{
BucketName: pulumi.String("my-bucket-name"),
Region: pulumi.String("us-mia"),
Permissions: pulumi.String("read_write"),
},
},
})
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 foobar = new Linode.ObjectStorageKey("foobar", new()
{
Label = "my-key",
BucketAccesses = new[]
{
new Linode.Inputs.ObjectStorageKeyBucketAccessArgs
{
BucketName = "my-bucket-name",
Region = "us-mia",
Permissions = "read_write",
},
},
});
});
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.inputs.ObjectStorageKeyBucketAccessArgs;
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 ObjectStorageKey("foobar", ObjectStorageKeyArgs.builder()
.label("my-key")
.bucketAccesses(ObjectStorageKeyBucketAccessArgs.builder()
.bucketName("my-bucket-name")
.region("us-mia")
.permissions("read_write")
.build())
.build());
}
}
resources:
foobar:
type: linode:ObjectStorageKey
properties:
label: my-key
bucketAccesses:
- bucketName: my-bucket-name
region: us-mia
permissions: read_write
Create ObjectStorageKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ObjectStorageKey(name: string, args: ObjectStorageKeyArgs, opts?: CustomResourceOptions);
@overload
def ObjectStorageKey(resource_name: str,
args: ObjectStorageKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ObjectStorageKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
label: Optional[str] = None,
bucket_accesses: Optional[Sequence[ObjectStorageKeyBucketAccessArgs]] = None,
regions: Optional[Sequence[str]] = None)
func NewObjectStorageKey(ctx *Context, name string, args ObjectStorageKeyArgs, opts ...ResourceOption) (*ObjectStorageKey, error)
public ObjectStorageKey(string name, ObjectStorageKeyArgs args, CustomResourceOptions? opts = null)
public ObjectStorageKey(String name, ObjectStorageKeyArgs args)
public ObjectStorageKey(String name, ObjectStorageKeyArgs args, CustomResourceOptions options)
type: linode:ObjectStorageKey
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 ObjectStorageKeyArgs
- 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 ObjectStorageKeyArgs
- 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 ObjectStorageKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectStorageKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ObjectStorageKeyArgs
- 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 objectStorageKeyResource = new Linode.ObjectStorageKey("objectStorageKeyResource", new()
{
Label = "string",
BucketAccesses = new[]
{
new Linode.Inputs.ObjectStorageKeyBucketAccessArgs
{
BucketName = "string",
Permissions = "string",
Region = "string",
},
},
Regions = new[]
{
"string",
},
});
example, err := linode.NewObjectStorageKey(ctx, "objectStorageKeyResource", &linode.ObjectStorageKeyArgs{
Label: pulumi.String("string"),
BucketAccesses: linode.ObjectStorageKeyBucketAccessArray{
&linode.ObjectStorageKeyBucketAccessArgs{
BucketName: pulumi.String("string"),
Permissions: pulumi.String("string"),
Region: pulumi.String("string"),
},
},
Regions: pulumi.StringArray{
pulumi.String("string"),
},
})
var objectStorageKeyResource = new ObjectStorageKey("objectStorageKeyResource", ObjectStorageKeyArgs.builder()
.label("string")
.bucketAccesses(ObjectStorageKeyBucketAccessArgs.builder()
.bucketName("string")
.permissions("string")
.region("string")
.build())
.regions("string")
.build());
object_storage_key_resource = linode.ObjectStorageKey("objectStorageKeyResource",
label="string",
bucket_accesses=[{
"bucket_name": "string",
"permissions": "string",
"region": "string",
}],
regions=["string"])
const objectStorageKeyResource = new linode.ObjectStorageKey("objectStorageKeyResource", {
label: "string",
bucketAccesses: [{
bucketName: "string",
permissions: "string",
region: "string",
}],
regions: ["string"],
});
type: linode:ObjectStorageKey
properties:
bucketAccesses:
- bucketName: string
permissions: string
region: string
label: string
regions:
- string
ObjectStorageKey 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 ObjectStorageKey resource accepts the following input properties:
- Label string
- The label given to this key. For display purposes only.
- Bucket
Accesses List<ObjectStorage Key Bucket Access> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- Regions List<string>
- A set of regions where the key will grant access to create buckets.
- Label string
- The label given to this key. For display purposes only.
- Bucket
Accesses []ObjectStorage Key Bucket Access Args - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- Regions []string
- A set of regions where the key will grant access to create buckets.
- label String
- The label given to this key. For display purposes only.
- bucket
Accesses List<ObjectStorage Key Bucket Access> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- regions List<String>
- A set of regions where the key will grant access to create buckets.
- label string
- The label given to this key. For display purposes only.
- bucket
Accesses ObjectStorage Key Bucket Access[] - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- regions string[]
- A set of regions where the key will grant access to create buckets.
- label str
- The label given to this key. For display purposes only.
- bucket_
accesses Sequence[ObjectStorage Key Bucket Access Args] - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- regions Sequence[str]
- A set of regions where the key will grant access to create buckets.
- label String
- The label given to this key. For display purposes only.
- bucket
Accesses List<Property Map> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- regions List<String>
- A set of regions where the key will grant access to create buckets.
Outputs
All input properties are implicitly available as output properties. Additionally, the ObjectStorageKey resource produces the following output properties:
- Access
Key string - This keypair's access key. This is not secret.
- Id string
- The provider-assigned unique ID for this managed resource.
- Limited bool
- Whether or not this key is a limited access key.
- Regions
Details List<ObjectStorage Key Regions Detail> - A set of objects containing the detailed info of the regions where this key can access.
- Secret
Key string - This keypair's secret key.
- Access
Key string - This keypair's access key. This is not secret.
- Id string
- The provider-assigned unique ID for this managed resource.
- Limited bool
- Whether or not this key is a limited access key.
- Regions
Details []ObjectStorage Key Regions Detail - A set of objects containing the detailed info of the regions where this key can access.
- Secret
Key string - This keypair's secret key.
- access
Key String - This keypair's access key. This is not secret.
- id String
- The provider-assigned unique ID for this managed resource.
- limited Boolean
- Whether or not this key is a limited access key.
- regions
Details List<ObjectStorage Key Regions Detail> - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key String - This keypair's secret key.
- access
Key string - This keypair's access key. This is not secret.
- id string
- The provider-assigned unique ID for this managed resource.
- limited boolean
- Whether or not this key is a limited access key.
- regions
Details ObjectStorage Key Regions Detail[] - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key string - This keypair's secret key.
- access_
key str - This keypair's access key. This is not secret.
- id str
- The provider-assigned unique ID for this managed resource.
- limited bool
- Whether or not this key is a limited access key.
- regions_
details Sequence[ObjectStorage Key Regions Detail] - A set of objects containing the detailed info of the regions where this key can access.
- secret_
key str - This keypair's secret key.
- access
Key String - This keypair's access key. This is not secret.
- id String
- The provider-assigned unique ID for this managed resource.
- limited Boolean
- Whether or not this key is a limited access key.
- regions
Details List<Property Map> - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key String - This keypair's secret key.
Look up Existing ObjectStorageKey Resource
Get an existing ObjectStorageKey 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?: ObjectStorageKeyState, opts?: CustomResourceOptions): ObjectStorageKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
bucket_accesses: Optional[Sequence[ObjectStorageKeyBucketAccessArgs]] = None,
label: Optional[str] = None,
limited: Optional[bool] = None,
regions: Optional[Sequence[str]] = None,
regions_details: Optional[Sequence[ObjectStorageKeyRegionsDetailArgs]] = None,
secret_key: Optional[str] = None) -> ObjectStorageKey
func GetObjectStorageKey(ctx *Context, name string, id IDInput, state *ObjectStorageKeyState, opts ...ResourceOption) (*ObjectStorageKey, error)
public static ObjectStorageKey Get(string name, Input<string> id, ObjectStorageKeyState? state, CustomResourceOptions? opts = null)
public static ObjectStorageKey get(String name, Output<String> id, ObjectStorageKeyState 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 - This keypair's access key. This is not secret.
- Bucket
Accesses List<ObjectStorage Key Bucket Access> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- Label string
- The label given to this key. For display purposes only.
- Limited bool
- Whether or not this key is a limited access key.
- Regions List<string>
- A set of regions where the key will grant access to create buckets.
- Regions
Details List<ObjectStorage Key Regions Detail> - A set of objects containing the detailed info of the regions where this key can access.
- Secret
Key string - This keypair's secret key.
- Access
Key string - This keypair's access key. This is not secret.
- Bucket
Accesses []ObjectStorage Key Bucket Access Args - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- Label string
- The label given to this key. For display purposes only.
- Limited bool
- Whether or not this key is a limited access key.
- Regions []string
- A set of regions where the key will grant access to create buckets.
- Regions
Details []ObjectStorage Key Regions Detail Args - A set of objects containing the detailed info of the regions where this key can access.
- Secret
Key string - This keypair's secret key.
- access
Key String - This keypair's access key. This is not secret.
- bucket
Accesses List<ObjectStorage Key Bucket Access> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- label String
- The label given to this key. For display purposes only.
- limited Boolean
- Whether or not this key is a limited access key.
- regions List<String>
- A set of regions where the key will grant access to create buckets.
- regions
Details List<ObjectStorage Key Regions Detail> - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key String - This keypair's secret key.
- access
Key string - This keypair's access key. This is not secret.
- bucket
Accesses ObjectStorage Key Bucket Access[] - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- label string
- The label given to this key. For display purposes only.
- limited boolean
- Whether or not this key is a limited access key.
- regions string[]
- A set of regions where the key will grant access to create buckets.
- regions
Details ObjectStorage Key Regions Detail[] - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key string - This keypair's secret key.
- access_
key str - This keypair's access key. This is not secret.
- bucket_
accesses Sequence[ObjectStorage Key Bucket Access Args] - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- label str
- The label given to this key. For display purposes only.
- limited bool
- Whether or not this key is a limited access key.
- regions Sequence[str]
- A set of regions where the key will grant access to create buckets.
- regions_
details Sequence[ObjectStorage Key Regions Detail Args] - A set of objects containing the detailed info of the regions where this key can access.
- secret_
key str - This keypair's secret key.
- access
Key String - This keypair's access key. This is not secret.
- bucket
Accesses List<Property Map> - Defines this key as a Limited Access Key. Limited Access Keys restrict this Object Storage key’s access to only the bucket(s) declared in this array and define their bucket-level permissions. Not providing this block will not limit this Object Storage Key.
- label String
- The label given to this key. For display purposes only.
- limited Boolean
- Whether or not this key is a limited access key.
- regions List<String>
- A set of regions where the key will grant access to create buckets.
- regions
Details List<Property Map> - A set of objects containing the detailed info of the regions where this key can access.
- secret
Key String - This keypair's secret key.
Supporting Types
ObjectStorageKeyBucketAccess, ObjectStorageKeyBucketAccessArgs
- Bucket
Name string - The unique label of the bucket to which the key will grant limited access.
- Permissions string
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - Cluster string
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - Region string
- The region where the bucket resides.
- Bucket
Name string - The unique label of the bucket to which the key will grant limited access.
- Permissions string
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - Cluster string
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - Region string
- The region where the bucket resides.
- bucket
Name String - The unique label of the bucket to which the key will grant limited access.
- permissions String
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - cluster String
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - region String
- The region where the bucket resides.
- bucket
Name string - The unique label of the bucket to which the key will grant limited access.
- permissions string
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - cluster string
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - region string
- The region where the bucket resides.
- bucket_
name str - The unique label of the bucket to which the key will grant limited access.
- permissions str
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - cluster str
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - region str
- The region where the bucket resides.
- bucket
Name String - The unique label of the bucket to which the key will grant limited access.
- permissions String
- This Limited Access Key’s permissions for the selected bucket. Changing
permissions
forces the creation of a new Object Storage Key. (read_write
,read_only
) - cluster String
- The Object Storage cluster where the bucket resides. Deprecated in favor of
region
. - region String
- The region where the bucket resides.
ObjectStorageKeyRegionsDetail, ObjectStorageKeyRegionsDetailArgs
- Id string
- The ID of the region.
- S3Endpoint string
- The S3-compatible hostname you can use to access the Object Storage buckets in this region.
- Id string
- The ID of the region.
- S3Endpoint string
- The S3-compatible hostname you can use to access the Object Storage buckets in this region.
- id String
- The ID of the region.
- s3Endpoint String
- The S3-compatible hostname you can use to access the Object Storage buckets in this region.
- id string
- The ID of the region.
- s3Endpoint string
- The S3-compatible hostname you can use to access the Object Storage buckets in this region.
- id str
- The ID of the region.
- s3_
endpoint str - The S3-compatible hostname you can use to access the Object Storage buckets in this region.
- id String
- The ID of the region.
- s3Endpoint String
- The S3-compatible hostname you can use to access the Object Storage buckets in this region.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.