-
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(aws): Add Support for Eventbridge scheduler (#4693)
#### Summary <!-- Explain what problem this PR addresses --> <!--
- Loading branch information
Showing
18 changed files
with
619 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package recipes | ||
|
||
import ( | ||
"github.com/aws/aws-sdk-go-v2/service/scheduler" | ||
"github.com/aws/aws-sdk-go-v2/service/scheduler/types" | ||
"github.com/cloudquery/plugin-sdk/codegen" | ||
"github.com/cloudquery/plugin-sdk/schema" | ||
) | ||
|
||
func SchedulerResources() []*Resource { | ||
mx := `client.ServiceAccountRegionMultiplexer("scheduler")` | ||
resources := []*Resource{ | ||
{ | ||
SubService: "schedule_groups", | ||
Struct: new(types.ScheduleGroupSummary), | ||
Multiplex: mx, | ||
PKColumns: []string{"arn"}, | ||
ExtraColumns: append( | ||
defaultRegionalColumns, | ||
[]codegen.ColumnDefinition{ | ||
|
||
{ | ||
Name: "tags", | ||
Type: schema.TypeJSON, | ||
Resolver: `resolveSchedulerScheduleTags()`, | ||
}, | ||
}...), | ||
}, | ||
{ | ||
SubService: "schedules", | ||
Struct: new(scheduler.GetScheduleOutput), | ||
Multiplex: mx, | ||
PKColumns: []string{"arn"}, | ||
SkipFields: []string{"ResultMetadata"}, | ||
ExtraColumns: append( | ||
defaultRegionalColumns, | ||
[]codegen.ColumnDefinition{ | ||
|
||
{ | ||
Name: "tags", | ||
Type: schema.TypeJSON, | ||
Resolver: `resolveSchedulerScheduleTags()`, | ||
}, | ||
}...), | ||
PreResourceResolver: "getSchedule", | ||
}, | ||
} | ||
for _, r := range resources { | ||
r.Service = "scheduler" | ||
r.Description = "https://docs.aws.amazon.com/scheduler/latest/APIReference/API_" + r.StructName() + ".html" | ||
} | ||
return resources | ||
} |
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
22 changes: 22 additions & 0 deletions
22
plugins/source/aws/docs/tables/aws_scheduler_schedule_groups.md
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,22 @@ | ||
# Table: aws_scheduler_schedule_groups | ||
|
||
https://docs.aws.amazon.com/scheduler/latest/APIReference/API_ScheduleGroupSummary.html | ||
|
||
The primary key for this table is **arn**. | ||
|
||
|
||
## Columns | ||
| Name | Type | | ||
| ------------- | ------------- | | ||
|_cq_source_name|String| | ||
|_cq_sync_time|Timestamp| | ||
|_cq_id|UUID| | ||
|_cq_parent_id|UUID| | ||
|account_id|String| | ||
|region|String| | ||
|tags|JSON| | ||
|arn (PK)|String| | ||
|creation_date|Timestamp| | ||
|last_modification_date|Timestamp| | ||
|name|String| | ||
|state|String| |
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,31 @@ | ||
# Table: aws_scheduler_schedules | ||
|
||
https://docs.aws.amazon.com/scheduler/latest/APIReference/API_GetScheduleOutput.html | ||
|
||
The primary key for this table is **arn**. | ||
|
||
|
||
## Columns | ||
| Name | Type | | ||
| ------------- | ------------- | | ||
|_cq_source_name|String| | ||
|_cq_sync_time|Timestamp| | ||
|_cq_id|UUID| | ||
|_cq_parent_id|UUID| | ||
|account_id|String| | ||
|region|String| | ||
|tags|JSON| | ||
|arn (PK)|String| | ||
|creation_date|Timestamp| | ||
|description|String| | ||
|end_date|Timestamp| | ||
|flexible_time_window|JSON| | ||
|group_name|String| | ||
|kms_key_arn|String| | ||
|last_modification_date|Timestamp| | ||
|name|String| | ||
|schedule_expression|String| | ||
|schedule_expression_timezone|String| | ||
|start_date|Timestamp| | ||
|state|String| | ||
|target|JSON| |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.