Documentation ¶
Overview ¶
Package usermanagementv1 : Operations and models for the UserManagementV1 service
Index ¶
- Constants
- func GetServiceURLForRegion(region string) (string, error)
- func UnmarshalAttribute(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInviteUser(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInviteUserIamPolicy(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInvitedUser(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalInvitedUserList(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalUserList(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalUserProfile(m map[string]json.RawMessage, result interface{}) (err error)
- func UnmarshalUserSettings(m map[string]json.RawMessage, result interface{}) (err error)
- type AcceptOptions
- type Attribute
- type GetUserProfileOptions
- func (_options *GetUserProfileOptions) SetAccountID(accountID string) *GetUserProfileOptions
- func (options *GetUserProfileOptions) SetHeaders(param map[string]string) *GetUserProfileOptions
- func (_options *GetUserProfileOptions) SetIamID(iamID string) *GetUserProfileOptions
- func (_options *GetUserProfileOptions) SetIncludeActivity(includeActivity string) *GetUserProfileOptions
- type GetUserSettingsOptions
- type InviteUser
- type InviteUserIamPolicy
- type InviteUsersOptions
- func (_options *InviteUsersOptions) SetAccessGroups(accessGroups []string) *InviteUsersOptions
- func (_options *InviteUsersOptions) SetAccountID(accountID string) *InviteUsersOptions
- func (options *InviteUsersOptions) SetHeaders(param map[string]string) *InviteUsersOptions
- func (_options *InviteUsersOptions) SetIamPolicy(iamPolicy []InviteUserIamPolicy) *InviteUsersOptions
- func (_options *InviteUsersOptions) SetUsers(users []InviteUser) *InviteUsersOptions
- type InvitedUser
- type InvitedUserList
- type ListUsersOptions
- func (_options *ListUsersOptions) SetAccountID(accountID string) *ListUsersOptions
- func (options *ListUsersOptions) SetHeaders(param map[string]string) *ListUsersOptions
- func (_options *ListUsersOptions) SetIncludeSettings(includeSettings bool) *ListUsersOptions
- func (_options *ListUsersOptions) SetLimit(limit int64) *ListUsersOptions
- func (_options *ListUsersOptions) SetSearch(search string) *ListUsersOptions
- func (_options *ListUsersOptions) SetStart(start string) *ListUsersOptions
- func (_options *ListUsersOptions) SetUserID(userID string) *ListUsersOptions
- type RemoveUserOptions
- func (_options *RemoveUserOptions) SetAccountID(accountID string) *RemoveUserOptions
- func (options *RemoveUserOptions) SetHeaders(param map[string]string) *RemoveUserOptions
- func (_options *RemoveUserOptions) SetIamID(iamID string) *RemoveUserOptions
- func (_options *RemoveUserOptions) SetIncludeActivity(includeActivity string) *RemoveUserOptions
- type Resource
- type Role
- type UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetAccountID(accountID string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetAltphonenumber(altphonenumber string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetEmail(email string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetFirstname(firstname string) *UpdateUserProfileOptions
- func (options *UpdateUserProfileOptions) SetHeaders(param map[string]string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetIamID(iamID string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetIncludeActivity(includeActivity string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetLastname(lastname string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetPhonenumber(phonenumber string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetPhoto(photo string) *UpdateUserProfileOptions
- func (_options *UpdateUserProfileOptions) SetState(state string) *UpdateUserProfileOptions
- type UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetAccountID(accountID string) *UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetAllowedIPAddresses(allowedIPAddresses string) *UpdateUserSettingsOptions
- func (options *UpdateUserSettingsOptions) SetHeaders(param map[string]string) *UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetIamID(iamID string) *UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetLanguage(language string) *UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetNotificationLanguage(notificationLanguage string) *UpdateUserSettingsOptions
- func (_options *UpdateUserSettingsOptions) SetSelfManage(selfManage bool) *UpdateUserSettingsOptions
- type UserList
- type UserManagementV1
- func (userManagement *UserManagementV1) Accept(acceptOptions *AcceptOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) AcceptWithContext(ctx context.Context, acceptOptions *AcceptOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) Clone() *UserManagementV1
- func (userManagement *UserManagementV1) DisableRetries()
- func (userManagement *UserManagementV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
- func (userManagement *UserManagementV1) GetEnableGzipCompression() bool
- func (userManagement *UserManagementV1) GetServiceURL() string
- func (userManagement *UserManagementV1) GetUserProfile(getUserProfileOptions *GetUserProfileOptions) (result *UserProfile, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) GetUserProfileWithContext(ctx context.Context, getUserProfileOptions *GetUserProfileOptions) (result *UserProfile, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) GetUserSettings(getUserSettingsOptions *GetUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) GetUserSettingsWithContext(ctx context.Context, getUserSettingsOptions *GetUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) InviteUsers(inviteUsersOptions *InviteUsersOptions) (result *InvitedUserList, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) InviteUsersWithContext(ctx context.Context, inviteUsersOptions *InviteUsersOptions) (result *InvitedUserList, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) ListUsers(listUsersOptions *ListUsersOptions) (result *UserList, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) ListUsersWithContext(ctx context.Context, listUsersOptions *ListUsersOptions) (result *UserList, response *core.DetailedResponse, err error)
- func (*UserManagementV1) NewAcceptOptions() *AcceptOptions
- func (*UserManagementV1) NewGetUserProfileOptions(accountID string, iamID string) *GetUserProfileOptions
- func (*UserManagementV1) NewGetUserSettingsOptions(accountID string, iamID string) *GetUserSettingsOptions
- func (*UserManagementV1) NewInviteUserIamPolicy(typeVar string) (_model *InviteUserIamPolicy, err error)
- func (*UserManagementV1) NewInviteUsersOptions(accountID string) *InviteUsersOptions
- func (*UserManagementV1) NewListUsersOptions(accountID string) *ListUsersOptions
- func (*UserManagementV1) NewRemoveUserOptions(accountID string, iamID string) *RemoveUserOptions
- func (*UserManagementV1) NewUpdateUserProfileOptions(accountID string, iamID string) *UpdateUserProfileOptions
- func (*UserManagementV1) NewUpdateUserSettingsOptions(accountID string, iamID string) *UpdateUserSettingsOptions
- func (userManagement *UserManagementV1) NewUsersPager(options *ListUsersOptions) (pager *UsersPager, err error)
- func (*UserManagementV1) NewV3RemoveUserOptions(accountID string, iamID string) *V3RemoveUserOptions
- func (userManagement *UserManagementV1) RemoveUser(removeUserOptions *RemoveUserOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) RemoveUserWithContext(ctx context.Context, removeUserOptions *RemoveUserOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) SetDefaultHeaders(headers http.Header)
- func (userManagement *UserManagementV1) SetEnableGzipCompression(enableGzip bool)
- func (userManagement *UserManagementV1) SetServiceURL(url string) error
- func (userManagement *UserManagementV1) UpdateUserProfile(updateUserProfileOptions *UpdateUserProfileOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserProfileWithContext(ctx context.Context, updateUserProfileOptions *UpdateUserProfileOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserSettings(updateUserSettingsOptions *UpdateUserSettingsOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserSettingsWithContext(ctx context.Context, updateUserSettingsOptions *UpdateUserSettingsOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) V3RemoveUser(v3RemoveUserOptions *V3RemoveUserOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) V3RemoveUserWithContext(ctx context.Context, v3RemoveUserOptions *V3RemoveUserOptions) (response *core.DetailedResponse, err error)
- type UserManagementV1Options
- type UserProfile
- type UserSettings
- type UsersPager
- func (pager *UsersPager) GetAll() (allItems []UserProfile, err error)
- func (pager *UsersPager) GetAllWithContext(ctx context.Context) (allItems []UserProfile, err error)
- func (pager *UsersPager) GetNext() (page []UserProfile, err error)
- func (pager *UsersPager) GetNextWithContext(ctx context.Context) (page []UserProfile, err error)
- func (pager *UsersPager) HasNext() bool
- type V3RemoveUserOptions
Constants ¶
const DefaultServiceName = "user_management"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://user-management.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
Variables ¶
This section is empty.
Functions ¶
func GetServiceURLForRegion ¶ added in v0.17.2
GetServiceURLForRegion returns the service URL to be used for the specified region
func UnmarshalAttribute ¶
func UnmarshalAttribute(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalAttribute unmarshals an instance of Attribute from the specified map of raw messages.
func UnmarshalInviteUser ¶
func UnmarshalInviteUser(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInviteUser unmarshals an instance of InviteUser from the specified map of raw messages.
func UnmarshalInviteUserIamPolicy ¶
func UnmarshalInviteUserIamPolicy(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInviteUserIamPolicy unmarshals an instance of InviteUserIamPolicy from the specified map of raw messages.
func UnmarshalInvitedUser ¶ added in v0.15.2
func UnmarshalInvitedUser(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInvitedUser unmarshals an instance of InvitedUser from the specified map of raw messages.
func UnmarshalInvitedUserList ¶ added in v0.15.2
func UnmarshalInvitedUserList(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalInvitedUserList unmarshals an instance of InvitedUserList from the specified map of raw messages.
func UnmarshalResource ¶
func UnmarshalResource(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalResource unmarshals an instance of Resource from the specified map of raw messages.
func UnmarshalRole ¶
func UnmarshalRole(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalRole unmarshals an instance of Role from the specified map of raw messages.
func UnmarshalUserList ¶
func UnmarshalUserList(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalUserList unmarshals an instance of UserList from the specified map of raw messages.
func UnmarshalUserProfile ¶
func UnmarshalUserProfile(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalUserProfile unmarshals an instance of UserProfile from the specified map of raw messages.
func UnmarshalUserSettings ¶
func UnmarshalUserSettings(m map[string]json.RawMessage, result interface{}) (err error)
UnmarshalUserSettings unmarshals an instance of UserSettings from the specified map of raw messages.
Types ¶
type AcceptOptions ¶ added in v0.29.5
type AcceptOptions struct { // The account ID. AccountID *string `json:"account_id,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
AcceptOptions : The Accept options.
func (*AcceptOptions) SetAccountID ¶ added in v0.29.5
func (_options *AcceptOptions) SetAccountID(accountID string) *AcceptOptions
SetAccountID : Allow user to set AccountID
func (*AcceptOptions) SetHeaders ¶ added in v0.29.5
func (options *AcceptOptions) SetHeaders(param map[string]string) *AcceptOptions
SetHeaders : Allow user to set Headers
type Attribute ¶
type Attribute struct { // The name of the attribute. Name *string `json:"name,omitempty"` // The value of the attribute. Value *string `json:"value,omitempty"` }
Attribute : An attribute/value pair.
type GetUserProfileOptions ¶
type GetUserProfileOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // Include activity information of the user, such as the last authentication timestamp. IncludeActivity *string `json:"include_activity,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
GetUserProfileOptions : The GetUserProfile options.
func (*GetUserProfileOptions) SetAccountID ¶
func (_options *GetUserProfileOptions) SetAccountID(accountID string) *GetUserProfileOptions
SetAccountID : Allow user to set AccountID
func (*GetUserProfileOptions) SetHeaders ¶
func (options *GetUserProfileOptions) SetHeaders(param map[string]string) *GetUserProfileOptions
SetHeaders : Allow user to set Headers
func (*GetUserProfileOptions) SetIamID ¶
func (_options *GetUserProfileOptions) SetIamID(iamID string) *GetUserProfileOptions
SetIamID : Allow user to set IamID
func (*GetUserProfileOptions) SetIncludeActivity ¶ added in v0.29.5
func (_options *GetUserProfileOptions) SetIncludeActivity(includeActivity string) *GetUserProfileOptions
SetIncludeActivity : Allow user to set IncludeActivity
type GetUserSettingsOptions ¶
type GetUserSettingsOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
GetUserSettingsOptions : The GetUserSettings options.
func (*GetUserSettingsOptions) SetAccountID ¶
func (_options *GetUserSettingsOptions) SetAccountID(accountID string) *GetUserSettingsOptions
SetAccountID : Allow user to set AccountID
func (*GetUserSettingsOptions) SetHeaders ¶
func (options *GetUserSettingsOptions) SetHeaders(param map[string]string) *GetUserSettingsOptions
SetHeaders : Allow user to set Headers
func (*GetUserSettingsOptions) SetIamID ¶
func (_options *GetUserSettingsOptions) SetIamID(iamID string) *GetUserSettingsOptions
SetIamID : Allow user to set IamID
type InviteUser ¶
type InviteUser struct { // The email of the user to be invited. Email *string `json:"email,omitempty"` // The account role of the user to be invited. AccountRole *string `json:"account_role,omitempty"` }
InviteUser : Invite a user.
type InviteUserIamPolicy ¶
type InviteUserIamPolicy struct { // The policy type. This can be either "access" or "authorization". Type *string `json:"type" validate:"required"` // A list of IAM roles. Roles []Role `json:"roles,omitempty"` // A list of resources. Resources []Resource `json:"resources,omitempty"` }
InviteUserIamPolicy : Invite a user to an IAM policy.
type InviteUsersOptions ¶
type InviteUsersOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // A list of users to be invited. Users []InviteUser `json:"users,omitempty"` // A list of IAM policies. IamPolicy []InviteUserIamPolicy `json:"iam_policy,omitempty"` // A list of access groups. AccessGroups []string `json:"access_groups,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
InviteUsersOptions : The InviteUsers options.
func (*InviteUsersOptions) SetAccessGroups ¶
func (_options *InviteUsersOptions) SetAccessGroups(accessGroups []string) *InviteUsersOptions
SetAccessGroups : Allow user to set AccessGroups
func (*InviteUsersOptions) SetAccountID ¶
func (_options *InviteUsersOptions) SetAccountID(accountID string) *InviteUsersOptions
SetAccountID : Allow user to set AccountID
func (*InviteUsersOptions) SetHeaders ¶
func (options *InviteUsersOptions) SetHeaders(param map[string]string) *InviteUsersOptions
SetHeaders : Allow user to set Headers
func (*InviteUsersOptions) SetIamPolicy ¶
func (_options *InviteUsersOptions) SetIamPolicy(iamPolicy []InviteUserIamPolicy) *InviteUsersOptions
SetIamPolicy : Allow user to set IamPolicy
func (*InviteUsersOptions) SetUsers ¶
func (_options *InviteUsersOptions) SetUsers(users []InviteUser) *InviteUsersOptions
SetUsers : Allow user to set Users
type InvitedUser ¶ added in v0.15.2
type InvitedUser struct { // The email address associated with the invited user. Email *string `json:"email,omitempty"` // The id associated with the invited user. ID *string `json:"id,omitempty"` // The state of the invitation for the user. State *string `json:"state,omitempty"` }
InvitedUser : Information about a user that has been invited to join an account.
type InvitedUserList ¶ added in v0.15.2
type InvitedUserList struct { // The list of users that have been invited to join the account. Resources []InvitedUser `json:"resources,omitempty"` }
InvitedUserList : A collection of invited users. This is the response returned by the invite_users operation.
type ListUsersOptions ¶
type ListUsersOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The number of results to be returned. Limit *int64 `json:"limit,omitempty"` // The user settings to be returned. Set to true to view language, allowed IP address, and authentication settings. IncludeSettings *bool `json:"include_settings,omitempty"` // The desired search results to be returned. To view the list of users with the additional search filter, use the // following query options: `firstname`, `lastname`, `email`, `state`, `substate`, `iam_id`, `realm`, and `userId`. // HTML URL encoding for the search query and `:` must be used. For example, search=state%3AINVALID returns a list of // invalid users. Multiple search queries can be combined to obtain `OR` results using `,` operator (not URL encoded). // For example, search=state%3AINVALID,email%3Amail.test.ibm.com. Search *string `json:"search,omitempty"` // An optional token that indicates the beginning of the page of results to be returned. If omitted, the first page of // results is returned. This value is obtained from the 'next_url' field of the operation response. Start *string `json:"_start,omitempty"` // Filter users based on their user ID. UserID *string `json:"user_id,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
ListUsersOptions : The ListUsers options.
func (*ListUsersOptions) SetAccountID ¶
func (_options *ListUsersOptions) SetAccountID(accountID string) *ListUsersOptions
SetAccountID : Allow user to set AccountID
func (*ListUsersOptions) SetHeaders ¶
func (options *ListUsersOptions) SetHeaders(param map[string]string) *ListUsersOptions
SetHeaders : Allow user to set Headers
func (*ListUsersOptions) SetIncludeSettings ¶ added in v0.37.4
func (_options *ListUsersOptions) SetIncludeSettings(includeSettings bool) *ListUsersOptions
SetIncludeSettings : Allow user to set IncludeSettings
func (*ListUsersOptions) SetLimit ¶ added in v0.15.2
func (_options *ListUsersOptions) SetLimit(limit int64) *ListUsersOptions
SetLimit : Allow user to set Limit
func (*ListUsersOptions) SetSearch ¶ added in v0.37.4
func (_options *ListUsersOptions) SetSearch(search string) *ListUsersOptions
SetSearch : Allow user to set Search
func (*ListUsersOptions) SetStart ¶ added in v0.15.2
func (_options *ListUsersOptions) SetStart(start string) *ListUsersOptions
SetStart : Allow user to set Start
func (*ListUsersOptions) SetUserID ¶ added in v0.29.5
func (_options *ListUsersOptions) SetUserID(userID string) *ListUsersOptions
SetUserID : Allow user to set UserID
type RemoveUserOptions ¶ added in v0.15.2
type RemoveUserOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // Include activity information of the user, such as the last authentication timestamp. IncludeActivity *string `json:"include_activity,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
RemoveUserOptions : The RemoveUser options.
func (*RemoveUserOptions) SetAccountID ¶ added in v0.15.2
func (_options *RemoveUserOptions) SetAccountID(accountID string) *RemoveUserOptions
SetAccountID : Allow user to set AccountID
func (*RemoveUserOptions) SetHeaders ¶ added in v0.15.2
func (options *RemoveUserOptions) SetHeaders(param map[string]string) *RemoveUserOptions
SetHeaders : Allow user to set Headers
func (*RemoveUserOptions) SetIamID ¶ added in v0.15.2
func (_options *RemoveUserOptions) SetIamID(iamID string) *RemoveUserOptions
SetIamID : Allow user to set IamID
func (*RemoveUserOptions) SetIncludeActivity ¶ added in v0.29.5
func (_options *RemoveUserOptions) SetIncludeActivity(includeActivity string) *RemoveUserOptions
SetIncludeActivity : Allow user to set IncludeActivity
type Resource ¶
type Resource struct { // A list of IAM attributes. Attributes []Attribute `json:"attributes,omitempty"` }
Resource : A collection of attribute value pairs.
type Role ¶
type Role struct { // An alphanumeric value identifying the origin. RoleID *string `json:"role_id,omitempty"` }
Role : The role of an IAM policy.
type UpdateUserProfileOptions ¶ added in v0.15.2
type UpdateUserProfileOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // The first name of the user. Firstname *string `json:"firstname,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` // The state of the user. Possible values are `PROCESSING`, `PENDING`, `ACTIVE`, `DISABLED_CLASSIC_INFRASTRUCTURE`, and // `VPN_ONLY`. State *string `json:"state,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` // The phone number of the user. Phonenumber *string `json:"phonenumber,omitempty"` // The alternative phone number of the user. Altphonenumber *string `json:"altphonenumber,omitempty"` // A link to a photo of the user. Photo *string `json:"photo,omitempty"` // Include activity information of the user, such as the last authentication timestamp. IncludeActivity *string `json:"include_activity,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateUserProfileOptions : The UpdateUserProfile options.
func (*UpdateUserProfileOptions) SetAccountID ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetAccountID(accountID string) *UpdateUserProfileOptions
SetAccountID : Allow user to set AccountID
func (*UpdateUserProfileOptions) SetAltphonenumber ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetAltphonenumber(altphonenumber string) *UpdateUserProfileOptions
SetAltphonenumber : Allow user to set Altphonenumber
func (*UpdateUserProfileOptions) SetEmail ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetEmail(email string) *UpdateUserProfileOptions
SetEmail : Allow user to set Email
func (*UpdateUserProfileOptions) SetFirstname ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetFirstname(firstname string) *UpdateUserProfileOptions
SetFirstname : Allow user to set Firstname
func (*UpdateUserProfileOptions) SetHeaders ¶ added in v0.15.2
func (options *UpdateUserProfileOptions) SetHeaders(param map[string]string) *UpdateUserProfileOptions
SetHeaders : Allow user to set Headers
func (*UpdateUserProfileOptions) SetIamID ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetIamID(iamID string) *UpdateUserProfileOptions
SetIamID : Allow user to set IamID
func (*UpdateUserProfileOptions) SetIncludeActivity ¶ added in v0.29.5
func (_options *UpdateUserProfileOptions) SetIncludeActivity(includeActivity string) *UpdateUserProfileOptions
SetIncludeActivity : Allow user to set IncludeActivity
func (*UpdateUserProfileOptions) SetLastname ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetLastname(lastname string) *UpdateUserProfileOptions
SetLastname : Allow user to set Lastname
func (*UpdateUserProfileOptions) SetPhonenumber ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetPhonenumber(phonenumber string) *UpdateUserProfileOptions
SetPhonenumber : Allow user to set Phonenumber
func (*UpdateUserProfileOptions) SetPhoto ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetPhoto(photo string) *UpdateUserProfileOptions
SetPhoto : Allow user to set Photo
func (*UpdateUserProfileOptions) SetState ¶ added in v0.15.2
func (_options *UpdateUserProfileOptions) SetState(state string) *UpdateUserProfileOptions
SetState : Allow user to set State
type UpdateUserSettingsOptions ¶
type UpdateUserSettingsOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // The console UI language. By default, this field is empty. Language *string `json:"language,omitempty"` // The language for email and phone notifications. By default, this field is empty. NotificationLanguage *string `json:"notification_language,omitempty"` // A comma-separated list of IP addresses. AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` // Whether user managed login is enabled. The default value is `false`. SelfManage *bool `json:"self_manage,omitempty"` // Allows users to set headers on API requests Headers map[string]string }
UpdateUserSettingsOptions : The UpdateUserSettings options.
func (*UpdateUserSettingsOptions) SetAccountID ¶
func (_options *UpdateUserSettingsOptions) SetAccountID(accountID string) *UpdateUserSettingsOptions
SetAccountID : Allow user to set AccountID
func (*UpdateUserSettingsOptions) SetAllowedIPAddresses ¶ added in v0.17.2
func (_options *UpdateUserSettingsOptions) SetAllowedIPAddresses(allowedIPAddresses string) *UpdateUserSettingsOptions
SetAllowedIPAddresses : Allow user to set AllowedIPAddresses
func (*UpdateUserSettingsOptions) SetHeaders ¶
func (options *UpdateUserSettingsOptions) SetHeaders(param map[string]string) *UpdateUserSettingsOptions
SetHeaders : Allow user to set Headers
func (*UpdateUserSettingsOptions) SetIamID ¶
func (_options *UpdateUserSettingsOptions) SetIamID(iamID string) *UpdateUserSettingsOptions
SetIamID : Allow user to set IamID
func (*UpdateUserSettingsOptions) SetLanguage ¶
func (_options *UpdateUserSettingsOptions) SetLanguage(language string) *UpdateUserSettingsOptions
SetLanguage : Allow user to set Language
func (*UpdateUserSettingsOptions) SetNotificationLanguage ¶
func (_options *UpdateUserSettingsOptions) SetNotificationLanguage(notificationLanguage string) *UpdateUserSettingsOptions
SetNotificationLanguage : Allow user to set NotificationLanguage
func (*UpdateUserSettingsOptions) SetSelfManage ¶
func (_options *UpdateUserSettingsOptions) SetSelfManage(selfManage bool) *UpdateUserSettingsOptions
SetSelfManage : Allow user to set SelfManage
type UserList ¶
type UserList struct { // The number of users returned. TotalResults *int64 `json:"total_results" validate:"required"` // A limit to the number of users returned in a page. Limit *int64 `json:"limit" validate:"required"` // The first URL of the get users API. FirstURL *string `json:"first_url,omitempty"` // The next URL of the get users API. NextURL *string `json:"next_url,omitempty"` // A list of users in the account. Resources []UserProfile `json:"resources,omitempty"` }
UserList : The users returned.
func (*UserList) GetNextStart ¶ added in v0.29.5
Retrieve the value to be passed to a request to access the next page of results
type UserManagementV1 ¶
type UserManagementV1 struct {
Service *core.BaseService
}
UserManagementV1 : Manage the lifecycle of your users using User Management APIs.
API Version: 1.0
func NewUserManagementV1 ¶
func NewUserManagementV1(options *UserManagementV1Options) (service *UserManagementV1, err error)
NewUserManagementV1 : constructs an instance of UserManagementV1 with passed in options.
func NewUserManagementV1UsingExternalConfig ¶
func NewUserManagementV1UsingExternalConfig(options *UserManagementV1Options) (userManagement *UserManagementV1, err error)
NewUserManagementV1UsingExternalConfig : constructs an instance of UserManagementV1 with passed in options and external configuration.
func (*UserManagementV1) Accept ¶ added in v0.29.5
func (userManagement *UserManagementV1) Accept(acceptOptions *AcceptOptions) (response *core.DetailedResponse, err error)
Accept : Accept an invitation Accept a user invitation to an account. You can use the user's token for authorization. To use this method, the requesting user must provide the account ID for the account that they are accepting an invitation for. If the user already accepted the invitation request, it returns 204 with no response body.
func (*UserManagementV1) AcceptWithContext ¶ added in v0.29.5
func (userManagement *UserManagementV1) AcceptWithContext(ctx context.Context, acceptOptions *AcceptOptions) (response *core.DetailedResponse, err error)
AcceptWithContext is an alternate form of the Accept method which supports a Context parameter
func (*UserManagementV1) Clone ¶ added in v0.17.2
func (userManagement *UserManagementV1) Clone() *UserManagementV1
Clone makes a copy of "userManagement" suitable for processing requests.
func (*UserManagementV1) DisableRetries ¶ added in v0.12.2
func (userManagement *UserManagementV1) DisableRetries()
DisableRetries disables automatic retries for requests invoked for this service instance.
func (*UserManagementV1) EnableRetries ¶ added in v0.12.2
func (userManagement *UserManagementV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)
EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.
func (*UserManagementV1) GetEnableGzipCompression ¶ added in v0.12.2
func (userManagement *UserManagementV1) GetEnableGzipCompression() bool
GetEnableGzipCompression returns the service's EnableGzipCompression field
func (*UserManagementV1) GetServiceURL ¶ added in v0.12.2
func (userManagement *UserManagementV1) GetServiceURL() string
GetServiceURL returns the service URL
func (*UserManagementV1) GetUserProfile ¶
func (userManagement *UserManagementV1) GetUserProfile(getUserProfileOptions *GetUserProfileOptions) (result *UserProfile, response *core.DetailedResponse, err error)
GetUserProfile : Get user profile Retrieve a user's profile by the user's IAM ID in your account. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the viewer, editor, or administrator role on the User Management service.
func (*UserManagementV1) GetUserProfileWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) GetUserProfileWithContext(ctx context.Context, getUserProfileOptions *GetUserProfileOptions) (result *UserProfile, response *core.DetailedResponse, err error)
GetUserProfileWithContext is an alternate form of the GetUserProfile method which supports a Context parameter
func (*UserManagementV1) GetUserSettings ¶
func (userManagement *UserManagementV1) GetUserSettings(getUserSettingsOptions *GetUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
GetUserSettings : Get user settings Retrieve a user's settings by the user's IAM ID. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have the viewer, editor, or administrator role on the User Management service. <br/><br/>The user settings have several fields. The `language` field is the language setting for the user interface display language. The `notification_language` field is the language setting for phone and email notifications. The `allowed_ip_addresses` field specifies a list of IP addresses that the user can log in and perform operations from as described in [Allowing specific IP addresses for a user](https://cloud.ibm.com/docs/account?topic=account-ips). For information about the `self_manage` field, review information about the [user-managed login setting](https://cloud.ibm.com/docs/account?topic=account-types).
func (*UserManagementV1) GetUserSettingsWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) GetUserSettingsWithContext(ctx context.Context, getUserSettingsOptions *GetUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
GetUserSettingsWithContext is an alternate form of the GetUserSettings method which supports a Context parameter
func (*UserManagementV1) InviteUsers ¶
func (userManagement *UserManagementV1) InviteUsers(inviteUsersOptions *InviteUsersOptions) (result *InvitedUserList, response *core.DetailedResponse, err error)
InviteUsers : Invite users to an account Invite users to the account. You must use a user token for authorization. Service IDs can't invite users to the account. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Inviting users](https://cloud.ibm.com/docs/account?topic=account-iamuserinv) documentation. You can specify the user account role and the corresponding IAM policy information in the request body. <br/><br/>When you invite a user to an account, the user is initially created in the `PROCESSING` state. After the user is successfully created, all specified permissions are configured, and the activation email is sent, the invited user is transitioned to the `PENDING` state. When the invited user clicks the activation email and creates and confirms their IBM Cloud account, the user is transitioned to `ACTIVE` state. If the user email is already verified, no email is generated.
func (*UserManagementV1) InviteUsersWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) InviteUsersWithContext(ctx context.Context, inviteUsersOptions *InviteUsersOptions) (result *InvitedUserList, response *core.DetailedResponse, err error)
InviteUsersWithContext is an alternate form of the InviteUsers method which supports a Context parameter
func (*UserManagementV1) ListUsers ¶
func (userManagement *UserManagementV1) ListUsers(listUsersOptions *ListUsersOptions) (result *UserList, response *core.DetailedResponse, err error)
ListUsers : List users Retrieve users in the account. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the viewer, editor, or administrator role on the User Management service. If unrestricted view is enabled, the user can see all users in the same account without an IAM role. If restricted view is enabled and user has the viewer, editor, or administrator role on the user management service, the API returns all users in the account. If unrestricted view is enabled and the user does not have these roles, the API returns only the current user. Users are returned in a paginated list with a default limit of 100 users. You can iterate through all users by following the `next_url` field. Additional substring search fields are supported to filter the users.
func (*UserManagementV1) ListUsersWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) ListUsersWithContext(ctx context.Context, listUsersOptions *ListUsersOptions) (result *UserList, response *core.DetailedResponse, err error)
ListUsersWithContext is an alternate form of the ListUsers method which supports a Context parameter
func (*UserManagementV1) NewAcceptOptions ¶ added in v0.29.5
func (*UserManagementV1) NewAcceptOptions() *AcceptOptions
NewAcceptOptions : Instantiate AcceptOptions
func (*UserManagementV1) NewGetUserProfileOptions ¶
func (*UserManagementV1) NewGetUserProfileOptions(accountID string, iamID string) *GetUserProfileOptions
NewGetUserProfileOptions : Instantiate GetUserProfileOptions
func (*UserManagementV1) NewGetUserSettingsOptions ¶
func (*UserManagementV1) NewGetUserSettingsOptions(accountID string, iamID string) *GetUserSettingsOptions
NewGetUserSettingsOptions : Instantiate GetUserSettingsOptions
func (*UserManagementV1) NewInviteUserIamPolicy ¶ added in v0.11.1
func (*UserManagementV1) NewInviteUserIamPolicy(typeVar string) (_model *InviteUserIamPolicy, err error)
NewInviteUserIamPolicy : Instantiate InviteUserIamPolicy (Generic Model Constructor)
func (*UserManagementV1) NewInviteUsersOptions ¶
func (*UserManagementV1) NewInviteUsersOptions(accountID string) *InviteUsersOptions
NewInviteUsersOptions : Instantiate InviteUsersOptions
func (*UserManagementV1) NewListUsersOptions ¶
func (*UserManagementV1) NewListUsersOptions(accountID string) *ListUsersOptions
NewListUsersOptions : Instantiate ListUsersOptions
func (*UserManagementV1) NewRemoveUserOptions ¶ added in v0.15.2
func (*UserManagementV1) NewRemoveUserOptions(accountID string, iamID string) *RemoveUserOptions
NewRemoveUserOptions : Instantiate RemoveUserOptions
func (*UserManagementV1) NewUpdateUserProfileOptions ¶ added in v0.15.2
func (*UserManagementV1) NewUpdateUserProfileOptions(accountID string, iamID string) *UpdateUserProfileOptions
NewUpdateUserProfileOptions : Instantiate UpdateUserProfileOptions
func (*UserManagementV1) NewUpdateUserSettingsOptions ¶
func (*UserManagementV1) NewUpdateUserSettingsOptions(accountID string, iamID string) *UpdateUserSettingsOptions
NewUpdateUserSettingsOptions : Instantiate UpdateUserSettingsOptions
func (*UserManagementV1) NewUsersPager ¶ added in v0.29.5
func (userManagement *UserManagementV1) NewUsersPager(options *ListUsersOptions) (pager *UsersPager, err error)
NewUsersPager returns a new UsersPager instance.
func (*UserManagementV1) NewV3RemoveUserOptions ¶ added in v0.29.5
func (*UserManagementV1) NewV3RemoveUserOptions(accountID string, iamID string) *V3RemoveUserOptions
NewV3RemoveUserOptions : Instantiate V3RemoveUserOptions
func (*UserManagementV1) RemoveUser ¶ added in v0.15.2
func (userManagement *UserManagementV1) RemoveUser(removeUserOptions *RemoveUserOptions) (response *core.DetailedResponse, err error)
RemoveUser : Remove user from account Remove users from an account by user's IAM ID. You must use a user token for authorization. Service IDs can't remove users from an account. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Removing users](https://cloud.ibm.com/docs/account?topic=account-remove) documentation.
func (*UserManagementV1) RemoveUserWithContext ¶ added in v0.15.2
func (userManagement *UserManagementV1) RemoveUserWithContext(ctx context.Context, removeUserOptions *RemoveUserOptions) (response *core.DetailedResponse, err error)
RemoveUserWithContext is an alternate form of the RemoveUser method which supports a Context parameter
func (*UserManagementV1) SetDefaultHeaders ¶ added in v0.12.2
func (userManagement *UserManagementV1) SetDefaultHeaders(headers http.Header)
SetDefaultHeaders sets HTTP headers to be sent in every request
func (*UserManagementV1) SetEnableGzipCompression ¶ added in v0.12.2
func (userManagement *UserManagementV1) SetEnableGzipCompression(enableGzip bool)
SetEnableGzipCompression sets the service's EnableGzipCompression field
func (*UserManagementV1) SetServiceURL ¶
func (userManagement *UserManagementV1) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*UserManagementV1) UpdateUserProfile ¶ added in v0.15.2
func (userManagement *UserManagementV1) UpdateUserProfile(updateUserProfileOptions *UpdateUserProfileOptions) (response *core.DetailedResponse, err error)
UpdateUserProfile : Partially update user profile Partially update a user's profile by user's IAM ID. You can use the IAM service token or a user token for authorization. To use this method, the requesting user or service ID must have at least the editor or administrator role on the User Management service. A user or service ID with these roles can change a user's state between `ACTIVE`, `VPN_ONLY`, or `DISABLED_CLASSIC_INFRASTRUCTURE`, but they can't change the state to `PROCESSING` or `PENDING` because these are system states. For other request body fields, a user can update their own profile without having User Management service permissions.
func (*UserManagementV1) UpdateUserProfileWithContext ¶ added in v0.15.2
func (userManagement *UserManagementV1) UpdateUserProfileWithContext(ctx context.Context, updateUserProfileOptions *UpdateUserProfileOptions) (response *core.DetailedResponse, err error)
UpdateUserProfileWithContext is an alternate form of the UpdateUserProfile method which supports a Context parameter
func (*UserManagementV1) UpdateUserSettings ¶
func (userManagement *UserManagementV1) UpdateUserSettings(updateUserSettingsOptions *UpdateUserSettingsOptions) (response *core.DetailedResponse, err error)
UpdateUserSettings : Partially update user settings Update a user's settings by the user's IAM ID. You can use the IAM service token or a user token for authorization. To fully use this method, the user or service ID must have the editor or administrator role on the User Management service. Without these roles, a user can update only their own `language` or `notification_language` fields. If `self_manage` is `true`, the user can also update the `allowed_ip_addresses` field.
func (*UserManagementV1) UpdateUserSettingsWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) UpdateUserSettingsWithContext(ctx context.Context, updateUserSettingsOptions *UpdateUserSettingsOptions) (response *core.DetailedResponse, err error)
UpdateUserSettingsWithContext is an alternate form of the UpdateUserSettings method which supports a Context parameter
func (*UserManagementV1) V3RemoveUser ¶ added in v0.29.5
func (userManagement *UserManagementV1) V3RemoveUser(v3RemoveUserOptions *V3RemoveUserOptions) (response *core.DetailedResponse, err error)
V3RemoveUser : Remove user from account (Asynchronous) Remove users from an account by using the user's IAM ID. You must use a user token for authorization. Service IDs can't remove users from an account. If removing the user fails it will set the user's state to ERROR_WHILE_DELETING. To use this method, the requesting user must have the editor or administrator role on the User Management service. For more information, see the [Removing users](https://cloud.ibm.com/docs/account?topic=account-remove) documentation.
func (*UserManagementV1) V3RemoveUserWithContext ¶ added in v0.29.5
func (userManagement *UserManagementV1) V3RemoveUserWithContext(ctx context.Context, v3RemoveUserOptions *V3RemoveUserOptions) (response *core.DetailedResponse, err error)
V3RemoveUserWithContext is an alternate form of the V3RemoveUser method which supports a Context parameter
type UserManagementV1Options ¶
type UserManagementV1Options struct { ServiceName string URL string Authenticator core.Authenticator }
UserManagementV1Options : Service options
type UserProfile ¶
type UserProfile struct { // An alphanumeric value identifying the user profile. ID *string `json:"id,omitempty"` // An alphanumeric value identifying the user's IAM ID. IamID *string `json:"iam_id,omitempty"` // The realm of the user. The value is either `IBMid` or `SL`. Realm *string `json:"realm,omitempty"` // The user ID used for login. UserID *string `json:"user_id,omitempty"` // The first name of the user. Firstname *string `json:"firstname,omitempty"` // The last name of the user. Lastname *string `json:"lastname,omitempty"` // The state of the user. Possible values are `PROCESSING`, `PENDING`, `ACTIVE`, `DISABLED_CLASSIC_INFRASTRUCTURE`, and // `VPN_ONLY`. State *string `json:"state,omitempty"` // The email address of the user. Email *string `json:"email,omitempty"` // The phone number of the user. Phonenumber *string `json:"phonenumber,omitempty"` // The alternative phone number of the user. Altphonenumber *string `json:"altphonenumber,omitempty"` // A link to a photo of the user. Photo *string `json:"photo,omitempty"` // An alphanumeric value identifying the account ID. AccountID *string `json:"account_id,omitempty"` // The timestamp for when the user was added to the account. AddedOn *string `json:"added_on,omitempty"` }
UserProfile : Returned the user profile.
type UserSettings ¶
type UserSettings struct { // The console UI language. By default, this field is empty. Language *string `json:"language,omitempty"` // The language for email and phone notifications. By default, this field is empty. NotificationLanguage *string `json:"notification_language,omitempty"` // A comma-separated list of IP addresses. AllowedIPAddresses *string `json:"allowed_ip_addresses,omitempty"` // Whether user managed login is enabled. The default value is `false`. SelfManage *bool `json:"self_manage,omitempty"` }
UserSettings : The user settings returned.
type UsersPager ¶ added in v0.29.5
type UsersPager struct {
// contains filtered or unexported fields
}
UsersPager can be used to simplify the use of the "ListUsers" method.
func (*UsersPager) GetAll ¶ added in v0.29.5
func (pager *UsersPager) GetAll() (allItems []UserProfile, err error)
GetAll invokes GetAllWithContext() using context.Background() as the Context parameter.
func (*UsersPager) GetAllWithContext ¶ added in v0.29.5
func (pager *UsersPager) GetAllWithContext(ctx context.Context) (allItems []UserProfile, err error)
GetAllWithContext returns all results by invoking GetNextWithContext() repeatedly until all pages of results have been retrieved.
func (*UsersPager) GetNext ¶ added in v0.29.5
func (pager *UsersPager) GetNext() (page []UserProfile, err error)
GetNext invokes GetNextWithContext() using context.Background() as the Context parameter.
func (*UsersPager) GetNextWithContext ¶ added in v0.29.5
func (pager *UsersPager) GetNextWithContext(ctx context.Context) (page []UserProfile, err error)
GetNextWithContext returns the next page of results using the specified Context.
func (*UsersPager) HasNext ¶ added in v0.29.5
func (pager *UsersPager) HasNext() bool
HasNext returns true if there are potentially more results to be retrieved.
type V3RemoveUserOptions ¶ added in v0.29.5
type V3RemoveUserOptions struct { // The account ID of the specified user. AccountID *string `json:"account_id" validate:"required,ne="` // The user's IAM ID. IamID *string `json:"iam_id" validate:"required,ne="` // Allows users to set headers on API requests Headers map[string]string }
V3RemoveUserOptions : The V3RemoveUser options.
func (*V3RemoveUserOptions) SetAccountID ¶ added in v0.29.5
func (_options *V3RemoveUserOptions) SetAccountID(accountID string) *V3RemoveUserOptions
SetAccountID : Allow user to set AccountID
func (*V3RemoveUserOptions) SetHeaders ¶ added in v0.29.5
func (options *V3RemoveUserOptions) SetHeaders(param map[string]string) *V3RemoveUserOptions
SetHeaders : Allow user to set Headers
func (*V3RemoveUserOptions) SetIamID ¶ added in v0.29.5
func (_options *V3RemoveUserOptions) SetIamID(iamID string) *V3RemoveUserOptions
SetIamID : Allow user to set IamID