Skip to content

Commit

Permalink
docs: proposed set of bindings for AWS - SNS and SQS (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: Dec Kolakowski <[email protected]>%0ACo-authored-by: Dec Kolakowski <[email protected]>%0ACo-authored-by: Lukasz Gornicki <[email protected]>%0ACo-authored-by: ssemyonov <[email protected]>
  • Loading branch information
iancooper and ssemyonov authored Jul 19, 2023
1 parent 676efb9 commit a7f7f64
Show file tree
Hide file tree
Showing 11 changed files with 1,391 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
/googlepubsub/ @whitlockjc
/solace/ @damaru-inc @CameronRushton
/pulsar/ @VisualBean
/sns/ @dpwdec @iancooper
/sqs/ @dpwdec @iancooper
*.json @KhudaDad414
273 changes: 269 additions & 4 deletions sns/README.md

Large diffs are not rendered by default.

Binary file added sns/SNS-HTTP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sns/SNS-SQS-Pub-Sub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 150 additions & 0 deletions sns/json_schemas/channel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/sns/channel.json",
"title": "Channel Schema",
"description": "This object contains information about the channel representation in SNS.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"name": {
"type": "string",
"description": "The name of the topic. Can be different from the channel name to allow flexibility around AWS resource naming limitations."
},
"ordering": {
"$ref": "#/definitions/ordering"
},
"policy": {
"$ref": "#/definitions/policy"
},
"tags": {
"type": "object",
"description": "Key-value pairs that represent AWS tags on the topic."
},
"bindingVersion": {
"type": "string",
"description": "The version of this binding.",
"default": "latest"
}
},
"required": [
"name"
],
"definitions": {
"ordering": {
"type": "object",
"description": "By default, we assume an unordered SNS topic. This field allows configuration of a FIFO SNS Topic.",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"type": {
"type": "string",
"description": "Defines the type of SNS Topic.",
"enum": [
"standard",
"FIFO"
]
},
"contentBasedDeduplication": {
"type": "boolean",
"description": "True to turn on de-duplication of messages for a channel."
}
},
"required": [
"type"
]
},
"policy": {
"type": "object",
"description": "The security policy for the SNS Topic.",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"statements": {
"type": "array",
"description": "An array of statement objects, each of which controls a permission for this topic",
"items": {
"$ref": "#/definitions/statement"
}
}
},
"required": [
"statements"
]
},
"statement": {
"type": "object",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"effect": {
"type": "string",
"enum": [
"Allow",
"Deny"
]
},
"principal": {
"description": "The AWS account or resource ARN that this statement applies to.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"action": {
"description": "The SNS permission being allowed or denied e.g. sns:Publish",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"required": [
"effect",
"principal",
"action"
]
}
},
"examples": [
{
"name": "my-sns-topic",
"policy": {
"statements": [
{
"effect": "Allow",
"principal": "*",
"action": "SNS:Publish"
}
]
}
}
]
}
Loading

0 comments on commit a7f7f64

Please sign in to comment.