1. Packages
  2. Exoscale
  3. API Docs
  4. IamAccessKey
Exoscale v0.62.7 published on Tuesday, Dec 10, 2024 by Pulumiverse

exoscale.IamAccessKey

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as exoscale from "@pulumiverse/exoscale";

const mySosAccessKey = new exoscale.IamAccessKey("mySosAccessKey", {
    operations: [
        "get-sos-object",
        "list-sos-bucket",
    ],
    resources: ["sos/bucket:my-bucket"],
});
const mySksAccessKey = new exoscale.IamAccessKey("mySksAccessKey", {tags: ["sks"]});
Copy
import pulumi
import pulumiverse_exoscale as exoscale

my_sos_access_key = exoscale.IamAccessKey("mySosAccessKey",
    operations=[
        "get-sos-object",
        "list-sos-bucket",
    ],
    resources=["sos/bucket:my-bucket"])
my_sks_access_key = exoscale.IamAccessKey("mySksAccessKey", tags=["sks"])
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := exoscale.NewIamAccessKey(ctx, "mySosAccessKey", &exoscale.IamAccessKeyArgs{
			Operations: pulumi.StringArray{
				pulumi.String("get-sos-object"),
				pulumi.String("list-sos-bucket"),
			},
			Resources: pulumi.StringArray{
				pulumi.String("sos/bucket:my-bucket"),
			},
		})
		if err != nil {
			return err
		}
		_, err = exoscale.NewIamAccessKey(ctx, "mySksAccessKey", &exoscale.IamAccessKeyArgs{
			Tags: pulumi.StringArray{
				pulumi.String("sks"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Exoscale = Pulumiverse.Exoscale;

return await Deployment.RunAsync(() => 
{
    var mySosAccessKey = new Exoscale.IamAccessKey("mySosAccessKey", new()
    {
        Operations = new[]
        {
            "get-sos-object",
            "list-sos-bucket",
        },
        Resources = new[]
        {
            "sos/bucket:my-bucket",
        },
    });

    var mySksAccessKey = new Exoscale.IamAccessKey("mySksAccessKey", new()
    {
        Tags = new[]
        {
            "sks",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.exoscale.IamAccessKey;
import com.pulumi.exoscale.IamAccessKeyArgs;
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 mySosAccessKey = new IamAccessKey("mySosAccessKey", IamAccessKeyArgs.builder()
            .operations(            
                "get-sos-object",
                "list-sos-bucket")
            .resources("sos/bucket:my-bucket")
            .build());

        var mySksAccessKey = new IamAccessKey("mySksAccessKey", IamAccessKeyArgs.builder()
            .tags("sks")
            .build());

    }
}
Copy
resources:
  mySosAccessKey:
    type: exoscale:IamAccessKey
    properties:
      operations:
        - get-sos-object
        - list-sos-bucket
      resources:
        - sos/bucket:my-bucket
  mySksAccessKey:
    type: exoscale:IamAccessKey
    properties:
      tags:
        - sks
Copy

Please refer to the examples directory for complete configuration examples.

NOTE: You can retrieve the list of available operations and tags using the Exoscale CLI: exo iam access-key list-operations.

Create IamAccessKey Resource

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

Constructor syntax

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

@overload
def IamAccessKey(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 name: Optional[str] = None,
                 operations: Optional[Sequence[str]] = None,
                 resources: Optional[Sequence[str]] = None,
                 tags: Optional[Sequence[str]] = None)
func NewIamAccessKey(ctx *Context, name string, args *IamAccessKeyArgs, opts ...ResourceOption) (*IamAccessKey, error)
public IamAccessKey(string name, IamAccessKeyArgs? args = null, CustomResourceOptions? opts = null)
public IamAccessKey(String name, IamAccessKeyArgs args)
public IamAccessKey(String name, IamAccessKeyArgs args, CustomResourceOptions options)
type: exoscale:IamAccessKey
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 IamAccessKeyArgs
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 IamAccessKeyArgs
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 IamAccessKeyArgs
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 IamAccessKeyArgs
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. IamAccessKeyArgs
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 iamAccessKeyResource = new Exoscale.IamAccessKey("iamAccessKeyResource", new()
{
    Name = "string",
    Operations = new[]
    {
        "string",
    },
    Resources = new[]
    {
        "string",
    },
    Tags = new[]
    {
        "string",
    },
});
Copy
example, err := exoscale.NewIamAccessKey(ctx, "iamAccessKeyResource", &exoscale.IamAccessKeyArgs{
	Name: pulumi.String("string"),
	Operations: pulumi.StringArray{
		pulumi.String("string"),
	},
	Resources: pulumi.StringArray{
		pulumi.String("string"),
	},
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var iamAccessKeyResource = new IamAccessKey("iamAccessKeyResource", IamAccessKeyArgs.builder()
    .name("string")
    .operations("string")
    .resources("string")
    .tags("string")
    .build());
Copy
iam_access_key_resource = exoscale.IamAccessKey("iamAccessKeyResource",
    name="string",
    operations=["string"],
    resources=["string"],
    tags=["string"])
Copy
const iamAccessKeyResource = new exoscale.IamAccessKey("iamAccessKeyResource", {
    name: "string",
    operations: ["string"],
    resources: ["string"],
    tags: ["string"],
});
Copy
type: exoscale:IamAccessKey
properties:
    name: string
    operations:
        - string
    resources:
        - string
    tags:
        - string
Copy

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

Name Changes to this property will trigger replacement. string
❗ The IAM access key name.
Operations Changes to this property will trigger replacement. List<string>
❗ A list of API operations to restrict the key to.
Resources Changes to this property will trigger replacement. List<string>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
Tags Changes to this property will trigger replacement. List<string>
❗ A list of tags to restrict the key to.
Name Changes to this property will trigger replacement. string
❗ The IAM access key name.
Operations Changes to this property will trigger replacement. []string
❗ A list of API operations to restrict the key to.
Resources Changes to this property will trigger replacement. []string
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
Tags Changes to this property will trigger replacement. []string
❗ A list of tags to restrict the key to.
name Changes to this property will trigger replacement. String
❗ The IAM access key name.
operations Changes to this property will trigger replacement. List<String>
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. List<String>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
tags Changes to this property will trigger replacement. List<String>
❗ A list of tags to restrict the key to.
name Changes to this property will trigger replacement. string
❗ The IAM access key name.
operations Changes to this property will trigger replacement. string[]
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. string[]
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
tags Changes to this property will trigger replacement. string[]
❗ A list of tags to restrict the key to.
name Changes to this property will trigger replacement. str
❗ The IAM access key name.
operations Changes to this property will trigger replacement. Sequence[str]
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. Sequence[str]
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
tags Changes to this property will trigger replacement. Sequence[str]
❗ A list of tags to restrict the key to.
name Changes to this property will trigger replacement. String
❗ The IAM access key name.
operations Changes to this property will trigger replacement. List<String>
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. List<String>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
tags Changes to this property will trigger replacement. List<String>
❗ A list of tags to restrict the key to.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Key string
The IAM access key (identifier).
Secret string
The key secret.
TagsOperations List<string>
Id string
The provider-assigned unique ID for this managed resource.
Key string
The IAM access key (identifier).
Secret string
The key secret.
TagsOperations []string
id String
The provider-assigned unique ID for this managed resource.
key String
The IAM access key (identifier).
secret String
The key secret.
tagsOperations List<String>
id string
The provider-assigned unique ID for this managed resource.
key string
The IAM access key (identifier).
secret string
The key secret.
tagsOperations string[]
id str
The provider-assigned unique ID for this managed resource.
key str
The IAM access key (identifier).
secret str
The key secret.
tags_operations Sequence[str]
id String
The provider-assigned unique ID for this managed resource.
key String
The IAM access key (identifier).
secret String
The key secret.
tagsOperations List<String>

Look up Existing IamAccessKey Resource

Get an existing IamAccessKey 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?: IamAccessKeyState, opts?: CustomResourceOptions): IamAccessKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        key: Optional[str] = None,
        name: Optional[str] = None,
        operations: Optional[Sequence[str]] = None,
        resources: Optional[Sequence[str]] = None,
        secret: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        tags_operations: Optional[Sequence[str]] = None) -> IamAccessKey
func GetIamAccessKey(ctx *Context, name string, id IDInput, state *IamAccessKeyState, opts ...ResourceOption) (*IamAccessKey, error)
public static IamAccessKey Get(string name, Input<string> id, IamAccessKeyState? state, CustomResourceOptions? opts = null)
public static IamAccessKey get(String name, Output<String> id, IamAccessKeyState state, CustomResourceOptions options)
resources:  _:    type: exoscale:IamAccessKey    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:
Key string
The IAM access key (identifier).
Name Changes to this property will trigger replacement. string
❗ The IAM access key name.
Operations Changes to this property will trigger replacement. List<string>
❗ A list of API operations to restrict the key to.
Resources Changes to this property will trigger replacement. List<string>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
Secret string
The key secret.
Tags Changes to this property will trigger replacement. List<string>
❗ A list of tags to restrict the key to.
TagsOperations List<string>
Key string
The IAM access key (identifier).
Name Changes to this property will trigger replacement. string
❗ The IAM access key name.
Operations Changes to this property will trigger replacement. []string
❗ A list of API operations to restrict the key to.
Resources Changes to this property will trigger replacement. []string
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
Secret string
The key secret.
Tags Changes to this property will trigger replacement. []string
❗ A list of tags to restrict the key to.
TagsOperations []string
key String
The IAM access key (identifier).
name Changes to this property will trigger replacement. String
❗ The IAM access key name.
operations Changes to this property will trigger replacement. List<String>
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. List<String>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
secret String
The key secret.
tags Changes to this property will trigger replacement. List<String>
❗ A list of tags to restrict the key to.
tagsOperations List<String>
key string
The IAM access key (identifier).
name Changes to this property will trigger replacement. string
❗ The IAM access key name.
operations Changes to this property will trigger replacement. string[]
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. string[]
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
secret string
The key secret.
tags Changes to this property will trigger replacement. string[]
❗ A list of tags to restrict the key to.
tagsOperations string[]
key str
The IAM access key (identifier).
name Changes to this property will trigger replacement. str
❗ The IAM access key name.
operations Changes to this property will trigger replacement. Sequence[str]
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. Sequence[str]
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
secret str
The key secret.
tags Changes to this property will trigger replacement. Sequence[str]
❗ A list of tags to restrict the key to.
tags_operations Sequence[str]
key String
The IAM access key (identifier).
name Changes to this property will trigger replacement. String
❗ The IAM access key name.
operations Changes to this property will trigger replacement. List<String>
❗ A list of API operations to restrict the key to.
resources Changes to this property will trigger replacement. List<String>
❗ A list of API resources to restrict the key to (<domain>/<type>:<name>).
secret String
The key secret.
tags Changes to this property will trigger replacement. List<String>
❗ A list of tags to restrict the key to.
tagsOperations List<String>

Package Details

Repository
exoscale pulumiverse/pulumi-exoscale
License
Apache-2.0
Notes
This Pulumi package is based on the exoscale Terraform Provider.