package
0.0.0-20211229091835-58b2192b5263
Repository: https://github.com/hashdatainc/terraform-provider-hashdata.git
Documentation: pkg.go.dev

# README

Go API client for cloudmgr

Cloud Manager Restful API Documentation.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v2.0
  • Package version: 4.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit www.hashdata.cn

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./cloudmgr"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identifield by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost:8000

ClassMethodHTTP requestDescription
AccountClientServiceApiCreateClientPost /account/api/v2/clientsCreate a new client.
AccountClientServiceApiDeleteClientDelete /account/api/v2/clients/{id}Delete an existent client.
AccountClientServiceApiDescribeClientGet /account/api/v2/clients/{id}Describe the client detail with given client id.
AccountClientServiceApiListClientGet /account/api/v2/clientsList clients.
AccountTeamServiceApiAddUserToTeamPost /account/api/v2/teams/{teamid}/usersAdd an user to the team with given role.
AccountTeamServiceApiCreateTeamPost /account/api/v2/teamsCreate a new team.
AccountTeamServiceApiDeleteTeamDelete /account/api/v2/teams/{teamid}Delete an existent team.
AccountTeamServiceApiDeleteUserFromTeamDelete /account/api/v2/teams/{teamid}/users/{userid}Remove an user from a team.
AccountTeamServiceApiDescribeTeamGet /account/api/v2/teams/{teamid}Describe the detail of a team.
AccountTeamServiceApiListTeamGet /account/api/v2/teamsList all teams.
AccountTeamServiceApiListUserOfTeamGet /account/api/v2/teams/{teamid}/usersList all users of a team.
AccountTeamServiceApiModifyTeamPut /account/api/v2/teams/{teamid}Modify an existent team.
AccountTenantServiceApiCreateExternalTenantPost /account/api/v2/tenants/externalCreate a new tenant from outside.
AccountTenantServiceApiCreateTenantPost /account/api/v2/tenantsCreate a new tenant.
AccountTenantServiceApiDeleteTenantDelete /account/api/v2/tenants/{tenantid}Delete a tenant.
AccountTenantServiceApiDescribeExternalTenantGet /account/api/v2/tenants/externalDescribe the detail of tenant.
AccountTenantServiceApiDescribeTenantGet /account/api/v2/tenants/{tenantid}Describe the detail of tenant.
AccountTenantServiceApiListTenantGet /account/api/v2/tenantsList all tenants.
AccountUserServiceApiChangePasswordPut /account/api/v2/users/{userid}/passwordModify user's password.
AccountUserServiceApiComplementExternalUserAndTenantPut /account/api/v2/users/external/{user.id}/tenants/external/{tenant.id}Complete external user's information and external tenant's information.
AccountUserServiceApiCreateExternalUserPost /account/api/v2/users/externalCreate a new user from outside.
AccountUserServiceApiCreateUserPost /account/api/v2/usersCreate a new user.
AccountUserServiceApiDeleteUserDelete /account/api/v2/users/{userid}Delete an user.
AccountUserServiceApiDescribeExternalUserGet /account/api/v2/users/externalDescribe the detail of an user.
AccountUserServiceApiDescribeSelfGet /account/api/v2/users/selfDescribe current login user.
AccountUserServiceApiDescribeUserGet /account/api/v2/users/{userid}Describe the detail of an user.
AccountUserServiceApiListTeamOfUserGet /account/api/v2/users/{userid}/teamsList all teams which the user belongs to.
AccountUserServiceApiListUserGet /account/api/v2/usersList all users.
AccountUserServiceApiModifyUserPut /account/api/v2/users/{userid}Modify an user.
AlertInfoServiceApiConfirmAlertInfoPut /ops/api/v2/alertinfo/confirm/{id}confirm a alert info.
AlertInfoServiceApiCreateAlertInfoPost /ops/api/v2/alertinfo/createcreate a alert info.
AlertInfoServiceApiDescribeAlertInfoGet /ops/api/v2/alertinfo/{id}get a alert info.
AlertInfoServiceApiListAlertInfoGet /ops/api/v2/alertinfoslist alert infos.
AlertInfoServiceApiProcessAlertInfoPut /ops/api/v2/alertinfo/process/{id}processed a alert info.
AlertmanagerServiceApiCreateSilencePost /ops/api/v2/silencecreate silence of alertmanagement.
AlertmanagerServiceApiDeleteSilenceDelete /ops/api/v2/silencedelete silence of alertmanagement.
AlertmanagerServiceApiDescribeSilenceGet /ops/api/v2/silence/{id}decribe silence of alertmanagement.
AlertmanagerServiceApiListAlertGet /ops/api/v2/alertslist alerts of alertmanagement.
AlertmanagerServiceApiListSilenceGet /ops/api/v2/silenceslist silence of alertmanagement.
AlertmanagerServiceApiModifySilencePut /ops/api/v2/silencecreate silence of alertmanagement.
ContactGroupServiceApiAddContactToGroupPost /notification/api/v2/groups/{group}/contactsAdd contacts to group.
ContactGroupServiceApiCreateContactGroupPost /notification/api/v2/groupsCreate a contact group.
ContactGroupServiceApiDeleteContactGroupDelete /notification/api/v2/groups/{id}Delete a contact group.
ContactGroupServiceApiDescribeContactGroupGet /notification/api/v2/groups/{id}Describe the detail of a given contact group.
ContactGroupServiceApiListContactGroupGet /notification/api/v2/groupsList contact group.
ContactGroupServiceApiRemoveContactFromGroupDelete /notification/api/v2/groups/{group}/contacts/{contact}Remove a contact from group.
ContactGroupServiceApiTestContactGroupPut /notification/api/v2/groups/{id}Test a given contact group.
CoreAlertServiceApiCreateAlertRulePost /default/api/v2/services/{service}/alertsCreate a service alert rule.
CoreAlertServiceApiDeleteAlertRuleDelete /default/api/v2/service/{service}/alerts/{alert}Delete an alert rule of a service.
CoreAlertServiceApiDeleteAlertRuleByServiceDelete /default/api/v2/service/{service}/alertsDelete all alert rules of a service.
CoreAlertServiceApiDescribeAlertRuleGet /default/api/v2/services/{service}/alerts/{alert}Describe the detail of a given alert rule.
CoreAlertServiceApiListAlertRuleGet /default/api/v2/services/{service}/alertsList the alerts of a given service.
CoreBucketServiceApiDescribeBucketGet /default/api/v2/buckets/{id}Describe the detail of a given bucket.
CoreBucketServiceApiListObjectGet /default/api/v2/buckets/{bucket}/contentsList the contents of a given bucket.
CoreCommonServiceApiDescribeAlertConfigGet /default/api/v2/commons/alertDescribe alert availability of system and a service.
CoreCommonServiceApiInitializeTenantPost /default/api/v2/commons/tenant/onboardingCustomer onboarding
CoreElasticIpServiceApiAttachElasticIpPost /default/api/v2/network/eips/{id}/attachAttach an eip to specified instance.
CoreElasticIpServiceApiCreateElasticIpPost /default/api/v2/network/eipsCreate a new eip.
CoreElasticIpServiceApiDeleteElasticIpDelete /default/api/v2/network/eips/{id}release an eip.
CoreElasticIpServiceApiDescribeElasticIpGet /default/api/v2/network/eips/{id}Describe an eip detail.
CoreElasticIpServiceApiDetachElasticIpGet /default/api/v2/network/eips/{id}/detachDetach an eip from instance.
CoreElasticIpServiceApiListElasticIpGet /default/api/v2/network/eipsList all eips.
CoreElasticIpServiceApiModifyElasticIpMaxBandWidthPut /default/api/v2/network/eips/{id}Modify maxBandWidth for specified eip.
CoreHdfsConfigServiceApiActivateHdfsConfigPut /default/api/v2/services/{service}/hdfs/{timestamp}/activationActivate a specified hdfs configuration of a service.
CoreHdfsConfigServiceApiCreateHdfsConfigPost /default/api/v2/services/{service}/hdfsCreate a service hdfs configuration.
CoreHdfsConfigServiceApiDeleteHdfsConfigDelete /default/api/v2/service/{service}/hdfs/{timestamp}Delete a hdfs configuration of a service.
CoreHdfsConfigServiceApiDescribeHdfsConfigGet /default/api/v2/services/{service}/hdfs/{timestamp}Describe the detail of a given hdfs configuration.
CoreHdfsConfigServiceApiListHdfsConfigGet /default/api/v2/services/{service}/hdfsList the hdfs configuration of a given service.
CoreInstanceServiceApiDescribeInstanceGet /default/api/v2/instances/{id}Describe the detail of a given instance.
CoreInstanceServiceApiListInstanceGet /default/api/v2/instancesList all instance.
CoreInstanceServiceApiListVolumeGet /default/api/v2/instances/{instance}/volumesList all volumes of of a given instance.
CoreInstanceTypeGroupServiceApiCreateInstanceTypeGroupPost /default/api/v2/instances/types/groupsCreate an instance type group.
CoreInstanceTypeGroupServiceApiDeleteInstanceTypeGroupDelete /default/api/v2/instances/types/groups/{name}Delete an instance type group.
CoreInstanceTypeGroupServiceApiDescribeInstanceTypeGroupGet /default/api/v2/instances/types/groups/{name}Describe the detail of a given instance type group.
CoreInstanceTypeGroupServiceApiListInstanceTypeGroupGet /default/api/v2/instances/types/groupsList all instance type group.
CoreInstanceTypeGroupServiceApiUpdateInstanceTypeGroupPut /default/api/v2/instances/types/groups/{name}Update an instance type group.
CoreInstanceTypeServiceApiCreateInstanceTypePost /default/api/v2/instances/typesCreate an instance type.
CoreInstanceTypeServiceApiDeleteInstanceTypeDelete /default/api/v2/instances/types/{name}Delete an instance type.
CoreInstanceTypeServiceApiDescribeInstanceTypeGet /default/api/v2/instances/types/{name}Describe the detail of a given instance type.
CoreInstanceTypeServiceApiDescribeInstanceTypeByComponentTypeGet /default/api/v2/instances/types/componentDescribe the detail of a given instance type.
CoreInstanceTypeServiceApiListInstanceTypeGet /default/api/v2/instances/typesList all instance type.
CoreInstanceTypeServiceApiUpdateInstanceTypePut /default/api/v2/instances/types/{name}Update an instance type.
CoreJobServiceApiDescribeJobGet /default/api/v2/jobs/{id}Describe the detail of a given job.
CoreJobServiceApiGetJobLogGet /default/api/v2/jobs/{id}/logsFetch job log.
CoreJobServiceApiListJobGet /default/api/v2/jobsList all jobs.
CoreNetworkInterfaceServiceApiAttachNetworkInterfacePost /default/api/v2/network/nics/{id}/attachAttach a nic to specified instance.
CoreNetworkInterfaceServiceApiCreateNetworkInterfacePost /default/api/v2/network/nicsCreate a new nic.
CoreNetworkInterfaceServiceApiDeleteNetworkInterfaceDelete /default/api/v2/network/nics/{id}release a nic.
CoreNetworkInterfaceServiceApiDescribeNetworkInterfaceGet /default/api/v2/network/nics/{id}Describe an eip detail.
CoreNetworkInterfaceServiceApiDetachNetworkInterfaceGet /default/api/v2/network/nics/{id}/detachDetach a nic from instance.
CoreNetworkInterfaceServiceApiListNetworkInterfaceGet /default/api/v2/network/nicsList all nics.
CoreOssZoneConfigServiceApiCreateOssZoneConfigPost /default/api/v2/oss/zones/configsCreate an object storage service configuration.
CoreOssZoneConfigServiceApiDeleteOssZoneConfigDelete /default/api/v2/oss/zones/configs/{id}Delete an object storage service configuration.
CoreOssZoneConfigServiceApiDescribeOssZoneConfigGet /default/api/v2/oss/zones/configs/{id}Describe the detail of an object storage service configuration.
CoreOssZoneConfigServiceApiListOssZoneConfigGet /default/api/v2/oss/zones/configsList all object storage service configuration.
CoreOssZoneConfigServiceApiUpdateOssZoneConfigPut /default/api/v2/oss/zones/configs/{id}Update n object storage service configuration.
CoreOssZoneServiceApiCreateOssZonePost /default/api/v2/oss/zonesCreate an object storage zone.
CoreOssZoneServiceApiDeleteOssZoneDelete /default/api/v2/oss/zones/{name}Delete an object storage zone.
CoreOssZoneServiceApiDescribeOssZoneGet /default/api/v2/oss/zones/{name}Describe the detail of a given object storage zone.
CoreOssZoneServiceApiListOssZoneGet /default/api/v2/oss/zonesList all object storage zone.
CoreQuotaServiceApiCreateQuotaPost /default/api/v2/quotasCreate default quota configure for given tenant.
CoreQuotaServiceApiListQuotaGet /default/api/v2/quotasList all configured quota.
CoreQuotaServiceApiUpdateQuotaPut /default/api/v2/quotasAdjust quota for given tenant.
CoreRegionConfigServiceApiCreateRegionConfigPost /default/api/v2/regions/configsCreate a data center region configuration.
CoreRegionConfigServiceApiDeleteRegionConfigDelete /default/api/v2/regions/configs/{id}Delete a data center region configuration.
CoreRegionConfigServiceApiDescribeRegionConfigGet /default/api/v2/regions/configs/{id}Describe the detail of a given data center region configuration.
CoreRegionConfigServiceApiListRegionConfigGet /default/api/v2/regions/configsList all data center region configuration.
CoreRegionConfigServiceApiUpdateRegionConfigPut /default/api/v2/regions/configs/{id}Update a data center region configuration.
CoreRegionServiceApiCreateRegionPost /default/api/v2/regionsCreate a new data center region.
CoreRegionServiceApiDeleteRegionDelete /default/api/v2/regions/{name}Delete a data center region.
CoreRegionServiceApiDescribeRegionGet /default/api/v2/regions/{name}Describe the detail of a given data center region.
CoreRegionServiceApiListRegionGet /default/api/v2/regionsList all data center region.
CoreResourcePoolServiceApiAddInstanceToResourcePoolPost /default/api/v2/resources/{id}/instancesAdd instances to a resource pool
CoreResourcePoolServiceApiCreateResourcePoolPost /default/api/v2/resourcesCreate a new data center zone.
CoreResourcePoolServiceApiDeleteInstanceFromResourcePoolDelete /default/api/v2/resources/{id}/instances/{instance}Remove a instance from a resource pool.
CoreResourcePoolServiceApiDeleteResourcePoolDelete /default/api/v2/resources/{id}Delete a data center zone.
CoreResourcePoolServiceApiDescribeResourcePoolGet /default/api/v2/resources/{id}Describe the detail of a given resource pool.
CoreResourcePoolServiceApiListPoolInstanceGet /default/api/v2/resources/{id}/instancesList all instances in resource pool.
CoreResourcePoolServiceApiListResourcePoolGet /default/api/v2/resourcesList all resource pool.
CoreRoleServiceApiDescribeRoleGet /default/api/v2/roles/{name}Describe the detail of a given role.
CoreRoleServiceApiListRoleGet /default/api/v2/rolesList all roles.
CoreServiceApiAddProjectTagPut /default/api/v2/services/projectTagDescribe the detail of a given service.
CoreServiceApiCheckServiceActionPermissionPut /default/api/v2/services/{id}/actionCheck if login user has permission to perform action on a given service.
CoreServiceApiCountServiceGet /default/api/v2/services/countcount services.
CoreServiceApiDeleteServiceDelete /default/api/v2/services/{id}Destroy a given service.
CoreServiceApiDescribeServiceGet /default/api/v2/services/{id}Describe the detail of a given service.
CoreServiceApiDescribeTunnelInfoGet /default/api/v2/services/tunneldescribe tunnel info of service.
CoreServiceApiEnableInternalChargePut /default/api/v2/services/enableInternalChargeenable internal charge for service.
CoreServiceApiExportServiceStateMachineDetailInfoGet /default/api/v2/services/{id}/statemachine/infoList service and component state machine detail info.
CoreServiceApiInplaceUpgradeServicePost /default/api/v2/services/{service}/upgrade/inplaceInplace upgrade service version.
CoreServiceApiListBucketGet /default/api/v2/services/{service}/bucketsList all bucket the given service has.
CoreServiceApiListFaultsGet /default/api/v2/services/{id}/faultsList all faluts which service got.
CoreServiceApiListMetadataGet /default/api/v2/services/{service}/metadataList service metadata.
CoreServiceApiListMonitorServiceGet /default/api/v2/services/monitorList monitor service.
CoreServiceApiListRecoveriesGet /default/api/v2/services/{id}/recoveriesList all recoveries which service got.
CoreServiceApiListServiceGet /default/api/v2/servicesList all service.
CoreServiceApiListServiceComponentHeatlhStatusGet /default/api/v2/services/{id}/component/healthList service Component health status.
CoreServiceApiListServiceDependentGet /default/api/v2/services/{id}/dependencyList all dependencies which catalog got.
CoreServiceApiListServiceFeatureGet /default/api/v2/services/{id}/featuresList all features which a service support.
CoreServiceApiListServiceInstanceGet /default/api/v2/services/{service}/instancesList all service instances.
CoreServiceApiListServiceRecoveryDetailGet /default/api/v2/service/recoveries/{id}List recovery detail by recovery id.
CoreServiceApiListServiceReferenceGet /default/api/v2/services/{id}/referenceList all references which computing service got.
CoreServiceApiListServiceStatusesGet /default/api/v2/services/statusesList all status of a service can be in.
CoreServiceApiListTeamOfServiceGet /default/api/v2/services/{service}/teamsList all teams the given service belongs to.
CoreServiceApiListUnhandledFaultsGet /default/api/v2/services/{id}/unhandledfaultsList all Unhandled faults which service got.
CoreServiceApiModifyChargeInfoPut /default/api/v2/services/modifyChargeInfo/{id}Modify Charge infomation.
CoreServiceApiModifyServicePut /default/api/v2/services/{id}Modify attribute of a service.
CoreServiceApiProtectServiceGet /default/api/v2/services/{id}/protectProtect the given service from delete or stop.
CoreServiceApiResetStateMachineGet /default/api/v2/services/{id}/statemachine/resetreset service state machine by a given service.
CoreServiceApiResizeVolumesPost /default/api/v2/services/{id}/volumes/resizeAdjust volume size of a given service.
CoreServiceApiRestartServicePost /default/api/v2/services/{id}/restartRestart a service.
CoreServiceApiScaleInServicePost /default/api/v2/services/{id}/scaleinScale in a given service.
CoreServiceApiScaleOutServicePost /default/api/v2/services/{id}/scaleoutScale out a given service.
CoreServiceApiStartServicePost /default/api/v2/services/{id}/startStart a service.
CoreServiceApiStopServicePost /default/api/v2/services/{id}/stopStop a service.
CoreServiceApiToggleAlertAvailabilityGet /default/api/v2/services/{id}/alertToggle alert availability.
CoreServiceApiToggleAutoRecoveryAvailabilityGet /default/api/v2/services/{id}/recoveryToggle auto recovery availability.
CoreServiceApiUpgradeGuestAgentGet /default/api/v2/services/{id}/guestagent/upgradeupgrade all guest agent by a given service.
CoreServiceApiUpgradeServicePost /default/api/v2/services/{service}/upgradeUpgrade service version.
CoreServiceTypeServiceApiListServiceTypeGet /default/api/v2/services/typesList all type of service.
CoreServiceVersionServiceApiCreateServiceVersionPost /default/api/v2/services/versionsCreate a new service version.
CoreServiceVersionServiceApiDeleteServiceVersionDelete /default/api/v2/services/versions/{id}Delete a service version.
CoreServiceVersionServiceApiDescribeServiceVersionGet /default/api/v2/services/versions/{id}Describe the detail of a given service version.
CoreServiceVersionServiceApiListServiceVersionGet /default/api/v2/services/versionsList all service versions.
CoreServiceVersionServiceApiUpdateServiceVersionPut /default/api/v2/services/versions/{id}Update a service version.
CoreTeamServiceApiAddServiceToTeamPost /default/api/v2/teams/{team}/servicesAdd a service to a team
CoreTeamServiceApiDeleteServiceFromTeamDelete /default/api/v2/teams/{team}/services/{service}Remove service from a team.
CoreTeamServiceApiListServiceOfTeamGet /default/api/v2/teams/{id}/servicesList all service of a team.
CoreUnmanagedServiceApiCreateUnmanagedServicePost /default/api/v2/services/unmanagedCreate a unmanaged service.
CoreVendorServiceApiListVendorGet /default/api/v2/vendorsList all cloud vendors.
CoreVolumeTypeServiceApiCreateVolumeTypePost /default/api/v2/volumes/typesCreate a new volume type.
CoreVolumeTypeServiceApiDeleteVolumeTypeDelete /default/api/v2/volumes/types/{name}Delete a volume type.
CoreVolumeTypeServiceApiDescribeVolumeTypeGet /default/api/v2/volumes/types/{name}Describe the detail of a given volume type.
CoreVolumeTypeServiceApiListVolumeTypeGet /default/api/v2/volumes/typesList all volume type.
CoreVpcServiceApiListVpcGet /default/api/v2/vpcsList all available vpc.
CoreVpcServiceApiListVpcSubnetsGet /default/api/v2/vpcs/{vpc}List all available subnet in a given vpc.
CoreWarehouseServiceApiCreateCatalogPost /default/api/v2/services/catalogCreate a catalog service.
CoreWarehouseServiceApiCreateWarehousePost /default/api/v2/services/warehouseCreate a database service.
CoreZoneConfigServiceApiCreateZoneConfigPost /default/api/v2/zones/configsCreate a data center zone configuration.
CoreZoneConfigServiceApiDeleteZoneConfigDelete /default/api/v2/zones/configs/{id}Delete a data center zone configuration.
CoreZoneConfigServiceApiDescribeZoneConfigGet /default/api/v2/zones/configs/{id}Describe the detail of a given data center zone configuration.
CoreZoneConfigServiceApiListZoneConfigGet /default/api/v2/zones/configsList all data center zone configuration.
CoreZoneConfigServiceApiUpdateZoneConfigPut /default/api/v2/zones/configs/{id}Update a data center zone configuration.
CoreZoneServiceApiCreateZonePost /default/api/v2/zonesCreate a new data center zone.
CoreZoneServiceApiDeleteZoneDelete /default/api/v2/zones/{name}Delete a data center zone.
CoreZoneServiceApiDescribeZoneGet /default/api/v2/zones/{name}Describe the detail of a given data center zone.
CoreZoneServiceApiListZoneGet /default/api/v2/zonesList all data center zone.
MaintenanceServiceApiConfigThreadPoolPost /default/api/v2/system/maintenance/configure/thread-poolConfigure thread pool.
MessageServiceApiDescribeMessageGet /notification/api/v2/messages/{id}Describe the detail of a given message.
MessageServiceApiListMessageGet /notification/api/v2/messagesList all messages.
MeteringServiceApiStartMeteringPut /default/api/v2/services/startmetering/{id}Service start metering.
ResourceUsageServiceApiCalculateResourceUsageGet /ksyun/ccb/api/v2/tenants/configsCalculate resource usage for configuring cluster
ResourceUsageServiceApiDescribeResourceUsageGet /ksyun/ccb/api/v2/tenants/regions/{region}Describe the resource usage of a given region.
ResourceUsageServiceApiListResourceUsageGet /ksyun/ccb/api/v2/tenantsList resource usage for all tenants.
ServiceConfigServiceApiCreateServiceConfigPost /ksyun/ccb/api/v2/configs/creationSave service configuration for creating, expanding or shrinking action.
ServiceConfigServiceApiDescribeServiceConfigPost /ksyun/ccb/api/v2/configs/inquirationInquire result of service configuration executing
ServiceConfigServiceApiExecuteServiceConfigPost /ksyun/ccb/api/v2/configs/executionCreate, expand or shrink service by configuration

Documentation For Models

Documentation For Authorization

oauth2

  • Type: OAuth
  • Flow: password
  • Authorization URL:
  • Scopes:
  • ROLE_SUPERVISOR: login as supervisor
  • ROLE_USER: login as user

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

[email protected]