-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Extend sns subscription data (#1424)
- Loading branch information
Showing
14 changed files
with
415 additions
and
155 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
plugins/source/aws/client/mocks/mock_sns.go → plugins/source/aws/client/mocks/sns.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
|
||
# Table: aws_sns_subscriptions | ||
A wrapper type for the attributes of an Amazon SNS subscription. | ||
Amazon SNS subscription | ||
## Columns | ||
| Name | Type | Description | | ||
| ------------- | ------------- | ----- | | ||
|account_id|text|The AWS Account ID of the resource.| | ||
|region|text|The AWS Region of the resource.| | ||
|endpoint|text|The subscription's endpoint (format depends on the protocol).| | ||
|owner|text|The subscription's owner.| | ||
|protocol|text|The subscription's protocol.| | ||
|arn|text|The subscription's ARN.| | ||
|topic_arn|text|The ARN of the subscription's topic.| | ||
|endpoint|text|The subscription's endpoint (format depends on the protocol)| | ||
|owner|text|The subscription's owner| | ||
|protocol|text|The subscription's protocol| | ||
|arn|text|The subscription's ARN| | ||
|topic_arn|text|The ARN of the subscription's topic| | ||
|confirmation_was_authenticated|boolean|True if the subscription confirmation request was authenticated| | ||
|delivery_policy|jsonb|The JSON serialization of the subscription's delivery policy| | ||
|effective_delivery_policy|jsonb|The JSON serialization of the effective delivery policy that takes into account the topic delivery policy and account system defaults| | ||
|filter_policy|jsonb|The filter policy JSON that is assigned to the subscription| | ||
|pending_confirmation|boolean|True if the subscription hasn't been confirmed| | ||
|raw_message_delivery|boolean|True if raw message delivery is enabled for the subscription| | ||
|redrive_policy|text|When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue| | ||
|subscription_role_arn|text|The ARN of the IAM role that has permission to write to the Kinesis Data Firehose delivery stream and has Amazon SNS listed as a trusted entity| | ||
|unknown_fields|jsonb|Other subscription attributes| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
|
||
# Table: aws_sns_topics | ||
AWS SNS topic | ||
Amazon SNS topic | ||
## Columns | ||
| Name | Type | Description | | ||
| ------------- | ------------- | ----- | | ||
|account_id|text|The AWS Account ID of the resource.| | ||
|region|text|The AWS Region of the resource.| | ||
|owner|text|The AWS account ID of the topic's owner.| | ||
|policy|jsonb|The JSON serialization of the topic's access control policy.| | ||
|delivery_policy|jsonb|The JSON serialization of the topic's delivery policy.| | ||
|display_name|text|The human-readable name used in the From field for notifications to email and email-json endpoints.| | ||
|subscriptions_confirmed|bigint|The number of confirmed subscriptions for the topic.| | ||
|subscriptions_deleted|bigint|The number of deleted subscriptions for the topic.| | ||
|subscriptions_pending|bigint|The number of subscriptions pending confirmation for the topic.| | ||
|effective_delivery_policy|jsonb|The JSON serialization of the effective delivery policy, taking system defaults into account.| | ||
|fifo_topic|boolean|When this is set to true, a FIFO topic is created.| | ||
|content_based_deduplication|boolean|Enables content-based deduplication for FIFO topics.| | ||
|kms_master_key_id|text|The ID of an AWS managed customer master key (CMK) for Amazon SNS or a custom CMK| | ||
|arn|text|The topic's ARN.| | ||
|tags|jsonb|Topic tags.| | ||
|tags|jsonb|| | ||
|delivery_policy|jsonb|The JSON serialization of the topic's delivery policy| | ||
|display_name|text|The human-readable name used in the From field for notifications to email and email-json endpoints| | ||
|owner|text|The AWS account ID of the topic's owner| | ||
|policy|jsonb|The JSON serialization of the topic's access control policy| | ||
|subscriptions_confirmed|bigint|The number of confirmed subscriptions for the topic| | ||
|subscriptions_deleted|bigint|The number of deleted subscriptions for the topic| | ||
|subscriptions_pending|bigint|The number of subscriptions pending confirmation for the topic| | ||
|arn|text|The Amazon Resource Name (ARN) of the topic| | ||
|effective_delivery_policy|jsonb|The JSON serialization of the effective delivery policy, taking system defaults into account| | ||
|kms_master_key_id|text|The ID of an Amazon Web Services managed customer master key (CMK) for Amazon SNS or a custom CMK| | ||
|fifo_topic|boolean|When this is set to true, a FIFO topic is created| | ||
|content_based_deduplication|boolean|Enables content-based deduplication for FIFO topics| | ||
|unknown_fields|jsonb|Other subscription attributes| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
plugins/source/aws/resources/services/sns/subscriptions.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//check-for-changes | ||
service = "aws" | ||
output_directory = "." | ||
add_generate = true | ||
|
||
description_modifier "remove_read_only" { | ||
words = [" This member is required."] | ||
} | ||
|
||
resource "aws" "sns" "subscriptions" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/resources/services/sns.Subscription" | ||
ignoreError "IgnoreCommonErrors" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/client.IgnoreCommonErrors" | ||
} | ||
deleteFilter "AccountRegionFilter" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/client.DeleteAccountRegionFilter" | ||
} | ||
multiplex "AwsAccountRegion" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/client.ServiceAccountRegionMultiplexer" | ||
params = ["sns"] | ||
} | ||
options { | ||
primary_keys = ["arn"] | ||
} | ||
userDefinedColumn "account_id" { | ||
description = "The AWS Account ID of the resource." | ||
type = "string" | ||
resolver "resolveAWSAccount" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/client.ResolveAWSAccount" | ||
} | ||
} | ||
userDefinedColumn "region" { | ||
type = "string" | ||
description = "The AWS Region of the resource." | ||
resolver "resolveAWSRegion" { | ||
path = "github.com/cloudquery/cloudquery/plugins/source/aws/client.ResolveAWSRegion" | ||
} | ||
} | ||
|
||
column "subscription" { | ||
skip_prefix = true | ||
} | ||
column "subscription_arn" { | ||
rename = "arn" | ||
} | ||
column "delivery_policy" { | ||
type = "json" | ||
} | ||
column "effective_delivery_policy" { | ||
type = "json" | ||
} | ||
column "filter_policy" { | ||
type = "json" | ||
} | ||
} |
Oops, something went wrong.