1. Packages
  2. Alks Provider
  3. API Docs
  4. Ltk
alks 2.8.2 published on Monday, Apr 14, 2025 by cox-automotive

alks.Ltk

Explore with Pulumi AI

alks logo
alks 2.8.2 published on Monday, Apr 14, 2025 by cox-automotive

    # 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)
    public Ltk(String name, LtkArgs args)
    public Ltk(String name, LtkArgs args, CustomResourceOptions options)
    
    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:

    IamUsername 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.
    LtkId string
    Tags Dictionary<string, string>
    If present, will add specified tags onto iam user.
    TagsAll Dictionary<string, string>
    IamUsername 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.
    LtkId string
    Tags map[string]string
    If present, will add specified tags onto iam user.
    TagsAll map[string]string
    iamUsername 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.
    ltkId String
    tags Map<String,String>
    If present, will add specified tags onto iam user.
    tagsAll Map<String,String>
    iamUsername 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.
    ltkId string
    tags {[key: string]: string}
    If present, will add specified tags onto iam user.
    tagsAll {[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
    tags Mapping[str, str]
    If present, will add specified tags onto iam user.
    tags_all Mapping[str, str]
    iamUsername 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.
    ltkId String
    tags Map<String>
    If present, will add specified tags onto iam user.
    tagsAll Map<String>

    Outputs

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

    AccessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    IamUserArn string
    The ARN associated with the LTK user.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretKey string
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    AccessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    IamUserArn string
    The ARN associated with the LTK user.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretKey string
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    accessKey String
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn String
    The ARN associated with the LTK user.
    id String
    The provider-assigned unique ID for this managed resource.
    secretKey String
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    accessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn string
    The ARN associated with the LTK user.
    id string
    The provider-assigned unique ID for this managed resource.
    secretKey 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_arn str
    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.
    accessKey String
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn String
    The ARN associated with the LTK user.
    id String
    The provider-assigned unique ID for this managed resource.
    secretKey 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.
    The following state arguments are supported:
    AccessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    IamUserArn string
    The ARN associated with the LTK user.
    IamUsername 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.
    LtkId string
    SecretKey string
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    Tags Dictionary<string, string>
    If present, will add specified tags onto iam user.
    TagsAll Dictionary<string, string>
    AccessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    IamUserArn string
    The ARN associated with the LTK user.
    IamUsername 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.
    LtkId string
    SecretKey string
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    Tags map[string]string
    If present, will add specified tags onto iam user.
    TagsAll map[string]string
    accessKey String
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn String
    The ARN associated with the LTK user.
    iamUsername 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.
    ltkId String
    secretKey String
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    tags Map<String,String>
    If present, will add specified tags onto iam user.
    tagsAll Map<String,String>
    accessKey string
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn string
    The ARN associated with the LTK user.
    iamUsername 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.
    ltkId string
    secretKey string
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    tags {[key: string]: string}
    If present, will add specified tags onto iam user.
    tagsAll {[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_arn str
    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.
    tags Mapping[str, str]
    If present, will add specified tags onto iam user.
    tags_all Mapping[str, str]
    accessKey String
    Generated access key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    iamUserArn String
    The ARN associated with the LTK user.
    iamUsername 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.
    ltkId String
    secretKey String
    Generated secret key for the LTK user. Note: This is saved in the state file, so please be aware of this.
    tags Map<String>
    If present, will add specified tags onto iam user.
    tagsAll 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.
    alks logo
    alks 2.8.2 published on Monday, Apr 14, 2025 by cox-automotive