/** * Copyright 2022 Splunk, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"): you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License 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. * * Identity * With the Identity service in Splunk Cloud Services, you can authenticate and authorize Splunk Cloud Services users. * * OpenAPI spec version: v3.6 (recommended default) * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AddGroupMemberBody, AddGroupRoleBody, AddMemberBody, AddRolePermissionBody, CreateGroupBody, CreatePrincipalBody, CreateRoleBody, CreateSamlClientBody, ECJwk, Group, GroupList, GroupMember, GroupMemberList, GroupRole, GroupRoleList, IdentityProviderBody, IdentityProviderConfigBody, Member, MemberList, PermissionList, Principal, PrincipalList, PrincipalPublicKey, PrincipalPublicKeyStatusBody, ResetPasswordBody, Role, RoleList, RolePermission, RolePermissionList, SamlClient, SetEntitlement, UpdateGroupBody, UpdatePasswordBody, UpdateRoleBody, UpdateSamlClientBody, ValidateInfo } from '../models'; import BaseApiService from "../../../../baseapiservice"; import { IdentityServiceExtensions } from "../../../../service_extensions/identity"; import { RequestStatus } from '../../../../client'; export declare const IDENTITY_SERVICE_PREFIX: string; export declare const IDENTITY_SERVICE_CLUSTER: string; /** * @export */ export declare enum AccessEnum { Write = "write" } /** * @export */ export declare enum KindEnum { User = "user", ServiceAccount = "service_account", Service = "service" } /** * Identity * Version: v3.6 * With the Identity service in Splunk Cloud Services, you can authenticate and authorize Splunk Cloud Services users. */ export declare class GeneratedIdentityService extends BaseApiService { getServiceCluster(): string; getServicePrefix(): string; /** * Adds a member to a given group. * @param group The group name. * @param addGroupMemberBody The member to add to a group. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupMember */ addGroupMember: (group: string, addGroupMemberBody: AddGroupMemberBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds a role to a given group. * @param group The group name. * @param addGroupRoleBody The role to add to a group. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupRole */ addGroupRole: (group: string, addGroupRoleBody: AddGroupRoleBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds a member to a given tenant. * @param addMemberBody The member to associate with a tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Member */ addMember: (addMemberBody: AddMemberBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Add service principal public key * @param principal The principal name. * @param eCJwk Service principal public key * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ addPrincipalPublicKey: (principal: string, eCJwk: ECJwk, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Adds permissions to a role in a given tenant. * @param role The role name. * @param addRolePermissionBody The permission to add to a role. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return RolePermission */ addRolePermission: (role: string, addRolePermissionBody: AddRolePermissionBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Creates a new group in a given tenant. * @param createGroupBody The group definition. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Group */ createGroup: (createGroupBody: CreateGroupBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Create an Identity Provider. * @param identityProviderConfigBody The Identity Provider to create. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ createIdentityProvider: (identityProviderConfigBody: IdentityProviderConfigBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Create a new principal * @param createPrincipalBody The new principal to add to the system. * @param args parameters to be sent with the request * @param args.inviteID The invite ID. * @param requestStatusCallback callback function to listen to the status of a request * @return Principal */ createPrincipal: (createPrincipalBody: CreatePrincipalBody, args?: { [key: string]: any; inviteID?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Creates a new authorization role in a given tenant. * @param createRoleBody Role definition * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Role */ createRole: (createRoleBody: CreateRoleBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Create a SAML client. * @param createSamlClientBody * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SamlClient */ createSamlClient: (createSamlClientBody: CreateSamlClientBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes a group in a given tenant. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteGroup: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes the Identity Provider. * @param idp The Identity Provider name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteIdentityProvider: (idp: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deletePrincipalPublicKey: (principal: string, keyId: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes a defined role for a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteRole: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Deletes the SAML client. * @param samlClient The saml client name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ deleteSamlClient: (samlClient: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the entitlements for the given tenant and client id * @param entitlementClientId ID of the client for commerce entitlements * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return EntitlementList */ getEntitlements: (entitlementClientId: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given group within a tenant. * @param group The group name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Group */ getGroup: (group: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given member within a given group. * @param group The group name. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupMember */ getGroupMember: (group: string, member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns information about a given role within a given group. * @param group The group name. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return GroupRole */ getGroupRole: (group: string, role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the Identity Provider for the given tenant. * @param idp The Identity Provider name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ getIdentityProvider: (idp: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a member of a given tenant. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Member */ getMember: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the details of a principal, including its tenant membership and any relevant profile information. * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Principal */ getPrincipal: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ getPrincipalPublicKey: (principal: string, keyId: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns principal public keys * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKeys */ getPrincipalPublicKeys: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a role for a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Role */ getRole: (role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets a permission for the specified role. * @param role The role name. * @param permission The permission string. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return RolePermission */ getRolePermission: (role: string, permission: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the SAML client. * @param samlClient The saml client name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SamlClient */ getSamlClient: (samlClient: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of the members within a given group. * @param group The group name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return GroupMemberList */ listGroupMembers: (group: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of the roles that are attached to a group within a given tenant. * @param group The group name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return GroupRoleList */ listGroupRoles: (group: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * List the groups that exist in a given tenant. * @param args parameters to be sent with the request * @param args.access List only the groups with specified access permission. * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return GroupList */ listGroups: (args?: { [key: string]: any; access?: AccessEnum | undefined; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the list of Identity Providers for the given tenant. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Array */ listIdentityProvider: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of groups that a member belongs to within a tenant. * @param member The member name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return GroupList */ listMemberGroups: (member: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a set of permissions granted to the member within the tenant. * @param member The member name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param args.scopeFilter List only the permissions matching the scope filter. * @param requestStatusCallback callback function to listen to the status of a request * @return PermissionList */ listMemberPermissions: (member: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; scopeFilter?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a set of roles that a given member holds within the tenant. * @param member The member name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return RoleList */ listMemberRoles: (member: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns a list of members in a given tenant. * @param args parameters to be sent with the request * @param args.kind Kind of member, one of: [user, service_account, service] * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return MemberList */ listMembers: (args?: { [key: string]: any; kind?: KindEnum | undefined; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns the list of principals that the Identity service knows about. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalList */ listPrincipals: (args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets a list of groups for a role in a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return GroupList */ listRoleGroups: (role: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Gets the permissions for a role in a given tenant. * @param role The role name. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return RolePermissionList */ listRolePermissions: (role: string, args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Returns all roles for a given tenant. * @param args parameters to be sent with the request * @param args.orderby The sorting order for returning list. * @param args.pageSize The maximize return items count of a list. * @param args.pageToken The cursor to then next page. * @param requestStatusCallback callback function to listen to the status of a request * @return RoleList */ listRoles: (args?: { [key: string]: any; orderby?: string | undefined; pageSize?: number | undefined; pageToken?: string | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * List SAML clients. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SamlClientsList */ listSamlClients: (args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes the member from a given group. * @param group The group name. * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeGroupMember: (group: string, member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a role from a given group. * @param group The group name. * @param role The role name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeGroupRole: (group: string, role: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a member from a given tenant * @param member The member name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeMember: (member: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Removes a permission from the role. * @param role The role name. * @param permission The permission string. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ removeRolePermission: (role: string, permission: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Sends an email which allows a principal to reset a forgotten password. * @param resetPasswordBody The principal information to recover password. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ resetPassword: (resetPasswordBody: ResetPasswordBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Revoke all existing access tokens issued to a principal. Principals can reset their password by visiting https://login.splunk.com/en_us/page/lost_password * @param principal The principal name. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ revokePrincipalAuthTokens: (principal: string, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update the entitlements for the given tenant and client id * @param entitlementClientId ID of the client for commerce entitlements * @param setEntitlement The desired entitlements to be set * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return EntitlementList */ updateEntitlements: (entitlementClientId: string, setEntitlement: SetEntitlement[], args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Updates a group's display name or description. * @param group The group name. * @param updateGroupBody The updated group information * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Group */ updateGroup: (group: string, updateGroupBody: UpdateGroupBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update the configuration for an Identity Provider. * @param idp The Identity Provider name. * @param identityProviderConfigBody The properties to update the Identity Provider with. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return IdentityProviderBody */ updateIdentityProvider: (idp: string, identityProviderConfigBody: IdentityProviderConfigBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update principal password * @param principal The principal name. * @param updatePasswordBody The new password to set for the principal. * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request */ updatePassword: (principal: string, updatePasswordBody: UpdatePasswordBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update principal public key * @param principal The principal name. * @param keyId Identifier of a public key. * @param principalPublicKeyStatusBody Status of the public key * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return PrincipalPublicKey */ updatePrincipalPublicKey: (principal: string, keyId: string, principalPublicKeyStatusBody: PrincipalPublicKeyStatusBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update a role's display name or description for a given tenant. * @param role The role name. * @param updateRoleBody The updated role information * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return Role */ updateRole: (role: string, updateRoleBody: UpdateRoleBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Update the SAML client. * @param samlClient The saml client name. * @param updateSamlClientBody * @param args parameters to be sent with the request * @param requestStatusCallback callback function to listen to the status of a request * @return SamlClient */ updateSamlClient: (samlClient: string, updateSamlClientBody: UpdateSamlClientBody, args?: object | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; /** * Validates the access token obtained from the authorization header and returns the principal name and tenant memberships. * @param args parameters to be sent with the request * @param args.include Include additional information to return when validating tenant membership. Valid parameters [tenant, principal] * @param requestStatusCallback callback function to listen to the status of a request * @return ValidateInfo */ validateToken: (args?: { [key: string]: any; include?: string[] | undefined; } | undefined, requestStatusCallback?: ((requestStatus: RequestStatus) => void) | undefined) => Promise; } export declare type IdentityService = GeneratedIdentityService & IdentityServiceExtensions; export declare const IdentityService: typeof GeneratedIdentityService;