AWS SDK Version 3 for .NET
API Reference

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.

After you generate a group or policy report using the 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.

You can also use this operation for user or role reports to retrieve details about those entities.

If the operation fails, the 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.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to GetServiceLastAccessedDetailsWithEntitiesAsync.

Namespace: Amazon.IdentityManagement
Assembly: AWSSDK.IdentityManagement.dll
Version: 3.x.y.z

Syntax

C#
public virtual GetServiceLastAccessedDetailsWithEntitiesResponse GetServiceLastAccessedDetailsWithEntities(
         GetServiceLastAccessedDetailsWithEntitiesRequest request
)

Parameters

request
Type: Amazon.IdentityManagement.Model.GetServiceLastAccessedDetailsWithEntitiesRequest

Container for the necessary parameters to execute the GetServiceLastAccessedDetailsWithEntities service method.

Return Value


The response from the GetServiceLastAccessedDetailsWithEntities service method, as returned by IdentityManagementService.

Exceptions

ExceptionCondition
InvalidInputException The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
NoSuchEntityException The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.

Examples

The following operation returns details about the entities that attempted to access the IAM service.

To get sntity details from a previously-generated report


var client = new AmazonIdentityManagementServiceClient();
var response = client.GetServiceLastAccessedDetailsWithEntities(new GetServiceLastAccessedDetailsWithEntitiesRequest 
{
    JobId = "examplef-1305-c245-eba4-71fe298bcda7",
    ServiceNamespace = "iam"
});

List<EntityDetails> entityDetailsList = response.EntityDetailsList;
bool isTruncated = response.IsTruncated;
DateTime jobCompletionDate = response.JobCompletionDate;
DateTime jobCreationDate = response.JobCreationDate;
string jobStatus = response.JobStatus;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also