CreateEventSubscription
処理概要
イベントサブスクリプションを新規作成します。
指定するパラメーター
| パラメーター | 型 | 説明 | 必須 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Enabled | boolean |
通知を行うかどうか 値:
|
|||||||||
| EventCategories.member.N | string |
通知を行うイベントカテゴリのリスト 指定したリソースタイプに対応するイベントカテゴリリストを指定します。
|
|||||||||
| SourceIds.member.N | string |
通知を行うリソースIDのリスト
|
|||||||||
| SourceType | string |
通知を行うイベントのリソースタイプ ※省略時はすべてのイベントが通知されます。 値:
|
|||||||||
| SubscriptionName | string |
イベント通知名
|
○ | ||||||||
| NiftyEmailAddresses.member.N | string |
イベント通知先のメールアドレスを指定します。 備考: 独自仕様 |
○ | ||||||||
| NiftyDescription | string |
イベント通知の説明
備考: 独自仕様 |
応答フィールド
| フィールド (項目) | 型 | 説明 |
|---|---|---|
| CreateEventSubscriptionResponse | structure |
ルート |
| ␣CreateEventSubscriptionResult | structure |
結果 |
| ␣␣EventSubscription | structure |
イベントサブスクリプション 備考: EventSubscriptionの子要素はDescribeEventSubscriptionsで返却される要素をすべて記載しているためAPIによっては返却されない要素もあります。実際のレスポンスはレスポンスサンプルを参照してください。 |
| ␣␣␣CustSubscriptionId | string |
イベント通知名 |
| ␣␣␣Enabled | boolean |
通知が有効かどうか |
| ␣␣␣EventCategoriesList | list |
イベントカテゴリリスト |
| ␣␣␣␣EventCategory | string |
イベントカテゴリ |
| ␣␣␣SourceIdsList | list |
リソースIDリスト |
| ␣␣␣␣SourceId | string |
リソースID |
| ␣␣␣SourceType | string |
リソースタイプ |
| ␣␣␣Status | string |
イベントサブスクリプションのステータス
|
| ␣␣␣SubscriptionCreationTime | string |
イベントサブスクリプションの作成日時 |
| ␣␣␣NiftyEmailAddressesList | list |
メールアドレスリスト 備考: 独自仕様 |
| ␣␣␣␣NiftyEmailAddress | string |
メールアドレス 備考: 独自仕様 |
| ␣␣␣NiftyDescription | string |
イベント通知の説明 備考: 独自仕様 |
| ␣ResponseMetadata | structure |
共通メタ情報 |
| ␣␣RequestId | string |
リクエスト識別子 |
エラー
| コード | メッセージ | タイプ | HTTPステータスコード | 説明 |
|---|---|---|---|---|
| Client.InvalidParameterDuplicate.SubscriptionName | Subscription already exists |
Sender | 400 | すでに存在するSubscriptionNameを指定した場合 |
| Client.InvalidParameterFormat.NiftyEmailAddress | Invalid nifty email address: aaa |
Sender | 400 | NiftyEmailAddresses.member.Nがメールアドレスの形式として正しくない場合 |
| Client.InvalidParameterFormat.SubscriptionName | The parameter Subscription Identifier is not a valid identifier. Identifiers must begin with a letter; must contain only ASCII letters, digits, and hyphens; and must not end with a hyphen or contain two consecutive hyphens. |
Sender | 400 | SubscriptionNameに無効な値(ハイフンから始まる 等)を指定した場合 |
| Client.InvalidParameterIllegalInput.Enabled | Sender | 400 | Enabledに真偽値型でない値を指定した場合 | |
| Client.InvalidParameterIllegalInput.NiftyDescription | NiftyDescription (4バイト文字) is not a valid parameter. |
Sender | 400 | NiftyDescriptionに4バイト文字を含む値を指定した場合 |
| Client.InvalidParameterIllegalInput.SourceType | Invalid event source type. Valid types are ‘db-instance’, ‘db-security-group’, ‘db-snapshot’, ‘db-parameter-group’ |
Sender | 400 | SourceTypeに db-instance | db-security-group | db-snapshot | db-parameter-group 以外の値を指定した場合 |
| Client.InvalidParameterNotFound.EventCategory | Category : aaa not found for source type db-instance |
Sender | 404 | 存在しないEventCategories.member.Nを指定した場合 |
| Client.InvalidParameterNotFound.SourceIdentifier | Could not find source :aaa |
Sender | 404 | 存在しないSourceIds.member.Nを指定した場合 |
| Client.InvalidParameterRequired.NiftyEmailAddress | NiftyEmailAddress is required. |
Sender | 400 | 必須のNiftyEmailAddresses.member.Nを指定しなかった場合 |
| Client.InvalidParameterRequired.SubscriptionName | Subscription name is required. |
Sender | 400 | 必須のSubscriptionNameを指定しなかった場合 |
| Client.InvalidParameterTooLong.NiftyDescription | Invalid nifty description: sample-123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
Sender | 400 | NiftyDescriptionに512文字を超える値を指定した場合 |
| Client.InvalidParameterTooLong.SubscriptionName | Invalid subscription name: sample-subscription123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 |
Sender | 400 | SubscriptionNameに255文字を超える値を指定した場合 |
| Client.LimitExceeded.NumberOfEventSubscription | EventSubscription quota exceeded |
Sender | 400 | 作成可能なイベントサブスクリプションの上限に達している場合 |
| Client.LimitExceeded.NumberOfNiftyEmailAddress | Cannot set more than 20 nifty email address |
Sender | 400 | 設定可能なNiftyEmailAddressの上限数を超えている場合 |
リクエストサンプル
https://jp-east-1.rdb.api.nifcloud.com/
?Action=CreateEventSubscription
&SubscriptionName=myrdb-event
&NiftyEmailAddresses.member.1=localpart@example.com
&SignatureVersion=2
&SignatureMethod=HmacSHA256
&Timestamp=2013-12-09T00:00:00.000Z
&AWSAccessKeyId=<NIFCLOUD Access Key ID>
&Signature=<Signature>
応答サンプル
<CreateEventSubscriptionResponse>
<CreateEventSubscriptionResult>
<EventSubscription>
<Enabled>true</Enabled>
<Status>active</Status>
<SubscriptionCreationTime>Thu Apr 16 03:01:39 UTC 2020</SubscriptionCreationTime>
<CustSubscriptionId>myrdb-event</CustSubscriptionId>
<NiftyEmailAddressesList>
<NiftyEmailAddress>localpart@example.com</NiftyEmailAddress>
</NiftyEmailAddressesList>
</EventSubscription>
</CreateEventSubscriptionResult>
<ResponseMetadata>
<RequestId>bed9629a-fffd-4379-9e08-3d36dca9f575</RequestId>
</ResponseMetadata>
</CreateEventSubscriptionResponse>
