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"]});
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"])
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
})
}
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",
},
});
});
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());
}
}
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
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
},
});
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"),
},
})
var iamAccessKeyResource = new IamAccessKey("iamAccessKeyResource", IamAccessKeyArgs.builder()
.name("string")
.operations("string")
.resources("string")
.tags("string")
.build());
iam_access_key_resource = exoscale.IamAccessKey("iamAccessKeyResource",
name="string",
operations=["string"],
resources=["string"],
tags=["string"])
const iamAccessKeyResource = new exoscale.IamAccessKey("iamAccessKeyResource", {
name: "string",
operations: ["string"],
resources: ["string"],
tags: ["string"],
});
type: exoscale:IamAccessKey
properties:
name: string
operations:
- string
resources:
- string
tags:
- string
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 string
- ❗ The IAM access key name.
- Operations List<string>
- ❗ A list of API operations to restrict the key to.
- Resources List<string>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - List<string>
- ❗ A list of tags to restrict the key to.
- Name string
- ❗ The IAM access key name.
- Operations []string
- ❗ A list of API operations to restrict the key to.
- Resources []string
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - []string
- ❗ A list of tags to restrict the key to.
- name String
- ❗ The IAM access key name.
- operations List<String>
- ❗ A list of API operations to restrict the key to.
- resources List<String>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - List<String>
- ❗ A list of tags to restrict the key to.
- name string
- ❗ The IAM access key name.
- operations string[]
- ❗ A list of API operations to restrict the key to.
- resources string[]
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - string[]
- ❗ A list of tags to restrict the key to.
- name str
- ❗ The IAM access key name.
- operations Sequence[str]
- ❗ A list of API operations to restrict the key to.
- resources Sequence[str]
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - Sequence[str]
- ❗ A list of tags to restrict the key to.
- name String
- ❗ The IAM access key name.
- operations List<String>
- ❗ A list of API operations to restrict the key to.
- resources List<String>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - 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:
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)
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.
- Key string
- The IAM access key (identifier).
- Name string
- ❗ The IAM access key name.
- Operations List<string>
- ❗ A list of API operations to restrict the key to.
- Resources List<string>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - Secret string
- The key secret.
- List<string>
- ❗ A list of tags to restrict the key to.
- List<string>
- Key string
- The IAM access key (identifier).
- Name string
- ❗ The IAM access key name.
- Operations []string
- ❗ A list of API operations to restrict the key to.
- Resources []string
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - Secret string
- The key secret.
- []string
- ❗ A list of tags to restrict the key to.
- []string
- key String
- The IAM access key (identifier).
- name String
- ❗ The IAM access key name.
- operations List<String>
- ❗ A list of API operations to restrict the key to.
- resources List<String>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - secret String
- The key secret.
- List<String>
- ❗ A list of tags to restrict the key to.
- List<String>
- key string
- The IAM access key (identifier).
- name string
- ❗ The IAM access key name.
- operations string[]
- ❗ A list of API operations to restrict the key to.
- resources string[]
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - secret string
- The key secret.
- string[]
- ❗ A list of tags to restrict the key to.
- string[]
- key str
- The IAM access key (identifier).
- name str
- ❗ The IAM access key name.
- operations Sequence[str]
- ❗ A list of API operations to restrict the key to.
- resources Sequence[str]
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - secret str
- The key secret.
- Sequence[str]
- ❗ A list of tags to restrict the key to.
- Sequence[str]
- key String
- The IAM access key (identifier).
- name String
- ❗ The IAM access key name.
- operations List<String>
- ❗ A list of API operations to restrict the key to.
- resources List<String>
- ❗ A list of API resources to restrict the key to (
<domain>/<type>:<name>
). - secret String
- The key secret.
- List<String>
- ❗ A list of tags to restrict the key to.
- List<String>
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
exoscale
Terraform Provider.