Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReplaceIamInstanceProfileAssociationCommand

Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.

Use DescribeIamInstanceProfileAssociations to get the association ID.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, ReplaceIamInstanceProfileAssociationCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, ReplaceIamInstanceProfileAssociationCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new ReplaceIamInstanceProfileAssociationCommand(input);
const response = await client.send(command);
see

ReplaceIamInstanceProfileAssociationCommandInput for command's input shape.

see

ReplaceIamInstanceProfileAssociationCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: ReplaceIamInstanceProfileAssociationCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions