Documentation ¶
Overview ¶
Package iam provides access to the Akamai Property APIs
Index ¶
- Constants
- Variables
- type AuthGrant
- type AuthGrantRequest
- type BlockedProperties
- type ClientFunc
- type CreateRoleRequest
- type CreateUserRequest
- type DeleteRoleRequest
- type Error
- type GetGroupRequest
- type GetPropertyRequest
- type GetPropertyResponse
- type GetRoleRequest
- type GetUserRequest
- type GrantedRoleID
- type Group
- type GroupActions
- type GroupRequest
- type GroupUser
- type Groups
- type IAM
- type ListAffectedUsersRequest
- type ListBlockedPropertiesRequest
- type ListGroupsRequest
- type ListPropertiesRequest
- type ListPropertiesResponse
- type ListRolesRequest
- type ListStatesRequest
- type ListUsersRequest
- type LockUserRequest
- type MapPropertyIDToNameRequest
- type MapPropertyNameToIDRequest
- type Mock
- func (m *Mock) CreateGroup(ctx context.Context, request GroupRequest) (*Group, error)
- func (m *Mock) CreateRole(ctx context.Context, request CreateRoleRequest) (*Role, error)
- func (m *Mock) CreateUser(ctx context.Context, request CreateUserRequest) (*User, error)
- func (m *Mock) DeleteRole(ctx context.Context, request DeleteRoleRequest) error
- func (m *Mock) GetGroup(ctx context.Context, request GetGroupRequest) (*Group, error)
- func (m *Mock) GetProperty(ctx context.Context, request GetPropertyRequest) (*GetPropertyResponse, error)
- func (m *Mock) GetRole(ctx context.Context, request GetRoleRequest) (*Role, error)
- func (m *Mock) GetUser(ctx context.Context, request GetUserRequest) (*User, error)
- func (m *Mock) ListAffectedUsers(ctx context.Context, request ListAffectedUsersRequest) ([]GroupUser, error)
- func (m *Mock) ListBlockedProperties(ctx context.Context, request ListBlockedPropertiesRequest) ([]int64, error)
- func (m *Mock) ListGrantableRoles(ctx context.Context) ([]RoleGrantedRole, error)
- func (m *Mock) ListGroups(ctx context.Context, request ListGroupsRequest) ([]Group, error)
- func (m *Mock) ListProducts(ctx context.Context) ([]string, error)
- func (m *Mock) ListProperties(ctx context.Context, request ListPropertiesRequest) (*ListPropertiesResponse, error)
- func (m *Mock) ListRoles(ctx context.Context, request ListRolesRequest) ([]Role, error)
- func (m *Mock) ListStates(ctx context.Context, request ListStatesRequest) ([]string, error)
- func (m *Mock) ListTimeoutPolicies(ctx context.Context) ([]TimeoutPolicy, error)
- func (m *Mock) ListUsers(ctx context.Context, request ListUsersRequest) ([]UserListItem, error)
- func (m *Mock) LockUser(ctx context.Context, request LockUserRequest) error
- func (m *Mock) MapPropertyIDToName(ctx context.Context, request MapPropertyIDToNameRequest) (*string, error)
- func (m *Mock) MapPropertyNameToID(ctx context.Context, request MapPropertyNameToIDRequest) (*int64, error)
- func (m *Mock) MoveGroup(ctx context.Context, request MoveGroupRequest) error
- func (m *Mock) MoveProperty(ctx context.Context, request MovePropertyRequest) error
- func (m *Mock) RemoveGroup(ctx context.Context, request RemoveGroupRequest) error
- func (m *Mock) RemoveUser(ctx context.Context, request RemoveUserRequest) error
- func (m *Mock) ResetUserPassword(ctx context.Context, request ResetUserPasswordRequest) (*ResetUserPasswordResponse, error)
- func (m *Mock) SetUserPassword(ctx context.Context, request SetUserPasswordRequest) error
- func (m *Mock) SupportedContactTypes(ctx context.Context) ([]string, error)
- func (m *Mock) SupportedCountries(ctx context.Context) ([]string, error)
- func (m *Mock) SupportedLanguages(ctx context.Context) ([]string, error)
- func (m *Mock) SupportedTimezones(ctx context.Context) ([]Timezone, error)
- func (m *Mock) UnlockUser(ctx context.Context, request UnlockUserRequest) error
- func (m *Mock) UpdateBlockedProperties(ctx context.Context, request UpdateBlockedPropertiesRequest) ([]int64, error)
- func (m *Mock) UpdateGroupName(ctx context.Context, request GroupRequest) (*Group, error)
- func (m *Mock) UpdateRole(ctx context.Context, request UpdateRoleRequest) (*Role, error)
- func (m *Mock) UpdateTFA(ctx context.Context, request UpdateTFARequest) error
- func (m *Mock) UpdateUserAuthGrants(ctx context.Context, request UpdateUserAuthGrantsRequest) ([]AuthGrant, error)
- func (m *Mock) UpdateUserInfo(ctx context.Context, request UpdateUserInfoRequest) (*UserBasicInfo, error)
- func (m *Mock) UpdateUserNotifications(ctx context.Context, request UpdateUserNotificationsRequest) (*UserNotifications, error)
- type MoveGroupRequest
- type MovePropertyReqBody
- type MovePropertyRequest
- type Option
- type Properties
- type Property
- type PropertyActions
- type RemoveGroupRequest
- type RemoveUserRequest
- type ResetUserPasswordRequest
- type ResetUserPasswordResponse
- type Role
- type RoleAction
- type RoleGrantedRole
- type RoleRequest
- type RoleType
- type RoleUser
- type Roles
- type SetUserPasswordRequest
- type Support
- type TFAActionType
- type TimeoutPolicy
- type Timezone
- type UnlockUserRequest
- type UpdateBlockedPropertiesRequest
- type UpdateRoleRequest
- type UpdateTFARequest
- type UpdateUserAuthGrantsRequest
- type UpdateUserInfoRequest
- type UpdateUserNotificationsRequest
- type User
- type UserActions
- type UserBasicInfo
- type UserListItem
- type UserLock
- type UserNotificationOptions
- type UserNotifications
- type UserPassword
- type Users
Constants ¶
const ( // LostAccessUsers with a userType of lostAccess lose their access to the source group LostAccessUsers = "lostAccess" // GainAccessUsers with a userType of gainAccess gain their access to the source group GainAccessUsers = "gainAccess" )
Variables ¶
var ( // ErrListBlockedProperties is returned when ListBlockedPropertiesRequest fails ErrListBlockedProperties = errors.New("list blocked properties") // ErrUpdateBlockedProperties is returned when UpdateBlockedPropertiesRequest fails ErrUpdateBlockedProperties = errors.New("update blocked properties") )
var ( // ErrCreateGroup is returned when CreateGroup fails ErrCreateGroup = errors.New("create group") // ErrGetGroup is returned when GetGroup fails ErrGetGroup = errors.New("get group") // ErrListAffectedUsers is returned when ListAffectedUsers fails ErrListAffectedUsers = errors.New("list affected users") // ErrListGroups is returned when ListGroups fails ErrListGroups = errors.New("list groups") // ErrUpdateGroupName is returned when UpdateGroupName fails ErrUpdateGroupName = errors.New("update group name") // ErrRemoveGroup is returned when RemoveGroup fails ErrRemoveGroup = errors.New("remove group") // ErrMoveGroup is returned when MoveGroup fails ErrMoveGroup = errors.New("move group") )
var ( // ErrListProperties is returned when ListProperties fails ErrListProperties = errors.New("list properties") // ErrGetProperty is returned when GetProperty fails ErrGetProperty = errors.New("get property") // ErrMoveProperty is returned when MoveProperty fails ErrMoveProperty = errors.New("move property") // ErrMapPropertyIDToName is returned when MapPropertyIDToName fails ErrMapPropertyIDToName = errors.New("map property by id") // ErrMapPropertyNameToID is returned when MapPropertyNameToID fails ErrMapPropertyNameToID = errors.New("map property by name") // ErrNoProperty is returned when MapPropertyNameToID did not find given property ErrNoProperty = errors.New("no such property") )
var ( // ErrCreateRole is returned when CreateRole fails ErrCreateRole = errors.New("create a role") // ErrGetRole is returned when GetRole fails ErrGetRole = errors.New("get a role") // ErrUpdateRole is returned when UpdateRole fails ErrUpdateRole = errors.New("update a role") // ErrDeleteRole is returned when DeleteRole fails ErrDeleteRole = errors.New("delete a role") // ErrListRoles is returned when ListRoles fails ErrListRoles = errors.New("list roles") // ErrListGrantableRoles is returned when ListGrantableRoles fails ErrListGrantableRoles = errors.New("list grantable roles") )
var ( // ErrListProducts is returned when ListProducts fails ErrListProducts = errors.New("list products") // ErrListStates is returned when ListStates fails ErrListStates = errors.New("list states") // ErrListTimeoutPolicies is returned when ListTimeoutPolicies fails ErrListTimeoutPolicies = errors.New("list timeout policies") // ErrSupportedContactTypes is returned when SupportedContactTypes fails ErrSupportedContactTypes = errors.New("supported contact types") // ErrSupportedCountries is returned when SupportedCountries fails ErrSupportedCountries = errors.New("supported countries") // ErrSupportedLanguages is returned when SupportedLanguages fails ErrSupportedLanguages = errors.New("supported languages") // ErrSupportedTimezones is returned when SupportedTimezones fails ErrSupportedTimezones = errors.New("supported timezones") )
var ( // ErrCreateUser is returned when CreateUser fails ErrCreateUser = errors.New("create user") // ErrGetUser is returned when GetUser fails ErrGetUser = errors.New("get user") // ErrListUsers is returned when GetUser fails ErrListUsers = errors.New("list users") // ErrRemoveUser is returned when RemoveUser fails ErrRemoveUser = errors.New("remove user") // ErrUpdateUserAuthGrants is returned when UpdateUserAuthGrants fails ErrUpdateUserAuthGrants = errors.New("update user auth grants") // ErrUpdateUserInfo is returned when UpdateUserInfo fails ErrUpdateUserInfo = errors.New("update user info") // ErrUpdateUserNotifications is returned when UpdateUserNotifications fails ErrUpdateUserNotifications = errors.New("update user notifications") // ErrUpdateTFA is returned when UpdateTFA fails ErrUpdateTFA = errors.New("update user's two-factor authentication") )
var ( // ErrLockUser is returned when LockUser fails ErrLockUser = errors.New("lock user") // ErrUnlockUser is returned when UnlockUser fails ErrUnlockUser = errors.New("unlock user") )
var ( // ErrResetUserPassword is returned when ResetUserPassword fails ErrResetUserPassword = errors.New("reset user password") // ErrSetUserPassword is returned when SetUserPassword fails ErrSetUserPassword = errors.New("set user password") )
var ( // ErrInputValidation is returned when the input parameters failed validation ErrInputValidation = errors.New("input validation error") )
var ( // ErrStructValidation is returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
Functions ¶
This section is empty.
Types ¶
type AuthGrant ¶
type AuthGrant struct { GroupID int64 `json:"groupId"` GroupName string `json:"groupName"` IsBlocked bool `json:"isBlocked"` RoleDescription string `json:"roleDescription"` RoleID *int `json:"roleId,omitempty"` RoleName string `json:"roleName"` Subgroups []AuthGrant `json:"subGroups,omitempty"` }
AuthGrant is user’s role assignments, per group
type AuthGrantRequest ¶
type AuthGrantRequest struct { GroupID int64 `json:"groupId"` IsBlocked bool `json:"isBlocked"` RoleID *int `json:"roleId,omitempty"` Subgroups []AuthGrantRequest `json:"subGroups,omitempty"` }
AuthGrantRequest is user’s role assignments, per group for the create/update operation
type BlockedProperties ¶
type BlockedProperties interface { // ListBlockedProperties returns all properties a user doesn't have access to in a group // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-blocked-properties ListBlockedProperties(context.Context, ListBlockedPropertiesRequest) ([]int64, error) // UpdateBlockedProperties removes or grant user access to properties // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-blocked-properties UpdateBlockedProperties(context.Context, UpdateBlockedPropertiesRequest) ([]int64, error) }
BlockedProperties is the IAM user blocked properties API interface
type ClientFunc ¶
ClientFunc is an IAM client new method, this can be used for mocking
type CreateRoleRequest ¶
type CreateRoleRequest RoleRequest
CreateRoleRequest describes the request parameters of the create role endpoint
func (CreateRoleRequest) Validate ¶
func (r CreateRoleRequest) Validate() error
Validate validates CreateRoleRequest
type CreateUserRequest ¶
type CreateUserRequest struct { UserBasicInfo AuthGrants []AuthGrantRequest `json:"authGrants,omitempty"` Notifications UserNotifications `json:"notifications,omitempty"` SendEmail bool `json:"-"` }
CreateUserRequest contains the request parameters for the create user endpoint
func (CreateUserRequest) Validate ¶
func (r CreateUserRequest) Validate() error
Validate validates CreateUserRequest
type DeleteRoleRequest ¶
type DeleteRoleRequest struct {
ID int64
}
DeleteRoleRequest describes the request parameters of the delete role endpoint
func (DeleteRoleRequest) Validate ¶
func (r DeleteRoleRequest) Validate() error
Validate validates DeleteRoleRequest
type Error ¶
type Error struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance,omitempty"` BehaviorName string `json:"behaviorName,omitempty"` ErrorLocation string `json:"errorLocation,omitempty"` StatusCode int `json:"statusCode,omitempty"` Errors json.RawMessage `json:"errors,omitempty"` Warnings json.RawMessage `json:"warnings,omitempty"` HTTPStatus int `json:"httpStatus,omitempty"` }
Error is an IAM error interface
type GetGroupRequest ¶
GetGroupRequest describes the request parameters of the get group endpoint
func (GetGroupRequest) Validate ¶
func (r GetGroupRequest) Validate() error
Validate validates GetGroupRequest
type GetPropertyRequest ¶ added in v8.4.0
GetPropertyRequest contains the request parameters for the get property operation.
func (GetPropertyRequest) Validate ¶ added in v8.4.0
func (r GetPropertyRequest) Validate() error
Validate validates GetPropertyRequest
type GetPropertyResponse ¶ added in v8.4.0
type GetPropertyResponse struct { ARLConfigFile string `json:"arlConfigFile"` CreatedBy string `json:"createdBy"` CreatedDate time.Time `json:"createdDate"` GroupID int64 `json:"groupId"` GroupName string `json:"groupName"` ModifiedBy string `json:"modifiedBy"` ModifiedDate time.Time `json:"modifiedDate"` PropertyID int64 `json:"propertyId"` PropertyName string `json:"propertyName"` }
GetPropertyResponse holds the response data from GetProperty.
type GetRoleRequest ¶
GetRoleRequest describes the request parameters of the get role endpoint
func (GetRoleRequest) Validate ¶
func (r GetRoleRequest) Validate() error
Validate validates GetRoleRequest
type GetUserRequest ¶
GetUserRequest contains the request parameters of the get user endpoint
func (GetUserRequest) Validate ¶
func (r GetUserRequest) Validate() error
Validate validates GetUserRequest
type GrantedRoleID ¶
type GrantedRoleID struct {
ID int64 `json:"grantedRoleId"`
}
GrantedRoleID describes a unique identifier for a granted role
type Group ¶
type Group struct { Actions *GroupActions `json:"actions,omitempty"` CreatedBy string `json:"createdBy"` CreatedDate string `json:"createdDate"` GroupID int64 `json:"groupId"` GroupName string `json:"groupName"` ModifiedBy string `json:"modifiedBy"` ModifiedDate string `json:"modifiedDate"` ParentGroupID int64 `json:"parentGroupId"` SubGroups []Group `json:"subGroups,omitempty"` }
Group describes the response of the list groups endpoint
type GroupActions ¶
GroupActions encapsulates permissions available to the user for this group
type GroupRequest ¶
GroupRequest describes the request and body parameters for creating new group or updating a group name endpoint
func (GroupRequest) Validate ¶
func (r GroupRequest) Validate() error
Validate validates GroupRequest
type GroupUser ¶
type GroupUser struct { AccountID string `json:"accountId"` Email string `json:"email"` FirstName string `json:"firstName"` IdentityID string `json:"uiIdentityId"` LastLoginDate string `json:"lastLoginDate"` LastName string `json:"lastName"` UserName string `json:"uiUserName"` }
GroupUser describes the response of the list affected users endpoint
type Groups ¶
type Groups interface { // CreateGroup creates a new group within a parent group_id specified in the request // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-group CreateGroup(context.Context, GroupRequest) (*Group, error) // GetGroup returns a group's details // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-group GetGroup(context.Context, GetGroupRequest) (*Group, error) // ListAffectedUsers lists users who are affected when a group is moved // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-move-affected-users ListAffectedUsers(context.Context, ListAffectedUsersRequest) ([]GroupUser, error) // ListGroups lists all groups in which you have a scope of admin for the current account and contract type // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-groups ListGroups(context.Context, ListGroupsRequest) ([]Group, error) // RemoveGroup removes a group based on group_id. We can only delete a sub-group, and only if that sub-group doesn't include any users // // See: https://techdocs.akamai.com/iam-user-admin/reference/delete-group RemoveGroup(context.Context, RemoveGroupRequest) error // UpdateGroupName changes the name of the group // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-group UpdateGroupName(context.Context, GroupRequest) (*Group, error) // MoveGroup Move a nested group under another group within the same parent hierarchy // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-groups-move MoveGroup(context.Context, MoveGroupRequest) error }
Groups is the IAM group API interface
type IAM ¶
type IAM interface { BlockedProperties Groups Properties Roles Support UserLock UserPassword Users }
IAM is the IAM api interface
type ListAffectedUsersRequest ¶
type ListAffectedUsersRequest struct { DestinationGroupID int64 SourceGroupID int64 UserType string }
ListAffectedUsersRequest describes the request and body parameters of the list affected users endpoint
func (ListAffectedUsersRequest) Validate ¶
func (r ListAffectedUsersRequest) Validate() error
Validate validates ListAffectedUsersRequest
type ListBlockedPropertiesRequest ¶
ListBlockedPropertiesRequest contains the request parameters for the list blocked properties endpoint
func (ListBlockedPropertiesRequest) Validate ¶
func (r ListBlockedPropertiesRequest) Validate() error
Validate validates ListBlockedPropertiesRequest
type ListGroupsRequest ¶
type ListGroupsRequest struct {
Actions bool
}
ListGroupsRequest describes the request parameters of the list groups endpoint
type ListPropertiesRequest ¶ added in v8.4.0
ListPropertiesRequest contains the request parameters for the list properties operation.
type ListPropertiesResponse ¶ added in v8.4.0
type ListPropertiesResponse []Property
ListPropertiesResponse holds the response data from ListProperties.
type ListRolesRequest ¶
ListRolesRequest describes the request parameters of the list roles endpoint
type ListStatesRequest ¶
type ListStatesRequest struct {
Country string
}
ListStatesRequest contains the country request parameter for the list states endpoint
func (ListStatesRequest) Validate ¶
func (r ListStatesRequest) Validate() error
Validate validates ListStatesRequest
type ListUsersRequest ¶
ListUsersRequest contains the request parameters for the list users endpoint
type LockUserRequest ¶
type LockUserRequest struct {
IdentityID string
}
LockUserRequest contains the request parameters of the lock user endpoint
func (LockUserRequest) Validate ¶
func (r LockUserRequest) Validate() error
Validate validates LockUserRequest
type MapPropertyIDToNameRequest ¶ added in v8.4.0
MapPropertyIDToNameRequest is the argument for MapPropertyIDToName
func (MapPropertyIDToNameRequest) Validate ¶ added in v8.4.0
func (r MapPropertyIDToNameRequest) Validate() error
Validate validates MapPropertyIDToNameRequest
type MapPropertyNameToIDRequest ¶ added in v8.4.0
type MapPropertyNameToIDRequest string
MapPropertyNameToIDRequest is the argument for MapPropertyNameToID
type Mock ¶
func (*Mock) CreateGroup ¶
func (*Mock) CreateRole ¶
func (*Mock) CreateUser ¶
func (*Mock) DeleteRole ¶
func (m *Mock) DeleteRole(ctx context.Context, request DeleteRoleRequest) error
func (*Mock) GetProperty ¶ added in v8.4.0
func (m *Mock) GetProperty(ctx context.Context, request GetPropertyRequest) (*GetPropertyResponse, error)
func (*Mock) ListAffectedUsers ¶
func (*Mock) ListBlockedProperties ¶
func (*Mock) ListGrantableRoles ¶
func (m *Mock) ListGrantableRoles(ctx context.Context) ([]RoleGrantedRole, error)
func (*Mock) ListGroups ¶
func (*Mock) ListProperties ¶ added in v8.4.0
func (m *Mock) ListProperties(ctx context.Context, request ListPropertiesRequest) (*ListPropertiesResponse, error)
func (*Mock) ListStates ¶
func (*Mock) ListTimeoutPolicies ¶
func (m *Mock) ListTimeoutPolicies(ctx context.Context) ([]TimeoutPolicy, error)
func (*Mock) ListUsers ¶
func (m *Mock) ListUsers(ctx context.Context, request ListUsersRequest) ([]UserListItem, error)
func (*Mock) MapPropertyIDToName ¶ added in v8.4.0
func (*Mock) MapPropertyNameToID ¶ added in v8.4.0
func (*Mock) MoveGroup ¶
func (m *Mock) MoveGroup(ctx context.Context, request MoveGroupRequest) error
func (*Mock) MoveProperty ¶ added in v8.4.0
func (m *Mock) MoveProperty(ctx context.Context, request MovePropertyRequest) error
func (*Mock) RemoveGroup ¶
func (m *Mock) RemoveGroup(ctx context.Context, request RemoveGroupRequest) error
func (*Mock) RemoveUser ¶
func (m *Mock) RemoveUser(ctx context.Context, request RemoveUserRequest) error
func (*Mock) ResetUserPassword ¶
func (m *Mock) ResetUserPassword(ctx context.Context, request ResetUserPasswordRequest) (*ResetUserPasswordResponse, error)
func (*Mock) SetUserPassword ¶
func (m *Mock) SetUserPassword(ctx context.Context, request SetUserPasswordRequest) error
func (*Mock) SupportedContactTypes ¶
func (*Mock) SupportedCountries ¶
func (*Mock) SupportedLanguages ¶
func (*Mock) SupportedTimezones ¶
func (*Mock) UnlockUser ¶
func (m *Mock) UnlockUser(ctx context.Context, request UnlockUserRequest) error
func (*Mock) UpdateBlockedProperties ¶
func (*Mock) UpdateGroupName ¶
func (*Mock) UpdateRole ¶
func (*Mock) UpdateTFA ¶
func (m *Mock) UpdateTFA(ctx context.Context, request UpdateTFARequest) error
func (*Mock) UpdateUserAuthGrants ¶
func (*Mock) UpdateUserInfo ¶
func (m *Mock) UpdateUserInfo(ctx context.Context, request UpdateUserInfoRequest) (*UserBasicInfo, error)
func (*Mock) UpdateUserNotifications ¶
func (m *Mock) UpdateUserNotifications(ctx context.Context, request UpdateUserNotificationsRequest) (*UserNotifications, error)
type MoveGroupRequest ¶
type MoveGroupRequest struct { SourceGroupID int64 `json:"sourceGroupId"` DestinationGroupID int64 `json:"destinationGroupId"` }
MoveGroupRequest describes the request body to move a group under another group
func (MoveGroupRequest) Validate ¶
func (r MoveGroupRequest) Validate() error
Validate validates MoveGroupRequest
type MovePropertyReqBody ¶ added in v8.4.0
type MovePropertyReqBody struct { DestinationGroupID int64 `json:"destinationGroupId"` SourceGroupID int64 `json:"sourceGroupId"` }
MovePropertyReqBody contains body parameters for the MoveProperty operation.
func (MovePropertyReqBody) Validate ¶ added in v8.4.0
func (r MovePropertyReqBody) Validate() error
Validate validates MovePropertyReqBody
type MovePropertyRequest ¶ added in v8.4.0
type MovePropertyRequest struct { PropertyID int64 BodyParams MovePropertyReqBody }
MovePropertyRequest contains the request parameters for the MoveProperty operation.
func (MovePropertyRequest) Validate ¶ added in v8.4.0
func (r MovePropertyRequest) Validate() error
Validate validates MovePropertyRequest
type Properties ¶ added in v8.4.0
type Properties interface { // ListProperties lists the properties for the current account or other managed accounts using the accountSwitchKey parameter. // // See: https://techdocs.akamai.com/iam-api/reference/get-properties ListProperties(context.Context, ListPropertiesRequest) (*ListPropertiesResponse, error) // GetProperty lists a property's details. // // See: https://techdocs.akamai.com/iam-api/reference/get-property GetProperty(context.Context, GetPropertyRequest) (*GetPropertyResponse, error) // MoveProperty moves a property from one group to another group. // // See: https://techdocs.akamai.com/iam-api/reference/put-property MoveProperty(context.Context, MovePropertyRequest) error // MapPropertyIDToName returns property name for given (IAM) property ID // Mainly to be used to map (IAM) Property ID to (PAPI) Property ID // To finish the mapping, please use papi.MapPropertyNameToID MapPropertyIDToName(context.Context, MapPropertyIDToNameRequest) (*string, error) }
Properties is the IAM properties API interface
type Property ¶ added in v8.4.0
type Property struct { PropertyID int64 `json:"propertyId"` PropertyName string `json:"propertyName"` PropertyTypeDescription string `json:"propertyTypeDescription"` GroupID int64 `json:"groupId"` GroupName string `json:"groupName"` Actions PropertyActions `json:"actions"` }
Property holds the property details.
type PropertyActions ¶ added in v8.4.0
type PropertyActions struct {
Move bool `json:"move"`
}
PropertyActions specifies activities available for the property.
type RemoveGroupRequest ¶
type RemoveGroupRequest struct {
GroupID int64
}
RemoveGroupRequest describes the request parameter for removing a group
func (RemoveGroupRequest) Validate ¶
func (r RemoveGroupRequest) Validate() error
Validate validates RemoveGroupRequest
type RemoveUserRequest ¶
type RemoveUserRequest struct {
IdentityID string
}
RemoveUserRequest contains the request parameters of the remove user endpoint
func (RemoveUserRequest) Validate ¶
func (r RemoveUserRequest) Validate() error
Validate validates RemoveUserRequest
type ResetUserPasswordRequest ¶
ResetUserPasswordRequest contains the request parameters of the reset user password endpoint
func (ResetUserPasswordRequest) Validate ¶
func (r ResetUserPasswordRequest) Validate() error
Validate validates ResetUserPasswordRequest
type ResetUserPasswordResponse ¶
type ResetUserPasswordResponse struct {
NewPassword string `json:"newPassword"`
}
ResetUserPasswordResponse contains the response from the reset user password endpoint
type Role ¶
type Role struct { Actions *RoleAction `json:"actions,omitempty"` CreatedBy string `json:"createdBy"` CreatedDate string `json:"createdDate"` GrantedRoles []RoleGrantedRole `json:"grantedRoles,omitempty"` ModifiedBy string `json:"modifiedBy"` ModifiedDate string `json:"modifiedDate"` RoleDescription string `json:"roleDescription"` RoleID int64 `json:"roleId"` RoleName string `json:"roleName"` Users []RoleUser `json:"users,omitempty"` RoleType RoleType `json:"type"` }
Role encapsulates the response of the list roles endpoint
type RoleAction ¶
RoleAction encapsulates permissions available to the user for this role
type RoleGrantedRole ¶
type RoleGrantedRole struct { Description string `json:"grantedRoleDescription,omitempty"` RoleID int64 `json:"grantedRoleId"` RoleName string `json:"grantedRoleName"` }
RoleGrantedRole is a list of granted roles, giving the user access to objects in a group
type RoleRequest ¶
type RoleRequest struct { Name string `json:"roleName,omitempty"` Description string `json:"roleDescription,omitempty"` GrantedRoles []GrantedRoleID `json:"grantedRoles,omitempty"` }
RoleRequest describes request parameters of the create and update role endpoint
type RoleUser ¶
type RoleUser struct { AccountID string `json:"accountId"` Email string `json:"email"` FirstName string `json:"firstName"` LastLoginDate string `json:"lastLoginDate"` LastName string `json:"lastName"` UIIdentityID string `json:"uiIdentityId"` }
RoleUser user who shares the same role
type Roles ¶
type Roles interface { // CreateRole creates a custom role // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-role CreateRole(context.Context, CreateRoleRequest) (*Role, error) // GetRole gets details for a specific role // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-role GetRole(context.Context, GetRoleRequest) (*Role, error) // UpdateRole adds or removes permissions from a role and updates other parameters // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-role UpdateRole(context.Context, UpdateRoleRequest) (*Role, error) // DeleteRole deletes a role. This operation is only allowed if the role isn't assigned to any users. // // See: https://techdocs.akamai.com/iam-user-admin/reference/delete-role DeleteRole(context.Context, DeleteRoleRequest) error // ListRoles lists roles for the current account and contract type // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-roles ListRoles(context.Context, ListRolesRequest) ([]Role, error) // ListGrantableRoles lists which grantable roles can be included in a new custom role or added to an existing custom role // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-grantable-roles ListGrantableRoles(context.Context) ([]RoleGrantedRole, error) }
Roles is the IAM role API interface
type SetUserPasswordRequest ¶
type SetUserPasswordRequest struct { IdentityID string `json:"-"` NewPassword string `json:"newPassword"` }
SetUserPasswordRequest contains the request parameters of the set user password endpoint
func (SetUserPasswordRequest) Validate ¶
func (r SetUserPasswordRequest) Validate() error
Validate validates SetUserPasswordRequest
type Support ¶
type Support interface { // ListProducts lists products a user can subscribe to and receive notifications for on the account // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-notification-products ListProducts(context.Context) ([]string, error) // ListStates lists U.S. states or Canadian provinces // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-states ListStates(context.Context, ListStatesRequest) ([]string, error) // ListTimeoutPolicies lists all the possible session timeout policies // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-timeout-policies ListTimeoutPolicies(context.Context) ([]TimeoutPolicy, error) // SupportedContactTypes lists supported contact types // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-contact-types SupportedContactTypes(context.Context) ([]string, error) // SupportedCountries lists supported countries // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-countries SupportedCountries(context.Context) ([]string, error) // SupportedLanguages lists supported languages // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-languages SupportedLanguages(context.Context) ([]string, error) // SupportedTimezones lists supported timezones // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-common-timezones SupportedTimezones(context.Context) ([]Timezone, error) }
Support is a list of IAM supported objects API interfaces
type TFAActionType ¶
type TFAActionType string
TFAActionType is a type for tfa action constants
const ( // TFAActionEnable ia an action value to use to enable tfa TFAActionEnable TFAActionType = "enable" // TFAActionDisable ia an action value to use to disable tfa TFAActionDisable TFAActionType = "disable" // TFAActionReset ia an action value to use to reset tfa TFAActionReset TFAActionType = "reset" )
type TimeoutPolicy ¶
TimeoutPolicy encapsulates the response of the list timeout policies endpoint
type Timezone ¶
type Timezone struct { Description string `json:"description"` Offset string `json:"offset"` Posix string `json:"posix"` Timezone string `json:"timezone"` }
Timezone contains the response of the list supported timezones endpoint
type UnlockUserRequest ¶
type UnlockUserRequest struct {
IdentityID string
}
UnlockUserRequest contains the request parameters of the unlock user endpoint
func (UnlockUserRequest) Validate ¶
func (r UnlockUserRequest) Validate() error
Validate validates UnlockUserRequest
type UpdateBlockedPropertiesRequest ¶
UpdateBlockedPropertiesRequest contains the request parameters for the update blocked properties endpoint
func (UpdateBlockedPropertiesRequest) Validate ¶
func (r UpdateBlockedPropertiesRequest) Validate() error
Validate validates UpdateBlockedPropertiesRequest
type UpdateRoleRequest ¶
type UpdateRoleRequest struct { ID int64 RoleRequest }
UpdateRoleRequest describes the request parameters of the update role endpoint. It works as patch request. You need to provide only fields which you want to update.
func (UpdateRoleRequest) Validate ¶
func (r UpdateRoleRequest) Validate() error
Validate validates UpdateRoleRequest
type UpdateTFARequest ¶
type UpdateTFARequest struct { IdentityID string Action TFAActionType }
UpdateTFARequest contains the request parameters of the tfa user endpoint
func (UpdateTFARequest) Validate ¶
func (r UpdateTFARequest) Validate() error
Validate validates UpdateTFARequest
type UpdateUserAuthGrantsRequest ¶
type UpdateUserAuthGrantsRequest struct { IdentityID string AuthGrants []AuthGrantRequest }
UpdateUserAuthGrantsRequest contains the request parameters of the update user auth grants endpoint
func (UpdateUserAuthGrantsRequest) Validate ¶
func (r UpdateUserAuthGrantsRequest) Validate() error
Validate validates UpdateUserAuthGrantsRequest
type UpdateUserInfoRequest ¶
type UpdateUserInfoRequest struct { IdentityID string User UserBasicInfo }
UpdateUserInfoRequest contains the request parameters of the update user endpoint
func (UpdateUserInfoRequest) Validate ¶
func (r UpdateUserInfoRequest) Validate() error
Validate validates UpdateUserInfoRequest
type UpdateUserNotificationsRequest ¶
type UpdateUserNotificationsRequest struct { IdentityID string Notifications UserNotifications }
UpdateUserNotificationsRequest contains the request parameters of the update user notifications endpoint
func (UpdateUserNotificationsRequest) Validate ¶
func (r UpdateUserNotificationsRequest) Validate() error
Validate validates UpdateUserNotificationsRequest
type User ¶
type User struct { UserBasicInfo IdentityID string `json:"uiIdentityId"` IsLocked bool `json:"isLocked"` LastLoginDate string `json:"lastLoginDate,omitempty"` PasswordExpiryDate string `json:"passwordExpiryDate,omitempty"` TFAConfigured bool `json:"tfaConfigured"` EmailUpdatePending bool `json:"emailUpdatePending"` AuthGrants []AuthGrant `json:"authGrants,omitempty"` Notifications UserNotifications `json:"notifications,omitempty"` }
User describes the response of the get and create user endpoints
type UserActions ¶
type UserActions struct { APIClient bool `json:"apiClient"` Delete bool `json:"delete"` Edit bool `json:"edit"` IsCloneable bool `json:"isCloneable"` ResetPassword bool `json:"resetPassword"` ThirdPartyAccess bool `json:"thirdPartyAccess"` CanEditTFA bool `json:"canEditTFA"` EditProfile bool `json:"editProfile"` }
UserActions encapsulates permissions available to the user for this group
type UserBasicInfo ¶
type UserBasicInfo struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` UserName string `json:"uiUserName,omitempty"` Email string `json:"email"` Phone string `json:"phone,omitempty"` TimeZone string `json:"timeZone,omitempty"` JobTitle string `json:"jobTitle"` TFAEnabled bool `json:"tfaEnabled"` SecondaryEmail string `json:"secondaryEmail,omitempty"` MobilePhone string `json:"mobilePhone,omitempty"` Address string `json:"address,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` ZipCode string `json:"zipCode,omitempty"` Country string `json:"country"` ContactType string `json:"contactType,omitempty"` PreferredLanguage string `json:"preferredLanguage,omitempty"` SessionTimeOut *int `json:"sessionTimeOut,omitempty"` }
UserBasicInfo is the user basic info structure
type UserListItem ¶
type UserListItem struct { FirstName string `json:"firstName"` LastName string `json:"lastName"` UserName string `json:"uiUserName,omitempty"` Email string `json:"email"` TFAEnabled bool `json:"tfaEnabled"` IdentityID string `json:"uiIdentityId"` IsLocked bool `json:"isLocked"` LastLoginDate string `json:"lastLoginDate,omitempty"` TFAConfigured bool `json:"tfaConfigured"` AccountID string `json:"accountId"` Actions *UserActions `json:"actions,omitempty"` AuthGrants []AuthGrant `json:"authGrants,omitempty"` }
UserListItem describes the response of the list endpoint
type UserLock ¶
type UserLock interface { // LockUser lock the user // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-ui-identity-lock LockUser(context.Context, LockUserRequest) error // UnlockUser release the lock on a user's account // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-ui-identity-unlock UnlockUser(context.Context, UnlockUserRequest) error }
UserLock is the IAM user lock/unlock API interface
type UserNotificationOptions ¶
type UserNotificationOptions struct { NewUser bool `json:"newUserNotification"` PasswordExpiry bool `json:"passwordExpiry"` Proactive []string `json:"proactive"` Upgrade []string `json:"upgrade"` }
UserNotificationOptions types of notification emails the user receives
type UserNotifications ¶
type UserNotifications struct { EnableEmail bool `json:"enableEmailNotifications"` Options UserNotificationOptions `json:"options"` }
UserNotifications types of notification emails the user receives
type UserPassword ¶
type UserPassword interface { // ResetUserPassword optionally sends a one-time use password to the user. // If you send the email with the password directly to the user, the response for this operation doesn't include that password. // If you don't send the password to the user through email, the password is included in the response. // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-reset-password ResetUserPassword(context.Context, ResetUserPasswordRequest) (*ResetUserPasswordResponse, error) // SetUserPassword sets a specific password for a user // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-set-password SetUserPassword(context.Context, SetUserPasswordRequest) error }
UserPassword is the IAM managing user's password API interface
type Users ¶
type Users interface { // CreateUser creates a user in the account specified in your own API client credentials or clone an existing user's role assignments // // See: https://techdocs.akamai.com/iam-user-admin/reference/post-ui-identity CreateUser(context.Context, CreateUserRequest) (*User, error) // GetUser gets a specific user's profile // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-ui-identity GetUser(context.Context, GetUserRequest) (*User, error) // ListUsers returns a list of users who have access on this account // // See: https://techdocs.akamai.com/iam-user-admin/reference/get-ui-identities ListUsers(context.Context, ListUsersRequest) ([]UserListItem, error) // RemoveUser removes a user identity // // See: https://techdocs.akamai.com/iam-user-admin/reference/delete-ui-identity RemoveUser(context.Context, RemoveUserRequest) error // UpdateUserAuthGrants edits what groups a user has access to, and how the user can interact with the objects in those groups // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-ui-uiidentity-auth-grants UpdateUserAuthGrants(context.Context, UpdateUserAuthGrantsRequest) ([]AuthGrant, error) // UpdateUserInfo updates a user's information // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-ui-identity-basic-info UpdateUserInfo(context.Context, UpdateUserInfoRequest) (*UserBasicInfo, error) // UpdateUserNotifications subscribes or un-subscribe user to product notification emails // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-notifications UpdateUserNotifications(context.Context, UpdateUserNotificationsRequest) (*UserNotifications, error) // UpdateTFA updates a user's two-factor authentication setting and can reset tfa // // See: https://techdocs.akamai.com/iam-user-admin/reference/put-ui-identity-tfa UpdateTFA(context.Context, UpdateTFARequest) error }
Users is the IAM user identity API interface