{
  "typeName" : "AWS::SMSVOICE::ConfigurationSet",
  "description" : "Resource Type definition for AWS::SMSVOICE::ConfigurationSet",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resoource-providers-smsvoice.git",
  "definitions" : {
    "Tag" : {
      "description" : "A key-value pair to associate with a resource.",
      "type" : "object",
      "properties" : {
        "Key" : {
          "type" : "string",
          "description" : "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "type" : "string",
          "description" : "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "CloudWatchLogsDestination" : {
      "type" : "object",
      "properties" : {
        "IamRoleArn" : {
          "description" : "The Amazon Resource Name (ARN) of an AWS Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.",
          "type" : "string",
          "pattern" : "^arn:\\S+$"
        },
        "LogGroupArn" : {
          "description" : "The name of the Amazon CloudWatch log group that you want to record events in.",
          "type" : "string",
          "pattern" : "^arn:\\S+$"
        }
      },
      "required" : [ "IamRoleArn", "LogGroupArn" ],
      "additionalProperties" : false
    },
    "KinesisFirehoseDestination" : {
      "type" : "object",
      "properties" : {
        "IamRoleArn" : {
          "description" : "The Amazon Resource Name (ARN) of an AWS Identity and Access Management role that is able to write event data to an Amazon CloudWatch destination.",
          "type" : "string",
          "pattern" : "^arn:\\S+$"
        },
        "DeliveryStreamArn" : {
          "description" : "The Amazon Resource Name (ARN) of the delivery stream.",
          "type" : "string",
          "pattern" : "^arn:\\S+$"
        }
      },
      "required" : [ "IamRoleArn", "DeliveryStreamArn" ],
      "additionalProperties" : false
    },
    "SnsDestination" : {
      "type" : "object",
      "properties" : {
        "TopicArn" : {
          "description" : "The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.",
          "type" : "string",
          "pattern" : "^arn:\\S+$"
        }
      },
      "required" : [ "TopicArn" ],
      "additionalProperties" : false
    },
    "EventDestination" : {
      "type" : "object",
      "description" : "An event destination is a location where you send message events. The event options are Amazon CloudWatch, Amazon Data Firehose, or Amazon SNS. For example, when a message is delivered successfully, you can send information about that event to an event destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.",
      "properties" : {
        "EventDestinationName" : {
          "description" : "The name that identifies the event destination.",
          "type" : "string",
          "pattern" : "^[A-Za-z0-9_-]+$",
          "minLength" : 1,
          "maxLength" : 64
        },
        "Enabled" : {
          "description" : "When set to true events will be logged. By default this is set to true",
          "type" : "boolean"
        },
        "MatchingEventTypes" : {
          "description" : "An array of event types that determine which events to log. If 'ALL' is used, then AWS End User Messaging SMS and Voice logs every event type.",
          "type" : "array",
          "uniqueItems" : true,
          "insertionOrder" : false,
          "items" : {
            "type" : "string"
          }
        },
        "CloudWatchLogsDestination" : {
          "description" : "An object that contains IamRoleArn and LogGroupArn associated with an Amazon CloudWatch event destination.",
          "$ref" : "#/definitions/CloudWatchLogsDestination"
        },
        "KinesisFirehoseDestination" : {
          "description" : "An object that contains IamRoleArn and DeliveryStreamArn associated with an Amazon Kinesis Firehose event destination.",
          "$ref" : "#/definitions/KinesisFirehoseDestination"
        },
        "SnsDestination" : {
          "description" : "An object that contains SNS TopicArn event destination.",
          "$ref" : "#/definitions/SnsDestination"
        }
      },
      "required" : [ "EventDestinationName", "Enabled", "MatchingEventTypes" ],
      "oneOf" : [ {
        "required" : [ "CloudWatchLogsDestination" ]
      }, {
        "required" : [ "KinesisFirehoseDestination" ]
      }, {
        "required" : [ "SnsDestination" ]
      } ],
      "additionalProperties" : false
    }
  },
  "properties" : {
    "Arn" : {
      "type" : "string"
    },
    "ConfigurationSetName" : {
      "description" : "The name to use for the configuration set.",
      "type" : "string",
      "pattern" : "^[A-Za-z0-9_-]+$",
      "minLength" : 1,
      "maxLength" : 64
    },
    "DefaultSenderId" : {
      "description" : "The default sender ID to set for the ConfigurationSet.",
      "type" : "string",
      "pattern" : "^[A-Za-z0-9_-]+$"
    },
    "MessageFeedbackEnabled" : {
      "description" : "Set to true to enable message feedback.",
      "type" : "boolean"
    },
    "ProtectConfigurationId" : {
      "description" : "The unique identifier for the protect configuration to be associated to the configuration set.",
      "type" : "string",
      "pattern" : "^[A-Za-z0-9_:/-]+$",
      "minLength" : 1,
      "maxLength" : 256
    },
    "EventDestinations" : {
      "description" : "An event destination is a location where you send message events.",
      "type" : "array",
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/EventDestination"
      },
      "maxItems" : 5
    },
    "Tags" : {
      "description" : "An array of key-value pairs to apply to this resource.",
      "type" : "array",
      "uniqueItems" : true,
      "insertionOrder" : false,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    }
  },
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/ConfigurationSetName" ],
  "readOnlyProperties" : [ "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/ConfigurationSetName" ],
  "tagging" : {
    "taggable" : true,
    "tagOnCreate" : true,
    "tagUpdatable" : true,
    "cloudFormationSystemTags" : true,
    "tagProperty" : "/properties/Tags",
    "permissions" : [ "sms-voice:UntagResource", "sms-voice:TagResource", "sms-voice:ListTagsForResource" ]
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "sms-voice:CreateConfigurationSet", "sms-voice:DescribeConfigurationSets", "sms-voice:SetDefaultSenderId", "sms-voice:SetDefaultMessageFeedbackEnabled", "sms-voice:AssociateProtectConfiguration", "sms-voice:CreateEventDestination", "sms-voice:UpdateEventDestination", "sms-voice:TagResource", "sms-voice:ListTagsForResource", "iam:PassRole" ]
    },
    "read" : {
      "permissions" : [ "sms-voice:DescribeConfigurationSets", "sms-voice:ListTagsForResource" ]
    },
    "update" : {
      "permissions" : [ "sms-voice:DescribeConfigurationSets", "sms-voice:CreateEventDestination", "sms-voice:UpdateEventDestination", "sms-voice:DeleteEventDestination", "sms-voice:DeleteDefaultSenderId", "sms-voice:SetDefaultSenderId", "sms-voice:DeleteDefaultMessageFeedbackEnabled", "sms-voice:SetDefaultMessageFeedbackEnabled", "sms-voice:DisassociateProtectConfiguration", "sms-voice:AssociateProtectConfiguration", "sms-voice:UntagResource", "sms-voice:TagResource", "sms-voice:ListTagsForResource", "iam:PassRole" ]
    },
    "delete" : {
      "permissions" : [ "sms-voice:DescribeConfigurationSets", "sms-voice:DeleteConfigurationSet" ]
    },
    "list" : {
      "permissions" : [ "sms-voice:DescribeConfigurationSets" ]
    }
  }
}