Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ListRolesCommand

Lists the IAM roles that have the specified path prefix. If there are none, the operation returns an empty list. For more information about roles, see Working with roles.

IAM resource-listing operations return a subset of the available attributes for the resource. For example, this operation does not return tags, even though they are an attribute of the returned object. To view all of the information for a role, see GetRole.

You can paginate the results using the MaxItems and Marker parameters.

example

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

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

ListRolesCommandInput for command's input shape.

see

ListRolesCommandOutput for command's response shape.

see

config for IAMClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: ListRolesCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<ListRolesCommandInput, ListRolesCommandOutput>

Methods

Static getEndpointParameterInstructions