创建转发策略-CreatePolicy

创建VServer内容转发策略

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域Yes
ProjectIdstring项目IDYes
ULBIdstring需要添加内容转发策略的负载均衡实例IDYes
VServerIdstring需要添加内容转发策略的VServer实例IDYes
BackendId.nstring内容转发策略应用的后端资源实例的ID,来源于 AllocateBackend 返回的 BackendIdYes
Matchstring内容转发匹配字段Yes
Typestring内容转发匹配字段的类型No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
PolicyIdstring内容转发策略IDNo

Request Example

http(s)://api.ucloud.cn/?Action=CreatePolicy
&Region=cn-bj2
&ProjectId=project-xs13ik
&GroupId=ulb-fr-2axjbg
&Match=ok
&ULBId=ulb-kix54p
&VServerId=vserver-9b646b
&BackendId.0=backend-67a442

Response Example

{
    "Action": "CreatePolicyResponse",
    "PolicyId": "0a074d02-b7c9-4a5d-9acf-414081f1b85f",
    "RetCode": 0
}