github.com/chnsz/golangsdk@v0.0.0-20240506093406-85a3fbfa605b/openstack/dcs/v2/instances/results.go (about)

     1  package instances
     2  
     3  type CreateResponse struct {
     4  	OrderId   string           `json:"order_id"`
     5  	Instances []SimpleInstance `json:"instances"`
     6  }
     7  
     8  type SimpleInstance struct {
     9  	InstanceId   string `json:"instance_id,omitempty"`
    10  	InstanceName string `json:"instance_name,omitempty"`
    11  }
    12  
    13  type DcsInstance struct {
    14  	VpcName                   string               `json:"vpc_name"`
    15  	ChargingMode              int                  `json:"charging_mode"`
    16  	VpcId                     string               `json:"vpc_id"`
    17  	UserName                  string               `json:"user_name"`
    18  	CreatedAt                 string               `json:"created_at"`
    19  	LaunchedAt                string               `json:"launched_at"`
    20  	Description               string               `json:"description"`
    21  	SecurityGroupId           string               `json:"security_group_id"`
    22  	SecurityGroupName         string               `json:"security_group_name"`
    23  	MaxMemory                 int                  `json:"max_memory"`
    24  	UsedMemory                int                  `json:"used_memory"`
    25  	Capacity                  float64              `json:"capacity"`
    26  	CapacityMinor             string               `json:"capacity_minor"`
    27  	MaintainBegin             string               `json:"maintain_begin"`
    28  	MaintainEnd               string               `json:"maintain_end"`
    29  	Engine                    string               `json:"engine"`
    30  	NoPasswordAccess          string               `json:"no_password_access"`
    31  	Ip                        string               `json:"ip"`
    32  	BackupPolicy              InstanceBackupPolicy `json:"instance_backup_policy"`
    33  	AzCodes                   []string             `json:"az_codes"`
    34  	AccessUser                string               `json:"access_user"`
    35  	InstanceId                string               `json:"instance_id"`
    36  	Port                      int                  `json:"port"`
    37  	UserId                    string               `json:"user_id"`
    38  	Name                      string               `json:"name"`
    39  	SpecCode                  string               `json:"spec_code"`
    40  	SubnetId                  string               `json:"subnet_id"`
    41  	SubnetName                string               `json:"subnet_name"`
    42  	SubnetCidr                string               `json:"subnet_cidr"`
    43  	EngineVersion             string               `json:"engine_version"`
    44  	OrderId                   string               `json:"order_id"`
    45  	Status                    string               `json:"status"`
    46  	DomainName                string               `json:"domain_name"`
    47  	EnablePublicIp            bool                 `json:"enable_publicip"`
    48  	PublicIpId                string               `json:"publicip_id"`
    49  	PublicIpAddress           string               `json:"publicip_address"`
    50  	EnableSsl                 bool                 `json:"enable_ssl"`
    51  	ServiceUpgrade            bool                 `json:"service_upgrade"`
    52  	ServiceTaskId             string               `json:"service_task_id"`
    53  	EnterpriseProjectId       string               `json:"enterprise_project_id"`
    54  	BackendAddress            string               `json:"backend_addrs"`
    55  	BandWidthDetail           BandWidthInfo        `json:"bandwidth_info"`
    56  	CacheMode                 string               `json:"cache_mode"`
    57  	CpuType                   string               `json:"cpu_type"`
    58  	ReplicaCount              int                  `json:"replica_count"`
    59  	ReadOnlyDomainName        string               `json:"readonly_domain_name"`
    60  	TransparentClientIpEnable bool                 `json:"transparent_client_ip_enable"`
    61  	ShardingCount             int                  `json:"sharding_count"`
    62  	ProductType               string               `json:"product_type"`
    63  }
    64  
    65  type InstanceBackupPolicy struct {
    66  	BackupPolicyId string          `json:"backup_policy_id"`
    67  	Policy         DcsBackupPolicy `json:"policy"`
    68  }
    69  
    70  type DcsBackupPolicy struct {
    71  	BackupType           string     `json:"backup_type"`
    72  	SaveDays             int        `json:"save_days"`
    73  	PeriodicalBackupPlan BackupPlan `json:"periodical_backup_plan"`
    74  }
    75  
    76  type ResizeResponse struct {
    77  	OrderId string `json:"order_id"`
    78  }
    79  
    80  type ResizePrePaidResponse struct {
    81  	OrderId string `json:"order_id"`
    82  }
    83  
    84  type RestartResponse struct {
    85  	Results []RestartResultResponse `json:"results"`
    86  }
    87  
    88  type RestartResultResponse struct {
    89  	Result   string `json:"result"`
    90  	Instance string `json:"instance"`
    91  }
    92  
    93  type Configuration struct {
    94  	ConfigTime   string        `json:"config_time"`
    95  	InstanceId   int           `json:"instance_id"`
    96  	RedisConfig  []RedisConfig `json:"redis_config"`
    97  	ConfigStatus string        `json:"config_status"`
    98  	Status       string        `json:"status"`
    99  }
   100  
   101  type RedisConfig struct {
   102  	Proxy              bool   `json:"proxy"`
   103  	ParamId            string `json:"param_id"`
   104  	ParamName          string `json:"param_name"`
   105  	DefaultValue       string `json:"default_value"`
   106  	ValueRange         string `json:"value_range"`
   107  	ValueType          string `json:"value_type"`
   108  	Description        string `json:"description"`
   109  	ParamValue         string `json:"param_value"`
   110  	NodeRole           string `json:"node_role"`
   111  	ParamType          string `json:"param_type"`
   112  	UserPermission     string `json:"user_permission"`
   113  	NeedRestart        bool   `json:"need_restart"`
   114  	SupportedVersion   string `json:"supported_version"`
   115  	InternationalKey   string `json:"international_key"`
   116  	NewVersionOnly     bool   `json:"new_version_only"`
   117  	SupportDataVersion string `json:"support_data_version"`
   118  	Customized         bool   `json:"customized"`
   119  }
   120  
   121  type GetSslResponse struct {
   122  	Enable       bool   `json:"enabled"`
   123  	Ip           string `json:"ip"`
   124  	SslValidated bool   `json:"ssl_validated"`
   125  	Port         string `json:"port"`
   126  	DomainName   string `json:"domain_name"`
   127  	SslExpiredAt string `json:"ssl_expired_at"`
   128  }
   129  
   130  type BandWidthInfo struct {
   131  	BandWidth          int  `json:"bandwidth"`
   132  	BeginTime          int  `json:"begin_time"`
   133  	CurrentTime        int  `json:"current_time"`
   134  	EndTime            int  `json:"end_time"`
   135  	ExpandCount        int  `json:"expand_count"`
   136  	ExpandEffectTime   int  `json:"expand_effect_time"`
   137  	ExpandIntervalTime int  `json:"expand_interval_time"`
   138  	MaxExpandCount     int  `json:"max_expand_count"`
   139  	NextExpandTime     int  `json:"next_expand_time"`
   140  	TaskRunning        bool `json:"task_running"`
   141  }