alks.Iamrole
Explore with Pulumi AI
Import
!> Warning: This will force-replace the resource if using role type method.
ALKS IAM roles can be imported using the name
, e.g.
$ pulumi import alks:index/iamrole:Iamrole test_role My_Test_Role
Create Iamrole Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Iamrole(name: string, args?: IamroleArgs, opts?: CustomResourceOptions);
@overload
def Iamrole(resource_name: str,
args: Optional[IamroleArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Iamrole(resource_name: str,
opts: Optional[ResourceOptions] = None,
assume_role_policy: Optional[str] = None,
enable_alks_access: Optional[bool] = None,
iamrole_id: Optional[str] = None,
include_default_policies: Optional[bool] = None,
max_session_duration_in_seconds: Optional[float] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
template_fields: Optional[Mapping[str, str]] = None,
type: Optional[str] = None)
func NewIamrole(ctx *Context, name string, args *IamroleArgs, opts ...ResourceOption) (*Iamrole, error)
public Iamrole(string name, IamroleArgs? args = null, CustomResourceOptions? opts = null)
public Iamrole(String name, IamroleArgs args)
public Iamrole(String name, IamroleArgs args, CustomResourceOptions options)
type: alks:Iamrole
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 IamroleArgs
- 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 IamroleArgs
- 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 IamroleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamroleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamroleArgs
- 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 iamroleResource = new Alks.Iamrole("iamroleResource", new()
{
AssumeRolePolicy = "string",
EnableAlksAccess = false,
IamroleId = "string",
IncludeDefaultPolicies = false,
MaxSessionDurationInSeconds = 0,
Name = "string",
NamePrefix = "string",
Tags =
{
{ "string", "string" },
},
TagsAll =
{
{ "string", "string" },
},
TemplateFields =
{
{ "string", "string" },
},
Type = "string",
});
example, err := alks.NewIamrole(ctx, "iamroleResource", &alks.IamroleArgs{
AssumeRolePolicy: pulumi.String("string"),
EnableAlksAccess: pulumi.Bool(false),
IamroleId: pulumi.String("string"),
IncludeDefaultPolicies: pulumi.Bool(false),
MaxSessionDurationInSeconds: pulumi.Float64(0),
Name: pulumi.String("string"),
NamePrefix: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TagsAll: pulumi.StringMap{
"string": pulumi.String("string"),
},
TemplateFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Type: pulumi.String("string"),
})
var iamroleResource = new Iamrole("iamroleResource", IamroleArgs.builder()
.assumeRolePolicy("string")
.enableAlksAccess(false)
.iamroleId("string")
.includeDefaultPolicies(false)
.maxSessionDurationInSeconds(0)
.name("string")
.namePrefix("string")
.tags(Map.of("string", "string"))
.tagsAll(Map.of("string", "string"))
.templateFields(Map.of("string", "string"))
.type("string")
.build());
iamrole_resource = alks.Iamrole("iamroleResource",
assume_role_policy="string",
enable_alks_access=False,
iamrole_id="string",
include_default_policies=False,
max_session_duration_in_seconds=0,
name="string",
name_prefix="string",
tags={
"string": "string",
},
tags_all={
"string": "string",
},
template_fields={
"string": "string",
},
type="string")
const iamroleResource = new alks.Iamrole("iamroleResource", {
assumeRolePolicy: "string",
enableAlksAccess: false,
iamroleId: "string",
includeDefaultPolicies: false,
maxSessionDurationInSeconds: 0,
name: "string",
namePrefix: "string",
tags: {
string: "string",
},
tagsAll: {
string: "string",
},
templateFields: {
string: "string",
},
type: "string",
});
type: alks:Iamrole
properties:
assumeRolePolicy: string
enableAlksAccess: false
iamroleId: string
includeDefaultPolicies: false
maxSessionDurationInSeconds: 0
name: string
namePrefix: string
tags:
string: string
tagsAll:
string: string
templateFields:
string: string
type: string
Iamrole 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 Iamrole resource accepts the following input properties:
- Assume
Role stringPolicy - Enable
Alks boolAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - Iamrole
Id string - Include
Default boolPolicies - Whether or not the default manages policies should be attached to the role.
- Max
Session doubleDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- Name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Dictionary<string, string>
- If present, will add specified tags onto role.
- Dictionary<string, string>
- Template
Fields Dictionary<string, string> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- Type string
- The role type to use. To see a list of available roles, call this endpoint.
- Assume
Role stringPolicy - Enable
Alks boolAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - Iamrole
Id string - Include
Default boolPolicies - Whether or not the default manages policies should be attached to the role.
- Max
Session float64Duration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- Name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- map[string]string
- If present, will add specified tags onto role.
- map[string]string
- Template
Fields map[string]string - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- Type string
- The role type to use. To see a list of available roles, call this endpoint.
- assume
Role StringPolicy - enable
Alks BooleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id String - include
Default BooleanPolicies - Whether or not the default manages policies should be attached to the role.
- max
Session DoubleDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name String
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix String - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Map<String,String>
- If present, will add specified tags onto role.
- Map<String,String>
- template
Fields Map<String,String> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type String
- The role type to use. To see a list of available roles, call this endpoint.
- assume
Role stringPolicy - enable
Alks booleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id string - include
Default booleanPolicies - Whether or not the default manages policies should be attached to the role.
- max
Session numberDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- {[key: string]: string}
- If present, will add specified tags onto role.
- {[key: string]: string}
- template
Fields {[key: string]: string} - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type string
- The role type to use. To see a list of available roles, call this endpoint.
- assume_
role_ strpolicy - enable_
alks_ boolaccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole_
id str - include_
default_ boolpolicies - Whether or not the default manages policies should be attached to the role.
- max_
session_ floatduration_ in_ seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name str
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name_
prefix str - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Mapping[str, str]
- If present, will add specified tags onto role.
- Mapping[str, str]
- template_
fields Mapping[str, str] - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type str
- The role type to use. To see a list of available roles, call this endpoint.
- assume
Role StringPolicy - enable
Alks BooleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id String - include
Default BooleanPolicies - Whether or not the default manages policies should be attached to the role.
- max
Session NumberDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name String
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix String - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Map<String>
- If present, will add specified tags onto role.
- Map<String>
- template
Fields Map<String> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type String
- The role type to use. To see a list of available roles, call this endpoint.
Outputs
All input properties are implicitly available as output properties. Additionally, the Iamrole resource produces the following output properties:
- Arn string
- Provides the ARN of the role that was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - Role
Added boolTo Ip - Indicates whether or not an instance profile role was created.
- Arn string
- Provides the ARN of the role that was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - Role
Added boolTo Ip - Indicates whether or not an instance profile role was created.
- arn String
- Provides the ARN of the role that was created.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Arn String - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - role
Added BooleanTo Ip - Indicates whether or not an instance profile role was created.
- arn string
- Provides the ARN of the role that was created.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - role
Added booleanTo Ip - Indicates whether or not an instance profile role was created.
- arn str
- Provides the ARN of the role that was created.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
arn str - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - role_
added_ boolto_ ip - Indicates whether or not an instance profile role was created.
- arn String
- Provides the ARN of the role that was created.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Arn String - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - role
Added BooleanTo Ip - Indicates whether or not an instance profile role was created.
Look up Existing Iamrole Resource
Get an existing Iamrole 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?: IamroleState, opts?: CustomResourceOptions): Iamrole
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
assume_role_policy: Optional[str] = None,
enable_alks_access: Optional[bool] = None,
iamrole_id: Optional[str] = None,
include_default_policies: Optional[bool] = None,
ip_arn: Optional[str] = None,
max_session_duration_in_seconds: Optional[float] = None,
name: Optional[str] = None,
name_prefix: Optional[str] = None,
role_added_to_ip: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
template_fields: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> Iamrole
func GetIamrole(ctx *Context, name string, id IDInput, state *IamroleState, opts ...ResourceOption) (*Iamrole, error)
public static Iamrole Get(string name, Input<string> id, IamroleState? state, CustomResourceOptions? opts = null)
public static Iamrole get(String name, Output<String> id, IamroleState state, CustomResourceOptions options)
resources: _: type: alks:Iamrole 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.
- Arn string
- Provides the ARN of the role that was created.
- Assume
Role stringPolicy - Enable
Alks boolAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - Iamrole
Id string - Include
Default boolPolicies - Whether or not the default manages policies should be attached to the role.
- Ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - Max
Session doubleDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- Name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Role
Added boolTo Ip - Indicates whether or not an instance profile role was created.
- Dictionary<string, string>
- If present, will add specified tags onto role.
- Dictionary<string, string>
- Template
Fields Dictionary<string, string> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- Type string
- The role type to use. To see a list of available roles, call this endpoint.
- Arn string
- Provides the ARN of the role that was created.
- Assume
Role stringPolicy - Enable
Alks boolAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - Iamrole
Id string - Include
Default boolPolicies - Whether or not the default manages policies should be attached to the role.
- Ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - Max
Session float64Duration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- Name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- Role
Added boolTo Ip - Indicates whether or not an instance profile role was created.
- map[string]string
- If present, will add specified tags onto role.
- map[string]string
- Template
Fields map[string]string - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- Type string
- The role type to use. To see a list of available roles, call this endpoint.
- arn String
- Provides the ARN of the role that was created.
- assume
Role StringPolicy - enable
Alks BooleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id String - include
Default BooleanPolicies - Whether or not the default manages policies should be attached to the role.
- ip
Arn String - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - max
Session DoubleDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name String
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix String - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- role
Added BooleanTo Ip - Indicates whether or not an instance profile role was created.
- Map<String,String>
- If present, will add specified tags onto role.
- Map<String,String>
- template
Fields Map<String,String> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type String
- The role type to use. To see a list of available roles, call this endpoint.
- arn string
- Provides the ARN of the role that was created.
- assume
Role stringPolicy - enable
Alks booleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id string - include
Default booleanPolicies - Whether or not the default manages policies should be attached to the role.
- ip
Arn string - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - max
Session numberDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name string
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix string - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- role
Added booleanTo Ip - Indicates whether or not an instance profile role was created.
- {[key: string]: string}
- If present, will add specified tags onto role.
- {[key: string]: string}
- template
Fields {[key: string]: string} - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type string
- The role type to use. To see a list of available roles, call this endpoint.
- arn str
- Provides the ARN of the role that was created.
- assume_
role_ strpolicy - enable_
alks_ boolaccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole_
id str - include_
default_ boolpolicies - Whether or not the default manages policies should be attached to the role.
- ip_
arn str - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - max_
session_ floatduration_ in_ seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name str
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name_
prefix str - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- role_
added_ boolto_ ip - Indicates whether or not an instance profile role was created.
- Mapping[str, str]
- If present, will add specified tags onto role.
- Mapping[str, str]
- template_
fields Mapping[str, str] - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type str
- The role type to use. To see a list of available roles, call this endpoint.
- arn String
- Provides the ARN of the role that was created.
- assume
Role StringPolicy - enable
Alks BooleanAccess - If
true
, allows ALKS calls to be made by instance profiles or Lambda functions making use of this role. Note: This enables machine identity capability. - iamrole
Id String - include
Default BooleanPolicies - Whether or not the default manages policies should be attached to the role.
- ip
Arn String - If
role_added_to_ip
wastrue
this will provide the ARN of the instance profile role. - max
Session NumberDuration In Seconds - If present, will set maximum duration for role. Change forces re-creation of resource.
- name String
- The name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- name
Prefix String - A prefix for a generated name of the ALKS IAM role which will be reflected in AWS and the ALKS UI.
- role
Added BooleanTo Ip - Indicates whether or not an instance profile role was created.
- Map<String>
- If present, will add specified tags onto role.
- Map<String>
- template
Fields Map<String> - If present, will submit template field data to ALKS. Note: This will generate an error if the role type does not support template fields.
- type String
- The role type to use. To see a list of available roles, call this endpoint.
Package Details
- Repository
- alks cox-automotive/terraform-provider-alks
- License
- Notes
- This Pulumi package is based on the
alks
Terraform Provider.