ChangeSNSApplicationEndpointState
API Request
URLs
PUT zstack/v1/sns/application-endpoints/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
{
"changeSNSApplicationEndpointState": {
"stateEvent": "disable"
},
"systemTags": [],
"userTags": []
}Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"changeSNSApplicationEndpointState":{"stateEvent":"disable"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/1485ef44ea5234ee83d80d3a15937e19/actionsRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 2.3 | |
| stateEvent | String | body (contained in the changeSNSApplicationEndpointState structure) | The state event. |
|
2.3 |
| systemTags | List | body | Optional. The system tags. | 2.3 | |
| userTags | List | body | Optional. The user tags. | 2.3 |
API Response
Sample
Response
{
"inventory": {
"name": "example",
"uuid": "917fe66f76b241f0843dfbd6be685fc1",
"description": "description example",
"type": "Email",
"state": "Enabled",
"platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
"createDate": "Dec 25, 2023 2:06:05 PM",
"lastOpDate": "Dec 25, 2023 2:06:05 PM"
}
}#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 2.3 |
| name | String | The resource name. | 2.3 |
| description | String | The detailed description of the resource. | 2.3 |
| type | String | The type. | 2.3 |
| platformUuid | String | The application platform UUID. | 2.3 |
| lastOpDate | Timestamp | The last operation date. | 2.3 |
| createDate | Timestamp | The creation date. | 2.3 |
SDK Sample
Java
SDK
ChangeSNSApplicationEndpointStateAction action = new ChangeSNSApplicationEndpointStateAction();
action.uuid = "1485ef44ea5234ee83d80d3a15937e19";
action.stateEvent = "disable";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
ChangeSNSApplicationEndpointStateAction.Result res = action.call();Python
SDK
ChangeSNSApplicationEndpointStateAction action = ChangeSNSApplicationEndpointStateAction()
action.uuid = "1485ef44ea5234ee83d80d3a15937e19"
action.stateEvent = "disable"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
ChangeSNSApplicationEndpointStateAction.Result res = action.call()