1. Packages
  2. Outscale Provider
  3. API Docs
  4. AccessKey
outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale

outscale.AccessKey

Explore with Pulumi AI

Example Usage

Creating an access key for yourself

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const accessKey01 = new outscale.AccessKey("accessKey01", {
    expirationDate: "2028-01-01",
    state: "ACTIVE",
});
Copy
import pulumi
import pulumi_outscale as outscale

access_key01 = outscale.AccessKey("accessKey01",
    expiration_date="2028-01-01",
    state="ACTIVE")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewAccessKey(ctx, "accessKey01", &outscale.AccessKeyArgs{
			ExpirationDate: pulumi.String("2028-01-01"),
			State:          pulumi.String("ACTIVE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var accessKey01 = new Outscale.AccessKey("accessKey01", new()
    {
        ExpirationDate = "2028-01-01",
        State = "ACTIVE",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.AccessKey;
import com.pulumi.outscale.AccessKeyArgs;
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 accessKey01 = new AccessKey("accessKey01", AccessKeyArgs.builder()
            .expirationDate("2028-01-01")
            .state("ACTIVE")
            .build());

    }
}
Copy
resources:
  accessKey01:
    type: outscale:AccessKey
    properties:
      expirationDate: 2028-01-01
      state: ACTIVE
Copy

Creating an access key for another user

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const accessKeyEim01 = new outscale.AccessKey("accessKeyEim01", {
    userName: outscale_user["user-1"].user_name,
    state: "ACTIVE",
    expirationDate: "2028-01-01",
}, {
    dependsOn: [outscale_user["user-1"]],
});
Copy
import pulumi
import pulumi_outscale as outscale

access_key_eim01 = outscale.AccessKey("accessKeyEim01",
    user_name=outscale_user["user-1"]["user_name"],
    state="ACTIVE",
    expiration_date="2028-01-01",
    opts = pulumi.ResourceOptions(depends_on=[outscale_user["user-1"]]))
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.NewAccessKey(ctx, "accessKeyEim01", &outscale.AccessKeyArgs{
			UserName:       pulumi.Any(outscale_user.User1.User_name),
			State:          pulumi.String("ACTIVE"),
			ExpirationDate: pulumi.String("2028-01-01"),
		}, pulumi.DependsOn([]pulumi.Resource{
			outscale_user.User1,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var accessKeyEim01 = new Outscale.AccessKey("accessKeyEim01", new()
    {
        UserName = outscale_user.User_1.User_name,
        State = "ACTIVE",
        ExpirationDate = "2028-01-01",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            outscale_user.User_1,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.AccessKey;
import com.pulumi.outscale.AccessKeyArgs;
import com.pulumi.resources.CustomResourceOptions;
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 accessKeyEim01 = new AccessKey("accessKeyEim01", AccessKeyArgs.builder()
            .userName(outscale_user.user-1().user_name())
            .state("ACTIVE")
            .expirationDate("2028-01-01")
            .build(), CustomResourceOptions.builder()
                .dependsOn(outscale_user.user-1())
                .build());

    }
}
Copy
resources:
  accessKeyEim01:
    type: outscale:AccessKey
    properties:
      userName: ${outscale_user"user-1"[%!s(MISSING)].user_name}
      state: ACTIVE
      expirationDate: 2028-01-01
    options:
      dependsOn:
        - ${outscale_user"user-1"[%!s(MISSING)]}
Copy

Create AccessKey Resource

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

Constructor syntax

new AccessKey(name: string, args?: AccessKeyArgs, opts?: CustomResourceOptions);
@overload
def AccessKey(resource_name: str,
              args: Optional[AccessKeyArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def AccessKey(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              expiration_date: Optional[str] = None,
              outscale_access_key_id: Optional[str] = None,
              state: Optional[str] = None,
              user_name: Optional[str] = None)
func NewAccessKey(ctx *Context, name string, args *AccessKeyArgs, opts ...ResourceOption) (*AccessKey, error)
public AccessKey(string name, AccessKeyArgs? args = null, CustomResourceOptions? opts = null)
public AccessKey(String name, AccessKeyArgs args)
public AccessKey(String name, AccessKeyArgs args, CustomResourceOptions options)
type: outscale:AccessKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args AccessKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AccessKeyArgs
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 accessKeyResource = new Outscale.AccessKey("accessKeyResource", new()
{
    ExpirationDate = "string",
    OutscaleAccessKeyId = "string",
    State = "string",
    UserName = "string",
});
Copy
example, err := outscale.NewAccessKey(ctx, "accessKeyResource", &outscale.AccessKeyArgs{
ExpirationDate: pulumi.String("string"),
OutscaleAccessKeyId: pulumi.String("string"),
State: pulumi.String("string"),
UserName: pulumi.String("string"),
})
Copy
var accessKeyResource = new AccessKey("accessKeyResource", AccessKeyArgs.builder()
    .expirationDate("string")
    .outscaleAccessKeyId("string")
    .state("string")
    .userName("string")
    .build());
Copy
access_key_resource = outscale.AccessKey("accessKeyResource",
    expiration_date="string",
    outscale_access_key_id="string",
    state="string",
    user_name="string")
Copy
const accessKeyResource = new outscale.AccessKey("accessKeyResource", {
    expirationDate: "string",
    outscaleAccessKeyId: "string",
    state: "string",
    userName: "string",
});
Copy
type: outscale:AccessKey
properties:
    expirationDate: string
    outscaleAccessKeyId: string
    state: string
    userName: string
Copy

AccessKey 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 AccessKey resource accepts the following input properties:

ExpirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
OutscaleAccessKeyId string
State string
The state for the access key (ACTIVE | INACTIVE).
UserName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
ExpirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
OutscaleAccessKeyId string
State string
The state for the access key (ACTIVE | INACTIVE).
UserName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
expirationDate String
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
outscaleAccessKeyId String
state String
The state for the access key (ACTIVE | INACTIVE).
userName String
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
expirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
outscaleAccessKeyId string
state string
The state for the access key (ACTIVE | INACTIVE).
userName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
expiration_date str
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
outscale_access_key_id str
state str
The state for the access key (ACTIVE | INACTIVE).
user_name str
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
expirationDate String
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
outscaleAccessKeyId String
state String
The state for the access key (ACTIVE | INACTIVE).
userName String
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).

Outputs

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

AccessKeyId string
The ID of the access key.
CreationDate string
The date and time (UTC) at which the access key was created.
Id string
The provider-assigned unique ID for this managed resource.
LastModificationDate string
The date and time (UTC) at which the access key was last modified.
RequestId string
SecretKey string
The secret key that enables you to send requests.
AccessKeyId string
The ID of the access key.
CreationDate string
The date and time (UTC) at which the access key was created.
Id string
The provider-assigned unique ID for this managed resource.
LastModificationDate string
The date and time (UTC) at which the access key was last modified.
RequestId string
SecretKey string
The secret key that enables you to send requests.
accessKeyId String
The ID of the access key.
creationDate String
The date and time (UTC) at which the access key was created.
id String
The provider-assigned unique ID for this managed resource.
lastModificationDate String
The date and time (UTC) at which the access key was last modified.
requestId String
secretKey String
The secret key that enables you to send requests.
accessKeyId string
The ID of the access key.
creationDate string
The date and time (UTC) at which the access key was created.
id string
The provider-assigned unique ID for this managed resource.
lastModificationDate string
The date and time (UTC) at which the access key was last modified.
requestId string
secretKey string
The secret key that enables you to send requests.
access_key_id str
The ID of the access key.
creation_date str
The date and time (UTC) at which the access key was created.
id str
The provider-assigned unique ID for this managed resource.
last_modification_date str
The date and time (UTC) at which the access key was last modified.
request_id str
secret_key str
The secret key that enables you to send requests.
accessKeyId String
The ID of the access key.
creationDate String
The date and time (UTC) at which the access key was created.
id String
The provider-assigned unique ID for this managed resource.
lastModificationDate String
The date and time (UTC) at which the access key was last modified.
requestId String
secretKey String
The secret key that enables you to send requests.

Look up Existing AccessKey Resource

Get an existing AccessKey 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?: AccessKeyState, opts?: CustomResourceOptions): AccessKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_key_id: Optional[str] = None,
        creation_date: Optional[str] = None,
        expiration_date: Optional[str] = None,
        last_modification_date: Optional[str] = None,
        outscale_access_key_id: Optional[str] = None,
        request_id: Optional[str] = None,
        secret_key: Optional[str] = None,
        state: Optional[str] = None,
        user_name: Optional[str] = None) -> AccessKey
func GetAccessKey(ctx *Context, name string, id IDInput, state *AccessKeyState, opts ...ResourceOption) (*AccessKey, error)
public static AccessKey Get(string name, Input<string> id, AccessKeyState? state, CustomResourceOptions? opts = null)
public static AccessKey get(String name, Output<String> id, AccessKeyState state, CustomResourceOptions options)
resources:  _:    type: outscale:AccessKey    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessKeyId string
The ID of the access key.
CreationDate string
The date and time (UTC) at which the access key was created.
ExpirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
LastModificationDate string
The date and time (UTC) at which the access key was last modified.
OutscaleAccessKeyId string
RequestId string
SecretKey string
The secret key that enables you to send requests.
State string
The state for the access key (ACTIVE | INACTIVE).
UserName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
AccessKeyId string
The ID of the access key.
CreationDate string
The date and time (UTC) at which the access key was created.
ExpirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
LastModificationDate string
The date and time (UTC) at which the access key was last modified.
OutscaleAccessKeyId string
RequestId string
SecretKey string
The secret key that enables you to send requests.
State string
The state for the access key (ACTIVE | INACTIVE).
UserName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
accessKeyId String
The ID of the access key.
creationDate String
The date and time (UTC) at which the access key was created.
expirationDate String
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
lastModificationDate String
The date and time (UTC) at which the access key was last modified.
outscaleAccessKeyId String
requestId String
secretKey String
The secret key that enables you to send requests.
state String
The state for the access key (ACTIVE | INACTIVE).
userName String
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
accessKeyId string
The ID of the access key.
creationDate string
The date and time (UTC) at which the access key was created.
expirationDate string
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
lastModificationDate string
The date and time (UTC) at which the access key was last modified.
outscaleAccessKeyId string
requestId string
secretKey string
The secret key that enables you to send requests.
state string
The state for the access key (ACTIVE | INACTIVE).
userName string
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
access_key_id str
The ID of the access key.
creation_date str
The date and time (UTC) at which the access key was created.
expiration_date str
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
last_modification_date str
The date and time (UTC) at which the access key was last modified.
outscale_access_key_id str
request_id str
secret_key str
The secret key that enables you to send requests.
state str
The state for the access key (ACTIVE | INACTIVE).
user_name str
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).
accessKeyId String
The ID of the access key.
creationDate String
The date and time (UTC) at which the access key was created.
expirationDate String
The date and time, or the date, at which you want the access key to expire, in ISO 8601 format (for example, 2020-06-14T00:00:00.000Z, or 2020-06-14). To remove an existing expiration date, use the method without specifying this parameter.
lastModificationDate String
The date and time (UTC) at which the access key was last modified.
outscaleAccessKeyId String
requestId String
secretKey String
The secret key that enables you to send requests.
state String
The state for the access key (ACTIVE | INACTIVE).
userName String
The name of the EIM user that owns the key to be created. If you do not specify a user name, this action creates an access key for the user who sends the request (which can be the root account).

Import

An access key can be imported using its ID. For example:

console

$ pulumi import outscale:index/accessKey:AccessKey ImportedAccessKey ABCDEFGHIJ0123456789
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.