alks.Ltk
Explore with Pulumi AI
# Resource: alks.Ltk
Creates an iam user with a long term key.
Example Usage
ALKS IAM User Creation
import * as pulumi from "@pulumi/pulumi";
import * as alks from "@pulumi/alks";
const testLtkUser = new alks.Ltk("testLtkUser", {iamUsername: "My_LTK_User_Name"});
import pulumi
import pulumi_alks as alks
test_ltk_user = alks.Ltk("testLtkUser", iam_username="My_LTK_User_Name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/alks/v2/alks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alks.NewLtk(ctx, "testLtkUser", &alks.LtkArgs{
IamUsername: pulumi.String("My_LTK_User_Name"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Alks = Pulumi.Alks;
return await Deployment.RunAsync(() =>
{
var testLtkUser = new Alks.Ltk("testLtkUser", new()
{
IamUsername = "My_LTK_User_Name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alks.Ltk;
import com.pulumi.alks.LtkArgs;
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 testLtkUser = new Ltk("testLtkUser", LtkArgs.builder()
.iamUsername("My_LTK_User_Name")
.build());
}
}
resources:
testLtkUser:
type: alks:Ltk
properties:
iamUsername: My_LTK_User_Name
ALKS IAM User Creation With Tags
import * as pulumi from "@pulumi/pulumi";
import * as alks from "@pulumi/alks";
const testLtkUser = new alks.Ltk("testLtkUser", {
iamUsername: "My_LTK_User_Name",
tags: {
tagKey: "tagValue",
},
});
import pulumi
import pulumi_alks as alks
test_ltk_user = alks.Ltk("testLtkUser",
iam_username="My_LTK_User_Name",
tags={
"tagKey": "tagValue",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/alks/v2/alks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := alks.NewLtk(ctx, "testLtkUser", &alks.LtkArgs{
IamUsername: pulumi.String("My_LTK_User_Name"),
Tags: pulumi.StringMap{
"tagKey": pulumi.String("tagValue"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Alks = Pulumi.Alks;
return await Deployment.RunAsync(() =>
{
var testLtkUser = new Alks.Ltk("testLtkUser", new()
{
IamUsername = "My_LTK_User_Name",
Tags =
{
{ "tagKey", "tagValue" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alks.Ltk;
import com.pulumi.alks.LtkArgs;
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 testLtkUser = new Ltk("testLtkUser", LtkArgs.builder()
.iamUsername("My_LTK_User_Name")
.tags(Map.of("tagKey", "tagValue"))
.build());
}
}
resources:
testLtkUser:
type: alks:Ltk
properties:
iamUsername: My_LTK_User_Name
tags:
tagKey: tagValue
Create Ltk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Ltk(name: string, args: LtkArgs, opts?: CustomResourceOptions);
@overload
def Ltk(resource_name: str,
args: LtkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Ltk(resource_name: str,
opts: Optional[ResourceOptions] = None,
iam_username: Optional[str] = None,
ltk_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None)
func NewLtk(ctx *Context, name string, args LtkArgs, opts ...ResourceOption) (*Ltk, error)
public Ltk(string name, LtkArgs args, CustomResourceOptions? opts = null)
type: alks:Ltk
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 LtkArgs
- 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 LtkArgs
- 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 LtkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LtkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LtkArgs
- 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 ltkResource = new Alks.Ltk("ltkResource", new()
{
IamUsername = "string",
LtkId = "string",
Tags =
{
{ "string", "string" },
},
TagsAll =
{
{ "string", "string" },
},
});
example, err := alks.NewLtk(ctx, "ltkResource", &alks.LtkArgs{
IamUsername: pulumi.String("string"),
LtkId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TagsAll: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var ltkResource = new Ltk("ltkResource", LtkArgs.builder()
.iamUsername("string")
.ltkId("string")
.tags(Map.of("string", "string"))
.tagsAll(Map.of("string", "string"))
.build());
ltk_resource = alks.Ltk("ltkResource",
iam_username="string",
ltk_id="string",
tags={
"string": "string",
},
tags_all={
"string": "string",
})
const ltkResource = new alks.Ltk("ltkResource", {
iamUsername: "string",
ltkId: "string",
tags: {
string: "string",
},
tagsAll: {
string: "string",
},
});
type: alks:Ltk
properties:
iamUsername: string
ltkId: string
tags:
string: string
tagsAll:
string: string
Ltk 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 Ltk resource accepts the following input properties:
- Iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- Ltk
Id string - Dictionary<string, string>
- If present, will add specified tags onto iam user.
- Dictionary<string, string>
- Iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- Ltk
Id string - map[string]string
- If present, will add specified tags onto iam user.
- map[string]string
- iam
Username String - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id String - Map<String,String>
- If present, will add specified tags onto iam user.
- Map<String,String>
- iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id string - {[key: string]: string}
- If present, will add specified tags onto iam user.
- {[key: string]: string}
- iam_
username str - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk_
id str - Mapping[str, str]
- If present, will add specified tags onto iam user.
- Mapping[str, str]
- iam
Username String - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id String - Map<String>
- If present, will add specified tags onto iam user.
- Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the Ltk resource produces the following output properties:
- Access
Key string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Iam
User stringArn - The ARN associated with the LTK user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Access
Key string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Iam
User stringArn - The ARN associated with the LTK user.
- Id string
- The provider-assigned unique ID for this managed resource.
- Secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- access
Key String - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User StringArn - The ARN associated with the LTK user.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Key String - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- access
Key string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User stringArn - The ARN associated with the LTK user.
- id string
- The provider-assigned unique ID for this managed resource.
- secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- access_
key str - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam_
user_ strarn - The ARN associated with the LTK user.
- id str
- The provider-assigned unique ID for this managed resource.
- secret_
key str - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- access
Key String - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User StringArn - The ARN associated with the LTK user.
- id String
- The provider-assigned unique ID for this managed resource.
- secret
Key String - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
Look up Existing Ltk Resource
Get an existing Ltk 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?: LtkState, opts?: CustomResourceOptions): Ltk
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
iam_user_arn: Optional[str] = None,
iam_username: Optional[str] = None,
ltk_id: Optional[str] = None,
secret_key: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Ltk
func GetLtk(ctx *Context, name string, id IDInput, state *LtkState, opts ...ResourceOption) (*Ltk, error)
public static Ltk Get(string name, Input<string> id, LtkState? state, CustomResourceOptions? opts = null)
public static Ltk get(String name, Output<String> id, LtkState state, CustomResourceOptions options)
resources: _: type: alks:Ltk 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 string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Iam
User stringArn - The ARN associated with the LTK user.
- Iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- Ltk
Id string - Secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Dictionary<string, string>
- If present, will add specified tags onto iam user.
- Dictionary<string, string>
- Access
Key string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Iam
User stringArn - The ARN associated with the LTK user.
- Iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- Ltk
Id string - Secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- map[string]string
- If present, will add specified tags onto iam user.
- map[string]string
- access
Key String - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User StringArn - The ARN associated with the LTK user.
- iam
Username String - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id String - secret
Key String - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Map<String,String>
- If present, will add specified tags onto iam user.
- Map<String,String>
- access
Key string - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User stringArn - The ARN associated with the LTK user.
- iam
Username string - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id string - secret
Key string - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- {[key: string]: string}
- If present, will add specified tags onto iam user.
- {[key: string]: string}
- access_
key str - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam_
user_ strarn - The ARN associated with the LTK user.
- iam_
username str - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk_
id str - secret_
key str - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Mapping[str, str]
- If present, will add specified tags onto iam user.
- Mapping[str, str]
- access
Key String - Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- iam
User StringArn - The ARN associated with the LTK user.
- iam
Username String - The name of the IAM user to create. This parameter allows a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: =,.@-. User names are not distinguished by case.
- ltk
Id String - secret
Key String - Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
- Map<String>
- If present, will add specified tags onto iam user.
- Map<String>
Import
AWS IAM users can be imported using their user name, eg:
$ pulumi import alks:index/ltk:Ltk my_ltk_resource MY_EXISTING_LTK_USER
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- alks cox-automotive/terraform-provider-alks
- License
- Notes
- This Pulumi package is based on the
alks
Terraform Provider.