github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/workspace/v2/services/results.go (about) 1 package services 2 3 // RequestResp is the structure that represents the API response of service methods request. 4 type RequestResp struct { 5 JobId string `json:"job_id"` 6 } 7 8 // CreateResp is the structure that represents the API response of Create method request. 9 type CreateResp struct { 10 RequestResp 11 } 12 13 // UpdateResp is the structure that represents the API response of Update method request. 14 type UpdateResp struct { 15 RequestResp 16 // Enterprise ID. 17 EnterpriseId string `json:"enterprise_id"` 18 } 19 20 // DeleteResp is the structure that represents the API response of Delete method request. 21 type DeleteResp struct { 22 RequestResp 23 } 24 25 // Service is the structure that represents the Workspace service details. 26 type Service struct { 27 // Workspace service ID. 28 ID string `json:"id"` 29 // Domain information. 30 AdDomain DomainResp `json:"ad_domains"` 31 // VPC ID. 32 VpcId string `json:"vpc_id"` 33 // VPC name. 34 VpcName string `json:"vpc_name"` 35 // Access mode. 36 // + INTERNET: Indicates Internet access. 37 // + DEDICATED: Indicates dedicated line access. 38 // + BOTH: Indicates that both access methods are supported. 39 AccessMode string `json:"access_mode"` 40 // Dedicated access network segment. 41 // This parameter is returned only when the access_mode is "DEDICATED" or "BOTH". 42 DedicatedSubnets string `json:"dedicated_subnets"` 43 // Dedicated access address 44 // This parameter is returned only when the access_mode is "DEDICATED" or "BOTH". 45 DedicatedAccessAddress string `json:"dedicated_access_address"` 46 // Internet access address. 47 // This parameter is returned only when the access_mode is "INTERNET" or "BOTH". 48 InternetAccessAddress string `json:"internet_access_address"` 49 // Internet access port. 50 InternetAccessPort string `json:"internet_access_port"` 51 // Status of cloud office services. 52 // + PREPARING: ready to open. 53 // + SUBSCRIBING: Subscription is in progress. 54 // + SUBSCRIBED: subscribed. 55 // + SUBSCRIPTION_FAILED: Subscription failed. 56 // + DEREGISTERING: The account is being sold out. 57 // + DEREGISTRATION_FAILED: Account cancellation failed. 58 // + CLOSED: The account that has been closed has not been opened. 59 Status string `json:"status"` 60 // The status of the Internet and private line switching tasks. 61 // + init: Initialization - the initial state after the service is activated. 62 // + available: Available - The normal state where the task was executed and returned after success. 63 // + internetOpening: On - Internet Access is on. 64 // + dedicatedOpening: Open - Dedicated line access is open. 65 // + internetOpenFailed: Failed to open - Open internet access failed to open. 66 // + dedicatedOpenFailed: Failed to open - Dedicated line access failed to open. 67 // + openSuccess: Open successfully - Internet access is successfully opened. 68 // + internetClosing: Closing - Closing Internet access is closing. 69 // + dedicatedClosing: Closing - Dedicated line access is closed. 70 // + internetCloseFailed: Failed to close - Failed to close the internet access method. 71 // + dedicatedCloseFailed: Failed to close - Failed to close dedicated line access. 72 // + closeSuccess: Close Success - Close the access method successfully. 73 // + internetAccessPortModifying: The internet access port is being modified. 74 // + internetAccessPortModifyFailed: Port modification failed. 75 AccessStatus string `json:"access_status"` 76 // Service subnet which to specify the returned network ID to order desktops. 77 SubnetIds []Subnet `json:"subnet_ids"` 78 // The subnet segment for the management component. 79 ManagementSubentCidr string `json:"management_subnet_cidr"` 80 // The management component security group automatically created under the specified VPC after the service is enabled. 81 InfrastructureSecurityGroup SecurityGroup `json:"infrastructure_security_group"` 82 // The desktop security group automatically created under the specified VPC after the service is enabled. 83 DesktopSecurityGroup SecurityGroup `json:"desktop_security_group"` 84 // Whether the service can be canceled. 85 Closable bool `json:"closable"` 86 // Configuration status. 87 // + 0: The service is successfully activated and the connection to AD is successful. 88 // + 1: The service is successfully activated, but the AD configuration fails. 89 // + 2: The service is successfully activated, but there are other errors after the AD configuration fails. 90 // + 3: The service is successfully activated, but the AD connection is not enabled. 91 ConfigStatus string `json:"config_status"` 92 // The progress of service activation or deregistration, in percentage format, for example: 100%. 93 Progress string `json:"progress"` 94 // The job ID of service activation or deregistration. 95 JobId string `json:"job_id"` 96 // Failure error code. 97 FailCode int `json:"fail_code"` 98 // Failure reason. 99 FailReason string `json:"fail_reason"` 100 // Enterprise ID. 101 EnterpriseId string `json:"enterprise_id"` 102 } 103 104 // DomainResp is an object to specified the configuration details of AD domain. 105 type DomainResp struct { 106 // Domain type. 107 // + LITE_AS: Local authentication. 108 // + LOCAL_AD: Local AD. 109 // When the domain type is "LOCAL_AD", make sure that the selected VPC network and the network to which AD 110 // belongs can be connected. 111 Type string `json:"domain_type"` 112 // Domain name. It needs to be configured when the domain type is LOCAL_AD. 113 // The domain name must be an existing domain name on the AD server, and the length should not exceed 55. 114 Name string `json:"domain_name"` 115 // Domain administrator account. It needs to be configured when the domain type is "LOCAL_AD". 116 // It must be an existing domain administrator account on the AD server. 117 AdminAccount string `json:"domain_admin_account"` 118 // Domain administrator account password. It needs to be configured when the domain type is "LOCAL_AD". 119 Password string `json:"domain_password"` 120 // Primary domain controller IP address. It needs to be configured when the domain type is LOCAL_AD. 121 ActiveDomainIp string `json:"active_domain_ip"` 122 // Primary domain controller name. It needs to be configured when the domain type is LOCAL_AD. 123 AcitveDomainName string `json:"active_domain_name"` 124 // The IP address of the standby domain controller. 125 // It needs to be configured when the domain type is LOCAL_AD and the standby node is configured. 126 StandyDomainIp string `json:"standy_domain_ip"` 127 // The name of the standby domain controller. 128 // It needs to be configured when the domain type is LOCAL_AD and the standby node is configured. 129 StandyDomainName string `json:"standy_domain_name"` 130 // Primary DNS IP address. 131 // It needs to be configured when the domain type is LOCAL_AD. 132 ActiveDnsIp string `json:"active_dns_ip"` 133 // Backup DNS IP address. 134 // It needs to be configured when the domain type is LOCAL_AD and the standby node is configured. 135 StandyDnsIp string `json:"standy_dns_ip"` 136 // Whether to delete the corresponding computer object on AD while deleting the desktop. 137 // + 0 means not delete 138 // + 1 means delete. 139 DeleteComputerObject string `json:"delete_computer_object"` 140 // Whether to enable LDAPS. 141 UseLdaps bool `json:"use_idaps"` 142 // The configuration of TLS. 143 TlsConfig TlsConfig `json:"tls_config"` 144 } 145 146 // SecurityGroup is an object to specified the security group that service have. 147 type SecurityGroup struct { 148 // Security Group ID. 149 ID string `json:"id"` 150 // Security Group name. 151 Name string `json:"name"` 152 } 153 154 // OtpConfigResp represents that the GetAuthConfig method response details. 155 type OtpConfigResp struct { 156 OptConfigInfo OtpConfig `json:"otp_config_info"` 157 } 158 159 // OtpConfig represents that the Auxiliary authentication configuration details. 160 type OtpConfig struct { 161 // Whether to enable OTP authentication mode. 162 Enable bool `json:"enable"` 163 // Verification code receiving mode. 164 // + VMFA Indicates virtual MFA device. 165 // + HMFA Indicates hardware MFA device. 166 ReceiveMode string `json:"receive_mode"` 167 // Auxiliary authentication server address. 168 AuthUrl string `json:"auth_url"` 169 // Auxiliary authentication service access account. 170 AppId string `json:"app_id"` 171 // Auxiliary authentication service access password. 172 AppSecrte string `json:"app_secret"` 173 // Auxiliary authentication service access mode. 174 // + INTERNET: Indicates Internet access. 175 // + DEDICATED: Indicates dedicated line access. 176 // + SYSTEM_DEFAULT:Indicates system default. 177 AuthServerAccessMode string `json:"auth_server_access_mode"` 178 // PEM format certificate content. 179 CertContent string `json:"cert_content"` 180 // Authentication application object information. If null, it means it is effective for all application objects. 181 ApplyRule ApplyRuleInfo `json:"apply_rule"` 182 } 183 184 // ApplyRuleInfo is an object specified the detail of Authentication application object. 185 type ApplyRuleInfo struct { 186 // Authentication application object type. 187 // + ACCESS_MODE: Indicates access type. 188 RuleType string `json:"rule_type"` 189 // Authentication application object. 190 // + INTERNET: Indicates Internet access. Optional only when rule_type is "ACCESS_MODE". 191 // + PRIVATE: Indicates dedicated line access. Optional only when rule_type is "ACCESS_MODE". 192 Rule string `json:"rule"` 193 } 194 195 // LockStatusResp is the structure that represents the API response of GetLockStatus method request. 196 type LockStatusResp struct { 197 // Whether the Workspace service is locked. 198 // + 0: Indicates not locked. 199 // + 1: Indicates locked. 200 IsLocked int `json:"is_locked"` 201 // The lock time of the Workspace service. 202 LockTime string `json:"lock_time"` 203 // The reason of the Workspace service is locked. 204 LockReason string `json:"lock_reason"` 205 } 206 207 type UnlockResp struct { 208 RequestResp 209 }