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:
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessKey resource produces the following output properties:
- Access
Key stringId - The access key id.
- Create
Date string - The create date of the access key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Access stringKey - The secret access key.
- Update
Date string - The update date of the access key.
- Access
Key stringId - The access key id.
- Create
Date string - The create date of the access key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Access stringKey - The secret access key.
- Update
Date string - The update date of the access key.
- access
Key StringId - The access key id.
- create
Date String - The create date of the access key.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Access StringKey - The secret access key.
- update
Date String - The update date of the access key.
- access
Key stringId - The access key id.
- create
Date string - The create date of the access key.
- id string
- The provider-assigned unique ID for this managed resource.
- secret
Access stringKey - The secret access key.
- update
Date string - The update date of the access key.
- access_
key_ strid - 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_ strkey - The secret access key.
- update_
date str - The update date of the access key.
- access
Key StringId - The access key id.
- create
Date String - The create date of the access key.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Access StringKey - The secret access key.
- update
Date 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) -> AccessKeyfunc 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.
- Access
Key stringId - The access key id.
- Create
Date string - The create date of the access key.
- Secret
Access stringKey - The secret access key.
- Status string
- The status of the access key, Optional choice contains
activeorinactive. - Update
Date string - The update date of the access key.
- User
Name string - The user name. If not specified, the current user is used.
- Access
Key stringId - The access key id.
- Create
Date string - The create date of the access key.
- Secret
Access stringKey - The secret access key.
- Status string
- The status of the access key, Optional choice contains
activeorinactive. - Update
Date string - The update date of the access key.
- User
Name string - The user name. If not specified, the current user is used.
- access
Key StringId - The access key id.
- create
Date String - The create date of the access key.
- secret
Access StringKey - The secret access key.
- status String
- The status of the access key, Optional choice contains
activeorinactive. - update
Date String - The update date of the access key.
- user
Name String - The user name. If not specified, the current user is used.
- access
Key stringId - The access key id.
- create
Date string - The create date of the access key.
- secret
Access stringKey - The secret access key.
- status string
- The status of the access key, Optional choice contains
activeorinactive. - update
Date string - The update date of the access key.
- user
Name string - The user name. If not specified, the current user is used.
- access_
key_ strid - The access key id.
- create_
date str - The create date of the access key.
- secret_
access_ strkey - The secret access key.
- status str
- The status of the access key, Optional choice contains
activeorinactive. - update_
date str - The update date of the access key.
- user_
name str - The user name. If not specified, the current user is used.
- access
Key StringId - The access key id.
- create
Date String - The create date of the access key.
- secret
Access StringKey - The secret access key.
- status String
- The status of the access key, Optional choice contains
activeorinactive. - update
Date String - The update date of the access key.
- user
Name 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
volcengineTerraform Provider.
