Managing an endpoint
Written by
Updated at April 17, 2025
Updating endpoint parameters
Management console
AWS CLI
AWS SDK for Python
AWS SDK for PHP
API
- In the management console
, select the folder containing the endpoint. - From the list of services, select Cloud Notification Service.
- Select an in-browser push notification channel.
- Navigate to the
Endpoints tab. - Click
next to the endpoint and select Edit. - Update Endpoint parameters in JSON and User data.
- Click Save.
-
If you do not have the AWS CLI yet, install and configure it.
-
Run this command:
aws sns set-endpoint-attributes \ --endpoint-arn <endpoint_ARN> \ --attributes Token=<pushSubscription_JSON>,CustomUserData=<any_data>
Where:
--endpoint-arn
: Endpoint ID (ARN).--attributes
: Comma-separated endpoint parameters you want to edit.Token
: PushSubscription object, in JSON format received in the user's browser.CustomUserData
: Additional information.
For more information about the
aws sns set-endpoint-attributes
command, see the AWS documentation .
```python
response = client.set_endpoint_attributes(
EndpointArn="<endpoint_ARN>",
Attributes={
Token: "<pushSubscription_JSON>",
CustomUserData: "<any_data>"
}
)
print("Endpoint attributes updated successfully.")
```
Where:
* `EndpointArn`: Endpoint ID (ARN).
* `Attributes`: Comma-separated parameters you want to edit.
* `Token`: [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription) object, in [JSON](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/toJSON) format received in the user's browser.
* `CustomUserData`: Additional information.
```php
$response = $client->setEndpointAttributes([
'EndpointArn' => '<endpoint_ARN>',
'Attributes' => [
Token => '<pushSubscription_JSON>',
CustomUserData => '<any_data>'
],
]);
echo "Endpoint attributes updated successfully.\n";
```
* `EndpointArn`: Endpoint ID (ARN).
* `Attributes`: Comma-separated parameters you want to edit.
* `Token`: [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription) object, in [JSON](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription/toJSON) format received in the user's browser.
* `CustomUserData`: Additional information.
Use the setAttributes HTTP API method for the Endpoint resource in Yandex Cloud Notification Service.
Updating an endpoint may take some time.
Deleting an endpoint
Management console
AWS CLI
AWS SDK for Python
AWS SDK for PHP
API
- In the management console
, go to the folder containing your endpoint. - From the list of services, select Cloud Notification Service.
- Select an in-browser push notification channel.
- Navigate to the
Endpoints tab. - Click
next to the endpoint and select Delete. - Click Delete.
```bash
aws sns delete-endpoint \
--endpoint-arn <endpoint_ARN>
```
Where `--endpoint-arn` is the endpoint ID (ARN).
For more information about the `aws sns delete-endpoint` command, see the [AWS documentation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sns/delete-endpoint.html).
```python
response = client.delete_endpoint(
EndpointArn="<endpoint_ARN>"
)
print("Endpoint deleted successfully.")
```
```php
$response = $client->deleteEndpoint([
'EndpointArn' => '<endpoint_ARN>',
]);
echo "Endpoint deleted successfully.\n";
```
Use the delete HTTP API method for the Endpoint resource in Yandex Cloud Notification Service.