置放群组开发手册

创建置放群组

所属服务

nvm

Action

CreatePlacementGroup

Version

2017-12-14

请求url

/nvm?Action=CreatePlacementGroup&Version=2017-12-14&GroupName=&Strategy=

Method

GET

描述

暂无描述

请求参数

query

参数名称说明参数类型是否必填备注
GroupName置放群组名称,1-255 位字符,租户、Region 内唯一,base64编码的密码字符串string
Strategy置放群组策略,不传默认AntiAffinity(反亲和)string
ActionCreatePlacementGroupstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求Idstring
GroupId置放群组 idstring

状态码

错误码(Code)错误提示(Message)http status code说明
NoSuchTenantno such tenant400没有这个用户
InvalidFormatthe format of the input parameter is illegal400请求参数格式错误
InvalidParaminvalid param400请求参数错误(一般为名字长度问题)
InvalidPlacementGroupPolicyinvalid placement group policy400无效的置放群组策略
DuplicatePlacementGroupNameduplicated placement group name400重复的置放组名称
OverGroupQuotaplacement group count over quota400置放组数量超配额
RequestFailedfail400请求失败

请求示例

 curl -X GET -H "X-Product-Id:4575f0f1063b484982bad09ddc5736c6" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=CreatePlacementGroup&GroupName=dGVzdE5hbWU=&Strategy=AntiAffinity'

返回示例

{"RequestId":"TEST-REQUEST-ID"}

删除置放群组

所属服务

nvm

Action

DeletePlacementGroup

Version

2017-12-14

请求url

/nvm?Action=DeletePlacementGroup&Version=2017-12-14&GroupId=

Method

GET

描述

暂无描述

请求参数

query

参数名称说明参数类型是否必填备注
GroupId置放群组 idstring
ActionDeletePlacementGroupstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求Idstring

状态码

错误码(Code)错误提示(Message)http status code说明
NoSuchTenantno such tenant400没有这个用户
NoSuchPlacementGroupno such placement group404置放群组不存在
RequestFailedfail400请求失败
InstanceInPlacementGroupcannot delete instance remaing instance in placement group400置放组内仍有实例无法删除

请求示例

http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=DeletePlacementGroup&GroupId=g-cb110f71c9e04337b85de3a4b69016ab'

返回示例

{"RequestId":"TEST-REQUEST-ID"}

查询置放群组列表

所属服务

nvm

Action

DescribePlacementGroupList

Version

2017-12-14

请求url

/nvm?Action=DescribePlacementGroupList&Version=2017-12-14&Limit=&Offset=

Method

GET

描述

暂无描述

请求参数

query

参数名称说明参数类型是否必填备注
Limit查询结果每页结果数量,默认 20integer
Offset查询结果起始序号,默认 0integer
ActionDescribePlacementGroupListstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
PlacementGroups置放群组列表,按创建时间降序array详细信息见下表
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求idstring

PlacementGroups

参数名称说明参数类型是否必填备注
GroupId置放群组 idstring
GroupName置放群组名称,1-255 位字符string
Strategy置放群组策略string
CreateAt创建时间string
ZoneInstanceCount置换组内各az对应的信息array详细信息见下表

ZoneInstanceCount

参数名称说明参数类型是否必填备注
ZoneId云服务器所在AZ名称string
InstanceCountaz内的实例数量string

状态码

错误码(Code)错误提示(Message)http status code说明
InvalidParaminvalid param400请求参数错误

请求示例

 curl -X GET -H "X-Product-Id:4575f0f1063b484982bad09ddc5736c6" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=DescribePlacementGroups'

返回示例

{
    "PlacementGroups": [
        {
            "CreateAt": "2019-03-27T02:57:15Z",
            "GroupId": "g-7a11a413347447fd8d7362d39a84c8d3",
            "GroupName": "anew-group-hello-no-delete",
            "Strategy": "AntiAffinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1b"
                }
            ]
        },
        {
            "CreateAt": "2019-03-21T11:29:12Z",
            "GroupId": "g-e92137f54ea54cffba84868514af18fb",
            "GroupName": "iamfine andyou",
            "Strategy": "anti-affinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1b"
                }
            ]
        },
        {
            "CreateAt": "2019-03-21T09:18:10Z",
            "GroupId": "g-287a77458f3c41a0a1fc25b2422bdb95",
            "GroupName": "HelloWorld2",
            "Strategy": "AntiAffinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1a"
                },
                {
                    "InstanceCount": 2,
                    "ZoneId": "cn-east-1b"
                }
            ]
        }
    ],
    "RequestId": "TEST-REQUEST-ID"
}

查询置放群组详细信息

所属服务

nvm

Action

DescribePlacementGroupList

Version

2017-12-14

请求url

/nvm?Action=DescribePlacementGroupList&Version=2017-12-14&Limit=&Offset=

Method

GET

描述

暂无描述

请求参数

query

参数名称说明参数类型是否必填备注
Limit查询结果每页结果数量,默认 20integer
Offset查询结果起始序号,默认 0integer
ActionDescribePlacementGroupListstring
Version2017-12-14string

返回参数

参数名称说明参数类型是否必填备注
PlacementGroups置放群组列表,按创建时间降序array详细信息见下表
Code仅返回http status code非200时有效 指示错误类型string
Message仅返回http status code非200时有效 指示详细错误信息string
RequestId请求idstring

PlacementGroups

参数名称说明参数类型是否必填备注
GroupId置放群组 idstring
GroupName置放群组名称,1-255 位字符string
Strategy置放群组策略string
CreateAt创建时间string
ZoneInstanceCount置换组内各az对应的信息array详细信息见下表

ZoneInstanceCount

参数名称说明参数类型是否必填备注
ZoneId云服务器所在AZ名称string
InstanceCountaz内的实例数量string

状态码

错误码(Code)错误提示(Message)http status code说明
InvalidParaminvalid param400请求参数错误

请求示例

 curl -X GET -H "X-Product-Id:4575f0f1063b484982bad09ddc5736c6" -H "Content-Type:application/json" -H "X-Request-Id:TEST-REQUEST-ID" -H "X-ORIGIN-GW:G0" -H "X-163-DebugMode:true" 'http://127.0.0.1:8188/nvm?Version=2017-12-14&Action=DescribePlacementGroups'

返回示例

{
    "PlacementGroups": [
        {
            "CreateAt": "2019-03-27T02:57:15Z",
            "GroupId": "g-7a11a413347447fd8d7362d39a84c8d3",
            "GroupName": "anew-group-hello-no-delete",
            "Strategy": "AntiAffinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1b"
                }
            ]
        },
        {
            "CreateAt": "2019-03-21T11:29:12Z",
            "GroupId": "g-e92137f54ea54cffba84868514af18fb",
            "GroupName": "iamfine andyou",
            "Strategy": "anti-affinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1b"
                }
            ]
        },
        {
            "CreateAt": "2019-03-21T09:18:10Z",
            "GroupId": "g-287a77458f3c41a0a1fc25b2422bdb95",
            "GroupName": "HelloWorld2",
            "Strategy": "AntiAffinity",
            "ZoneInstanceCount": [
                {
                    "InstanceCount": 1,
                    "ZoneId": "cn-east-1a"
                },
                {
                    "InstanceCount": 2,
                    "ZoneId": "cn-east-1b"
                }
            ]
        }
    ],
    "RequestId": "TEST-REQUEST-ID"
}