usermanagementv1

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package usermanagementv1 : Operations and models for the UserManagementV1 service

Index

Constants

View Source
const DefaultServiceName = "user_management"

DefaultServiceName is the default key used to find external configuration information.

View Source
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

func GetServiceURLForRegion(region string) (string, error)

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 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.
	AccountID *string `validate:"required,ne="`

	// The user's IAM ID.
	IamID *string `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 `validate:"required,ne="`

	// The user's IAM ID.
	IamID *string `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 `validate:"required,ne="`

	// A list of users to be invited.
	Users []InviteUser

	// A list of IAM policies.
	IamPolicy []InviteUserIamPolicy

	// A list of access groups.
	AccessGroups []string

	// 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.
	AccountID *string `validate:"required,ne="`

	// The state of the user.
	State *string

	// The number of results to be returned.
	Limit *int64

	// 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

	// 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) SetLimit added in v0.15.2

func (options *ListUsersOptions) SetLimit(limit int64) *ListUsersOptions

SetLimit : Allow user to set Limit

func (*ListUsersOptions) SetStart added in v0.15.2

func (options *ListUsersOptions) SetStart(start string) *ListUsersOptions

SetStart : Allow user to set Start

func (*ListUsersOptions) SetState

func (options *ListUsersOptions) SetState(state string) *ListUsersOptions

SetState : Allow user to set State

type RemoveUserOptions added in v0.15.2

type RemoveUserOptions struct {
	// The account ID.
	AccountID *string `validate:"required,ne="`

	// The user's IAM ID.
	IamID *string `validate:"required,ne="`

	// 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

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.
	AccountID *string `validate:"required,ne="`

	// The user's IAM ID.
	IamID *string `validate:"required,ne="`

	// The first name of the user.
	Firstname *string

	// The last name of the user.
	Lastname *string

	// The state of the user. Possible values are `PROCESSING`, `PENDING`, `ACTIVE`, `DISABLED_CLASSIC_INFRASTRUCTURE`, and
	// `VPN_ONLY`.
	State *string

	// The email address of the user.
	Email *string

	// The phone number of the user.
	Phonenumber *string

	// The alternative phone number of the user.
	Altphonenumber *string

	// A link to a photo of the user.
	Photo *string

	// 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) 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.
	AccountID *string `validate:"required,ne="`

	// The user's IAM ID.
	IamID *string `validate:"required,ne="`

	// The console UI language. By default, this field is empty.
	Language *string

	// The language for email and phone notifications. By default, this field is empty.
	NotificationLanguage *string

	// A comma-separated list of IP addresses.
	AllowedIPAddresses *string

	// Whether user managed login is enabled. The default value is `false`.
	SelfManage *bool

	// 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

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.

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) 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.

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) 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) 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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL