/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.identitymanagement.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Contains details about the most recent attempt to access the service. *
** This data type is used as a response element in the GetServiceLastAccessedDetails operation. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ServiceLastAccessed implements Serializable, Cloneable { /** ** The name of the service in which access was attempted. *
*/ private String serviceName; /** ** The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
*/ private java.util.Date lastAuthenticated; /** ** The namespace of the service in which access was attempted. *
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service Authorization
* Reference. Choose the name of the service to view details for that service. In the first paragraph, find the
* service prefix. For example, (service prefix: a4b)
. For more information about service namespaces,
* see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*
* The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web Services * does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
*/ private String lastAuthenticatedEntity; /** ** The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
*/ private String lastAuthenticatedRegion; /** ** The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to access * the service. *
** This field is null if no principals attempted to access the service within the tracking period. *
*/ private Integer totalAuthenticatedEntities; /** ** An object that contains details about the most recent attempt to access a tracked action within the service. *
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within the tracking period. This field is also null if the report was generated at the service level and not the action
* level. For more information, see the Granularity
field in GenerateServiceLastAccessedDetails.
*
* The name of the service in which access was attempted. *
* * @param serviceName * The name of the service in which access was attempted. */ public void setServiceName(String serviceName) { this.serviceName = serviceName; } /** ** The name of the service in which access was attempted. *
* * @return The name of the service in which access was attempted. */ public String getServiceName() { return this.serviceName; } /** ** The name of the service in which access was attempted. *
* * @param serviceName * The name of the service in which access was attempted. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLastAccessed withServiceName(String serviceName) { setServiceName(serviceName); return this; } /** ** The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticated * The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public void setLastAuthenticated(java.util.Date lastAuthenticated) { this.lastAuthenticated = lastAuthenticated; } /** *
* The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @return The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public java.util.Date getLastAuthenticated() { return this.lastAuthenticated; } /** *
* The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticated * The date and time, in ISO 8601 date-time format, when an * authenticated entity most recently attempted to access the service. Amazon Web Services does not report * unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLastAccessed withLastAuthenticated(java.util.Date lastAuthenticated) { setLastAuthenticated(lastAuthenticated); return this; } /** *
* The namespace of the service in which access was attempted. *
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service Authorization
* Reference. Choose the name of the service to view details for that service. In the first paragraph, find the
* service prefix. For example, (service prefix: a4b)
. For more information about service namespaces,
* see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service
* Authorization Reference. Choose the name of the service to view details for that service. In the first
* paragraph, find the service prefix. For example, (service prefix: a4b)
. For more information
* about service namespaces, see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*/
public void setServiceNamespace(String serviceNamespace) {
this.serviceNamespace = serviceNamespace;
}
/**
*
* The namespace of the service in which access was attempted. *
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service Authorization
* Reference. Choose the name of the service to view details for that service. In the first paragraph, find the
* service prefix. For example, (service prefix: a4b)
. For more information about service namespaces,
* see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service
* Authorization Reference. Choose the name of the service to view details for that service. In the
* first paragraph, find the service prefix. For example, (service prefix: a4b)
. For more
* information about service namespaces, see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*/
public String getServiceNamespace() {
return this.serviceNamespace;
}
/**
*
* The namespace of the service in which access was attempted. *
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service Authorization
* Reference. Choose the name of the service to view details for that service. In the first paragraph, find the
* service prefix. For example, (service prefix: a4b)
. For more information about service namespaces,
* see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
*
* To learn the service namespace of a service, see Actions, resources, and condition keys for Amazon Web Services services in the Service
* Authorization Reference. Choose the name of the service to view details for that service. In the first
* paragraph, find the service prefix. For example, (service prefix: a4b)
. For more information
* about service namespaces, see Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceLastAccessed withServiceNamespace(String serviceNamespace) {
setServiceNamespace(serviceNamespace);
return this;
}
/**
*
* The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web Services * does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticatedEntity * The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public void setLastAuthenticatedEntity(String lastAuthenticatedEntity) { this.lastAuthenticatedEntity = lastAuthenticatedEntity; } /** *
* The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web Services * does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @return The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public String getLastAuthenticatedEntity() { return this.lastAuthenticatedEntity; } /** *
* The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web Services * does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticatedEntity * The ARN of the authenticated entity (user or role) that last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLastAccessed withLastAuthenticatedEntity(String lastAuthenticatedEntity) { setLastAuthenticatedEntity(lastAuthenticatedEntity); return this; } /** *
* The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticatedRegion * The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon * Web Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public void setLastAuthenticatedRegion(String lastAuthenticatedRegion) { this.lastAuthenticatedRegion = lastAuthenticatedRegion; } /** *
* The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @return The Region from which the authenticated entity (user or role) last attempted to access the service. * Amazon Web Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. */ public String getLastAuthenticatedRegion() { return this.lastAuthenticatedRegion; } /** *
* The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon Web * Services does not report unauthenticated requests. *
** This field is null if no IAM entities attempted to access the service within the tracking period. *
* * @param lastAuthenticatedRegion * The Region from which the authenticated entity (user or role) last attempted to access the service. Amazon * Web Services does not report unauthenticated requests. ** This field is null if no IAM entities attempted to access the service within the tracking period. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLastAccessed withLastAuthenticatedRegion(String lastAuthenticatedRegion) { setLastAuthenticatedRegion(lastAuthenticatedRegion); return this; } /** *
* The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to access * the service. *
** This field is null if no principals attempted to access the service within the tracking period. *
* * @param totalAuthenticatedEntities * The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to * access the service. ** This field is null if no principals attempted to access the service within the tracking period. */ public void setTotalAuthenticatedEntities(Integer totalAuthenticatedEntities) { this.totalAuthenticatedEntities = totalAuthenticatedEntities; } /** *
* The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to access * the service. *
** This field is null if no principals attempted to access the service within the tracking period. *
* * @return The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to * access the service. ** This field is null if no principals attempted to access the service within the tracking period. */ public Integer getTotalAuthenticatedEntities() { return this.totalAuthenticatedEntities; } /** *
* The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to access * the service. *
** This field is null if no principals attempted to access the service within the tracking period. *
* * @param totalAuthenticatedEntities * The total number of authenticated principals (root user, IAM users, or IAM roles) that have attempted to * access the service. ** This field is null if no principals attempted to access the service within the tracking period. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceLastAccessed withTotalAuthenticatedEntities(Integer totalAuthenticatedEntities) { setTotalAuthenticatedEntities(totalAuthenticatedEntities); return this; } /** *
* An object that contains details about the most recent attempt to access a tracked action within the service. *
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within the tracking period. This field is also null if the report was generated at the service level and not the action
* level. For more information, see the Granularity
field in GenerateServiceLastAccessedDetails.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within
* the tracking period. This field is also null if the report was generated at the service level and not
* the action level. For more information, see the
* An object that contains details about the most recent attempt to access a tracked action within the service.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within the tracking period. This field is also null if the report was generated at the service level and not the action
* level. For more information, see the Granularity
field in
* GenerateServiceLastAccessedDetails.
*/
public java.util.ListGranularity
field in GenerateServiceLastAccessedDetails.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within
* the tracking period. This field is also null if the report was generated at the service level and not the
* action level. For more information, see the
* An object that contains details about the most recent attempt to access a tracked action within the service.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within the tracking period. This field is also null if the report was generated at the service level and not the action
* level. For more information, see the
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTrackedActionsLastAccessed(java.util.Collection)} or
* {@link #withTrackedActionsLastAccessed(java.util.Collection)} if you want to override the existing values.
* Granularity
field in
* GenerateServiceLastAccessedDetails.
*/
public void setTrackedActionsLastAccessed(java.util.CollectionGranularity
field in GenerateServiceLastAccessedDetails.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within
* the tracking period. This field is also null if the report was generated at the service level and not the
* action level. For more information, see the
* An object that contains details about the most recent attempt to access a tracked action within the service.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within the tracking period. This field is also null if the report was generated at the service level and not the action
* level. For more information, see the Granularity
field in
* GenerateServiceLastAccessedDetails.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceLastAccessed withTrackedActionsLastAccessed(TrackedActionLastAccessed... trackedActionsLastAccessed) {
if (this.trackedActionsLastAccessed == null) {
setTrackedActionsLastAccessed(new com.amazonaws.internal.SdkInternalListGranularity
field in GenerateServiceLastAccessedDetails.
*
* This field is null if there no tracked actions or if the principal did not use the tracked actions within
* the tracking period. This field is also null if the report was generated at the service level and not the
* action level. For more information, see the Granularity
field in
* GenerateServiceLastAccessedDetails.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ServiceLastAccessed withTrackedActionsLastAccessed(java.util.Collection