AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Get-IAMServiceLastAccessedDetailWithEntity-JobId <String>-ServiceNamespace <String>-Marker <String>-MaxItem <Int32>-Select <String>
GenerateServiceLastAccessedDetails
operation, you can use the JobId
parameter in GetServiceLastAccessedDetailsWithEntities
. This operation retrieves the status of your report job and a list of entities that could have used group or policy permissions to access the specified service.
GetServiceLastAccessedDetailsWithEntities
operation returns the reason that it failed.
By default, the list of associated entities is sorted by date, with the most recent access listed first. GenerateServiceLastAccessedDetails
operation. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Marker
element in the response that you received to indicate where the next call should start.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | NextToken |
IsTruncated
response element is true
.If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated
response element returns true
, and Marker
contains a value to include in the subsequent call that tells the service where to continue from. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | MaxItems |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
(service prefix: a4b)
. For more information about service namespaces, see Amazon Web Services service namespaces in the Amazon Web Services General Reference. Required? | True |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
$results = Get-IAMServiceLastAccessedDetailWithEntity -JobId f0b7a819-eab0-929b-dc26-ca598911cb9f -ServiceNamespace ec2
$results
Output:
EntityDetailsList : {Amazon.IdentityManagement.Model.EntityDetails}
Error :
IsTruncated : False
JobCompletionDate : 12/29/19 11:19:31 AM
JobCreationDate : 12/29/19 11:19:31 AM
JobStatus : COMPLETED
Marker :
$results.EntityDetailsList
Output:
EntityInfo LastAuthenticated
---------- -----------------
Amazon.IdentityManagement.Model.EntityInfo 11/16/19 3:47:00 PM
$results.EntityInfo
Output:
Arn : arn:aws:iam::123456789012:user/TestUser
Id : AIDA4NBK5CXF5TZHU1234
Name : TestUser
Path : /
Type : USERThis example provides the last accessed timestamp for the service in the request by that respective IAM entity.
AWS Tools for PowerShell: 2.x.y.z