更新接收端邮箱地址

PUT/zstack/v1/sns/application-endpoints/emails/email-addresses

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateEmailAddressOfSNSEmailEndpoint": {
    "emailAddressUuid": "cb2b3d85e0da3a299c52c23510ba15dd",
    "endpointUuid": "f305528eb6773a73beac3f94f79d3017",
    "emailAddress": "example@cloud.io"
  },
  "systemTags": [],
  "userTags": []
}

上述示例中systemTagsuserTags字段可以省略。列出是为了表示body中可以包含这两个字段。

Curl示例

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateEmailAddressOfSNSEmailEndpoint":{"emailAddressUuid":"cb2b3d85e0da3a299c52c23510ba15dd","endpointUuid":"f305528eb6773a73beac3f94f79d3017","emailAddress":"example@cloud.io"}}' http://localhost:8080/zstack/v1/sns/application-endpoints/emails/email-addresses

参数列表

名字类型位置描述可选值起始版本
emailAddressUuidStringbody(包含在updateEmailAddressOfSNSEmailEndpoint结构中)邮箱地址uuid 5.0.0
endpointUuidStringbody(包含在updateEmailAddressOfSNSEmailEndpoint结构中)接收端uuid 5.0.0
emailAddressStringbody(包含在updateEmailAddressOfSNSEmailEndpoint结构中)新邮箱地址 5.0.0
systemTags (可选)Listbody  3.7.0
userTags (可选)Listbody  3.7.0

API返回

返回示例

{
  "inventory": {
    "uuid": "fe09a0e973724cba8d7369806d93fc50",
    "emailAddress": "example@zstack.io",
    "endpointUuid": "2648d04a1e7443dc966c3265d9f691dc",
    "createDate": "Mar 26, 2024 2:45:58 AM",
    "lastOpDate": "Mar 26, 2024 2:45:58 AM"
  }
}
名字类型描述起始版本
successboolean 5.0.0
errorErrorCode错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error3.7.0
inventorySNSEmailAddressInventory详情参考inventory3.7.0

error

名字类型描述起始版本
codeString错误码号,错误的全局唯一标识,例如SYS.1000, HOST.10013.7.0
descriptionString错误的概要描述3.7.0
detailsString错误的详细信息3.7.0
elaborationString保留字段,默认为null3.7.0
opaqueLinkedHashMap保留字段,默认为null3.7.0
causeErrorCode根错误,引发当前错误的源错误,若无原错误,该字段为null3.7.0

inventory

名字类型描述起始版本
uuidString资源的UUID,唯一标示该资源3.7.0
emailAddressString 3.7.0
endpointUuidString 3.7.0
createDateTimestamp创建时间5.0.0
lastOpDateTimestamp最后一次修改时间5.0.0

SDK示例

Java SDK

UpdateEmailAddressOfSNSEmailEndpointAction action = new UpdateEmailAddressOfSNSEmailEndpointAction();
action.emailAddressUuid = "cb2b3d85e0da3a299c52c23510ba15dd";
action.endpointUuid = "f305528eb6773a73beac3f94f79d3017";
action.emailAddress = "example@cloud.io";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateEmailAddressOfSNSEmailEndpointAction.Result res = action.call();

Python SDK

UpdateEmailAddressOfSNSEmailEndpointAction action = UpdateEmailAddressOfSNSEmailEndpointAction()
action.emailAddressUuid = "cb2b3d85e0da3a299c52c23510ba15dd"
action.endpointUuid = "f305528eb6773a73beac3f94f79d3017"
action.emailAddress = "example@cloud.io"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateEmailAddressOfSNSEmailEndpointAction.Result res = action.call()