UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

127 lines (126 loc) 6.72 kB
import * as pulumi from "@pulumi/pulumi"; /** * Creates a new instance profile. For information about instance profiles, see [Using instance profiles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html). * For information about the number of instance profiles you can create, see [object quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *User Guide*. * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myIamInstanceProfile = new aws_native.iam.InstanceProfile("myIamInstanceProfile", { * instanceProfileName: "MyIamInstanceProfile", * path: "/", * roles: ["MyAdminRole"], * }); * const myLaunchTemplate = new aws_native.ec2.LaunchTemplate("myLaunchTemplate", { * launchTemplateName: "MyLaunchTemplate", * launchTemplateData: { * iamInstanceProfile: { * arn: myIamInstanceProfile.arn, * }, * disableApiTermination: true, * imageId: "ami-04d5cc9b88example", * instanceType: "t2.micro", * keyName: "MyKeyPair", * securityGroupIds: ["sg-083cd3bfb8example"], * }, * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const myIamInstanceProfile = new aws_native.iam.InstanceProfile("myIamInstanceProfile", { * instanceProfileName: "MyIamInstanceProfile", * path: "/", * roles: ["MyAdminRole"], * }); * const myLaunchTemplate = new aws_native.ec2.LaunchTemplate("myLaunchTemplate", { * launchTemplateName: "MyLaunchTemplate", * launchTemplateData: { * iamInstanceProfile: { * arn: myIamInstanceProfile.arn, * }, * disableApiTermination: true, * imageId: "ami-04d5cc9b88example", * instanceType: "t2.micro", * keyName: "MyKeyPair", * securityGroupIds: ["sg-083cd3bfb8example"], * }, * }); * * ``` */ export declare class InstanceProfile extends pulumi.CustomResource { /** * Get an existing InstanceProfile resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): InstanceProfile; /** * Returns true if the given object is an instance of InstanceProfile. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is InstanceProfile; /** * Returns the Amazon Resource Name (ARN) for the instance profile. For example: * * `{"Fn::GetAtt" : ["MyProfile", "Arn"] }` * * This returns a value such as `arn:aws:iam::1234567890:instance-profile/MyProfile-ASDNSDLKJ` . */ readonly arn: pulumi.Output<string>; /** * The name of the instance profile to create. * This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- */ readonly instanceProfileName: pulumi.Output<string | undefined>; /** * The path to the instance profile. For more information about paths, see [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) in the *IAM User Guide*. * This parameter is optional. If it is not included, it defaults to a slash (/). * This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (``\u0021``) through the DEL character (``\u007F``), including most punctuation characters, digits, and upper and lowercased letters. */ readonly path: pulumi.Output<string | undefined>; /** * The name of the role to associate with the instance profile. Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions. */ readonly roles: pulumi.Output<string[]>; /** * Create a InstanceProfile resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: InstanceProfileArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a InstanceProfile resource. */ export interface InstanceProfileArgs { /** * The name of the instance profile to create. * This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@- */ instanceProfileName?: pulumi.Input<string>; /** * The path to the instance profile. For more information about paths, see [IAM Identifiers](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) in the *IAM User Guide*. * This parameter is optional. If it is not included, it defaults to a slash (/). * This parameter allows (through its [regex pattern](https://docs.aws.amazon.com/http://wikipedia.org/wiki/regex)) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (``\u0021``) through the DEL character (``\u007F``), including most punctuation characters, digits, and upper and lowercased letters. */ path?: pulumi.Input<string>; /** * The name of the role to associate with the instance profile. Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions. */ roles: pulumi.Input<pulumi.Input<string>[]>; }