Create event notification subscription (POST /v1.0/{tenantId}/eventnotifications)

Creates an event notification subscription.

Request URI

{tenantID}

Project ID of the owner of the instance

Data Type Cardinality
String 1..1

Request Parameters

eventnotification

Data Type Cardinality Parent Element Child Element(s)
    None enabled

eventCategories.

sourceIds.

sourceType

id

name

description

enabled

Enables event notification

true or false

Data Type Cardinality Parent Element Child Element(s)
Boolean 0..1 eventnotification None

eventCategories.

A list containing the SourceType event categories you want to register.

The list of assigned SourceType categories can be confirmed from DescribeEventCategories.

Data Type Cardinality Parent Element Child Element(s)
String 0..1 eventnotification None

sourceIds.

List of event source IDs returned by the event

Default: If this specification is omitted, all source IDs are returned.

Constrained by the source type.

For example, this value must be the DBInstance ID for the instance.

Data Type Cardinality Parent Element Child Element(s)
String list 0..1 eventnotification None

sourceType

The type of source for which an event is generated.

For example, to notify an event generated by the DBinstance, specify ""db-instance".

Default: If this specification is omitted, all events will be notified.

db-instance | db-snapshot

Data Type Cardinality Parent Element Child Element(s)
String 0..1 eventnotification None

id

ID of event notification subscription
  • Only alphanumeric characters and hyphens can be used
  • The string must start with a letter
  • A hyphen cannot be used at the end of the string
  • Two or more consecutive hyphens cannot be used
  • Up to 63 characters

Default: random value

Data Type Cardinality Parent Element Child Element(s)
String 0..1 eventnotification None

name

Name of event notification subscription
  • Only alphanumeric characters and hyphens can be used
  • The string must start with a letter
  • A hyphen cannot be used at the end of the string
  • Two or more consecutive hyphens cannot be used
  • Up to 255 characters
Data Type Cardinality Parent Element Child Element(s)
String 1..1 eventnotification None

description

Description of the event notification subscription
  • Up to 1024 characters

Default: None

Data Type Cardinality Parent Element Child Element(s)
String 0..1 eventnotification None

Response Headers

Status

Returns the status of the request.

One of the following values will be returned.
400:
badRequest
401:
unauthorized
403:
forbidden
404:
itemNotFound
413:
overLimit
422:
unprocessableEntity
500:
instanceFault
501:
notImplemented
503:
serviceUnavailable
504:
gatewayTimeout
Data Type Cardinality
Int 1..1

Response Elements

EventSubscription

Data Type Cardinality Parent Element Child Element(s)
    None id

name

enabled

eventCategoriesList

sourceIdsList

sourceType

status

created

id

ID of event notification subscription

Data Type Cardinality Parent Element Child Element(s)
String      

name

Name of event notification subscription

Data Type Cardinality Parent Element Child Element(s)
String      

enabled

Flag indicating whether notification is enabled

Data Type Cardinality Parent Element Child Element(s)
Boolean      

eventCategoriesList

List of event categories to notify

Data Type Cardinality Parent Element Child Element(s)
String list      

sourceIdsList

List of resource IDs that will be the event source to notify

Data Type Cardinality Parent Element Child Element(s)
String list      

sourceType

Type of resource that will be the event source

Data Type Cardinality Parent Element Child Element(s)
String      

status

Status of event notification subscription

creating | modifying | deleting | active |

Data Type Cardinality Parent Element Child Element(s)
String      

created

The creation date and time

Data Type Cardinality Parent Element Child Element(s)
String      

description

Description

Data Type Cardinality Parent Element Child Element(s)
String      

Example of Response


{
  "eventSubscription": {
    "subscriptionId": "subscription1",
    "name": " mysubscription1",
    " enabled ": true,
    " eventCategories ": [
      {
        "eventCategory": "backup"
      },
      {
        "eventCategory": "creation"
      }
    ],
    "sourceIds": [
      {
        "sourceId": "dbinst1"
      },
      {
        "sourceId": "dbinst2"
      }
    ],
    "sourceType": "db-instance",
    "created": "2013-03-18T19:09:17",
"description": " this is test "
  }
}