Class UserIdentity

    • Method Detail

      • assumedRole

        public final AssumedRole assumedRole()

        If the action was performed with temporary security credentials that were obtained using the AssumeRole operation of the Security Token Service (STS) API, the identifiers, session context, and other details about the identity.

        Returns:
        If the action was performed with temporary security credentials that were obtained using the AssumeRole operation of the Security Token Service (STS) API, the identifiers, session context, and other details about the identity.
      • awsAccount

        public final AwsAccount awsAccount()

        If the action was performed using the credentials for another Amazon Web Services account, the details of that account.

        Returns:
        If the action was performed using the credentials for another Amazon Web Services account, the details of that account.
      • awsService

        public final AwsService awsService()

        If the action was performed by an Amazon Web Services account that belongs to an Amazon Web Service, the name of the service.

        Returns:
        If the action was performed by an Amazon Web Services account that belongs to an Amazon Web Service, the name of the service.
      • federatedUser

        public final FederatedUser federatedUser()

        If the action was performed with temporary security credentials that were obtained using the GetFederationToken operation of the Security Token Service (STS) API, the identifiers, session context, and other details about the identity.

        Returns:
        If the action was performed with temporary security credentials that were obtained using the GetFederationToken operation of the Security Token Service (STS) API, the identifiers, session context, and other details about the identity.
      • iamUser

        public final IamUser iamUser()

        If the action was performed using the credentials for an Identity and Access Management (IAM) user, the name and other details about the user.

        Returns:
        If the action was performed using the credentials for an Identity and Access Management (IAM) user, the name and other details about the user.
      • root

        public final UserIdentityRoot root()

        If the action was performed using the credentials for your Amazon Web Services account, the details of your account.

        Returns:
        If the action was performed using the credentials for your Amazon Web Services account, the details of your account.
      • typeAsString

        public final String typeAsString()

        The type of entity that performed the action.

        If the service returns an enum value that is not available in the current SDK version, type will return UserIdentityType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

        Returns:
        The type of entity that performed the action.
        See Also:
        UserIdentityType
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)