All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.akeyless.api.AkeylessApi Maven / Gradle / Ivy

There is a newer version: 0.0.10
Show newest version
package com.akeyless.api;

import com.akeyless.api.exceptions.*;
import com.akeyless.api.uam.UamApi;
import com.akeyless.api.utils.AkeylessItemType;
import com.akeyless.api.utils.DeriveKeyResult;
import com.akeyless.auth.swagger.model.SetUAMPolicyCredsParams;
import com.akeyless.auth.swagger.model.SystemUserCredentialsReplyObj;
import com.akeyless.auth.swagger.model.CredentialsReplyObj;
import com.akeyless.crypto.utils.CryptoAlgorithm;
import com.akeyless.exceptions.AkeylessRuntimeException;
import com.akeyless.kfm.swagger.model.DerivedFragmentReplyObj;
import com.akeyless.uam.swagger.model.*;

import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.ArrayList;
import java.util.List;

public interface AkeylessApi {

    UamApi getUamApi();

    /**
     * Return a combination of three temporary credentials for accessing Auth, UAM and KFMs instances.
     *
     * System's user that meet an API key access policy will be able to get a combination of three
     * temporary credentials signed by Auth for accessing Auth, UAM and KFMs instances. The client
     * must provide a signature that proves his compliance with the policy. In this case the IP address
     * used for authentication will be taken from the http request.
     *
     * @param policyId Policy id. (required)
     * @param timestamp A Unix timestamp which was used for the signature. (required)
     * @param nonce Random string which was used for the signature. (required)
     * @param signature A digital signature generated with the private key that complies with the access policy. (required)
     * @param clientIp The Client's IP for authentication. Relevant only to the services that mediate between Auth and their clients in obtaining temporary access credentials. (optional)
     * @param credsExpiry The requested expiration time of the temporary credentials in minutes. (optional, default to 60)
     * @return SystemUserCredentialsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AuthenticationFailedException If authentication failed
     * @throws NotFoundException If access policy id not found
     */
    SystemUserCredentialsReplyObj authenticateUAMApiKeyPolicy(
            String policyId,
            Long timestamp,
            String nonce,
            String signature,
            String clientIp,
            Integer credsExpiry
    ) throws ApiCommunicationException, AuthenticationFailedException, InvalidParamException,
            NotFoundException, MissingRequiredParamException;


    /**
     * Get account details.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @return GetAccountDetailsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws NotFoundException If customer not found.
     */
    GetAccountDetailsReplyObj getAccountDetails(String akeylessUAMUserCreds) throws ApiCommunicationException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;


    /**
     * Get an temporary access credentials to KFM instances for item's fragments derivation.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName The item name for derivation (required)
     * @param itemVersion The item version. If it is empty, the derivation credentials will be returned for the latest item version (optional)
     * @param restrictedDerivationData In case not empty, the derivation credentials will be restricted only to this derivation data (optional)
     * @param credsExpiry The requested expiration time of the temporary credentials in minutes. (optional, default to 60)
     * @return DerivationCredsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If no access permissions were found for the item.
     */
    DerivationCredsReplyObj getItemDerivationCreds(
            String akeylessUAMUserCreds,
            String itemName,
            Integer itemVersion,
            String restrictedDerivationData,
            Long credsExpiry
    ) throws ApiCommunicationException, InvalidParamException, MissingRequiredParamException,
            NotFoundException, CredentialsNotFoundException, InvalidCredentialsException;


    /**
     * Get temporary access credentials to KFM instances for RSA key fragments decryption.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName The item name for decrypt operation (required)
     * @param itemVersion The item version. If it is empty, the RSA decrypt credentials will be returned for the latest item version (optional)
     * @param restrictedCipher In case not empty, the RSA decrypt credentials will be restricted only to this cipher (optional)
     * @param credsExpiry The requested expiration time of the temporary credentials in minutes. (optional, default to 60)
     * @return RSADecryptCredsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If no access permissions were found for the item.
     * */
    RSADecryptCredsReplyObj getRSAKeyDecryptCreds(String akeylessUAMUserCreds,
                                                  String itemName,
                                                  Integer itemVersion,
                                                  String restrictedCipher,
                                                  Long credsExpiry
    ) throws ApiCommunicationException, InvalidParamException, MissingRequiredParamException,
            NotFoundException, CredentialsNotFoundException, InvalidCredentialsException;


    /**
     * Returns a derived fragment from the origin fragment via the supplied derivation data.
     *
     * @param derivationCreds Temporary credentials for the fragment derivation operation (required)
     * @param akeylessKFMUserCreds Temporary credentials for accessing the KFM endpoints (required)
     * @param derivationsData The derivation data to be used for the fragment derivation operation (required)
     * @param doubleDerivation Indicate if perform a double derivation (optional)
     * @return DeriveKeyResult
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials or operation credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials or operation credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If fragment not found.
     */
    DeriveKeyResult deriveKey(final DerivationCredsReplyObj derivationCreds,
                              final String akeylessKFMUserCreds,
                              final ArrayList derivationsData,
                              final boolean doubleDerivation
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException, AkeylessRuntimeException;

    /**
     * Returns a fragmented decryption result on an RSA fragment.
     *
     * @param rsaDecryptCreds Temporary credentials for performing the decrypt operation (required)
     * @param akeylessKFMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param cipher The ciphertext to be decrypted (in case of signing operation this parameter should contain the message to be signed) (required)
     * @return List of BigInteger
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials or operation credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials or operation credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If fragment not found.
     */
    List rsaFragmentDecrypt(final RSADecryptCredsReplyObj rsaDecryptCreds,
                                        final String akeylessKFMUserCreds,
                                        final String cipher
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;

    /**
     * Add a new AES key to the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName The item name to be created (required)
     * @param itemType The type of the item to be created. Types available are: [AES128GCM, AES256GCM, AES128SIV, AES256SIV] (required)
     * @param splitLevel The splitting level represent the number of fragments that the item will be split into. (required)
     * @param userMetadata User metadata about the item. (optional)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws UnauthorizedUserException If the user is not an administrator.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If item with the same name already exist in the account.
     */
    void createAESKeyItem(String akeylessUAMUserCreds,
                    String itemName,
                    AkeylessItemType itemType,
                    Long splitLevel,
                    String userMetadata
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, AlreadyExistsException, UnauthorizedUserException;


    /**
     * Add a new RSA key to the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName The item name to be created (required)
     * @param itemType The type of the item to be created Types available are: [RSA1024, RSA2048] (required)
     * @param splitLevel The splitting level represent the number of fragments that the item will be split into. (required)
     * @param userMetadata User metadata about the item. (optional)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws UnauthorizedUserException If the user is not an administrator.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If item with the same name already exist in the account.
     */
    void createRSAKeyItem(final String akeylessUAMUserCreds,
                          final String akeylessKFMUserCreds,
                          String itemName,
                          AkeylessItemType itemType,
                          Long splitLevel,
                          String userMetadata
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, AlreadyExistsException,
            UnauthorizedUserException, NoSuchAlgorithmException, SignatureException, InvalidKeyException;

    /**
     * Get item details.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName Item name. (required)
     * @param itemVersion The item version (for item attributes that are unique to each version). If it is empty, the item attributes of the latest version will be returned (optional)
     * @return GetItemReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If item not found or no access permissions were found for the item.
     */
    GetItemReplyObj getItemWithAttributes(String akeylessUAMUserCreds, String itemName, Integer itemVersion)
            throws ApiCommunicationException, InvalidParamException, MissingRequiredParamException,
            NotFoundException, CredentialsNotFoundException, InvalidCredentialsException;

    /**
     * Get item details.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName Item name. (required)
     * @return GetItemReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If item not found or no access permissions were found for the item.
     */
    GetItemReplyObj getItem(String akeylessUAMUserCreds, String itemName)
            throws ApiCommunicationException, InvalidParamException, MissingRequiredParamException,
            NotFoundException, CredentialsNotFoundException, InvalidCredentialsException;


    /**
     * Get All the items associated with the user.
     *
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @return GetUserItemsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If no item is found that the user has access to.
     */
    GetUserItemsReplyObj getUserItems(String akeylessUAMUserCreds)
            throws ApiCommunicationException, InvalidParamException, MissingRequiredParamException,
            NotFoundException, CredentialsNotFoundException, InvalidCredentialsException;

    /**
     * Updating an existing item in the account
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param newItemName The new item name that will replace the existing one (required)
     * @param itemName Item name. (required)
     * @param userMetadata User metadata about the item. (optional)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If item with the same name already exist in the account.
     */
    void updateItem(String akeylessUAMUserCreds,
                           String newItemName,
                           String itemName,
                           String userMetadata
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, AlreadyExistsException;


    /**
     * Deleting an existing item from the account.
     * This endpoint is accessible only by the account admin role
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param itemName Item name. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If item not found or no access permissions were found for the item.
     */
    void deleteItem(String akeylessUAMUserCreds, String itemName) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;

    /**
     * Add a new user to the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param akeylessSetUserAccessPolicyCreds Temporary credentials for accessing the endpoint (required)
     * @param userName The user name to be created
     * @return CreateUserReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If a user with the same name already exist in the account.
     */
    CreateUserReplyObj createUser(String akeylessUAMUserCreds,
                                  String akeylessSetUserAccessPolicyCreds,
                                  String userName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, AlreadyExistsException;


    /**
     * Get user details.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param userName User name. (required)
     * @return GetUserReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the user not found.
     */
    GetUserReplyObj getUser(String akeylessUAMUserCreds, String userName) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;


    /**
     * Get All the existing users in the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @return GetAccountUsersReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If no user is found in the account.
     */
    GetAccountUsersReplyObj getAccountUsers(String akeylessUAMUserCreds) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;


    /**
     * Updating an existing user in the account
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param akeylessSetUserAccessPolicyCreds Temporary credentials for accessing the endpoint (required)
     * @param newUserName The new username that will replace the existing one (required)
     * @param userName User name. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If a user with the same name already exist in the account.
     * @throws NotFoundException If the user not found.
     */
    void updateUser(String akeylessUAMUserCreds,
                    String akeylessSetUserAccessPolicyCreds,
                    String newUserName,
                    String userName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, AlreadyExistsException, NotFoundException;


    /**
     * Deleting an existing user from the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param userName User name. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the user not found or no access permissions were found for the item.
     */
    void deleteUser(String akeylessUAMUserCreds, String userName) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;

    /**
     * Getting temporary access credentials to add a new access policy or to update an existing access policy in an UAM account. The UAM service will use this credentials to create/update an access policy to be used for accessing key fragments.
     * This endpoint is accessible only by services that have a permission to access Auth for managing their policies for their clients.
     * @param akeylessAuthCreds Temporary credentials for accessing the endpoint (required)
     * @param policyParams Policy params. (required)
     * @return CredentialsReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     */
    CredentialsReplyObj setUamPolicyCreds(String akeylessAuthCreds,
                                          SetUAMPolicyCredsParams policyParams
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException;


    /**
     * Add a new role to the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName The role name to be created (required)
     * @param roleAction The role action. (optional)
     * @param comment Comments (optional)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If a user with the same name already exist in the account.
     */
    void createRole(String akeylessUAMUserCreds,
                    String roleName,
                    String roleAction,
                    String comment
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, AlreadyExistsException;


    /**
     * Get role details.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName Role name. (required)
     * @return GetRoleReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role not found.
     */
    GetRoleReplyObj getRole(String akeylessUAMUserCreds, String roleName) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;


    /**
     * Get All the existing roles in the account.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @return GetAccountRolesReplyObj
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the user access credentials not found.
     * @throws InvalidCredentialsException If the user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If no role is found in the account.
     */
    GetAccountRolesReplyObj getAccountRoles(String akeylessUAMUserCreds) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;


    /**
     * Updating an existing role in the account
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param newRoleName The new role name that will replace the existing one (required)
     * @param roleName Role name. (required)
     * @param roleAction The role action. (optional)
     * @param comment Comments (optional)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws AlreadyExistsException If a user with the same name already exist in the account.
     * @throws NotFoundException If the role not found.
     */
    void updateRole(String akeylessUAMUserCreds,
                    String newRoleName,
                    String roleName,
                    String roleAction,
                    String comment
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException, AlreadyExistsException;


    /**
     * Deleting an existing role from the account.
     * This endpoint is accessible only by the account admin role
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName Role name. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role not found.
     */
    void deleteRole(String akeylessUAMUserCreds, String roleName) throws ApiCommunicationException,
            MissingRequiredParamException, InvalidParamException, CredentialsNotFoundException,
            InvalidCredentialsException, NotFoundException;

    /**
     * Create an association between a role and an item.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName The role name to be associated (required)
     * @param itemName The item name to be associated. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role or the item not found.
     */
    void createRoleItemAssoc(String akeylessUAMUserCreds,
                             String roleName,
                             String itemName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;

    /**
     * Create an association between a role and an user.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName The role name to be associated (required)
     * @param userName The user name to be associated. (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role or the user not found.
     */
    void createRoleUserAssoc(String akeylessUAMUserCreds,
                             String roleName,
                             String userName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;

    /**
     * Delete an association between a role and an item.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName Role name (required)
     * @param itemName Item name (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role or the item not found.
     */
    void deleteRoleItemAssoc(String akeylessUAMUserCreds,
                             String roleName,
                             String itemName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;

    /**
     * Delete an association between a role and an user.
     * This endpoint is accessible only by the account admin user
     * @param akeylessUAMUserCreds Temporary credentials for accessing the endpoint (required)
     * @param roleName Role name (required)
     * @param userName User name (required)
     * @throws ApiCommunicationException If fail to call the API, e.g. server error or cannot deserialize the response body.
     * @throws CredentialsNotFoundException If the admin user access credentials not found.
     * @throws InvalidCredentialsException If the admin user's access credentials are invalid.
     * @throws MissingRequiredParamException Missing required parameter.
     * @throws InvalidParamException Invalid parameter.
     * @throws NotFoundException If the role or the user not found.
     */
    void deleteRoleUserAssoc(String akeylessUAMUserCreds,
                             String roleName,
                             String userName
    ) throws ApiCommunicationException, MissingRequiredParamException, InvalidParamException,
            CredentialsNotFoundException, InvalidCredentialsException, NotFoundException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy