Role
Get-IAMRole
Synopsis
Get a role.
Syntax
all (Default)
Get-IAMRole [-RoleID <String>] [-Actions] [-GroupID <Int32>] [-Users] [-IgnoreContext] [-EdgeRCFile <String>]
[-Section <String>] [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
single
Get-IAMRole [-RoleID <String>] [-Actions] [-GrantedRoles] [-EdgeRCFile <String>] [-Section <String>]
[-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
Gets all roles or returns a specific role by its ID. You can filter the results depending on whether you are listing all or retrieving an individual record by adding additional switch parameters, such as -Actions
(global), -GrantedRoles
(individual), -GroupID
, -Users
, or -IgnoreContext
(all).
Parameters
-AccountSwitchKey
Account switch key, for use when you have access to multiple accounts and need to specify which one to use. Run Get-AccountSwitchKey
to list the account switch keys available to you.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Actions
Includes actions you can perform on the object.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-EdgeRCFile
EdgeRC file to authenticate your command. Defaults to ~/.edgerc
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GrantedRoles
Lists granted roles assigned for a role.
Type: SwitchParameter
Parameter Sets: single
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-GroupID
Unique identifier for each group.
Type: Int32
Parameter Sets: all
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IgnoreContext
Returns all the roles for the current account, ignoring the contract type of your API client.
Type: SwitchParameter
Parameter Sets: all
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-RoleID
Unique identifier for each role.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Section
EdgeRC section to retrieve authentication credentials from. Defaults to default
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Users
Returns users assigned to the roles.
Type: SwitchParameter
Parameter Sets: all
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug
, -ErrorAction
, -ErrorVariable
, -InformationAction
, -InformationVariable
, -OutVariable
, -OutBuffer
, -PipelineVariable
, -Verbose
, -WarningAction
, and -WarningVariable
. For more information, see about_CommonParameters.
Inputs
None
Outputs
System.Object
Related links
Updated 7 days ago