diff --git a/service/misc.go b/service/misc.go index 24b6ed0..884cd4e 100644 --- a/service/misc.go +++ b/service/misc.go @@ -92,3 +92,58 @@ type GetQuotaLeftOutput struct { QuotaLeftSet []*QuotaLeft `json:"quota_left_set" name:"quota_left_set" location:"elements"` RetCode *int `json:"ret_code" name:"ret_code" location:"elements"` } + +// Documentation URL: https://docs.qingcloud.com/product/api/action/misc +func (s *MiscService) GetResourceLimit(i *GetResourceLimitInput) (*GetResourceLimitOutput, error) { + if i == nil { + i = &GetResourceLimitInput{} + } + o := &data.Operation{ + Config: s.Config, + Properties: s.Properties, + APIName: "GetResourceLimit", + RequestMethod: "GET", + } + + x := &GetResourceLimitOutput{} + r, err := request.New(o, i, x) + if err != nil { + return nil, err + } + + err = r.Send() + if err != nil { + return nil, err + } + + return x, err +} + +type GetResourceLimitInput struct { + VolumeType *int `json:"volume_type" name:"volume_type" location:"params"` + Zone *string `json:"zone" name:"zone" location:"params"` // Required +} + +func (v *GetResourceLimitInput) Validate() error { + + if v.Zone == nil { + return errors.ParameterRequiredError{ + ParameterName: "Zone", + ParentName: "GetResourceLimitInput", + } + } + + return nil +} + +type GetResourceLimitOutput struct { + Message *string `json:"message" name:"message"` + Action *string `json:"action" name:"action" location:"elements"` + MaxSize *int `json:"max-size" name:"max-size" location:"elements"` + MinSize *int `json:"min-size" name:"min-size" location:"elements"` + ResourceLimits *ResourceLimits `json:"resource_limits" name:"resource_limits" location:"elements"` + RetCode *int `json:"ret_code" name:"ret_code" location:"elements"` + Step *int `json:"step" name:"step" location:"elements"` + VxNetSubnets []*string `json:"vxnet_subnets" name:"vxnet_subnets" location:"elements"` + VxNetVersion *int `json:"vxnet_version" name:"vxnet_version" location:"elements"` +} diff --git a/service/types.go b/service/types.go index 4423e9b..f793cdc 100644 --- a/service/types.go +++ b/service/types.go @@ -2180,6 +2180,88 @@ func (v *Resource) Validate() error { return nil } +type ResourceLimits struct { + Comments *string `json:"__comments" name:"__comments"` + BanMmVxNets *int `json:"ban_mm_vxnets" name:"ban_mm_vxnets"` + BmZones []*string `json:"bm_zones" name:"bm_zones"` + BucketCreateWhitelist *string `json:"bucket_create_whitelist" name:"bucket_create_whitelist"` + DisabledActions []*string `json:"disabled_actions" name:"disabled_actions"` + DisabledFeatures []*string `json:"disabled_features" name:"disabled_features"` + EnableNICBandwidth *int `json:"enable_nic_bandwidth" name:"enable_nic_bandwidth"` + GpuZones []*string `json:"gpu_zones" name:"gpu_zones"` + HadoopTypes interface{} `json:"hadoop_types" name:"hadoop_types"` + HbaseTypes interface{} `json:"hbase_types" name:"hbase_types"` + HcVolumeStep *int `json:"hc_volume_step" name:"hc_volume_step"` + HcsVolumeStep *int `json:"hcs_volume_step" name:"hcs_volume_step"` + HdfsDisksPerNode *int `json:"hdfs_disks_per_node" name:"hdfs_disks_per_node"` + HpsVolumeStep *int `json:"hps_volume_step" name:"hps_volume_step"` + IgnoreMmVxNetUsers *string `json:"ignore_mm_vxnet_users" name:"ignore_mm_vxnet_users"` + MaxAbuseEIPCnt *int `json:"max_abuse_eip_cnt" name:"max_abuse_eip_cnt"` + MaxAlarmPolicyActions *int `json:"max_alarm_policy_actions" name:"max_alarm_policy_actions"` + MaxAlarmPolicyResources *int `json:"max_alarm_policy_resources" name:"max_alarm_policy_resources"` + MaxAlarmPolicyRules *int `json:"max_alarm_policy_rules" name:"max_alarm_policy_rules"` + MaxChangeEIPBillingModeCnt *int `json:"max_change_eip_billing_mode_cnt" name:"max_change_eip_billing_mode_cnt"` + MaxEIPBandwidth *int `json:"max_eip_bandwidth" name:"max_eip_bandwidth"` + MaxEIPCount *int `json:"max_eip_count" name:"max_eip_count"` + MaxGpuCount *int `json:"max_gpu_count" name:"max_gpu_count"` + MaxHcVolumeSize *int `json:"max_hc_volume_size" name:"max_hc_volume_size"` + MaxHcsVolumeSize *int `json:"max_hcs_volume_size" name:"max_hcs_volume_size"` + MaxHpsVolumeSize *int `json:"max_hps_volume_size" name:"max_hps_volume_size"` + MaxImageSharedUsers *int `json:"max_image_shared_users" name:"max_image_shared_users"` + MaxInstanceCount *int `json:"max_instance_count" name:"max_instance_count"` + MaxItemInResourceGroup *int `json:"max_item_in_resource_group" name:"max_item_in_resource_group"` + MaxListenerBackends *int `json:"max_listener_backends" name:"max_listener_backends"` + MaxLoadBalancerListeners *int `json:"max_loadbalancer_listeners" name:"max_loadbalancer_listeners"` + MaxLoadBalancerPolicyRewriteRules *int `json:"max_loadbalancer_policy_rewrite_rules" name:"max_loadbalancer_policy_rewrite_rules"` + MaxLoadBalancerPolicyRules *int `json:"max_loadbalancer_policy_rules" name:"max_loadbalancer_policy_rules"` + MaxMemberInUserGroup *int `json:"max_member_in_user_group" name:"max_member_in_user_group"` + MaxNICPerInstance *int `json:"max_nic_per_instance" name:"max_nic_per_instance"` + MaxResourceSharedUsers *int `json:"max_resource_shared_users" name:"max_resource_shared_users"` + MaxRgCntItemCanJoin *int `json:"max_rg_cnt_item_can_join" name:"max_rg_cnt_item_can_join"` + MaxRouterCount *int `json:"max_router_count" name:"max_router_count"` + MaxRouterEntries *int `json:"max_router_entries" name:"max_router_entries"` + MaxRouterStatics *int `json:"max_router_statics" name:"max_router_statics"` + MaxRouterVxNets *int `json:"max_router_vxnets" name:"max_router_vxnets"` + MaxRuleInGroupRole *int `json:"max_rule_in_group_role" name:"max_rule_in_group_role"` + MaxSecurityGroupRules *int `json:"max_security_group_rules" name:"max_security_group_rules"` + MaxSecurityGroupRulesets *int `json:"max_security_group_rulesets" name:"max_security_group_rulesets"` + MaxSecurityGroupSnapshots *int `json:"max_security_group_snapshots" name:"max_security_group_snapshots"` + MaxUsersInOneDepartment *int `json:"max_users_in_one_department" name:"max_users_in_one_department"` + MaxVolumeCount *int `json:"max_volume_count" name:"max_volume_count"` + MaxVolumePerInst *int `json:"max_volume_per_inst" name:"max_volume_per_inst"` + MaxVolumeSize *int `json:"max_volume_size" name:"max_volume_size"` + MaxVosReplicaCount *int `json:"max_vos_replica_count" name:"max_vos_replica_count"` + MaxVxNetCount *int `json:"max_vxnet_count" name:"max_vxnet_count"` + MinAbuseEIPSec *int `json:"min_abuse_eip_sec" name:"min_abuse_eip_sec"` + MinHcVolumeSize *int `json:"min_hc_volume_size" name:"min_hc_volume_size"` + MinHcsVolumeSize *int `json:"min_hcs_volume_size" name:"min_hcs_volume_size"` + MinHostsPerDedicatedGroup *int `json:"min_hosts_per_dedicated_group" name:"min_hosts_per_dedicated_group"` + MinHpsVolumeSize *int `json:"min_hps_volume_size" name:"min_hps_volume_size"` + MinReservedHostsInPool *int `json:"min_reserved_hosts_in_pool" name:"min_reserved_hosts_in_pool"` + MinVolumeSize *int `json:"min_volume_size" name:"min_volume_size"` + PrivilegeOfLxc *int `json:"privilege_of_lxc" name:"privilege_of_lxc"` + SparkTypes interface{} `json:"spark_types" name:"spark_types"` + StormTypes interface{} `json:"storm_types" name:"storm_types"` + ValidCacheSize []*int `json:"valid_cache_size" name:"valid_cache_size"` + ValidCPUCores []*int `json:"valid_cpu_cores" name:"valid_cpu_cores"` + ValidCPUMemoryPairs interface{} `json:"valid_cpu_memory_pairs" name:"valid_cpu_memory_pairs"` + ValidDedicatedHostGroupClasses []*int `json:"valid_dedicated_host_group_classes" name:"valid_dedicated_host_group_classes"` + ValidInstanceClasses []*int `json:"valid_instance_classes" name:"valid_instance_classes"` + ValidLoadBalancerTypes []*int `json:"valid_loadbalancer_types" name:"valid_loadbalancer_types"` + ValidMemorySize []*int `json:"valid_memory_size" name:"valid_memory_size"` + ValidResourceClasses []*int `json:"valid_resource_classes" name:"valid_resource_classes"` + ValidVolumeTypes []*int `json:"valid_volume_types" name:"valid_volume_types"` + VolumeStep *int `json:"volume_step" name:"volume_step"` + VpcIpv6Prefixlen *int `json:"vpc_ipv6_prefixlen" name:"vpc_ipv6_prefixlen"` + VxNetIpv6Prefixlen *int `json:"vxnet_ipv6_prefixlen" name:"vxnet_ipv6_prefixlen"` + VxNetKsWhiteList *string `json:"vxnet_ks_white_list" name:"vxnet_ks_white_list"` +} + +func (v *ResourceLimits) Validate() error { + + return nil +} + type ResourceTagPair struct { ResourceID *string `json:"resource_id" name:"resource_id"` ResourceType *string `json:"resource_type" name:"resource_type"`