

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# HTTP/HTTPS サブスクリプションの解除の JSON 形式
<a name="http-unsubscribe-confirmation-json"></a>

HTTP/HTTPS エンドポイントのサブスクリプションがトピックから解除されると、Amazon SNS はエンドポイントにサブスクリプションの確認メッセージを送信します。

サブスクリプション解除の確認メッセージは、次の名前と値のペアを持つ JSON ドキュメントを含むメッセージ本文がある POST メッセージです。

**`Type`**  
メッセージのタイプ。サブスクリプション解除の確認の場合、タイプは `UnsubscribeConfirmation` です。

**`MessageId`**  
発行するメッセージごとの汎用一意識別子 (UUID)。再試行間に Amazon SNS が再送信するメッセージの場合、元のメッセージのメッセージ ID が使用されます。

**`Token`**  
サブスクリプションを再確認するために [https://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html](https://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html) アクションで使用できる値。または、`SubscribeURL` にアクセスしても構いません。

**`TopicArn`**  
このエンドポイントがサブスクリプションを解除されたトピックの Amazon リソースネーム (ARN)。

**`Message`**  
メッセージについて説明する文字列。サブスクリプション解除の確認の場合、この文字列は次のようになります。  

```
You have chosen to deactivate subscription arn:aws:sns:us-east-2:123456789012:MyTopic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55.\nTo cancel this operation and restore the subscription, visit the SubscribeURL included in this message.
```

**`SubscribeURL`**  
サブスクリプションを再確認するためにアクセスする必要がある URL。または、代わりに `Token` を [https://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html](https://docs.aws.amazon.com/sns/latest/api/API_ConfirmSubscription.html) アクションで使用してサブスクリプションを再確認することもできます。

**`Timestamp`**  
サブスクリプション解除の確認が送信された日時 (GMT)。

**`SignatureVersion`**  
使用される Amazon SNS 署名のバージョン  
+ `SignatureVersion` が **1** である場合、`Signature` は `Message`、`MessageId`、`Type`、`Timestamp`、`TopicArn` の各値の Base64 でエンコードされた `SHA1withRSA` シグネチャです。
+ `SignatureVersion` が **2** である場合、`Signature` は `Message`、`MessageId`、`Type`、`Timestamp`、`TopicArn` の各値の Base64 でエンコードされた `SHA256withRSA` シグネチャです。

**`Signature`**  
`Message`、`MessageId`、`Type`、`Timestamp`、`TopicArn` の各値の BaseBase64 でエンコードされた `SHA1withRSA` または `SHA256withRSA` シグネチャ。

**`SigningCertURL`**  
メッセージの署名に使用された証明書の URL

次の HTTP POST メッセージは、HTTP エンドポイントへの `UnsubscribeConfirmation` メッセージの例です。

```
POST / HTTP/1.1
x-amz-sns-message-type: UnsubscribeConfirmation
x-amz-sns-message-id: 47138184-6831-46b8-8f7c-afc488602d7d
x-amz-sns-topic-arn: arn:aws:sns:us-west-2:123456789012:MyTopic
x-amz-sns-subscription-arn: arn:aws:sns:us-west-2:123456789012:MyTopic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55
Content-Length: 1399
Content-Type: text/plain; charset=UTF-8
Host: myhost.example.com
Connection: Keep-Alive
User-Agent: Amazon Simple Notification Service Agent

{
  "Type" : "UnsubscribeConfirmation",
  "MessageId" : "47138184-6831-46b8-8f7c-afc488602d7d",
  "Token" : "2336412f37...",
  "TopicArn" : "arn:aws:sns:us-west-2:123456789012:MyTopic",
  "Message" : "You have chosen to deactivate subscription arn:aws:sns:us-west-2:123456789012:MyTopic:2bcfbf39-05c3-41de-beaa-fcfcc21c8f55.\nTo cancel this operation and restore the subscription, visit the SubscribeURL included in this message.",
  "SubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-west-2:123456789012:MyTopic&Token=2336412f37fb6...",
  "Timestamp" : "2012-04-26T20:06:41.581Z",
  "SignatureVersion" : "1",
  "Signature" : "EXAMPLEHXgJm...",
  "SigningCertURL" : "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem"
}
```