ucloud.IamAccessKey
Explore with Pulumi AI
Provides an IAM access key resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ucloud from "@pulumi/ucloud";
const fooIamUser = new ucloud.IamUser("fooIamUser", {
isFrozen: false,
loginEnable: false,
});
const fooIamAccessKey = new ucloud.IamAccessKey("fooIamAccessKey", {userName: fooIamUser.name});
import pulumi
import pulumi_ucloud as ucloud
foo_iam_user = ucloud.IamUser("fooIamUser",
is_frozen=False,
login_enable=False)
foo_iam_access_key = ucloud.IamAccessKey("fooIamAccessKey", user_name=foo_iam_user.name)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooIamUser, err := ucloud.NewIamUser(ctx, "fooIamUser", &ucloud.IamUserArgs{
IsFrozen: pulumi.Bool(false),
LoginEnable: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = ucloud.NewIamAccessKey(ctx, "fooIamAccessKey", &ucloud.IamAccessKeyArgs{
UserName: fooIamUser.Name,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ucloud = Pulumi.Ucloud;
return await Deployment.RunAsync(() =>
{
var fooIamUser = new Ucloud.IamUser("fooIamUser", new()
{
IsFrozen = false,
LoginEnable = false,
});
var fooIamAccessKey = new Ucloud.IamAccessKey("fooIamAccessKey", new()
{
UserName = fooIamUser.Name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ucloud.IamUser;
import com.pulumi.ucloud.IamUserArgs;
import com.pulumi.ucloud.IamAccessKey;
import com.pulumi.ucloud.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 fooIamUser = new IamUser("fooIamUser", IamUserArgs.builder()
.isFrozen(false)
.loginEnable(false)
.build());
var fooIamAccessKey = new IamAccessKey("fooIamAccessKey", IamAccessKeyArgs.builder()
.userName(fooIamUser.name())
.build());
}
}
resources:
fooIamUser:
type: ucloud:IamUser
properties:
isFrozen: false
loginEnable: false
fooIamAccessKey:
type: ucloud:IamAccessKey
properties:
userName: ${fooIamUser.name}
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: IamAccessKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamAccessKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
user_name: Optional[str] = None,
iam_access_key_id: Optional[str] = None,
pgp_key: Optional[str] = None,
secret_file: Optional[str] = None,
status: Optional[str] = None)
func NewIamAccessKey(ctx *Context, name string, args IamAccessKeyArgs, opts ...ResourceOption) (*IamAccessKey, error)
public IamAccessKey(string name, IamAccessKeyArgs args, CustomResourceOptions? opts = null)
public IamAccessKey(String name, IamAccessKeyArgs args)
public IamAccessKey(String name, IamAccessKeyArgs args, CustomResourceOptions options)
type: ucloud: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 Ucloud.IamAccessKey("iamAccessKeyResource", new()
{
UserName = "string",
IamAccessKeyId = "string",
PgpKey = "string",
SecretFile = "string",
Status = "string",
});
example, err := ucloud.NewIamAccessKey(ctx, "iamAccessKeyResource", &ucloud.IamAccessKeyArgs{
UserName: pulumi.String("string"),
IamAccessKeyId: pulumi.String("string"),
PgpKey: pulumi.String("string"),
SecretFile: pulumi.String("string"),
Status: pulumi.String("string"),
})
var iamAccessKeyResource = new IamAccessKey("iamAccessKeyResource", IamAccessKeyArgs.builder()
.userName("string")
.iamAccessKeyId("string")
.pgpKey("string")
.secretFile("string")
.status("string")
.build());
iam_access_key_resource = ucloud.IamAccessKey("iamAccessKeyResource",
user_name="string",
iam_access_key_id="string",
pgp_key="string",
secret_file="string",
status="string")
const iamAccessKeyResource = new ucloud.IamAccessKey("iamAccessKeyResource", {
userName: "string",
iamAccessKeyId: "string",
pgpKey: "string",
secretFile: "string",
status: "string",
});
type: ucloud:IamAccessKey
properties:
iamAccessKeyId: string
pgpKey: string
secretFile: string
status: string
userName: 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:
- User
Name string - Name of the IAM user.
- Iam
Access stringKey Id - The access key ID.
- Pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - Secret
File string - The name of file that can save access key id and access key secret.
- Status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
- User
Name string - Name of the IAM user.
- Iam
Access stringKey Id - The access key ID.
- Pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - Secret
File string - The name of file that can save access key id and access key secret.
- Status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
- user
Name String - Name of the IAM user.
- iam
Access StringKey Id - The access key ID.
- pgp
Key String - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret
File String - The name of file that can save access key id and access key secret.
- status String
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
- user
Name string - Name of the IAM user.
- iam
Access stringKey Id - The access key ID.
- pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret
File string - The name of file that can save access key id and access key secret.
- status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
- user_
name str - Name of the IAM user.
- iam_
access_ strkey_ id - The access key ID.
- pgp_
key str - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret_
file str - The name of file that can save access key id and access key secret.
- status str
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
- user
Name String - Name of the IAM user.
- iam
Access StringKey Id - The access key ID.
- pgp
Key String - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret
File String - The name of file that can save access key id and access key secret.
- status String
- Status of access key. It must be
Active
orInactive
. Default value isActive
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamAccessKey resource produces the following output properties:
- Encrypted
Secret string - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- Secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
- Encrypted
Secret string - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- Secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
- encrypted
Secret String - id String
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret
- secret String
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
- encrypted
Secret string - id string
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
- encrypted_
secret str - id str
- The provider-assigned unique ID for this managed resource.
- key_
fingerprint str - The fingerprint of the PGP key used to encrypt the secret
- secret str
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
- encrypted
Secret String - id String
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret
- secret String
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext.
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,
encrypted_secret: Optional[str] = None,
iam_access_key_id: Optional[str] = None,
key_fingerprint: Optional[str] = None,
pgp_key: Optional[str] = None,
secret: Optional[str] = None,
secret_file: Optional[str] = None,
status: Optional[str] = None,
user_name: Optional[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: ucloud:IamAccessKey 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.
- Encrypted
Secret string - Iam
Access stringKey Id - The access key ID.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- Pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - Secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - Secret
File string - The name of file that can save access key id and access key secret.
- Status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - User
Name string - Name of the IAM user.
- Encrypted
Secret string - Iam
Access stringKey Id - The access key ID.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- Pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - Secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - Secret
File string - The name of file that can save access key id and access key secret.
- Status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - User
Name string - Name of the IAM user.
- encrypted
Secret String - iam
Access StringKey Id - The access key ID.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret
- pgp
Key String - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret String
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - secret
File String - The name of file that can save access key id and access key secret.
- status String
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - user
Name String - Name of the IAM user.
- encrypted
Secret string - iam
Access stringKey Id - The access key ID.
- key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret
- pgp
Key string - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret string
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - secret
File string - The name of file that can save access key id and access key secret.
- status string
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - user
Name string - Name of the IAM user.
- encrypted_
secret str - iam_
access_ strkey_ id - The access key ID.
- key_
fingerprint str - The fingerprint of the PGP key used to encrypt the secret
- pgp_
key str - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret str
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - secret_
file str - The name of file that can save access key id and access key secret.
- status str
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - user_
name str - Name of the IAM user.
- encrypted
Secret String - iam
Access StringKey Id - The access key ID.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret
- pgp
Key String - Either a base-64 encoded PGP public key, or a keybase username in the form
keybase:some_person_that_exists
. - secret String
- The secret access key. Note that this will be written to the state file. Alternatively, you may supply a
pgp_key
instead, which will prevent the secret from being stored in plaintext. - secret
File String - The name of file that can save access key id and access key secret.
- status String
- Status of access key. It must be
Active
orInactive
. Default value isActive
. - user
Name String - Name of the IAM user.
Package Details
- Repository
- ucloud ucloud/terraform-provider-ucloud
- License
- Notes
- This Pulumi package is based on the
ucloud
Terraform Provider.