Class Principal

    • Method Detail

      • principalARN

        public final String principalARN()

        The ARN of the principal (user, role, or group). This field allows for an ARN with no accountID, with or without wildcard characters if the PrincipalType is an IAM_PATTERN.

        For more information, review associate-principal-with-portfolio in the Amazon Web Services CLI Command Reference.

        Returns:
        The ARN of the principal (user, role, or group). This field allows for an ARN with no accountID, with or without wildcard characters if the PrincipalType is an IAM_PATTERN.

        For more information, review associate-principal-with-portfolio in the Amazon Web Services CLI Command Reference.

      • principalType

        public final PrincipalType principalType()

        The principal type. The supported value is IAM if you use a fully defined ARN, or IAM_PATTERN if you use an ARN with no accountID, with or without wildcard characters.

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

        Returns:
        The principal type. The supported value is IAM if you use a fully defined ARN, or IAM_PATTERN if you use an ARN with no accountID, with or without wildcard characters.
        See Also:
        PrincipalType
      • principalTypeAsString

        public final String principalTypeAsString()

        The principal type. The supported value is IAM if you use a fully defined ARN, or IAM_PATTERN if you use an ARN with no accountID, with or without wildcard characters.

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

        Returns:
        The principal type. The supported value is IAM if you use a fully defined ARN, or IAM_PATTERN if you use an ARN with no accountID, with or without wildcard characters.
        See Also:
        PrincipalType
      • 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)