cloudid

package
v0.0.0-...-21b9e53 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

View Source
const (
	SERVICE_TYPE    = apis.SERVICE_TYPE_CLOUDID
	SAML_IDP_PREFIX = cloudid.SAML_IDP_PREFIX
	SERVICE_VERSION = ""
)
View Source
const (
	CLOUD_POLICY_TYPE_SYSTEM = string(cloudid.PolicyTypeSystem)
	CLOUD_POLICY_TYPE_CUSTOM = string(cloudid.PolicyTypeCustom)
)
View Source
const (
	CLOUD_POLICY_CACHE_STATUS_CACHING = "caching"
	CLOUD_POLICY_CACHE_STATUS_READY   = "ready"
)
View Source
const (
	CLOUD_USER_STATUS_RESET_PASSWORD        = "reset_password"        // 重置密码中
	CLOUD_USER_STATUS_RESET_PASSWORD_FAILED = "reset_password_failed" // 重置密码失败
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudaccountResourceDetails

type CloudaccountResourceDetails struct {
	// 云账号名称
	Cloudaccount string `json:"cloudaccount"`
	// 平台信息
	Provider string `json:"provider"`
	// 品牌信息
	Brand string `json:"brand"`

	// 公有云账号登录地址
	IamLoginUrl string `json:"iam_login_url"`
}

type CloudaccountResourceListInput

type CloudaccountResourceListInput struct {
	// 根据云账号名称过滤资源
	Cloudaccount string `json:"cloudaccount" yunion-deprecated-by:"cloudaccount_id"`

	// 根据平台过滤
	Provider []string `json:"provider"`

	// swagger:ignore
	CloudaccountId string `json:"cloudaccount_id"`
}

type CloudgroupAddUserInput

type CloudgroupAddUserInput struct {

	// 用户Id
	ClouduserId string `json:"clouduser_id"`
}

type CloudgroupAttachPolicyInput

type CloudgroupAttachPolicyInput struct {

	// 权限Id
	CloudpolicyId string `json:"cloudpolicy_id"`
}

type CloudgroupCreateInput

type CloudgroupCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	// 子账号Id
	ManagerId string `json:"manager_id"`
	// swagger: ignore
	CloudaccountId string `json:"cloudaccount_id"`

	// 权限Id列表, 权限provider必须和权限组provider一致
	CloudpolicyIds []string `json:"cloudpolicy_ids"`
}

type CloudgroupDetachPolicyInput

type CloudgroupDetachPolicyInput struct {

	// 权限Id
	CloudpolicyId string `json:"cloudpolicy_id"`
}

type CloudgroupDetails

type CloudgroupDetails struct {
	apis.StatusInfrasResourceBaseDetails
	CloudaccountResourceDetails
	CloudproviderResourceDetails

	SCloudgroup

	// 公有云子用户数量
	ClouduserCount int `json:"clouduser_count"`
	// 权限数量
	CloudpolicyCount int `json:"cloudpolicy_count"`

	Cloudpolicies []SCloudIdBaseResource `json:"cloudpolicies"`
	Cloudusers    []SCloudIdBaseResource `json:"cloudusers"`
}

type CloudgroupJointBaseUpdateInput

type CloudgroupJointBaseUpdateInput struct {
	apis.JointResourceBaseUpdateInput
}

type CloudgroupJointResourceDetails

type CloudgroupJointResourceDetails struct {
	apis.JointResourceBaseDetails

	// 公有云用户组名称
	Cloudgroup string `json:"cloudgroup"`
}

type CloudgroupJointsListInput

type CloudgroupJointsListInput struct {
	apis.JointResourceBaseListInput

	// 根据公有云用户组过滤资源
	Cloudgroup string `json:"cloudgroup"`
	// swagger:ignore
	CloudgroupId string `json:"cloudgroup_id" yunion-deprecated-by:"cloudgroup"`
}

type CloudgroupListInput

type CloudgroupListInput struct {
	apis.StatusInfrasResourceBaseListInput
	CloudaccountResourceListInput
	CloudproviderResourceListInput

	// 过滤子账号所在的权限组
	ClouduserId string `json:"clouduser_id"`

	// 根据权限过滤权限组
	CloudpolicyId string `json:"cloudpolicy_id"`
}

type CloudgroupRemoveUserInput

type CloudgroupRemoveUserInput struct {

	// 用户Id
	ClouduserId string `json:"clouduser_id"`
}

type CloudgroupResourceDetails

type CloudgroupResourceDetails struct {
	// 公有云用户名称
	Cloudgroup string `json:"cloudgroup"`
}

type CloudgroupResourceListInput

type CloudgroupResourceListInput struct {
	// 根据权限组Id过滤资源
	CloudgroupId string `json:"cloudgroup_id"`
}

type CloudgroupSetPoliciesInput

type CloudgroupSetPoliciesInput struct {

	// 权限Ids
	CloudpolicyIds []string `json:"cloudpolicy_ids"`
}

type CloudgroupSetUsersInput

type CloudgroupSetUsersInput struct {

	// 公有云子账号Ids
	ClouduserIds []string `json:"clouduser_ids"`
}

type CloudgroupSyncInput

type CloudgroupSyncInput struct {
}

type CloudgroupSyncstatusInput

type CloudgroupSyncstatusInput struct {
}

type CloudgroupUpdateInput

type CloudgroupUpdateInput struct {
}

type CloudpolicyAssignGroupInput

type CloudpolicyAssignGroupInput struct {

	// 权限组Id
	CloudgroupId string `json:"cloudgroup_id"`
}

type CloudpolicyCreateInput

type CloudpolicyCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	// default: custom
	PolicyType string `json:"policy_type"`

	// 策略详情
	Document *jsonutils.JSONDict `json:"document"`
}

type CloudpolicyListInput

type CloudpolicyListInput struct {
	apis.StatusInfrasResourceBaseListInput

	CloudaccountResourceListInput
	CloudproviderResourceListInput

	// 根据平台过滤
	Provider []string `json:"provider"`

	// 根据子账号过滤权限
	ClouduserId string `json:"clouduser_id"`

	// 根据权限组过滤权限
	CloudgroupId string `json:"cloudgroup_id"`

	// 根据订阅过滤权限
	ManagerId string `json:"manager_id"`

	// 权限类型
	//
	//
	// | 类型    |  说明                |
	// |---------| ------------            |
	// | system  |  过滤系统权限        |
	// | custom  |  过滤自定义权限      |
	PolicyType string `json:"policy_type"`
}

type CloudpolicyResourceDetails

type CloudpolicyResourceDetails struct {
	// 公有云权限名称
	Cloudpolicy string `json:"cloudpolicy"`
}

type CloudpolicyResourceListInput

type CloudpolicyResourceListInput struct {
	// 根据公有云权限过滤资源
	Cloudpolicy string `json:"cloudpolicy"`

	// swagger:ignore
	CloudpolicyId string `json:"cloudpolicy_id" yunion-deprecated-by:"cloudpolicy"`
}

type CloudpolicyRevokeGroupInput

type CloudpolicyRevokeGroupInput struct {

	// 权限组Id
	CloudgroupId string `json:"cloudgroup_id"`
}

type CloudpolicyUpdateInput

type CloudpolicyUpdateInput struct {
	apis.StatusInfrasResourceBaseUpdateInput

	Document *jsonutils.JSONDict `json:"document"`

	// swagger:ignore
	OriginDocument *jsonutils.JSONDict `json:"origin_document"`
}

type CloudpolicycacheListInput

type CloudpolicycacheListInput struct {
	apis.StatusStandaloneResourceListInput

	// 根据权限过滤
	CloudpolicyId string `json:"cloudpolicy_id"`

	// 根据云账号过滤
	CloudaccountId string `json:"cloudaccount_id"`
}

type CloudproviderResourceDetails

type CloudproviderResourceDetails struct {
	// 云订阅名称
	Manager string `json:"manager"`
}

type CloudproviderResourceListInput

type CloudproviderResourceListInput struct {
	// 根据云订阅过滤资源
	ManagerId string `json:"manager_id"`

	// swagger:ignore
	CloudproviderId string `json:"cloudprovider_id" yunion-deprecated-by:"manager_id"`
}

type CloudrolePurgeInput

type CloudrolePurgeInput struct {
}

type ClouduserAttachPolicyInput

type ClouduserAttachPolicyInput struct {
	// 权限Id
	//
	//
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 支持                                        |
	// | Aliyun   | 支持                                        |
	// | Huawei   | 不支持                                      |
	// | Azure    | 支持                                        |
	// | 腾讯云   | 支持                                        |
	CloudpolicyId string `json:"cloudpolicy_id"`
}

type ClouduserChangeOwnerInput

type ClouduserChangeOwnerInput struct {

	// 本地用户Id
	UserId string `json:"user_id"`
}

type ClouduserCreateAccessKeyInput

type ClouduserCreateAccessKeyInput struct {
	Name string `json:"name"`
}

type ClouduserCreateInput

type ClouduserCreateInput struct {
	apis.StatusDomainLevelUserResourceCreateInput
	apis.StatusBaseResourceCreateInput

	// 云订阅ID
	ManagerId string `json:"manager_id"`
	// 云账号ID
	// Azure云账号需要有User administrator权限,否则删操作会出现Insufficient privileges to complete the operation错误信息
	CloudaccountId string `json:"cloudaccount_id"`

	// 用户密码, 若is_console_login = true时, 此参数不传时会生成12位随机密码
	//
	//
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 不支持此参数                                |
	// | Aliyun   | 支持                                        |
	// | Huawei   | 支持                                        |
	// | Azure    | 支持                                        |
	// | 腾讯云   | 支持                                        |
	Password string `json:"password"`
	// 是否可控制台登录
	// default: false
	IsConsoleLogin *bool `json:"is_console_login"`

	// 邮箱地址
	// example: test@example.com
	Email string `json:"email"`
	// 手机号码
	// example: 86-1868888****
	MobilePhone string `json:"mobile_phone"`

	// 初始的权限Id列表, 权限必须属于指定的云账号
	//
	//
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 至少需要一个初始权限                        |
	// | Aliyun   | 支持                                        |
	// | Huawei   | 不支持                                      |
	// | Azure    | 支持                                        |
	// | 腾讯云   | 支持                                        |
	CloudpolicyIds []string `json:"cloudpolicy_ids"`

	// 初始化权限组Id列表, 权限组必须和云账号平台属性相同
	CloudgroupIds []string `json:"cloudgroup_ids"`

	// swagger:ignore
	ExternalId string `json:"external_id"`

	// 是否发送邮件通知(仅设置email不为空生效)
	// default: false
	Notify bool `json:"notify"`
}

type ClouduserDeleteAccessKeyInput

type ClouduserDeleteAccessKeyInput struct {
	AccessKey string `json:"access_key"`
}

type ClouduserDetachPolicyInput

type ClouduserDetachPolicyInput struct {
	// 权限Id
	//
	//
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 支持,但最少需要保留一个权限                |
	// | Aliyun   | 支持                                        |
	// | Huawei   | 不支持                                      |
	// | Azure    | 不支持                                      |
	// | 腾讯云   | 支持                                        |
	CloudpolicyId string `json:"cloudpolicy_id"`
}

type ClouduserDetails

type ClouduserDetails struct {
	apis.StatusDomainLevelUserResourceDetails
	SClouduser

	CloudaccountResourceDetails
	CloudproviderResourceDetails

	// 权限数量
	CloudpolicyCount int `json:"cloudpolicy_count"`

	// 权限组数量
	CloudgroupCount int `json:"cloudgroup_count"`

	Cloudgroups   []SCloudIdBaseResource `json:"cloudgroups"`
	Cloudpolicies []SCloudIdBaseResource `json:"cloudpolicies"`
}

type ClouduserJoinGroupInput

type ClouduserJoinGroupInput struct {

	// 权限组Id
	CloudgroupId string `json:"cloudgroup_id"`
}

type ClouduserJointBaseUpdateInput

type ClouduserJointBaseUpdateInput struct {
	apis.JointResourceBaseUpdateInput
}

type ClouduserJointResourceDetails

type ClouduserJointResourceDetails struct {
	apis.JointResourceBaseDetails

	ClouduserResourceDetails
}

type ClouduserLeaveGroupInput

type ClouduserLeaveGroupInput struct {
	// 权限组Id
	CloudgroupId string `json:"cloudgroup_id"`
}

type ClouduserListAccessKeyInput

type ClouduserListAccessKeyInput struct {
}

type ClouduserListInput

type ClouduserListInput struct {
	apis.StatusDomainLevelUserResourceListInput

	CloudaccountResourceListInput
	CloudproviderResourceListInput

	// 过滤绑定权限的子账号
	CloudpolicyId string `json:"cloudpolicy_id"`

	// 过滤属于指定权限组的子账号
	CloudgroupId string `json:"cloudgroup_id"`
}

type ClouduserResetPasswordInput

type ClouduserResetPasswordInput struct {
	// 若此参数为空, 默认会生成随机12位密码
	//
	//
	//
	// | 云平台   | 说明                                        |
	// |----------|---------------------------------------------|
	// | Google   | 不支持                                      |
	// | Aliyun   | 支持                                        |
	// | Huawei   | 支持                                        |
	// | Azure    | 支持                                        |
	// | 腾讯云   | 支持                                        |
	Password string `json:"password"`
}

type ClouduserResourceDetails

type ClouduserResourceDetails struct {
	// 公有云用户名称
	Clouduser string `json:"clouduser"`

	// 云账号名称
	Cloudaccount string `json:"cloudaccount"`

	// 云订阅名称
	Cloudprovider string `json:"cloudprovider"`
}

type ClouduserResourceListInput

type ClouduserResourceListInput struct {
	// 根据公有云用户过滤资源
	Clouduser string `json:"clouduser"`

	// swagger:ignore
	ClouduserId string `json:"clouduser_id" yunion-deprecated-by:"clouduser"`
}

type ClouduserSetGroupsInput

type ClouduserSetGroupsInput struct {
	// 权限组Ids
	CloudgroupIds []string `json:"cloudgroup_ids"`
}

type ClouduserSetPoliciesInput

type ClouduserSetPoliciesInput struct {
	// 权限Ids
	CloudpolicyIds []string `json:"cloudpolicy_ids"`
}

type ClouduserSyncInput

type ClouduserSyncInput struct {
}

type ClouduserSyncstatusInput

type ClouduserSyncstatusInput struct {
}

type ClouduserUpdateInput

type ClouduserUpdateInput struct {
}

type GetCloudaccountSamlOutput

type GetCloudaccountSamlOutput struct {
	// cloudaccount SAML ServiceProvider entity ID
	EntityId string `json:"entity_id,allowempty"`
	// redirect login URL for this cloudaccount
	RedirectLoginUrl string `json:"redirect_login_url,allowempty"`
	// redirect logout URL for this cloudaccount
	RedirectLogoutUrl string `json:"redirect_logout_url,allowempty"`
	// metadata URL for this cloudaccount
	MetadataUrl string `json:"metadata_url,allowempty"`
	// initial SAML SSO login URL for this cloudaccount
	InitLoginUrl string `json:"init_login_url,allowempty"`
}

type GroupUser

type GroupUser struct {
	Name       string
	ExternalId string
}

type PolicyUsage

type PolicyUsage struct {
	CloudgroupCount int
	ClouduserCount  int
}

type SAMLProviderCreateInput

type SAMLProviderCreateInput struct {
	apis.StatusInfrasResourceBaseCreateInput

	CloudaccountId string `json:"cloudaccount_id"`

	// swagger:ignore
	EntityId string `json:"entity_id"`

	// swagger:ignore
	MetadataDocument string `json:"metadata_document"`
}

type SAMLProviderResourceBase

type SAMLProviderResourceBase struct {
	SAMLProviderId string `json:"saml_provider_id"`
}

SAMLProviderResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SAMLProviderResourceBase.

type SCloudIdBaseResource

type SCloudIdBaseResource struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type SCloudaccount

type SCloudaccount struct {
	apis.SStandaloneResourceBase
	apis.SDomainizedResourceBase
	AccountId   string `json:"account_id"`
	Provider    string `json:"provider"`
	Brand       string `json:"brand"`
	IamLoginUrl string `json:"iam_login_url"`
	SAMLAuth    *bool  `json:"saml_auth,omitempty"`
	AccessUrl   string `json:"access_url"`
	ReadOnly    bool   `json:"read_only"`
}

SCloudaccount is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudaccount.

type SCloudaccountResourceBase

type SCloudaccountResourceBase struct {
	// 云账号Id
	CloudaccountId string `json:"cloudaccount_id"`
}

SCloudaccountResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudaccountResourceBase.

type SCloudgroup

SCloudgroup is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudgroup.

type SCloudgroupResourceBase

type SCloudgroupResourceBase struct {
	CloudgroupId string `json:"cloudgroup_id"`
}

SCloudgroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudgroupResourceBase.

type SCloudpolicy

type SCloudpolicy struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SCloudaccountResourceBase
	SCloudproviderResourceBase
	// 权限类型
	// | 权限类型      |  说明                |
	// |---------------|----------------------|
	// | system        | 平台内置权限         |
	// | custom        | 用户自定义权限       |
	PolicyType string `json:"policy_type"`
	// 策略内容
	Document *jsonutils.JSONDict `json:"document"`
}

SCloudpolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudpolicy.

type SCloudpolicyResourceBase

type SCloudpolicyResourceBase struct {
	// 权限Id
	CloudpolicyId string `json:"cloudpolicy_id"`
}

SCloudpolicyResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudpolicyResourceBase.

type SCloudprovider

type SCloudprovider struct {
	apis.SStandaloneResourceBase
	Provider       string `json:"provider"`
	CloudaccountId string `json:"cloudaccount_id"`
}

SCloudprovider is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudprovider.

type SCloudproviderResourceBase

type SCloudproviderResourceBase struct {
	// 子订阅Id
	ManagerId string `json:"manager_id"`
}

SCloudproviderResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudproviderResourceBase.

type SCloudrole

SCloudrole is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudrole.

type SClouduser

type SClouduser struct {
	apis.SStatusDomainLevelUserResourceBase
	apis.SExternalizedResourceBase
	SCloudaccountResourceBase
	SCloudproviderResourceBase
	Secret string `json:"secret"`
	// 是否可以控制台登录
	IsConsoleLogin *bool `json:"is_console_login,omitempty"`
	// 手机号码
	MobilePhone string `json:"mobile_phone"`
	// 邮箱地址
	Email string `json:"email"`
}

SClouduser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SClouduser.

type SGroup

type SGroup struct {
	Id   string
	Name string
}

type SPolicy

type SPolicy struct {
	Name       string
	ExternalId string
	PolicyType string
}

type SSAMLProvider

type SSAMLProvider struct {
	apis.SStatusInfrasResourceBase
	apis.SExternalizedResourceBase
	SCloudaccountResourceBase
	SCloudproviderResourceBase
	EntityId         string `json:"entity_id"`
	MetadataDocument string `json:"metadata_document"`
	AuthUrl          string `json:"auth_url"`
}

SSAMLProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SSAMLProvider.

type SSamluser

type SSamluser struct {
	apis.SStatusDomainLevelUserResourceBase
	SCloudgroupResourceBase
	// 邮箱地址
	Email       string `json:"email"`
	CloudroleId string `json:"cloudrole_id"`
}

SSamluser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SSamluser.

type SamluserCreateInput

type SamluserCreateInput struct {
	apis.StatusDomainLevelUserResourceCreateInput

	// 权限组和账号必须是同一平台
	CloudgroupId string `json:"cloudgroup_id"`

	// 权限组和账号必须是同一平台
	CloudaccountId string `json:"cloudaccount_id"`

	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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