Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugins][feat] Add human readable kind names as well as kind descriptions #1813

Merged
merged 27 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
00ebeb1
Add display name and description to all base resources
lloesche Nov 1, 2023
6b50a64
Add display name and description to all vSphere resources
lloesche Nov 1, 2023
0a93c02
Add display name and description to all Slack resources
lloesche Nov 1, 2023
b2f4ad4
Add display name and description to all Scarf resources
lloesche Nov 1, 2023
b0b56cf
Add display name and description to all DockerHub, Github, OneLogin, …
lloesche Nov 1, 2023
16663a0
Add display name and description to all DigitalOcean resources
lloesche Nov 1, 2023
2279987
Add display name and description to all K8s resources
lloesche Nov 1, 2023
fbf254a
Update DigitalOcean Descriptions
lloesche Nov 1, 2023
cc6b5d9
Update vSphere Descriptions
lloesche Nov 1, 2023
ad4b3ec
Update GCP Descriptions
lloesche Nov 1, 2023
8ebc86f
Update AWS Descriptions
lloesche Nov 1, 2023
982055d
Update AWS linefeeds
lloesche Nov 1, 2023
9588776
Update GCP linefeeds
lloesche Nov 1, 2023
2f4795a
Update K8s linefeeds
lloesche Nov 1, 2023
9c694ef
Update vSphere linefeeds
lloesche Nov 1, 2023
2b0eb4d
Remove comment
lloesche Nov 1, 2023
64178bc
Update DigitalOcean linefeeds
lloesche Nov 1, 2023
91c2756
Let black mess the strings up
lloesche Nov 1, 2023
ceee335
Fix typo in K8s
lloesche Nov 1, 2023
60b7a1f
Update descriptions
lloesche Nov 2, 2023
77823a6
Update descriptions
lloesche Nov 2, 2023
ce5ba2d
Update descriptions
lloesche Nov 2, 2023
4643f9e
Update descriptions
lloesche Nov 3, 2023
65e4ff6
Update descriptions
lloesche Nov 3, 2023
957109d
Update GCP descriptions
lloesche Nov 7, 2023
4605eee
Update K8s descriptions
lloesche Nov 7, 2023
9a82370
Syntax
lloesche Nov 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions plugins/aws/resoto_plugin_aws/resource/apigateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def service_name(cls) -> str:
@define(eq=False, slots=False)
class AwsApiGatewayMethodResponse:
kind: ClassVar[str] = "aws_api_gateway_method_response"
kind_display: ClassVar[str] = "AWS API Gateway Method Response"
kind_description: ClassVar[str] = (
"API Gateway Method Response allows users to define the response parameters"
" and models for a particular method in the API Gateway service, which helps"
" in shaping the output of API responses."
)
mapping: ClassVar[Dict[str, Bender]] = {
"status_code": S("statusCode"),
"response_parameters": S("responseParameters"),
Expand All @@ -76,6 +82,11 @@ class AwsApiGatewayMethodResponse:
@define(eq=False, slots=False)
class AwsApiGatewayIntegrationResponse:
kind: ClassVar[str] = "aws_api_gateway_integration_response"
kind_display: ClassVar[str] = "AWS API Gateway Integration Response"
kind_description: ClassVar[str] = (
"API Gateway Integration Response is used to define the response structure"
" and mapping for an API Gateway integration."
)
mapping: ClassVar[Dict[str, Bender]] = {
"status_code": S("statusCode"),
"selection_pattern": S("selectionPattern"),
Expand All @@ -93,6 +104,12 @@ class AwsApiGatewayIntegrationResponse:
@define(eq=False, slots=False)
class AwsApiGatewayIntegration:
kind: ClassVar[str] = "aws_api_gateway_integration"
kind_display: ClassVar[str] = "AWS API Gateway Integration"
kind_description: ClassVar[str] = (
"API Gateway Integration is a feature provided by AWS API Gateway that allows"
" users to connect their APIs to other AWS services or external HTTP"
" endpoints."
)
mapping: ClassVar[Dict[str, Bender]] = {
"integration_type": S("type"),
"http_method": S("httpMethod"),
Expand Down Expand Up @@ -130,6 +147,12 @@ class AwsApiGatewayIntegration:
@define(eq=False, slots=False)
class AwsApiGatewayMethod:
kind: ClassVar[str] = "aws_api_gateway_method"
kind_display: ClassVar[str] = "AWS API Gateway Method"
kind_description: ClassVar[str] = (
"AWS API Gateway Method allows users to define the individual methods that"
" are available in a REST API, including the HTTP method and the integration"
" with backend services."
)
mapping: ClassVar[Dict[str, Bender]] = {
"http_method": S("httpMethod"),
"authorization_type": S("authorizationType"),
Expand Down Expand Up @@ -160,6 +183,11 @@ class AwsApiGatewayMethod:
class AwsApiGatewayResource(AwsResource):
# collection of resource resources happens in AwsApiGatewayRestApi.collect()
kind: ClassVar[str] = "aws_api_gateway_resource"
kind_display: ClassVar[str] = "AWS API Gateway Resource"
kind_description: ClassVar[str] = (
"API Gateway Resource is a logical unit used in API Gateway to represent a"
" part of an API's resource hierarchy."
)
reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_api_gateway_authorizer"]}}
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("id"),
Expand Down Expand Up @@ -207,6 +235,12 @@ def service_name(cls) -> str:
class AwsApiGatewayAuthorizer(AwsResource):
# collection of authorizer resources happens in AwsApiGatewayRestApi.collect()
kind: ClassVar[str] = "aws_api_gateway_authorizer"
kind_display: ClassVar[str] = "AWS API Gateway Authorizer"
kind_description: ClassVar[str] = (
"API Gateway Authorizers are mechanisms that help control access to APIs"
" deployed on AWS API Gateway by authenticating and authorizing client"
" requests."
)
reference_kinds: ClassVar[ModelReference] = {
"successors": {"default": ["aws_lambda_function"]},
"predecessors": {"default": ["aws_iam_role"], "delete": ["aws_lambda_function", "aws_iam_role"]},
Expand Down Expand Up @@ -270,6 +304,12 @@ def service_name(cls) -> str:
@define(eq=False, slots=False)
class AwsApiGatewayCanarySetting:
kind: ClassVar[str] = "aws_api_gateway_canary_setting"
kind_display: ClassVar[str] = "AWS API Gateway Canary Setting"
kind_description: ClassVar[str] = (
"API Gateway Canary Setting is a feature in AWS API Gateway that allows you"
" to test new deployments or changes to your APIs on a small percentage of"
" your traffic before rolling them out to the entire API."
)
mapping: ClassVar[Dict[str, Bender]] = {
"percent_traffic": S("percentTraffic"),
"deployment_id": S("deploymentId"),
Expand All @@ -286,6 +326,11 @@ class AwsApiGatewayCanarySetting:
class AwsApiGatewayStage(ApiGatewayTaggable, AwsResource):
# collection of stage resources happens in AwsApiGatewayRestApi.collect()
kind: ClassVar[str] = "aws_api_gateway_stage"
kind_display: ClassVar[str] = "AWS API Gateway Stage"
kind_description: ClassVar[str] = (
"API Gateway Stages are environment configurations for deploying and managing"
" APIs in the AWS API Gateway service."
)
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("syntheticId"), # created by Resoto to avoid collision with duplicate stage names
"name": S("stageName"),
Expand Down Expand Up @@ -342,6 +387,11 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]:
class AwsApiGatewayDeployment(AwsResource):
# collection of deployment resources happens in AwsApiGatewayRestApi.collect()
kind: ClassVar[str] = "aws_api_gateway_deployment"
kind_display: ClassVar[str] = "AWS API Gateway Deployment"
kind_description: ClassVar[str] = (
"API Gateway Deployments represents a deployment of an API to an API Gateway stage."
" This allows the API to be invocable by end-users."
)
# edge to aws_api_gateway_stage is established in AwsApiGatewayRestApi.collect()
reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_api_gateway_stage"]}}

Expand Down Expand Up @@ -379,6 +429,12 @@ def service_name(cls) -> str:
@define(eq=False, slots=False)
class AwsApiGatewayEndpointConfiguration:
kind: ClassVar[str] = "aws_api_gateway_endpoint_configuration"
kind_display: ClassVar[str] = "AWS API Gateway Endpoint Configuration"
kind_description: ClassVar[str] = (
"API Gateway Endpoint Configuration is a configuration that defines the"
" settings for an API Gateway endpoint, including the protocol, SSL"
" certificate, and custom domain name."
)
mapping: ClassVar[Dict[str, Bender]] = {
"types": S("types", default=[]),
"vpc_endpoint_ids": S("vpcEndpointIds", default=[]),
Expand All @@ -390,6 +446,11 @@ class AwsApiGatewayEndpointConfiguration:
@define(eq=False, slots=False)
class AwsApiGatewayRestApi(ApiGatewayTaggable, AwsResource):
kind: ClassVar[str] = "aws_api_gateway_rest_api"
kind_display: ClassVar[str] = "AWS API Gateway REST API"
kind_description: ClassVar[str] = (
"API Gateway is a fully managed service that makes it easy for developers to"
" create, publish, and manage APIs at any scale."
)
api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(
service_name, "get-rest-apis", "items", override_iam_permission="apigateway:GET"
)
Expand Down Expand Up @@ -521,6 +582,12 @@ def delete_resource(self, client: AwsClient, graph: Graph) -> bool:
@define(eq=False, slots=False)
class AwsApiGatewayMutualTlsAuthentication:
kind: ClassVar[str] = "aws_api_gateway_mutual_tls_authentication"
kind_display: ClassVar[str] = "AWS API Gateway Mutual TLS Authentication"
kind_description: ClassVar[str] = (
"API Gateway Mutual TLS Authentication enables mutual TLS authentication for"
" secure communication between clients and API Gateway, providing an"
" additional layer of security to protect the API endpoints."
)
mapping: ClassVar[Dict[str, Bender]] = {
"truststore_uri": S("truststoreUri"),
"truststore_version": S("truststoreVersion"),
Expand All @@ -534,6 +601,12 @@ class AwsApiGatewayMutualTlsAuthentication:
@define(eq=False, slots=False)
class AwsApiGatewayDomainName(ApiGatewayTaggable, AwsResource):
kind: ClassVar[str] = "aws_api_gateway_domain_name"
kind_display: ClassVar[str] = "AWS API Gateway Domain Name"
kind_description: ClassVar[str] = (
"API Gateway Domain Name is a custom domain name that you can associate with"
" your API in Amazon API Gateway, allowing you to have a more branded and"
" user-friendly endpoint for your API."
)
api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(
service_name, "get-domain-names", "items", override_iam_permission="apigateway:GET"
)
Expand Down
32 changes: 32 additions & 0 deletions plugins/aws/resoto_plugin_aws/resource/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
@define(eq=False, slots=False)
class AwsAthenaEncryptionConfiguration:
kind: ClassVar[str] = "aws_athena_encryption_configuration"
kind_display: ClassVar[str] = "AWS Athena Encryption Configuration"
kind_description: ClassVar[str] = (
"Athena Encryption Configuration is a feature in AWS Athena that allows users"
" to configure encryption settings for their query results."
)
mapping: ClassVar[Dict[str, Bender]] = {"encryption_option": S("EncryptionOption"), "kms_key": S("KmsKey")}
encryption_option: Optional[str] = None
kms_key: Optional[str] = None
Expand All @@ -27,6 +32,11 @@ class AwsAthenaEncryptionConfiguration:
@define(eq=False, slots=False)
class AwsAthenaResultConfiguration:
kind: ClassVar[str] = "aws_athena_result_configuration"
kind_display: ClassVar[str] = "AWS Athena Result Configuration"
kind_description: ClassVar[str] = (
"AWS Athena Result Configuration allows users to specify where query results"
" should be stored in Amazon S3 and how they should be encrypted."
)
mapping: ClassVar[Dict[str, Bender]] = {
"output_location": S("OutputLocation"),
"encryption_configuration": S("EncryptionConfiguration") >> Bend(AwsAthenaEncryptionConfiguration.mapping),
Expand All @@ -40,6 +50,11 @@ class AwsAthenaResultConfiguration:
@define(eq=False, slots=False)
class AwsAthenaEngineVersion:
kind: ClassVar[str] = "aws_athena_engine_version"
kind_display: ClassVar[str] = "AWS Athena Engine Version"
kind_description: ClassVar[str] = (
"AWS Athena Engine Version refers to the underlying query engine version, based on Presto,"
" that Amazon Athena uses to process SQL queries against datasets."
)
mapping: ClassVar[Dict[str, Bender]] = {
"selected_engine_version": S("SelectedEngineVersion"),
"effective_engine_version": S("EffectiveEngineVersion"),
Expand All @@ -51,6 +66,11 @@ class AwsAthenaEngineVersion:
@define(eq=False, slots=False)
class AwsAthenaWorkGroupConfiguration:
kind: ClassVar[str] = "aws_athena_work_group_configuration"
kind_display: ClassVar[str] = "AWS Athena Work Group Configuration"
kind_description: ClassVar[str] = (
"Athena work group configuration allows users to configure settings"
" for managing and executing queries in Athena."
)
mapping: ClassVar[Dict[str, Bender]] = {
"result_configuration": S("ResultConfiguration") >> Bend(AwsAthenaResultConfiguration.mapping),
"enforce_work_group_configuration": S("EnforceWorkGroupConfiguration"),
Expand All @@ -70,6 +90,12 @@ class AwsAthenaWorkGroupConfiguration:
@define(eq=False, slots=False)
class AwsAthenaWorkGroup(AwsResource):
kind: ClassVar[str] = "aws_athena_work_group"
kind_display: ClassVar[str] = "AWS Athena Work Group"
kind_description: ClassVar[str] = (
"Amazon Athena Work Groups are a resource type for isolating query execution and history among different"
" users, teams, or applications within the same AWS account, with features for access control, cost"
" management, and integration with AWS CloudWatch for metrics monitoring."
)
api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-work-groups", "WorkGroups")
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("Name"),
Expand Down Expand Up @@ -185,6 +211,12 @@ def delete_resource(self, client: AwsClient, graph: Graph) -> bool:
@define(eq=False, slots=False)
class AwsAthenaDataCatalog(AwsResource):
kind: ClassVar[str] = "aws_athena_data_catalog"
kind_display: ClassVar[str] = "AWS Athena Data Catalog"
kind_description: ClassVar[str] = (
"Athena Data Catalog is a managed metadata repository in AWS that allows you"
" to store and organize metadata about your data sources, such as databases,"
" tables, and partitions."
)
api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-data-catalogs", "DataCatalogsSummary")
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("Name"),
Expand Down
Loading
Loading