Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetRoleCommand

Retrieves information about the specified role, including the role's path, GUID, ARN, and the role's trust policy that grants permission to assume the role. For more information about roles, see Working with roles.

Policies returned by this operation are URL-encoded compliant with RFC 3986. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the decode method of the java.net.URLDecoder utility class in the Java SDK. Other languages and SDKs provide similar functionality.

example

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

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

GetRoleCommandInput for command's input shape.

see

GetRoleCommandOutput for command's response shape.

see

config for IAMClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: GetRoleCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<GetRoleCommandInput, GetRoleCommandOutput>

Methods

Static getEndpointParameterInstructions