{
  "typeName" : "AWS::Neptune::EventSubscription",
  "description" : "Resource Type definition for AWS::Neptune::EventSubscription",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-neptune",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string"
        },
        "Value" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Key", "Value" ]
    }
  },
  "properties" : {
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "Enabled" : {
      "description" : "A Boolean value; set to true to activate the subscription, set to false to create the subscription but not active it.",
      "type" : "boolean",
      "default" : true
    },
    "EventCategories" : {
      "description" : "A list of event categories for a SourceType that you want to subscribe to. You can see a list of the categories for a given SourceType in the Events topic in the Amazon Neptune User Guide or by using the DescribeEventCategories action.",
      "type" : "array",
      "uniqueItems" : true,
      "items" : {
        "type" : "string"
      }
    },
    "SnsTopicArn" : {
      "description" : "The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.",
      "type" : "string"
    },
    "SubscriptionName" : {
      "description" : "The name of the subscription.",
      "type" : "string",
      "maxLength" : 255
    },
    "SourceIds" : {
      "description" : "The list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it cannot end with a hyphen or contain two consecutive hyphens.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "type" : "string"
      }
    },
    "SourceType" : {
      "description" : "The type of source that will be generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. if this value is not specified, all events are returned.",
      "type" : "string"
    }
  },
  "additionalProperties" : false,
  "propertyTransform" : {
    "/properties/SubscriptionName" : "$lowercase(SubscriptionName)"
  },
  "required" : [ "SnsTopicArn" ],
  "createOnlyProperties" : [ "/properties/SnsTopicArn", "/properties/SubscriptionName" ],
  "primaryIdentifier" : [ "/properties/SubscriptionName" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "rds:AddTagsToResource", "rds:ListTagsForResource", "rds:RemoveTagsFromResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "iam:CreateServiceLinkedRole", "rds:CreateEventSubscription", "rds:ListTagsForResource", "rds:AddTagsToResource", "rds:RemoveTagsFromResource" ]
    },
    "read" : {
      "permissions" : [ "rds:DescribeEventSubscriptions", "rds:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "rds:ModifyEventSubscription", "rds:AddSourceIdentifierToSubscription", "rds:RemoveSourceIdentifierFromSubscription", "rds:DescribeEventSubscriptions", "rds:AddTagsToResource", "rds:RemoveTagsFromResource" ]
    },
    "delete" : {
      "permissions" : [ "rds:DeleteEventSubscription", "rds:DescribeEventSubscriptions", "rds:RemoveTagsFromResource" ]
    },
    "list" : {
      "permissions" : [ "rds:DescribeEventSubscriptions", "rds:ListTagsForResource" ]
    }
  }
}