paws.compute (version 0.1.0)

ec2_associate_iam_instance_profile: Associates an IAM instance profile with a running or stopped instance

Description

Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

Usage

ec2_associate_iam_instance_profile(IamInstanceProfile, InstanceId)

Arguments

IamInstanceProfile

[required] The IAM instance profile.

InstanceId

[required] The ID of the instance.

Request syntax

svc$associate_iam_instance_profile(
  IamInstanceProfile = list(
    Arn = "string",
    Name = "string"
  ),
  InstanceId = "string"
)

Examples

Run this code
# NOT RUN {
# This example associates an IAM instance profile named admin-role with
# the specified instance.
# }
# NOT RUN {
svc$associate_iam_instance_profile(
  IamInstanceProfile = list(
    Name = "admin-role"
  ),
  InstanceId = "i-123456789abcde123"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace