1. Packages
  2. Volcengine
  3. API Docs
  4. iam
  5. AccessKey
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
volcengine logo
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine

    Provides a resource to manage iam access key

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.iam.AccessKey("foo", {
        status: "active",
        userName: "jonny",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.iam.AccessKey("foo",
        status="active",
        user_name="jonny")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewAccessKey(ctx, "foo", &iam.AccessKeyArgs{
    			Status:   pulumi.String("active"),
    			UserName: pulumi.String("jonny"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Iam.AccessKey("foo", new()
        {
            Status = "active",
            UserName = "jonny",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.iam.AccessKey;
    import com.pulumi.volcengine.iam.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 foo = new AccessKey("foo", AccessKeyArgs.builder()        
                .status("active")
                .userName("jonny")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:iam:AccessKey
        properties:
          status: active
          userName: jonny
    

    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,
                  status: 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: volcengine:iam:AccessKey
    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 AccessKeyArgs
    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 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 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 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 String
    The unique name of the resource.
    args 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 Volcengine.Iam.AccessKey("accessKeyResource", new()
    {
        Status = "string",
        UserName = "string",
    });
    
    example, err := iam.NewAccessKey(ctx, "accessKeyResource", &iam.AccessKeyArgs{
    	Status:   pulumi.String("string"),
    	UserName: pulumi.String("string"),
    })
    
    var accessKeyResource = new AccessKey("accessKeyResource", AccessKeyArgs.builder()
        .status("string")
        .userName("string")
        .build());
    
    access_key_resource = volcengine.iam.AccessKey("accessKeyResource",
        status="string",
        user_name="string")
    
    const accessKeyResource = new volcengine.iam.AccessKey("accessKeyResource", {
        status: "string",
        userName: "string",
    });
    
    type: volcengine:iam:AccessKey
    properties:
        status: string
        userName: string
    

    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:

    Status string
    The status of the access key, Optional choice contains active or inactive.
    UserName string
    The user name. If not specified, the current user is used.
    Status string
    The status of the access key, Optional choice contains active or inactive.
    UserName string
    The user name. If not specified, the current user is used.
    status String
    The status of the access key, Optional choice contains active or inactive.
    userName String
    The user name. If not specified, the current user is used.
    status string
    The status of the access key, Optional choice contains active or inactive.
    userName string
    The user name. If not specified, the current user is used.
    status str
    The status of the access key, Optional choice contains active or inactive.
    user_name str
    The user name. If not specified, the current user is used.
    status String
    The status of the access key, Optional choice contains active or inactive.
    userName String
    The user name. If not specified, the current user is used.

    Outputs

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

    AccessKeyId string
    The access key id.
    CreateDate string
    The create date of the access key.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretAccessKey string
    The secret access key.
    UpdateDate string
    The update date of the access key.
    AccessKeyId string
    The access key id.
    CreateDate string
    The create date of the access key.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretAccessKey string
    The secret access key.
    UpdateDate string
    The update date of the access key.
    accessKeyId String
    The access key id.
    createDate String
    The create date of the access key.
    id String
    The provider-assigned unique ID for this managed resource.
    secretAccessKey String
    The secret access key.
    updateDate String
    The update date of the access key.
    accessKeyId string
    The access key id.
    createDate string
    The create date of the access key.
    id string
    The provider-assigned unique ID for this managed resource.
    secretAccessKey string
    The secret access key.
    updateDate string
    The update date of the access key.
    access_key_id str
    The access key id.
    create_date str
    The create date of the access key.
    id str
    The provider-assigned unique ID for this managed resource.
    secret_access_key str
    The secret access key.
    update_date str
    The update date of the access key.
    accessKeyId String
    The access key id.
    createDate String
    The create date of the access key.
    id String
    The provider-assigned unique ID for this managed resource.
    secretAccessKey String
    The secret access key.
    updateDate String
    The update date of the access key.

    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,
            create_date: Optional[str] = None,
            secret_access_key: Optional[str] = None,
            status: Optional[str] = None,
            update_date: 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: volcengine:iam:AccessKey    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.
    The following state arguments are supported:
    AccessKeyId string
    The access key id.
    CreateDate string
    The create date of the access key.
    SecretAccessKey string
    The secret access key.
    Status string
    The status of the access key, Optional choice contains active or inactive.
    UpdateDate string
    The update date of the access key.
    UserName string
    The user name. If not specified, the current user is used.
    AccessKeyId string
    The access key id.
    CreateDate string
    The create date of the access key.
    SecretAccessKey string
    The secret access key.
    Status string
    The status of the access key, Optional choice contains active or inactive.
    UpdateDate string
    The update date of the access key.
    UserName string
    The user name. If not specified, the current user is used.
    accessKeyId String
    The access key id.
    createDate String
    The create date of the access key.
    secretAccessKey String
    The secret access key.
    status String
    The status of the access key, Optional choice contains active or inactive.
    updateDate String
    The update date of the access key.
    userName String
    The user name. If not specified, the current user is used.
    accessKeyId string
    The access key id.
    createDate string
    The create date of the access key.
    secretAccessKey string
    The secret access key.
    status string
    The status of the access key, Optional choice contains active or inactive.
    updateDate string
    The update date of the access key.
    userName string
    The user name. If not specified, the current user is used.
    access_key_id str
    The access key id.
    create_date str
    The create date of the access key.
    secret_access_key str
    The secret access key.
    status str
    The status of the access key, Optional choice contains active or inactive.
    update_date str
    The update date of the access key.
    user_name str
    The user name. If not specified, the current user is used.
    accessKeyId String
    The access key id.
    createDate String
    The create date of the access key.
    secretAccessKey String
    The secret access key.
    status String
    The status of the access key, Optional choice contains active or inactive.
    updateDate String
    The update date of the access key.
    userName String
    The user name. If not specified, the current user is used.

    Import

    Iam access key don’t support import

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate