ionoscloud.S3Key
Explore with Pulumi AI
Manages an IONOS Object Storage Key on IonosCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const exampleUser = new ionoscloud.User("exampleUser", {
firstName: "example",
lastName: "example",
email: "unique@email.com",
password: "abc123-321CBA",
administrator: false,
forceSecAuth: false,
});
const exampleS3Key = new ionoscloud.S3Key("exampleS3Key", {
userId: exampleUser.userId,
active: true,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example_user = ionoscloud.User("exampleUser",
first_name="example",
last_name="example",
email="unique@email.com",
password="abc123-321CBA",
administrator=False,
force_sec_auth=False)
example_s3_key = ionoscloud.S3Key("exampleS3Key",
user_id=example_user.user_id,
active=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleUser, err := ionoscloud.NewUser(ctx, "exampleUser", &ionoscloud.UserArgs{
FirstName: pulumi.String("example"),
LastName: pulumi.String("example"),
Email: pulumi.String("unique@email.com"),
Password: pulumi.String("abc123-321CBA"),
Administrator: pulumi.Bool(false),
ForceSecAuth: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = ionoscloud.NewS3Key(ctx, "exampleS3Key", &ionoscloud.S3KeyArgs{
UserId: exampleUser.UserId,
Active: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var exampleUser = new Ionoscloud.User("exampleUser", new()
{
FirstName = "example",
LastName = "example",
Email = "unique@email.com",
Password = "abc123-321CBA",
Administrator = false,
ForceSecAuth = false,
});
var exampleS3Key = new Ionoscloud.S3Key("exampleS3Key", new()
{
UserId = exampleUser.UserId,
Active = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.User;
import com.pulumi.ionoscloud.UserArgs;
import com.pulumi.ionoscloud.S3Key;
import com.pulumi.ionoscloud.S3KeyArgs;
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 exampleUser = new User("exampleUser", UserArgs.builder()
.firstName("example")
.lastName("example")
.email("unique@email.com")
.password("abc123-321CBA")
.administrator(false)
.forceSecAuth(false)
.build());
var exampleS3Key = new S3Key("exampleS3Key", S3KeyArgs.builder()
.userId(exampleUser.userId())
.active(true)
.build());
}
}
resources:
exampleUser:
type: ionoscloud:User
properties:
firstName: example
lastName: example
email: unique@email.com
password: abc123-321CBA
administrator: false
forceSecAuth: false
exampleS3Key:
type: ionoscloud:S3Key
properties:
userId: ${exampleUser.userId}
active: true
Create S3Key Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new S3Key(name: string, args: S3KeyArgs, opts?: CustomResourceOptions);
@overload
def S3Key(resource_name: str,
args: S3KeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def S3Key(resource_name: str,
opts: Optional[ResourceOptions] = None,
user_id: Optional[str] = None,
active: Optional[bool] = None,
s3_key_id: Optional[str] = None,
timeouts: Optional[S3KeyTimeoutsArgs] = None)
func NewS3Key(ctx *Context, name string, args S3KeyArgs, opts ...ResourceOption) (*S3Key, error)
public S3Key(string name, S3KeyArgs args, CustomResourceOptions? opts = null)
type: ionoscloud:S3Key
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 S3KeyArgs
- 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 S3KeyArgs
- 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 S3KeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args S3KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args S3KeyArgs
- 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 s3keyResource = new Ionoscloud.S3Key("s3keyResource", new()
{
UserId = "string",
Active = false,
S3KeyId = "string",
Timeouts = new Ionoscloud.Inputs.S3KeyTimeoutsArgs
{
Create = "string",
Default = "string",
Delete = "string",
Update = "string",
},
});
example, err := ionoscloud.NewS3Key(ctx, "s3keyResource", &ionoscloud.S3KeyArgs{
UserId: pulumi.String("string"),
Active: pulumi.Bool(false),
S3KeyId: pulumi.String("string"),
Timeouts: &ionoscloud.S3KeyTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var s3keyResource = new S3Key("s3keyResource", S3KeyArgs.builder()
.userId("string")
.active(false)
.s3KeyId("string")
.timeouts(S3KeyTimeoutsArgs.builder()
.create("string")
.default_("string")
.delete("string")
.update("string")
.build())
.build());
s3key_resource = ionoscloud.S3Key("s3keyResource",
user_id="string",
active=False,
s3_key_id="string",
timeouts={
"create": "string",
"default": "string",
"delete": "string",
"update": "string",
})
const s3keyResource = new ionoscloud.S3Key("s3keyResource", {
userId: "string",
active: false,
s3KeyId: "string",
timeouts: {
create: "string",
"default": "string",
"delete": "string",
update: "string",
},
});
type: ionoscloud:S3Key
properties:
active: false
s3KeyId: string
timeouts:
create: string
default: string
delete: string
update: string
userId: string
S3Key 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 S3Key resource accepts the following input properties:
- User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- Active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- S3Key
Id string - Timeouts
S3Key
Timeouts
- User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- Active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- S3Key
Id string - Timeouts
S3Key
Timeouts Args
- user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
- active Boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id String - timeouts
S3Key
Timeouts
- user
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- active boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id string - timeouts
S3Key
Timeouts
- user_
id str - [string] The UUID of the user owning the IONOS Object Storage Key.
- active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3_
key_ strid - timeouts
S3Key
Timeouts Args
- user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
- active Boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id String - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the S3Key resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- secret_
key str - The IONOS Object Storage Secret key.
Look up Existing S3Key Resource
Get an existing S3Key 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?: S3KeyState, opts?: CustomResourceOptions): S3Key
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
s3_key_id: Optional[str] = None,
secret_key: Optional[str] = None,
timeouts: Optional[S3KeyTimeoutsArgs] = None,
user_id: Optional[str] = None) -> S3Key
func GetS3Key(ctx *Context, name string, id IDInput, state *S3KeyState, opts ...ResourceOption) (*S3Key, error)
public static S3Key Get(string name, Input<string> id, S3KeyState? state, CustomResourceOptions? opts = null)
public static S3Key get(String name, Output<String> id, S3KeyState state, CustomResourceOptions options)
resources: _: type: ionoscloud:S3Key get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- S3Key
Id string - Secret
Key string - The IONOS Object Storage Secret key.
- Timeouts
S3Key
Timeouts - User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- Active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- S3Key
Id string - Secret
Key string - The IONOS Object Storage Secret key.
- Timeouts
S3Key
Timeouts Args - User
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- active Boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id String - secret
Key String - The IONOS Object Storage Secret key.
- timeouts
S3Key
Timeouts - user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
- active boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id string - secret
Key string - The IONOS Object Storage Secret key.
- timeouts
S3Key
Timeouts - user
Id string - [string] The UUID of the user owning the IONOS Object Storage Key.
- active bool
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3_
key_ strid - secret_
key str - The IONOS Object Storage Secret key.
- timeouts
S3Key
Timeouts Args - user_
id str - [string] The UUID of the user owning the IONOS Object Storage Key.
- active Boolean
- [boolean] Whether the IONOS Object Storage is active / enabled or not - Please keep in mind this is only required on create. Default value in true
- s3Key
Id String - secret
Key String - The IONOS Object Storage Secret key.
- timeouts Property Map
- user
Id String - [string] The UUID of the user owning the IONOS Object Storage Key.
Supporting Types
S3KeyTimeouts, S3KeyTimeoutsArgs
Import
An IONOS Object Storage Unit resource can be imported using its user id as well as its resource id
, e.g.
$ pulumi import ionoscloud:index/s3Key:S3Key demo userid/s3Keyid
This can be helpful when you want to import IONOS Object Storage Keys which you have already created manually or using other means, outside of terraform.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.