Class AwsIam

    • Constructor Detail

      • AwsIam

        public AwsIam()
    • Method Detail

      • builder

        public Provider.Builder builder()
        Description copied from interface: Provider
        Creates and returns a new Builder instance for this provider.
        Returns:
        A Builder instance for constructing this provider.
      • getException

        public Class<? extends SubstrateSdkException> getException​(Throwable t)
        Description copied from interface: Provider
        Maps a given Throwable from the provider implementation to a specific SubstrateSdkException. This is used for exception handling abstraction.
        Parameters:
        t - The Throwable to be mapped.
        Returns:
        The Class of the corresponding SubstrateSdkException.
      • doCreateIdentity

        protected String doCreateIdentity​(CreateIdentityRequest request)
        Create IAM Role with optional Trust Configuration and Create Options.
        Specified by:
        doCreateIdentity in class AbstractIam
        Parameters:
        request - the request containing identity name, description, tenant ID, region, trust config, and options.
        Returns:
        the IAM role ARN.
      • doAttachInlinePolicy

        protected void doAttachInlinePolicy​(AttachInlinePolicyRequest request)
        Description copied from class: AbstractIam
        Attaches an inline policy to an identity. Provider-specific implementations should override this method.
        Specified by:
        doAttachInlinePolicy in class AbstractIam
        Parameters:
        request - the request containing policy document, tenant ID, region, and identity/role names
      • doGetInlinePolicyDetails

        protected String doGetInlinePolicyDetails​(GetInlinePolicyDetailsRequest request)
        Get inline policy document attached to an IAM role.
        Specified by:
        doGetInlinePolicyDetails in class AbstractIam
        Parameters:
        request - the request containing relevant fields from identity name, policy name, role name, tenant ID, and region
        Returns:
        the inline policy document as a JSON string
      • doGetAttachedPolicies

        protected List<String> doGetAttachedPolicies​(GetAttachedPoliciesRequest request)
        Lists all inline policies attached to an IAM role.
        Specified by:
        doGetAttachedPolicies in class AbstractIam
        Parameters:
        request - the request; AWS uses roleName only (IAM role to list policies for)
        Returns:
        a list of inline policy names attached to the role.
      • doRemovePolicy

        protected void doRemovePolicy​(RemovePolicyRequest request)
        Removes an inline policy from an IAM role.
        Specified by:
        doRemovePolicy in class AbstractIam
        Parameters:
        request - the request containing identity name, policy name, tenant ID, and region.
      • doDeleteIdentity

        protected void doDeleteIdentity​(DeleteIdentityRequest request)
        Delete IAM Role.
        Specified by:
        doDeleteIdentity in class AbstractIam
        Parameters:
        request - the request containing identity name, tenant ID, and region.
      • doGetIdentity

        protected String doGetIdentity​(GetIdentityRequest request)
        Get IAM Role.
        Specified by:
        doGetIdentity in class AbstractIam
        Parameters:
        request - the request containing identity name, tenant ID, and region.
        Returns:
        the IAM role ARN.