Documentation ¶
Overview ¶
Package usermanagementv1 : Operations and models for the UserManagementV1 service
Index ¶
- Constants
- 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 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 Attribute
- type 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 ListUsersOptions
- type RemoveUsersOptions
- type Resource
- type Role
- type UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetAccountID(accountID string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetAltphonenumber(altphonenumber string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetEmail(email string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetFirstname(firstname string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetHeaders(param map[string]string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetIamID(iamID string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetLastname(lastname string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetPhonenumber(phonenumber string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetPhoto(photo string) *UpdateUserProfilesOptions
- func (options *UpdateUserProfilesOptions) SetState(state string) *UpdateUserProfilesOptions
- 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) 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 *UserList, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) InviteUsersWithContext(ctx context.Context, inviteUsersOptions *InviteUsersOptions) (result *UserList, 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) 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) NewRemoveUsersOptions(accountID string, iamID string) *RemoveUsersOptions
- func (*UserManagementV1) NewUpdateUserProfilesOptions(accountID string, iamID string) *UpdateUserProfilesOptions
- func (*UserManagementV1) NewUpdateUserSettingsOptions(accountID string, iamID string) *UpdateUserSettingsOptions
- func (userManagement *UserManagementV1) RemoveUsers(removeUsersOptions *RemoveUsersOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) RemoveUsersWithContext(ctx context.Context, removeUsersOptions *RemoveUsersOptions) (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) UpdateUserProfiles(updateUserProfilesOptions *UpdateUserProfilesOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserProfilesWithContext(ctx context.Context, updateUserProfilesOptions *UpdateUserProfilesOptions) (response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserSettings(updateUserSettingsOptions *UpdateUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
- func (userManagement *UserManagementV1) UpdateUserSettingsWithContext(ctx context.Context, updateUserSettingsOptions *UpdateUserSettingsOptions) (result *UserSettings, response *core.DetailedResponse, err error)
- type UserManagementV1Options
- type UserProfile
- type UserSettings
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 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 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 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 : Attribute struct
type GetUserProfileOptions ¶
type GetUserProfileOptions struct { // The account ID. 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 }
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
type GetUserSettingsOptions ¶
type GetUserSettingsOptions struct { // The account ID. 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. 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 ListUsersOptions ¶
type ListUsersOptions struct { // The account ID. AccountID *string `json:"account_id" validate:"required,ne="` // The state of the user. State *string `json:"state,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) SetState ¶
func (options *ListUsersOptions) SetState(state string) *ListUsersOptions
SetState : Allow user to set State
type RemoveUsersOptions ¶
type RemoveUsersOptions struct { // The account ID. 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 }
RemoveUsersOptions : The RemoveUsers options.
func (*RemoveUsersOptions) SetAccountID ¶
func (options *RemoveUsersOptions) SetAccountID(accountID string) *RemoveUsersOptions
SetAccountID : Allow user to set AccountID
func (*RemoveUsersOptions) SetHeaders ¶
func (options *RemoveUsersOptions) SetHeaders(param map[string]string) *RemoveUsersOptions
SetHeaders : Allow user to set Headers
func (*RemoveUsersOptions) SetIamID ¶
func (options *RemoveUsersOptions) SetIamID(iamID string) *RemoveUsersOptions
SetIamID : Allow user to set IamID
type Resource ¶
type Resource struct { // A list of IAM attributes. Attributes []Attribute `json:"attributes,omitempty"` }
Resource : object.
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 UpdateUserProfilesOptions ¶
type UpdateUserProfilesOptions struct { // The account ID. 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"` // Allows users to set headers on API requests Headers map[string]string }
UpdateUserProfilesOptions : The UpdateUserProfiles options.
func (*UpdateUserProfilesOptions) SetAccountID ¶
func (options *UpdateUserProfilesOptions) SetAccountID(accountID string) *UpdateUserProfilesOptions
SetAccountID : Allow user to set AccountID
func (*UpdateUserProfilesOptions) SetAltphonenumber ¶
func (options *UpdateUserProfilesOptions) SetAltphonenumber(altphonenumber string) *UpdateUserProfilesOptions
SetAltphonenumber : Allow user to set Altphonenumber
func (*UpdateUserProfilesOptions) SetEmail ¶
func (options *UpdateUserProfilesOptions) SetEmail(email string) *UpdateUserProfilesOptions
SetEmail : Allow user to set Email
func (*UpdateUserProfilesOptions) SetFirstname ¶
func (options *UpdateUserProfilesOptions) SetFirstname(firstname string) *UpdateUserProfilesOptions
SetFirstname : Allow user to set Firstname
func (*UpdateUserProfilesOptions) SetHeaders ¶
func (options *UpdateUserProfilesOptions) SetHeaders(param map[string]string) *UpdateUserProfilesOptions
SetHeaders : Allow user to set Headers
func (*UpdateUserProfilesOptions) SetIamID ¶
func (options *UpdateUserProfilesOptions) SetIamID(iamID string) *UpdateUserProfilesOptions
SetIamID : Allow user to set IamID
func (*UpdateUserProfilesOptions) SetLastname ¶
func (options *UpdateUserProfilesOptions) SetLastname(lastname string) *UpdateUserProfilesOptions
SetLastname : Allow user to set Lastname
func (*UpdateUserProfilesOptions) SetPhonenumber ¶
func (options *UpdateUserProfilesOptions) SetPhonenumber(phonenumber string) *UpdateUserProfilesOptions
SetPhonenumber : Allow user to set Phonenumber
func (*UpdateUserProfilesOptions) SetPhoto ¶
func (options *UpdateUserProfilesOptions) SetPhoto(photo string) *UpdateUserProfilesOptions
SetPhoto : Allow user to set Photo
func (*UpdateUserProfilesOptions) SetState ¶
func (options *UpdateUserProfilesOptions) SetState(state string) *UpdateUserProfilesOptions
SetState : Allow user to set State
type UpdateUserSettingsOptions ¶
type UpdateUserSettingsOptions struct { // The account ID. 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 ¶
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 *float64 `json:"total_results,omitempty"` // A limit to the number of users returned in a page. Limit *float64 `json:"limit,omitempty"` // 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.
type UserManagementV1 ¶
type UserManagementV1 struct {
Service *core.BaseService
}
UserManagementV1 : Manage the lifecycle of your users using User Management APIs.
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) 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](/docs/account?topic=account-ips). For information about the `self_manage` field, review information about the [user-managed login setting](/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 *UserList, response *core.DetailedResponse, err error)
InviteUsers : Invite users 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](/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 *UserList, 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.
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) 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) NewRemoveUsersOptions ¶
func (*UserManagementV1) NewRemoveUsersOptions(accountID string, iamID string) *RemoveUsersOptions
NewRemoveUsersOptions : Instantiate RemoveUsersOptions
func (*UserManagementV1) NewUpdateUserProfilesOptions ¶
func (*UserManagementV1) NewUpdateUserProfilesOptions(accountID string, iamID string) *UpdateUserProfilesOptions
NewUpdateUserProfilesOptions : Instantiate UpdateUserProfilesOptions
func (*UserManagementV1) NewUpdateUserSettingsOptions ¶
func (*UserManagementV1) NewUpdateUserSettingsOptions(accountID string, iamID string) *UpdateUserSettingsOptions
NewUpdateUserSettingsOptions : Instantiate UpdateUserSettingsOptions
func (*UserManagementV1) RemoveUsers ¶
func (userManagement *UserManagementV1) RemoveUsers(removeUsersOptions *RemoveUsersOptions) (response *core.DetailedResponse, err error)
RemoveUsers : Remove users 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](/docs/account?topic=account-remove) documentation.
func (*UserManagementV1) RemoveUsersWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) RemoveUsersWithContext(ctx context.Context, removeUsersOptions *RemoveUsersOptions) (response *core.DetailedResponse, err error)
RemoveUsersWithContext is an alternate form of the RemoveUsers 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) UpdateUserProfiles ¶
func (userManagement *UserManagementV1) UpdateUserProfiles(updateUserProfilesOptions *UpdateUserProfilesOptions) (response *core.DetailedResponse, err error)
UpdateUserProfiles : Partially update user profiles 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) UpdateUserProfilesWithContext ¶ added in v0.12.2
func (userManagement *UserManagementV1) UpdateUserProfilesWithContext(ctx context.Context, updateUserProfilesOptions *UpdateUserProfilesOptions) (response *core.DetailedResponse, err error)
UpdateUserProfilesWithContext is an alternate form of the UpdateUserProfiles method which supports a Context parameter
func (*UserManagementV1) UpdateUserSettings ¶
func (userManagement *UserManagementV1) UpdateUserSettings(updateUserSettingsOptions *UpdateUserSettingsOptions) (result *UserSettings, 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) (result *UserSettings, response *core.DetailedResponse, err error)
UpdateUserSettingsWithContext is an alternate form of the UpdateUserSettings 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"` }
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.