From 0dd8f240c6bad701d30d1be64e3c5ba6f32db7d8 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Tue, 24 Sep 2024 16:56:50 +0200 Subject: [PATCH] [lib][chore] Rename internal properties with underscore (#2209) --- fixlib/fixlib/baseresources.py | 452 +++++++-------- fixlib/fixlib/core/model_check.py | 12 +- fixlib/fixlib/core/model_export.py | 14 +- fixlib/test/core/model_export_test.py | 2 +- plugins/aws/fix_plugin_aws/collector.py | 16 +- plugins/aws/fix_plugin_aws/resource/acm.py | 8 +- .../aws/fix_plugin_aws/resource/amazonq.py | 112 ++-- .../aws/fix_plugin_aws/resource/apigateway.py | 72 +-- plugins/aws/fix_plugin_aws/resource/athena.py | 22 +- .../fix_plugin_aws/resource/autoscaling.py | 10 +- plugins/aws/fix_plugin_aws/resource/backup.py | 122 ++-- plugins/aws/fix_plugin_aws/resource/base.py | 36 +- .../aws/fix_plugin_aws/resource/bedrock.py | 142 ++--- .../fix_plugin_aws/resource/cloudformation.py | 30 +- .../aws/fix_plugin_aws/resource/cloudfront.py | 106 ++-- .../aws/fix_plugin_aws/resource/cloudtrail.py | 12 +- .../aws/fix_plugin_aws/resource/cloudwatch.py | 36 +- .../aws/fix_plugin_aws/resource/cognito.py | 32 +- plugins/aws/fix_plugin_aws/resource/config.py | 10 +- .../aws/fix_plugin_aws/resource/dynamodb.py | 24 +- plugins/aws/fix_plugin_aws/resource/ec2.py | 228 ++++---- plugins/aws/fix_plugin_aws/resource/ecr.py | 10 +- plugins/aws/fix_plugin_aws/resource/ecs.py | 72 +-- plugins/aws/fix_plugin_aws/resource/efs.py | 34 +- plugins/aws/fix_plugin_aws/resource/eks.py | 24 +- .../fix_plugin_aws/resource/elasticache.py | 24 +- .../resource/elasticbeanstalk.py | 22 +- plugins/aws/fix_plugin_aws/resource/elb.py | 12 +- plugins/aws/fix_plugin_aws/resource/elbv2.py | 22 +- .../aws/fix_plugin_aws/resource/glacier.py | 24 +- plugins/aws/fix_plugin_aws/resource/iam.py | 76 +-- .../aws/fix_plugin_aws/resource/kinesis.py | 12 +- plugins/aws/fix_plugin_aws/resource/kms.py | 10 +- .../aws/fix_plugin_aws/resource/lambda_.py | 10 +- .../aws/fix_plugin_aws/resource/opensearch.py | 12 +- plugins/aws/fix_plugin_aws/resource/rds.py | 46 +- .../aws/fix_plugin_aws/resource/redshift.py | 12 +- .../aws/fix_plugin_aws/resource/route53.py | 36 +- plugins/aws/fix_plugin_aws/resource/s3.py | 20 +- .../aws/fix_plugin_aws/resource/sagemaker.py | 254 ++++----- .../fix_plugin_aws/resource/secretsmanager.py | 12 +- .../fix_plugin_aws/resource/service_quotas.py | 10 +- plugins/aws/fix_plugin_aws/resource/sns.py | 46 +- plugins/aws/fix_plugin_aws/resource/sqs.py | 12 +- plugins/aws/fix_plugin_aws/resource/ssm.py | 34 +- plugins/aws/fix_plugin_aws/resource/waf.py | 12 +- plugins/aws/test/collector_test.py | 8 +- .../resource/authorization.py | 28 +- .../azure/fix_plugin_azure/resource/base.py | 22 +- .../fix_plugin_azure/resource/compute.py | 128 ++--- .../resource/containerservice.py | 24 +- .../fix_plugin_azure/resource/cosmosdb.py | 264 ++++----- .../fix_plugin_azure/resource/keyvault.py | 26 +- .../resource/machinelearning.py | 290 +++++----- .../resource/microsoft_graph.py | 58 +- .../fix_plugin_azure/resource/monitor.py | 70 +-- .../azure/fix_plugin_azure/resource/mysql.py | 58 +- .../fix_plugin_azure/resource/network.py | 342 ++++++------ .../fix_plugin_azure/resource/postgresql.py | 44 +- .../fix_plugin_azure/resource/security.py | 32 +- .../fix_plugin_azure/resource/sql_server.py | 128 ++--- .../fix_plugin_azure/resource/storage.py | 50 +- .../azure/fix_plugin_azure/resource/web.py | 52 +- plugins/azure/test/collector_test.py | 8 +- .../fix_plugin_digitalocean/resources.py | 138 ++--- .../fix_plugin_dockerhub/resources.py | 8 +- plugins/gcp/fix_plugin_gcp/resources/base.py | 26 +- .../gcp/fix_plugin_gcp/resources/billing.py | 34 +- .../gcp/fix_plugin_gcp/resources/compute.py | 520 +++++++++--------- .../gcp/fix_plugin_gcp/resources/container.py | 18 +- .../gcp/fix_plugin_gcp/resources/sqladmin.py | 50 +- .../gcp/fix_plugin_gcp/resources/storage.py | 12 +- plugins/gcp/test/test_collector.py | 8 +- plugins/github/fix_plugin_github/resources.py | 24 +- .../hetzner/fix_plugin_hetzner/resources.py | 4 +- plugins/k8s/fix_plugin_k8s/base.py | 2 +- plugins/k8s/fix_plugin_k8s/resources.py | 208 +++---- plugins/k8s/tools/successors.py | 2 +- .../onelogin/fix_plugin_onelogin/__init__.py | 12 +- plugins/onprem/fix_plugin_onprem/resources.py | 16 +- .../posthog/fix_plugin_posthog/resources.py | 8 +- plugins/scarf/fix_plugin_scarf/resources.py | 8 +- plugins/slack/fix_plugin_slack/resources.py | 28 +- .../vsphere/fix_plugin_vsphere/resources.py | 36 +- 84 files changed, 2587 insertions(+), 2563 deletions(-) diff --git a/fixlib/fixlib/baseresources.py b/fixlib/fixlib/baseresources.py index 3fba4b47a0..46e50b1989 100644 --- a/fixlib/fixlib/baseresources.py +++ b/fixlib/fixlib/baseresources.py @@ -247,45 +247,61 @@ def __str__(self) -> str: @define(eq=False, slots=False, kw_only=True) class BaseResource(ABC): - """A BaseResource is any node we're connecting to the Graph() - - BaseResources have an id, name and tags. The id is a unique id used to search for - the resource within the Graph. The name is used for display purposes. Tags are - key/value pairs that get exported in the GRAPHML view. - - There's also class variables, kind, and reference_kinds. - `kind` is a string describing the type of resource, e.g. 'aws_ec2_instance' - or 'some_cloud_load_balancer'. - `reference_kinds` is a list of kinds that can be connected to this resource for - the related edge type as successor or predecessor. """ + Base class of all concrete resources. + """ + + ################################################################################ + # Class Variables + # Every concrete resource type needs to override and define its own kind. kind: ClassVar[str] = "resource" - kind_display: ClassVar[str] = "Resource" - kind_description: ClassVar[str] = "A generic resource." - kind_service: ClassVar[Optional[str]] = None - reference_kinds: ClassVar[ModelReference] = {} - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + # Human-readable name of the resource kind. + _kind_display: ClassVar[str] = "Resource" + # A description of the resource kind. + _kind_description: ClassVar[str] = "A generic resource." + # The cloud provider service that offers this resource kind. + _kind_service: ClassVar[Optional[str]] = None + # Define possible predecessors/successors of this resource kind. + _reference_kinds: ClassVar[ModelReference] = {} + # Metadata for the resource kind. + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + # Categories of this resource kind. + _categories: ClassVar[List[Category]] = [] + + ################################################################################ + # InstanceVariables + # Identifier of this resource. Does not need to be globally unique. chksum is used to compute a unique identifier. id: str + # List if key/value pairs that describe this resource. tags: Dict[str, Optional[str]] = Factory(dict) + # Name of this resource. name: Optional[str] = field(default=None) - _cloud: "Optional[BaseCloud]" = field(default=None, repr=False) - _account: "Optional[BaseAccount]" = field(default=None, repr=False) - _region: "Optional[BaseRegion]" = field(default=None, repr=False) - _zone: "Optional[BaseZone]" = field(default=None, repr=False) + # The related cloud provider of this resource. + _cloud: Optional[BaseCloud] = field(default=None, repr=False) + # The related account of this resource. + _account: Optional[BaseAccount] = field(default=None, repr=False) + # The related region of this resource. + _region: Optional[BaseRegion] = field(default=None, repr=False) + # The related zone of this resource. + _zone: Optional[BaseZone] = field(default=None, repr=False) + # The id provided by fixcore. Only used for resources loaded from fixcore. _fixcore_id: Optional[str] = field(default=None, repr=False) + # The revision id of this resource as defined by core. Only used for resources loaded from fixcore. _fixcore_revision: Optional[str] = field(default=None, repr=False) - _fixcore_query_tag: Optional[str] = field(default=None, repr=False) + # Indicates if this resource is marked for cleanup. _clean: bool = False + # Ephemeral state, indicating if this resource has been cleaned up. _cleaned: bool = False + # Indicates if this resource is protected and not allowed to change. _protected: bool = False + # List of deferred connections that need to be resolved in fixcore, after the resource is imported. _deferred_connections: List[Dict[str, Any]] = field(factory=list) + # Usage of this resource since the last collect for specific metrics. _resource_usage: Dict[MetricNameWithUnit, Dict[str, float]] = field(factory=lambda: defaultdict(dict)) - # Deep link into the cloud provider's console _provider_link: Optional[str] = None - _categories: ClassVar[List[Category]] = [] ctime: Optional[datetime] = field( default=None, @@ -738,7 +754,7 @@ def gather_categories(class_type: Type["BaseResource"]) -> List[Category]: @classmethod def categories(cls) -> List[str]: cs = {str(category.value) for category in cls.get_all_categories()} - if group := cls.metadata.get("group"): + if group := cls._metadata.get("group"): cs.add(group) return list(cs) @@ -754,8 +770,8 @@ def categories(cls) -> List[str]: @define(eq=False, slots=False) class PhantomBaseResource(BaseResource): kind: ClassVar[str] = "phantom_resource" - kind_display: ClassVar[str] = "Phantom Resource" - kind_description: ClassVar[str] = "A generic phantom resource." + _kind_display: ClassVar[str] = "Phantom Resource" + _kind_description: ClassVar[str] = "A generic phantom resource." def update_tag(self, key: str, value: str) -> bool: log.error(f"Resource {self.rtdname} is a phantom resource and does not maintain tags") @@ -776,11 +792,11 @@ def cleanup(self, graph: Optional[Any] = None) -> bool: @define(eq=False, slots=False) class BaseQuota(PhantomBaseResource): - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "management"} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "management"} kind: ClassVar[str] = "quota" - kind_display: ClassVar[str] = "Quota" - kind_description: ClassVar[str] = "A service quota." + _kind_display: ClassVar[str] = "Quota" + _kind_description: ClassVar[str] = "A service quota." quota: Optional[float] = None usage: Optional[float] = None quota_type: Optional[str] = None @@ -803,18 +819,18 @@ def usage_percentage(self) -> float: @define(eq=False, slots=False) class BaseType(BaseQuota): kind: ClassVar[str] = "type" - kind_display: ClassVar[str] = "Type" - kind_description: ClassVar[str] = "A generic type." - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} + _kind_display: ClassVar[str] = "Type" + _kind_description: ClassVar[str] = "A generic type." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} @define(eq=False, slots=False) class BaseInstanceQuota(BaseQuota): kind: ClassVar[str] = "instance_quota" - kind_display: ClassVar[str] = "Instance Quota" - kind_description: ClassVar[str] = "An instance quota." + _kind_display: ClassVar[str] = "Instance Quota" + _kind_description: ClassVar[str] = "An instance quota." instance_type: Optional[str] = None - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} def __attrs_post_init__(self) -> None: super().__attrs_post_init__() @@ -825,9 +841,9 @@ def __attrs_post_init__(self) -> None: @define(eq=False, slots=False) class BaseInstanceType(BaseType): kind: ClassVar[str] = "instance_type" - kind_display: ClassVar[str] = "Instance Type" - kind_description: ClassVar[str] = "An instance type." - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _kind_display: ClassVar[str] = "Instance Type" + _kind_description: ClassVar[str] = "An instance type." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} instance_type: Optional[str] = None instance_cores: float = 0.0 instance_memory: float = 0.0 @@ -847,9 +863,9 @@ def __attrs_post_init__(self) -> None: @define(eq=False, slots=False) class BaseCloud(PhantomBaseResource): kind: ClassVar[str] = "base_cloud" - kind_display: ClassVar[str] = "Cloud" - kind_description: ClassVar[str] = "A cloud." - metadata: ClassVar[Dict[str, Any]] = {"icon": "cloud", "group": "management"} + _kind_display: ClassVar[str] = "Cloud" + _kind_description: ClassVar[str] = "A cloud." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cloud", "group": "management"} def cloud(self, graph: Optional[Any] = None) -> BaseCloud: return self @@ -858,9 +874,9 @@ def cloud(self, graph: Optional[Any] = None) -> BaseCloud: @define(eq=False, slots=False) class BaseAccount(BaseResource): kind: ClassVar[str] = "account" - kind_display: ClassVar[str] = "Account" - kind_description: ClassVar[str] = "An account." - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} + _kind_display: ClassVar[str] = "Account" + _kind_description: ClassVar[str] = "An account." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} def account(self, graph: Optional[Any] = None) -> BaseAccount: return self @@ -869,9 +885,9 @@ def account(self, graph: Optional[Any] = None) -> BaseAccount: @define(eq=False, slots=False) class BaseRegion(PhantomBaseResource): kind: ClassVar[str] = "region" - kind_display: ClassVar[str] = "Region" - kind_description: ClassVar[str] = "A region." - metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "management"} + _kind_display: ClassVar[str] = "Region" + _kind_description: ClassVar[str] = "A region." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "management"} long_name: Optional[str] = None latitude: Optional[float] = None @@ -889,9 +905,9 @@ def region(self, graph: Optional[Any] = None) -> BaseRegion: @define(eq=False, slots=False) class BaseZone(PhantomBaseResource): kind: ClassVar[str] = "zone" - kind_display: ClassVar[str] = "Zone" - kind_description: ClassVar[str] = "A zone." - metadata: ClassVar[Dict[str, Any]] = {"icon": "zone", "group": "management"} + _kind_display: ClassVar[str] = "Zone" + _kind_description: ClassVar[str] = "A zone." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "zone", "group": "management"} long_name: Optional[str] = None @@ -910,9 +926,9 @@ class InstanceStatus(Enum): @define(eq=False, slots=False) class BaseInstance(BaseResource): kind: ClassVar[str] = "instance" - kind_display: ClassVar[str] = "Instance" - kind_description: ClassVar[str] = "An instance." - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _kind_display: ClassVar[str] = "Instance" + _kind_description: ClassVar[str] = "An instance." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} _categories: ClassVar[List[Category]] = [Category.compute] instance_cores: float = 0.0 instance_memory: float = 0.0 @@ -923,9 +939,9 @@ class BaseInstance(BaseResource): @define(eq=False, slots=False) class BaseVolumeType(BaseType): kind: ClassVar[str] = "volume_type" - kind_display: ClassVar[str] = "Volume Type" - kind_description: ClassVar[str] = "A volume type." - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} + _kind_display: ClassVar[str] = "Volume Type" + _kind_description: ClassVar[str] = "A volume type." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} volume_type: Optional[str] = None ondemand_cost: Optional[float] = None @@ -950,9 +966,9 @@ class VolumeStatus(Enum): @define(eq=False, slots=False) class BaseNetworkShare(BaseResource): kind: ClassVar[str] = "network_share" - kind_display: ClassVar[str] = "Network Share" - kind_description: ClassVar[str] = "A network share." - metadata: ClassVar[Dict[str, Any]] = {"icon": "network_share", "group": "storage"} + _kind_display: ClassVar[str] = "Network Share" + _kind_description: ClassVar[str] = "A network share." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network_share", "group": "storage"} _categories: ClassVar[List[Category]] = [Category.storage] share_size: int = 0 share_type: str = "" @@ -965,9 +981,9 @@ class BaseNetworkShare(BaseResource): @define(eq=False, slots=False) class BaseVolume(BaseResource): kind: ClassVar[str] = "volume" - kind_display: ClassVar[str] = "Volume" - kind_description: ClassVar[str] = "A volume." - metadata: ClassVar[Dict[str, Any]] = {"icon": "volume", "group": "storage"} + _kind_display: ClassVar[str] = "Volume" + _kind_description: ClassVar[str] = "A volume." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "volume", "group": "storage"} _categories: ClassVar[List[Category]] = [Category.storage] volume_size: int = 0 volume_type: str = "" @@ -981,9 +997,9 @@ class BaseVolume(BaseResource): @define(eq=False, slots=False) class BaseSnapshot(BaseResource): kind: ClassVar[str] = "snapshot" - kind_display: ClassVar[str] = "Snapshot" - kind_description: ClassVar[str] = "A snapshot." - metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} + _kind_display: ClassVar[str] = "Snapshot" + _kind_description: ClassVar[str] = "A snapshot." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} _categories: ClassVar[List[Category]] = [Category.storage] snapshot_status: str = "" description: Optional[str] = None @@ -997,9 +1013,9 @@ class BaseSnapshot(BaseResource): @define(eq=False, slots=False) class Cloud(BaseCloud): kind: ClassVar[str] = "cloud" - kind_display: ClassVar[str] = "Cloud" - kind_description: ClassVar[str] = "A cloud." - metadata: ClassVar[Dict[str, Any]] = {"icon": "cloud", "group": "management"} + _kind_display: ClassVar[str] = "Cloud" + _kind_description: ClassVar[str] = "A cloud." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cloud", "group": "management"} def delete(self, graph: Any) -> bool: return False @@ -1008,9 +1024,9 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class GraphRoot(PhantomBaseResource): kind: ClassVar[str] = "graph_root" - kind_display: ClassVar[str] = "Graph Root" - kind_description: ClassVar[str] = "The root of the graph." - metadata: ClassVar[Dict[str, Any]] = {"icon": "graph_root", "group": "management"} + _kind_display: ClassVar[str] = "Graph Root" + _kind_description: ClassVar[str] = "The root of the graph." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "graph_root", "group": "management"} def delete(self, graph: Any) -> bool: return False @@ -1019,36 +1035,36 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class BaseBucket(BaseResource): kind: ClassVar[str] = "bucket" - kind_display: ClassVar[str] = "Storage Bucket" - kind_description: ClassVar[str] = "A storage bucket." - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} + _kind_display: ClassVar[str] = "Storage Bucket" + _kind_description: ClassVar[str] = "A storage bucket." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} _categories: ClassVar[List[Category]] = [Category.storage] @define(eq=False, slots=False) class BaseQueue(BaseResource): kind: ClassVar[str] = "queue" - kind_display: ClassVar[str] = "Storage Queue" - kind_description: ClassVar[str] = "A storage queue." - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "storage"} + _kind_display: ClassVar[str] = "Storage Queue" + _kind_description: ClassVar[str] = "A storage queue." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "storage"} _categories: ClassVar[List[Category]] = [Category.storage] @define(eq=False, slots=False) class BaseServerlessFunction(BaseResource): kind: ClassVar[str] = "serverless_function" - kind_display: ClassVar[str] = "Serverless Function" - kind_description: ClassVar[str] = "A serverless function." - metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "compute"} + _kind_display: ClassVar[str] = "Serverless Function" + _kind_description: ClassVar[str] = "A serverless function." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "compute"} _categories: ClassVar[List[Category]] = [Category.compute] @define(eq=False, slots=False) class BaseKeyPair(BaseResource): kind: ClassVar[str] = "keypair" - kind_display: ClassVar[str] = "Key Pair" - kind_description: ClassVar[str] = "A key pair." - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} + _kind_display: ClassVar[str] = "Key Pair" + _kind_description: ClassVar[str] = "A key pair." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} fingerprint: str = "" _categories: ClassVar[List[Category]] = [Category.access_control] @@ -1056,34 +1072,34 @@ class BaseKeyPair(BaseResource): @define(eq=False, slots=False) class BaseBucketQuota(BaseQuota): kind: ClassVar[str] = "bucket_quota" - kind_display: ClassVar[str] = "Bucket Quota" - kind_description: ClassVar[str] = "A bucket quota." - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "storage"} + _kind_display: ClassVar[str] = "Bucket Quota" + _kind_description: ClassVar[str] = "A bucket quota." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "storage"} @define(eq=False, slots=False) class BaseNetwork(BaseResource): kind: ClassVar[str] = "network" - kind_display: ClassVar[str] = "Network" - kind_description: ClassVar[str] = "A network." - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Network" + _kind_description: ClassVar[str] = "A network." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseNetworkQuota(BaseQuota): kind: ClassVar[str] = "network_quota" - kind_display: ClassVar[str] = "Network Quota" - kind_description: ClassVar[str] = "A network quota." - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} + _kind_display: ClassVar[str] = "Network Quota" + _kind_description: ClassVar[str] = "A network quota." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} @define(eq=False, slots=False) class BaseFirewall(BaseResource): kind: ClassVar[str] = "firewall" - kind_display: ClassVar[str] = "Firewall" - kind_description: ClassVar[str] = "A firewall." - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Firewall" + _kind_description: ClassVar[str] = "A firewall." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking, Category.security] @@ -1099,17 +1115,17 @@ class DatabaseInstanceStatus(Enum): @define(eq=False, slots=False) class BaseDatabaseInstanceType(BaseInstanceType): kind: ClassVar[str] = "database_instance_type" - kind_display: ClassVar[str] = "Database Instance Type" - kind_description: ClassVar[str] = "A database instance type." - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Database Instance Type" + _kind_description: ClassVar[str] = "A database instance type." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} @define(eq=False, slots=False) class BaseDatabase(BaseResource): kind: ClassVar[str] = "database" - kind_display: ClassVar[str] = "Database" - kind_description: ClassVar[str] = "A database." - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Database" + _kind_description: ClassVar[str] = "A database." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} _categories: ClassVar[List[Category]] = [Category.compute, Category.database] db_type: Optional[str] = None db_status: Optional[DatabaseInstanceStatus] = None @@ -1125,9 +1141,9 @@ class BaseDatabase(BaseResource): @define(eq=False, slots=False) class BaseLoadBalancer(BaseResource): kind: ClassVar[str] = "load_balancer" - kind_display: ClassVar[str] = "Load Balancer" - kind_description: ClassVar[str] = "A load balancer." - metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} + _kind_display: ClassVar[str] = "Load Balancer" + _kind_description: ClassVar[str] = "A load balancer." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] lb_type: str = "" public_ip_address: Optional[str] = None @@ -1137,106 +1153,106 @@ class BaseLoadBalancer(BaseResource): @define(eq=False, slots=False) class BaseLoadBalancerQuota(BaseQuota): kind: ClassVar[str] = "load_balancer_quota" - kind_display: ClassVar[str] = "Load Balancer Quota" - kind_description: ClassVar[str] = "A load balancer quota." - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} + _kind_display: ClassVar[str] = "Load Balancer Quota" + _kind_description: ClassVar[str] = "A load balancer quota." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} @define(eq=False, slots=False) class BaseSubnet(BaseResource): kind: ClassVar[str] = "subnet" - kind_display: ClassVar[str] = "Subnet" - kind_description: ClassVar[str] = "A subnet." - metadata: ClassVar[Dict[str, Any]] = {"icon": "subnet", "group": "networking"} + _kind_display: ClassVar[str] = "Subnet" + _kind_description: ClassVar[str] = "A subnet." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "subnet", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseGateway(BaseResource): kind: ClassVar[str] = "gateway" - kind_display: ClassVar[str] = "Gateway" - kind_description: ClassVar[str] = "A gateway." - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Gateway" + _kind_description: ClassVar[str] = "A gateway." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseTunnel(BaseResource): kind: ClassVar[str] = "tunnel" - kind_display: ClassVar[str] = "Networking Tunnel" - kind_description: ClassVar[str] = "A networking tunnel." - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _kind_display: ClassVar[str] = "Networking Tunnel" + _kind_description: ClassVar[str] = "A networking tunnel." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseGatewayQuota(BaseQuota): kind: ClassVar[str] = "gateway_quota" - kind_display: ClassVar[str] = "Gateway Quota" - kind_description: ClassVar[str] = "A gateway quota." - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} + _kind_display: ClassVar[str] = "Gateway Quota" + _kind_description: ClassVar[str] = "A gateway quota." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "networking"} @define(eq=False, slots=False) class BaseSecurityGroup(BaseResource): kind: ClassVar[str] = "security_group" - kind_display: ClassVar[str] = "Security Group" - kind_description: ClassVar[str] = "A security group." - metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "networking"} + _kind_display: ClassVar[str] = "Security Group" + _kind_description: ClassVar[str] = "A security group." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking, Category.security] @define(eq=False, slots=False) class BaseRoutingTable(BaseResource): kind: ClassVar[str] = "routing_table" - kind_display: ClassVar[str] = "Routing Table" - kind_description: ClassVar[str] = "A routing table." - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Routing Table" + _kind_description: ClassVar[str] = "A routing table." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseRoute(BaseResource): kind: ClassVar[str] = "route" - kind_display: ClassVar[str] = "Network Route" - kind_description: ClassVar[str] = "A network route." - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Network Route" + _kind_description: ClassVar[str] = "A network route." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseNetworkAcl(BaseResource): kind: ClassVar[str] = "network_acl" - kind_display: ClassVar[str] = "Network ACL" - kind_description: ClassVar[str] = "A network access control list." - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} + _kind_display: ClassVar[str] = "Network ACL" + _kind_description: ClassVar[str] = "A network access control list." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking, Category.security] @define(eq=False, slots=False) class BasePeeringConnection(BaseResource): kind: ClassVar[str] = "peering_connection" - kind_display: ClassVar[str] = "Peering Connection" - kind_description: ClassVar[str] = "A peering connection." - metadata: ClassVar[Dict[str, Any]] = {"icon": "connection", "group": "networking"} + _kind_display: ClassVar[str] = "Peering Connection" + _kind_description: ClassVar[str] = "A peering connection." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "connection", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseEndpoint(BaseResource): kind: ClassVar[str] = "endpoint" - kind_display: ClassVar[str] = "Endpoint" - kind_description: ClassVar[str] = "An endpoint." - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Endpoint" + _kind_description: ClassVar[str] = "An endpoint." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] @define(eq=False, slots=False) class BaseNetworkInterface(BaseResource): kind: ClassVar[str] = "network_interface" - kind_display: ClassVar[str] = "Network Interface" - kind_description: ClassVar[str] = "A network interface." - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Network Interface" + _kind_description: ClassVar[str] = "A network interface." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] network_interface_status: str = "" network_interface_type: Optional[str] = None @@ -1250,65 +1266,65 @@ class BaseNetworkInterface(BaseResource): @define(eq=False, slots=False) class BaseIamPrincipal(BaseResource): kind: ClassVar[str] = "iam_principal" - kind_display: ClassVar[str] = "IAM Principal" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "IAM Principal" + _kind_description: ClassVar[str] = ( "An IAM principal is an entity that can be authenticated and authorized to access resources." ) - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BaseUser(BaseResource): kind: ClassVar[str] = "user" - kind_display: ClassVar[str] = "User" - kind_description: ClassVar[str] = "A user." - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _kind_display: ClassVar[str] = "User" + _kind_description: ClassVar[str] = "A user." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BaseGroup(BaseResource): kind: ClassVar[str] = "group" - kind_display: ClassVar[str] = "Group" - kind_description: ClassVar[str] = "A group." - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} + _kind_display: ClassVar[str] = "Group" + _kind_description: ClassVar[str] = "A group." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BasePolicy(BaseResource): kind: ClassVar[str] = "policy" - kind_display: ClassVar[str] = "Policy" - kind_description: ClassVar[str] = "A policy." - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "access_control"} + _kind_display: ClassVar[str] = "Policy" + _kind_description: ClassVar[str] = "A policy." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BaseRole(BaseResource): kind: ClassVar[str] = "role" - kind_display: ClassVar[str] = "Role" - kind_description: ClassVar[str] = "A role." - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_display: ClassVar[str] = "Role" + _kind_description: ClassVar[str] = "A role." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BaseInstanceProfile(BaseResource): kind: ClassVar[str] = "instance_profile" - kind_display: ClassVar[str] = "Instance Profile" - kind_description: ClassVar[str] = "An instance profile." - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "access_control"} + _kind_display: ClassVar[str] = "Instance Profile" + _kind_description: ClassVar[str] = "An instance profile." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control] @define(eq=False, slots=False) class BaseAccessKey(BaseResource): kind: ClassVar[str] = "access_key" - kind_display: ClassVar[str] = "Access Key" - kind_description: ClassVar[str] = "An access key." - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} + _kind_display: ClassVar[str] = "Access Key" + _kind_description: ClassVar[str] = "An access key." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} access_key_status: str = "" _categories: ClassVar[List[Category]] = [Category.access_control, Category.security] @@ -1316,9 +1332,9 @@ class BaseAccessKey(BaseResource): @define(eq=False, slots=False) class BaseCertificate(BaseResource): kind: ClassVar[str] = "certificate" - kind_display: ClassVar[str] = "Certificate" - kind_description: ClassVar[str] = "A certificate." - metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "access_control"} + _kind_display: ClassVar[str] = "Certificate" + _kind_description: ClassVar[str] = "A certificate." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "access_control"} _categories: ClassVar[List[Category]] = [Category.access_control, Category.security] expires: Optional[datetime] = None dns_names: Optional[List[str]] = None @@ -1328,17 +1344,17 @@ class BaseCertificate(BaseResource): @define(eq=False, slots=False) class BaseCertificateQuota(BaseQuota): kind: ClassVar[str] = "certificate_quota" - kind_display: ClassVar[str] = "Certificate Quota" - kind_description: ClassVar[str] = "A certificate quota." - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "access_control"} + _kind_display: ClassVar[str] = "Certificate Quota" + _kind_description: ClassVar[str] = "A certificate quota." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "access_control"} @define(eq=False, slots=False) class BaseStack(BaseResource): kind: ClassVar[str] = "stack" - kind_display: ClassVar[str] = "Stack" - kind_description: ClassVar[str] = "A stack." - metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} + _kind_display: ClassVar[str] = "Stack" + _kind_description: ClassVar[str] = "A stack." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} stack_status: str = "" stack_status_reason: str = "" stack_parameters: Dict[str, str] = field(factory=dict) @@ -1348,9 +1364,9 @@ class BaseStack(BaseResource): @define(eq=False, slots=False) class BaseAutoScalingGroup(BaseResource): kind: ClassVar[str] = "autoscaling_group" - kind_display: ClassVar[str] = "Auto Scaling Group" - kind_description: ClassVar[str] = "An auto scaling group." - metadata: ClassVar[Dict[str, Any]] = {"icon": "autoscaling_group", "group": "compute"} + _kind_display: ClassVar[str] = "Auto Scaling Group" + _kind_description: ClassVar[str] = "An auto scaling group." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "autoscaling_group", "group": "compute"} _categories: ClassVar[List[Category]] = [Category.compute, Category.management] min_size: Optional[int] = None max_size: Optional[int] = None @@ -1359,9 +1375,9 @@ class BaseAutoScalingGroup(BaseResource): @define(eq=False, slots=False) class BaseIPAddress(BaseResource): kind: ClassVar[str] = "ip_address" - kind_display: ClassVar[str] = "IP Address" - kind_description: ClassVar[str] = "An IP address." - metadata: ClassVar[Dict[str, Any]] = {"icon": "network_address", "group": "networking"} + _kind_display: ClassVar[str] = "IP Address" + _kind_description: ClassVar[str] = "An IP address." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network_address", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.networking] ip_address: Optional[str] = None ip_address_family: str = "" @@ -1370,9 +1386,9 @@ class BaseIPAddress(BaseResource): @define(eq=False, slots=False) class BaseHealthCheck(BaseResource): kind: ClassVar[str] = "health_check" - kind_display: ClassVar[str] = "Health Check" - kind_description: ClassVar[str] = "A health check." - metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "compute"} + _kind_display: ClassVar[str] = "Health Check" + _kind_description: ClassVar[str] = "A health check." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "compute"} _categories: ClassVar[List[Category]] = [Category.monitoring] check_interval: Optional[int] = None healthy_threshold: Optional[int] = None @@ -1384,18 +1400,18 @@ class BaseHealthCheck(BaseResource): @define(eq=False, slots=False) class BaseDNSZone(BaseResource): kind: ClassVar[str] = "dns_zone" - kind_display: ClassVar[str] = "DNS Zone" - kind_description: ClassVar[str] = "A DNS zone." - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _kind_display: ClassVar[str] = "DNS Zone" + _kind_description: ClassVar[str] = "A DNS zone." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.dns, Category.networking] @define(eq=False, slots=False) class BaseDNSRecordSet(BaseResource): kind: ClassVar[str] = "dns_record_set" - kind_display: ClassVar[str] = "DNS Record Set" - kind_description: ClassVar[str] = "A DNS record set." - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _kind_display: ClassVar[str] = "DNS Record Set" + _kind_description: ClassVar[str] = "A DNS record set." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.dns] record_ttl: Optional[int] = None @@ -1431,9 +1447,9 @@ def _keys(self) -> tuple[Any, ...]: @define(eq=False, slots=False) class BaseDNSRecord(BaseResource): kind: ClassVar[str] = "dns_record" - kind_display: ClassVar[str] = "DNS Record" - kind_description: ClassVar[str] = "A DNS record." - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} + _kind_display: ClassVar[str] = "DNS Record" + _kind_description: ClassVar[str] = "A DNS record." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} _categories: ClassVar[List[Category]] = [Category.dns] record_ttl: int = -1 @@ -1483,27 +1499,27 @@ def _keys(self) -> tuple[Any, ...]: @define(eq=False, slots=False) class BaseOrganizationalRoot(BaseResource): kind: ClassVar[str] = "organizational_root" - kind_display: ClassVar[str] = "Organizational Root" - kind_description: ClassVar[str] = "An Organizational Root." - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Organizational Root" + _kind_description: ClassVar[str] = "An Organizational Root." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} _categories: ClassVar[List[Category]] = [Category.management] @define(eq=False, slots=False) class BaseOrganizationalUnit(BaseResource): kind: ClassVar[str] = "organizational_unit" - kind_display: ClassVar[str] = "Organizational Unit" - kind_description: ClassVar[str] = "An Organizational Unit." - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Organizational Unit" + _kind_description: ClassVar[str] = "An Organizational Unit." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} _categories: ClassVar[List[Category]] = [Category.management] @define(eq=False, slots=False) class BaseManagedKubernetesClusterProvider(BaseResource): kind: ClassVar[str] = "managed_kubernetes_cluster_provider" - kind_display: ClassVar[str] = "Managed Kubernetes Cluster Provider" - kind_description: ClassVar[str] = "A managed kubernetes cluster provider." - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "compute"} + _kind_display: ClassVar[str] = "Managed Kubernetes Cluster Provider" + _kind_description: ClassVar[str] = "A managed kubernetes cluster provider." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "compute"} _categories: ClassVar[List[Category]] = [Category.compute, Category.management] version: Optional[str] = field(default=None, metadata={"description": "The kubernetes version"}) endpoint: Optional[str] = field(default=None, metadata={"description": "The kubernetes API endpoint"}) @@ -1512,33 +1528,33 @@ class BaseManagedKubernetesClusterProvider(BaseResource): @define(eq=False, slots=False) class BaseAIResource(BaseResource): kind: ClassVar[str] = "ai_resource" - kind_display: ClassVar[str] = "AI resource" - kind_description: ClassVar[str] = "An AI Resource." - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "AI resource" + _kind_description: ClassVar[str] = "An AI Resource." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} _categories: ClassVar[List[Category]] = [Category.ai, Category.compute] @define(eq=False, slots=False) class BaseAIJob(BaseAIResource): kind: ClassVar[str] = "ai_job" - kind_display: ClassVar[str] = "AI Job" - kind_description: ClassVar[str] = "An AI Job resource." - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _kind_display: ClassVar[str] = "AI Job" + _kind_description: ClassVar[str] = "An AI Job resource." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} @define(eq=False, slots=False) class BaseAIModel(BaseAIResource): kind: ClassVar[str] = "ai_model" - kind_display: ClassVar[str] = "AI Model" - kind_description: ClassVar[str] = "An AI Model resource." - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "AI Model" + _kind_description: ClassVar[str] = "An AI Model resource." + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} @define(eq=False, slots=False) class UnknownCloud(BaseCloud): kind: ClassVar[str] = "unknown_cloud" - kind_display: ClassVar[str] = "Unknown Cloud" - kind_description: ClassVar[str] = "An unknown cloud." + _kind_display: ClassVar[str] = "Unknown Cloud" + _kind_description: ClassVar[str] = "An unknown cloud." def delete(self, graph: Any) -> bool: return False @@ -1547,8 +1563,8 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class UnknownAccount(BaseAccount): kind: ClassVar[str] = "unknown_account" - kind_display: ClassVar[str] = "Unknown Account" - kind_description: ClassVar[str] = "An unknown account." + _kind_display: ClassVar[str] = "Unknown Account" + _kind_description: ClassVar[str] = "An unknown account." def delete(self, graph: Any) -> bool: return False @@ -1557,8 +1573,8 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class UnknownRegion(BaseRegion): kind: ClassVar[str] = "unknown_region" - kind_display: ClassVar[str] = "Unknown Region" - kind_description: ClassVar[str] = "An unknown region." + _kind_display: ClassVar[str] = "Unknown Region" + _kind_description: ClassVar[str] = "An unknown region." def delete(self, graph: Any) -> bool: return False @@ -1567,8 +1583,8 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class UnknownDNSZone(BaseDNSZone): kind: ClassVar[str] = "unknown_dns_zone" - kind_display: ClassVar[str] = "Unknown DNS Zone" - kind_description: ClassVar[str] = "An unknown DNS zone." + _kind_display: ClassVar[str] = "Unknown DNS Zone" + _kind_description: ClassVar[str] = "An unknown DNS zone." def delete(self, graph: Any) -> bool: return False @@ -1577,8 +1593,8 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class UnknownZone(BaseZone): kind: ClassVar[str] = "unknown_zone" - kind_display: ClassVar[str] = "Unknown Zone" - kind_description: ClassVar[str] = "An unknown zone." + _kind_display: ClassVar[str] = "Unknown Zone" + _kind_description: ClassVar[str] = "An unknown zone." def delete(self, graph: Any) -> bool: return False @@ -1587,8 +1603,8 @@ def delete(self, graph: Any) -> bool: @define(eq=False, slots=False) class UnknownLocation(BaseResource): kind: ClassVar[str] = "unknown_location" - kind_display: ClassVar[str] = "Unknown Location" - kind_description: ClassVar[str] = "An unknown location." + _kind_display: ClassVar[str] = "Unknown Location" + _kind_description: ClassVar[str] = "An unknown location." def delete(self, graph: Any) -> bool: return False diff --git a/fixlib/fixlib/core/model_check.py b/fixlib/fixlib/core/model_check.py index 978785e23e..9d811b2035 100644 --- a/fixlib/fixlib/core/model_check.py +++ b/fixlib/fixlib/core/model_check.py @@ -139,14 +139,14 @@ def check_model_class(clazz: Type[BaseResource]) -> None: kind = clazz.kind if any(kind.startswith(a) for a in ["aws", "gcp", "azure", "microsoft"]): # only selected providers support this props = vars(clazz) - if "kind_display" not in props: - raise AttributeError(f"Class {name} does not have a kind_display attribute") - assert clazz.kind_service is not None, f"Class {name} does not have a kind_service attribute" + if "_kind_display" not in props: + raise AttributeError(f"Class {name} does not have a _kind_display attribute") + assert clazz._kind_service is not None, f"Class {name} does not have a _kind_service attribute" - # make sure metadata is valid - if icon := clazz.metadata.get("icon"): + # make sure _metadata is valid + if icon := clazz._metadata.get("icon"): assert icon in ResourceIcons, f"{name} has unknown icon {icon}" - if group := clazz.metadata.get("group"): + if group := clazz._metadata.get("group"): assert group in ResourceGroups, f"{name} has unknown group {group}" diff --git a/fixlib/fixlib/core/model_export.py b/fixlib/fixlib/core/model_export.py index 4da6ab8000..5a60dad2f6 100644 --- a/fixlib/fixlib/core/model_export.py +++ b/fixlib/fixlib/core/model_export.py @@ -193,7 +193,9 @@ def json( meta: Optional[Dict[str, str]], **kwargs: Any, ) -> Json: - js = {"name": name, "kind": kind_str, "required": required, "description": description, **kwargs} + js = {"name": name, "kind": kind_str, "required": required, **kwargs} + if description: + js["description"] = description if meta: js["metadata"] = meta return js @@ -227,7 +229,7 @@ def json( if succs := getattr(clazz, "successor_kinds", None): for edge_type, values in succs.items(): successors[name][edge_type].extend(values) - if refs := getattr(clazz, "reference_kinds", None): + if refs := getattr(clazz, "_reference_kinds", None): if succs := refs.get("successors", None): for edge_type, values in succs.items(): successors[name][edge_type].extend(values) @@ -247,11 +249,11 @@ def export_data_class(clazz: type) -> None: root = any(sup == aggregate_root for sup in clazz.mro()) if aggregate_root else True kind = model_name(clazz) metadata: Json = {} - if (m := getattr(clazz, "metadata", None)) and isinstance(m, dict): + if (m := getattr(clazz, "_metadata", None)) and isinstance(m, dict): metadata = m.copy() - if (s := clazz.__dict__.get("kind_display", None)) and isinstance(s, str): + if (s := clazz.__dict__.get("_kind_display", None)) and isinstance(s, str): metadata["name"] = s - if (s := getattr(clazz, "kind_service", None)) and isinstance(s, str): + if (s := getattr(clazz, "_kind_service", None)) and isinstance(s, str): metadata["service"] = s if (slc := getattr(clazz, "categories", None)) and callable(slc) and (sl := slc()): metadata["categories"] = sl @@ -259,7 +261,7 @@ def export_data_class(clazz: type) -> None: with_kind_description and (ar := aggregate_root) and issubclass(clazz, ar) - and (s := clazz.__dict__.get("kind_description", None)) + and (s := clazz.__dict__.get("_kind_description", None)) and isinstance(s, str) ): metadata["description"] = s diff --git a/fixlib/test/core/model_export_test.py b/fixlib/test/core/model_export_test.py index 4bcfabeba3..2708770efd 100644 --- a/fixlib/test/core/model_export_test.py +++ b/fixlib/test/core/model_export_test.py @@ -47,7 +47,7 @@ class DataClassExample(DataClassBase): successor_kinds: ClassVar[Dict[str, List[str]]] = { "default": ["example"], } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["base"]}, "predecessors": {"delete": ["other"]}, } diff --git a/plugins/aws/fix_plugin_aws/collector.py b/plugins/aws/fix_plugin_aws/collector.py index eec170c98c..3ddbb8c1d3 100644 --- a/plugins/aws/fix_plugin_aws/collector.py +++ b/plugins/aws/fix_plugin_aws/collector.py @@ -460,16 +460,16 @@ def add_accounts(parent: Union[AwsOrganizationalRoot, AwsOrganizationalUnit]) -> @define(eq=False, slots=False) class AwsOrganizationalRoot(BaseOrganizationalRoot, AwsResource): kind: ClassVar[str] = "aws_organizational_root" - kind_display: ClassVar[str] = "AWS Organizational Root" - kind_description: ClassVar[str] = "An AWS Organizational Root is the root of an AWS Organization." - kind_service = "organizations" - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _kind_display: ClassVar[str] = "AWS Organizational Root" + _kind_description: ClassVar[str] = "An AWS Organizational Root is the root of an AWS Organization." + _kind_service = "organizations" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} @define(eq=False, slots=False) class AwsOrganizationalUnit(BaseOrganizationalUnit, AwsResource): kind: ClassVar[str] = "aws_organizational_unit" - kind_display: ClassVar[str] = "AWS Organizational Unit" - kind_description: ClassVar[str] = "An AWS Organizational Unit is a container for AWS Accounts." - kind_service = "organizations" - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _kind_display: ClassVar[str] = "AWS Organizational Unit" + _kind_description: ClassVar[str] = "An AWS Organizational Unit is a container for AWS Accounts." + _kind_service = "organizations" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} diff --git a/plugins/aws/fix_plugin_aws/resource/acm.py b/plugins/aws/fix_plugin_aws/resource/acm.py index 0575cbd0de..e30f720bb9 100644 --- a/plugins/aws/fix_plugin_aws/resource/acm.py +++ b/plugins/aws/fix_plugin_aws/resource/acm.py @@ -69,10 +69,10 @@ class AwsAcmExtendedKeyUsage: @define(eq=False, slots=False) class AwsAcmCertificate(AwsResource, BaseCertificate): kind: ClassVar[str] = "aws_acm_certificate" - kind_display: ClassVar[str] = "AWS ACM Certificate" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/acm/home?region={region}#/certificates/{id}", "arn_tpl": "arn:{partition}:acm:{region}:{account}:certificate/{id}"} # fmt: skip - kind_description: ClassVar[str] = "An AWS ACM Certificate is used to provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for secure web traffic on AWS services." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name + _kind_display: ClassVar[str] = "AWS ACM Certificate" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/acm/home?region={region}#/certificates/{id}", "arn_tpl": "arn:{partition}:acm:{region}:{account}:certificate/{id}"} # fmt: skip + _kind_description: ClassVar[str] = "An AWS ACM Certificate is used to provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for secure web traffic on AWS services." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("acm", "describe-certificate", "Certificate") mapping: ClassVar[Dict[str, Bender]] = { "id": S("CertificateArn") >> F(AwsResource.id_from_arn), diff --git a/plugins/aws/fix_plugin_aws/resource/amazonq.py b/plugins/aws/fix_plugin_aws/resource/amazonq.py index 5f4c95d9ca..163c7979a1 100644 --- a/plugins/aws/fix_plugin_aws/resource/amazonq.py +++ b/plugins/aws/fix_plugin_aws/resource/amazonq.py @@ -47,18 +47,18 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQBusinessApplication(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_application" - kind_display: ClassVar[str] = "AWS QBusiness Application" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Application" + _kind_description: ClassVar[str] = ( "Represents a QBusiness application within the AWS QBusiness service. Applications" " define a set of tasks and configuration for processing data within the QBusiness ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = { "provider_link_tpl": "https://{region_id}.console.aws.amazon.com/amazonq/business/applications/{id}/details?region={region}", # fmt: skip "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{id}", } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "aws_q_business_conversation", @@ -313,13 +313,13 @@ def collect_index_resources( @define(eq=False, slots=False) class AwsQBusinessConversation(AwsResource): kind: ClassVar[str] = "aws_q_business_conversation" - kind_display: ClassVar[str] = "AWS QBusiness Conversation" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Conversation" + _kind_description: ClassVar[str] = ( "Represents a conversation within the AWS QBusiness service. Conversations are" " interactions that involve a series of messages or data exchanges." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AwsQBusinessApplication() mapping: ClassVar[Dict[str, Bender]] = { "id": S("conversationId"), @@ -347,15 +347,15 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQBusinessDataSource(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_data_source" - kind_display: ClassVar[str] = "AWS QBusiness Data Source" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Data Source" + _kind_description: ClassVar[str] = ( "Represents a data source in the AWS QBusiness service. Data sources are the origins" " from which data is ingested for processing or analysis within the QBusiness framework." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "ai"} # Collected via AwsQBusinessApplication() - aws_metadata: ClassVar[Dict[str, Any]] = { + _aws_metadata: ClassVar[Dict[str, Any]] = { "provider_link_tpl": "https://{region_id}.console.aws.amazon.com/amazonq/business/applications/{application_id}/indices/{indice_id}/datasources/{id}/details?region={region}", # fmt: skip "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{application_id}/index/{indice_id}/data-source/{id}", "extra_args_for_arn": ["application_id", "indice_id"], @@ -437,13 +437,13 @@ class AwsQBusinessDataSourceSyncJobMetrics: @define(eq=False, slots=False) class AwsQBusinessDataSourceSyncJob(AwsResource): kind: ClassVar[str] = "aws_q_business_data_source_sync_job" - kind_display: ClassVar[str] = "AWS QBusiness Data Source Sync Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Data Source Sync Job" + _kind_description: ClassVar[str] = ( "Represents a data source synchronization job in the AWS QBusiness service. Sync jobs" " ensure that data from data sources is up-to-date and correctly integrated into the system." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} # Collected via AwsQBusinessApplication() mapping: ClassVar[Dict[str, Bender]] = { "id": S("executionId"), @@ -479,13 +479,13 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQBusinessDocument(AwsResource): kind: ClassVar[str] = "aws_q_business_document" - kind_display: ClassVar[str] = "AWS QBusiness Document" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Document" + _kind_description: ClassVar[str] = ( "Represents a document within the AWS QBusiness service. Documents are structured pieces" " of information that can be used for various purposes within the QBusiness ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} # Collected via AwsQBusinessApplication() mapping: ClassVar[Dict[str, Bender]] = { "id": S("documentId"), @@ -519,14 +519,14 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQBusinessIndice(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_indice" - kind_display: ClassVar[str] = "AWS QBusiness Indice" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Indice" + _kind_description: ClassVar[str] = ( "Represents an index in the AWS QBusiness service. Indices are used to organize and" " facilitate efficient searching and retrieval of data within the QBusiness framework." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = { "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{application_id}/index/{id}", "extra_args_for_arn": ["application_id"], } @@ -700,13 +700,13 @@ class AwsQBusinessActionExecution: @define(eq=False, slots=False) class AwsQBusinessMessage(AwsResource): kind: ClassVar[str] = "aws_q_business_message" - kind_display: ClassVar[str] = "AWS QBusiness Message" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Message" + _kind_description: ClassVar[str] = ( "Represents a message within the AWS QBusiness service. Messages are used for communication" " or data exchange between various components or users within the QBusiness ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} # Collected via AwsQBusinessApplication() mapping: ClassVar[Dict[str, Bender]] = { "id": S("messageId"), @@ -744,14 +744,14 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQBusinessPlugin(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_plugin" - kind_display: ClassVar[str] = "AWS QBusiness Plugin" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QBusiness Plugin" + _kind_description: ClassVar[str] = ( "Represents a plugin in the AWS QBusiness service. Plugins extend the functionality of" " the QBusiness framework by adding new features or capabilities." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = { "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{application_id}/plugin/{id}", "extra_args_for_arn": ["application_id"], } @@ -810,14 +810,14 @@ def delete_resource(self, client: AwsClient, graph: Graph) -> bool: @define(eq=False, slots=False) class AwsQBusinessRetriever(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_retriever" - kind_display: ClassVar[str] = "AWS Q Business Retriever" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Q Business Retriever" + _kind_description: ClassVar[str] = ( "Represents a retriever in the AWS QBusiness service. Retrievers are used to fetch and" " process data from various sources within the QBusiness ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = { "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{application_id}/retriever/{id}", "extra_args_for_arn": ["application_id"], } @@ -867,14 +867,14 @@ def delete_resource(self, client: AwsClient, graph: Graph) -> bool: @define(eq=False, slots=False) class AwsQBusinessWebExperience(AmazonQTaggable, AwsResource): kind: ClassVar[str] = "aws_q_business_web_experience" - kind_display: ClassVar[str] = "AWS Q Business Web Experience" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Q Business Web Experience" + _kind_description: ClassVar[str] = ( "Represents a web experience in the AWS QBusiness service. Web experiences define" " interactive web-based applications or interfaces within the QBusiness ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = { "arn_tpl": "arn:{partition}:qbusiness:{region}:{account}:application/{application_id}/web-experience/{id}", "extra_args_for_arn": ["application_id"], } @@ -935,15 +935,15 @@ class AwsQAppsCategory: @define(eq=False, slots=False) class AwsQAppsLibraryItem(AwsResource): kind: ClassVar[str] = "aws_q_apps_library_item" - kind_display: ClassVar[str] = "AWS QApps Library Item" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QApps Library Item" + _kind_description: ClassVar[str] = ( "Represents a library item in the AWS QApps service. Library items include resources" " such as scripts, templates, or other components that can be used in QApps applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "ai"} # Collected via AwsQBusinessApplication() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_q_apps"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1016,13 +1016,13 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsQApps(AwsResource): kind: ClassVar[str] = "aws_q_apps" - kind_display: ClassVar[str] = "AWS QApps" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS QApps" + _kind_description: ClassVar[str] = ( "Represents an application within the AWS QApps service. QApps applications include" " various components and configurations for developing and deploying apps within the AWS environment." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} # Collected via AwsQBusinessApplication() mapping: ClassVar[Dict[str, Bender]] = { "id": S("appId"), diff --git a/plugins/aws/fix_plugin_aws/resource/apigateway.py b/plugins/aws/fix_plugin_aws/resource/apigateway.py index c55708dfa5..a6d2031c92 100644 --- a/plugins/aws/fix_plugin_aws/resource/apigateway.py +++ b/plugins/aws/fix_plugin_aws/resource/apigateway.py @@ -183,15 +183,15 @@ class AwsApiGatewayMethod: class AwsApiGatewayResource(AwsResource): # collection of resource resources happens in AwsApiGatewayRestApi.collect() kind: ClassVar[str] = "aws_apigateway_resource" - kind_display: ClassVar[str] = "AWS API Gateway Resource" - kind_description: ClassVar[str] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_apigateway_authorizer"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_apigateway_authorizer"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "resource_parent_id": S("parentId"), @@ -249,16 +249,16 @@ def service_name(cls) -> str: class AwsApiGatewayAuthorizer(AwsResource): # collection of authorizer resources happens in AwsApiGatewayRestApi.collect() kind: ClassVar[str] = "aws_apigateway_authorizer" - kind_display: ClassVar[str] = "AWS API Gateway Authorizer" - kind_description: ClassVar[str] = ( + _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." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{api_link}/authorizers/{id}?api={api_link}®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:authorizer/{name}/{id}"} # fmt: skip - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{api_link}/authorizers/{id}?api={api_link}®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:authorizer/{name}/{id}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_lambda_function"]}, "predecessors": {"default": ["aws_iam_role"], "delete": ["aws_lambda_function", "aws_iam_role"]}, } @@ -343,14 +343,14 @@ class AwsApiGatewayCanarySetting: class AwsApiGatewayStage(ApiGatewayTaggable, AwsResource): # collection of stage resources happens in AwsApiGatewayRestApi.collect() kind: ClassVar[str] = "aws_apigateway_stage" - kind_display: ClassVar[str] = "AWS API Gateway Stage" - kind_description: ClassVar[str] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{api_link}/stages?api={api_link}®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/stages/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{api_link}/stages?api={api_link}®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/stages/{name}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("syntheticId"), # created by Fix to avoid collision with duplicate stage names "name": S("stageName"), @@ -407,16 +407,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: class AwsApiGatewayDeployment(AwsResource): # collection of deployment resources happens in AwsApiGatewayRestApi.collect() kind: ClassVar[str] = "aws_apigateway_deployment" - kind_display: ClassVar[str] = "AWS API Gateway Deployment" - kind_description: ClassVar[str] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/deployments/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/deployments/{name}"} # fmt: skip # edge to aws_apigateway_stage is established in AwsApiGatewayRestApi.collect() - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_apigateway_stage"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_apigateway_stage"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -469,18 +469,18 @@ class AwsApiGatewayEndpointConfiguration: @define(eq=False, slots=False) class AwsApiGatewayRestApi(ApiGatewayTaggable, AwsResource): kind: ClassVar[str] = "aws_apigateway_rest_api" - kind_display: ClassVar[str] = "AWS API Gateway REST API" - kind_description: ClassVar[str] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{id}/resources?api={id}&experience=rest®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:restapi/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/apis/{id}/resources?api={id}&experience=rest®ion={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:restapi/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "get-rest-apis", "items", override_iam_permission="apigateway:GET" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "aws_vpc_endpoint", @@ -556,7 +556,7 @@ def add_instance(api_instance: AwsResource) -> None: if stage_instance := AwsApiGatewayStage.from_api(stage, builder): stage_instance.api_link = api_instance.id builder.add_node(stage_instance, stage) - # reference kinds for this edge are maintained in AwsApiGatewayDeployment.reference_kinds # noqa: E501 + # reference kinds for this edge are maintained in AwsApiGatewayDeployment._reference_kinds # noqa: E501 builder.add_edge(deploy_instance, EdgeType.default, node=stage_instance) for authorizer in builder.client.list(service_name, "get-authorizers", "items", restApiId=api_instance.id): if auth_instance := AwsApiGatewayAuthorizer.from_api(authorizer, builder): @@ -626,19 +626,19 @@ class AwsApiGatewayMutualTlsAuthentication: @define(eq=False, slots=False) class AwsApiGatewayDomainName(ApiGatewayTaggable, AwsResource): kind: ClassVar[str] = "aws_apigateway_domain_name" - kind_display: ClassVar[str] = "AWS API Gateway Domain Name" - kind_description: ClassVar[str] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/publish/domain-names?api=unselected&domain={name}&®ion={region}", "arn_tpl": "arn:aws:apigateway:{region}:{account}:domainname/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/apigateway/main/publish/domain-names?api=unselected&domain={name}&®ion={region}", "arn_tpl": "arn:aws:apigateway:{region}:{account}:domainname/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "get-domain-names", "items", override_iam_permission="apigateway:GET" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_route53_zone"]}, "successors": {"default": ["aws_route53_zone", "aws_vpc_endpoint"], "delete": ["aws_vpc_endpoint"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/athena.py b/plugins/aws/fix_plugin_aws/resource/athena.py index 31542e4ac6..2d727a9cab 100644 --- a/plugins/aws/fix_plugin_aws/resource/athena.py +++ b/plugins/aws/fix_plugin_aws/resource/athena.py @@ -91,15 +91,15 @@ 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] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/athena/home?region={region}#/workgroups/details/{name}", "arn_tpl": "arn:{partition}:athena:{region}:{account}:workgroup/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/athena/home?region={region}#/workgroups/details/{name}", "arn_tpl": "arn:{partition}:athena:{region}:{account}:workgroup/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-work-groups", "WorkGroups") mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), @@ -113,7 +113,7 @@ class AwsAthenaWorkGroup(AwsResource): workgroup_configuration: Optional[AwsAthenaWorkGroupConfiguration] = None description: Optional[str] = None - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_kms_key"]}, "successors": {"default": ["aws_kms_key", "aws_s3_bucket"]}, } @@ -208,15 +208,15 @@ 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] = ( + _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." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/athena/home?region={region}#datacatalog/detail/{name}", "arn_tpl": "arn:{partition}:athena:{region}:{account}:catalog/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/athena/home?region={region}#datacatalog/detail/{name}", "arn_tpl": "arn:{partition}:athena:{region}:{account}:catalog/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-data-catalogs", "DataCatalogsSummary") mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), diff --git a/plugins/aws/fix_plugin_aws/resource/autoscaling.py b/plugins/aws/fix_plugin_aws/resource/autoscaling.py index f0caaeeed3..0815449d93 100644 --- a/plugins/aws/fix_plugin_aws/resource/autoscaling.py +++ b/plugins/aws/fix_plugin_aws/resource/autoscaling.py @@ -276,16 +276,16 @@ class AwsAutoScalingWarmPoolConfiguration: @define(eq=False, slots=False) class AwsAutoScalingGroup(AwsResource, BaseAutoScalingGroup): kind: ClassVar[str] = "aws_autoscaling_group" - kind_display: ClassVar[str] = "AWS Autoscaling Group" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/awsautoscaling/home?region={region}#dashboard/{name}", "arn_tpl": "arn:{partition}:autoscaling:{region}:{account}:autoscalinggroup/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Autoscaling Group" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/awsautoscaling/home?region={region}#dashboard/{name}", "arn_tpl": "arn:{partition}:autoscaling:{region}:{account}:autoscalinggroup/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "An AWS Autoscaling Group is a collection of Amazon EC2 instances that are" " treated as a logical grouping for the purpose of automatic scaling and" " management." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-auto-scaling-groups", "AutoScalingGroups") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_ec2_instance", "aws_ec2_launch_template"]}, "predecessors": {"delete": ["aws_ec2_instance"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/backup.py b/plugins/aws/fix_plugin_aws/resource/backup.py index 413318cb1b..46ad6210ad 100644 --- a/plugins/aws/fix_plugin_aws/resource/backup.py +++ b/plugins/aws/fix_plugin_aws/resource/backup.py @@ -69,15 +69,15 @@ class AwsBackupRecoveryPointCreator: @define(eq=False, slots=False) class AwsBackupJob(AwsResource): kind: ClassVar[str] = "aws_backup_job" - kind_display: ClassVar[str] = "AWS Backup Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Job" + _kind_description: ClassVar[str] = ( "AWS Backup Jobs represent the individual backup tasks that are executed based on backup plans. " "They encompass the execution details and status of the backup process for a specified resource." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_plan", "aws_backup_vault"]}, "successors": {"default": ["aws_backup_protected_resource", "aws_backup_recovery_point"]}, } @@ -152,15 +152,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsBackupProtectedResource(AwsResource): kind: ClassVar[str] = "aws_backup_protected_resource" - kind_display: ClassVar[str] = "AWS Backup Protected Resource" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Protected Resource" + _kind_description: ClassVar[str] = ( "AWS Backup Protected Resources represent the AWS resources that are configured to be backed up according to a backup plan. " "They include information about the resource type and identifiers." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/resources/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/resources/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_vault", "aws_backup_recovery_point"]}, "successors": { "default": [ @@ -230,14 +230,14 @@ class AwsBackupAdvancedBackupSetting: @define(eq=False, slots=False) class AwsBackupPlan(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_plan" - kind_display: ClassVar[str] = "AWS Backup Plan" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Plan" + _kind_description: ClassVar[str] = ( "AWS Backup Plans define the schedule and rules for automatically backing up AWS resources. " "They include settings such as backup frequency, retention period, and lifecycle policies." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{id}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:backup-plan:{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{id}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:backup-plan:{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("backup", "list-backup-plans", "BackupPlansList") mapping: ClassVar[Dict[str, Bender]] = { "id": S("BackupPlanId"), @@ -312,14 +312,14 @@ def add_tags(backup_plan: AwsBackupPlan) -> None: @define(eq=False, slots=False) class AwsBackupVault(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_vault" - kind_display: ClassVar[str] = "AWS Backup Vault" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Vault" + _kind_description: ClassVar[str] = ( "AWS Backup Vaults are secure storage locations for backup data. " "They are used to store and organize backups created by AWS Backup, providing encryption and access control." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:backup-vault:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupplan/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:backup-vault:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("backup", "list-backup-vaults", "BackupVaultList") mapping: ClassVar[Dict[str, Bender]] = { "id": S("BackupVaultArn"), @@ -444,16 +444,16 @@ class AwsBackupLifecycle: @define(eq=False, slots=False) class AwsBackupRecoveryPoint(AwsResource): kind: ClassVar[str] = "aws_backup_recovery_point" - kind_display: ClassVar[str] = "AWS Backup Recovery Point" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Recovery Point" + _kind_description: ClassVar[str] = ( "AWS Backup Recovery Points by Vault represent specific instances of backup data stored within a backup vault. " "They provide detailed information on the recovery points, including metadata, status, and lifecycle policies. " "These recovery points are crucial for restoring data during disaster recovery or operational recovery scenarios." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupvaults/details/{backup_vault_name}/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/backupvaults/details/{backup_vault_name}/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_vault", "aws_backup_plan"]}, } # Resource will be collect by AwsBackupVault @@ -598,15 +598,15 @@ class AwsBackupReportDeliveryChannel: @define(eq=False, slots=False) class AwsBackupReportPlan(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_report_plan" - kind_display: ClassVar[str] = "AWS Backup Report Plan" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Report Plan" + _kind_description: ClassVar[str] = ( "AWS Backup Report Plans generate reports that provide detailed information on backup jobs and resource compliance. " "These reports help in monitoring and auditing backup activities and compliance with organizational policies." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/compliance/reports/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:report-plan:{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/compliance/reports/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:report-plan:{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_framework"]}, } api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( @@ -688,14 +688,14 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: class AwsBackupRestoreTestingPlan(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_restore_testing_plan" - kind_display: ClassVar[str] = "AWS Backup Restore Testing Plan" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Restore Testing Plan" + _kind_description: ClassVar[str] = ( "AWS Backup Restore Testing Plans are configurations designed to test the restore capabilities and processes for backed-up data. " "They ensure that recovery procedures are effective and that data can be reliably restored." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/restoretesting/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:restore-testing-plan:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "plan", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/restoretesting/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:restore-testing-plan:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("backup", "list-restore-testing-plans", "RestoreTestingPlans") mapping: ClassVar[Dict[str, Bender]] = { "id": S("RestoreTestingPlanArn"), @@ -768,14 +768,14 @@ def add_tags(restore_plan: AwsBackupRestoreTestingPlan) -> None: @define(eq=False, slots=False) class AwsBackupLegalHold(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_legal_hold" - kind_display: ClassVar[str] = "AWS Backup Legal Hold" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Legal Hold" + _kind_description: ClassVar[str] = ( "AWS Backup Legal Holds are used to retain backup data for compliance and legal purposes. " "They prevent deletion of backups that might be required for legal or regulatory reasons." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/legalholds/details/{id}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:legal-hold:{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/legalholds/details/{id}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:legal-hold:{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("backup", "list-legal-holds", "LegalHolds") mapping: ClassVar[Dict[str, Bender]] = { "id": S("LegalHoldId"), @@ -835,15 +835,15 @@ def add_tags(legal_hold: AwsBackupLegalHold) -> None: @define(eq=False, slots=False) class AwsBackupRestoreJob(AwsResource): kind: ClassVar[str] = "aws_backup_restore_job" - kind_display: ClassVar[str] = "AWS Backup Restore Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Restore Job" + _kind_description: ClassVar[str] = ( "AWS Backup Restore Jobs represent the tasks that restore data from backups. " "They include details on the restore process, target resources, and status of the restoration." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/jobs/restore/details/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/jobs/restore/details/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_testing_plan", "aws_backup_recovery_point"]}, } api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("backup", "list-restore-jobs", "RestoreJobs") @@ -901,15 +901,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsBackupCopyJob(AwsResource): kind: ClassVar[str] = "aws_backup_copy_job" - kind_display: ClassVar[str] = "AWS Backup Copy Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Copy Job" + _kind_description: ClassVar[str] = ( "AWS Backup Copy Jobs are operations that duplicate backups from one backup vault to another. " "They facilitate data redundancy and disaster recovery by ensuring copies are stored in different locations." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/jobs/copy/details/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/jobs/copy/details/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_backup_plan"]}, "successors": {"default": ["aws_backup_vault", "aws_backup_recovery_point"]}, } @@ -976,14 +976,14 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsBackupFramework(BackupResourceTaggable, AwsResource): kind: ClassVar[str] = "aws_backup_framework" - kind_display: ClassVar[str] = "AWS Backup Framework" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Backup Framework" + _kind_description: ClassVar[str] = ( "AWS Backup Frameworks are predefined sets of controls and requirements designed to help organizations align their backup operations with regulatory and compliance standards. " "They provide a structured approach to managing backups, ensuring adherence to policies, and facilitating audits." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/compliance/frameworks/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:framework:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/backup/home?region={region_id}#/compliance/frameworks/details/{name}", "arn_tpl": "arn:{partition}:backup:{region}:{account}:framework:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( "backup", "list-frameworks", "Frameworks", expected_errors=["AccessDeniedException"] ) diff --git a/plugins/aws/fix_plugin_aws/resource/base.py b/plugins/aws/fix_plugin_aws/resource/base.py index 642be66dce..b54f2d8197 100644 --- a/plugins/aws/fix_plugin_aws/resource/base.py +++ b/plugins/aws/fix_plugin_aws/resource/base.py @@ -115,10 +115,14 @@ class AwsResource(BaseResource, ABC): Override kind, mapping and api_spec for every resource that is collected in AWS. """ - # The name of the kind of all resources. Needs to be globally unique. + # The kind of this resource. Needs to be globally unique. kind: ClassVar[str] = "aws_resource" - kind_display: ClassVar[str] = "AWS Resource" - kind_description: ClassVar[str] = "AWS Resource is a generic term used to refer to any type of resource available in Amazon Web Services cloud." # fmt: skip + # The display name of the kind. + _kind_display: ClassVar[str] = "AWS Resource" + # The description of the kind. + _kind_description: ClassVar[str] = "AWS Resource is a generic term used to refer to any type of resource available in Amazon Web Services cloud." # fmt: skip + # AWS specific metadata that hold template strings for ARN and provider link. + _aws_metadata: ClassVar[Dict[str, Any]] = {} # The mapping to transform the incoming API json into the internal representation. mapping: ClassVar[Dict[str, Bender]] = {} # Which API to call and what to expect in the result. @@ -268,14 +272,14 @@ def __str__(self) -> str: @define(eq=False) class AwsAccount(BaseAccount, AwsResource, BaseIamPrincipal): kind: ClassVar[str] = "aws_account" - kind_display: ClassVar[str] = "AWS Account" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Account" + _kind_description: ClassVar[str] = ( "An AWS Account is a container for AWS resources, such as EC2 instances, S3" " buckets, and RDS databases. It allows users to access and manage their" " resources on the Amazon Web Services platform." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/billing/home?region={region}#/account"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_region"]}} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/billing/home?region={region}#/account"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_region"]}} account_alias: Optional[str] = "" role: Optional[str] = None @@ -314,13 +318,13 @@ class AwsAccount(BaseAccount, AwsResource, BaseIamPrincipal): @define(eq=False) class AwsRegion(BaseRegion, AwsResource): kind: ClassVar[str] = "aws_region" - kind_display: ClassVar[str] = "AWS Region" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Region" + _kind_description: ClassVar[str] = ( "An AWS Region is a physical location where AWS has multiple data centers," " allowing users to choose the geographic area in which their resources are" " located." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "aws_vpc_peering_connection", @@ -387,14 +391,14 @@ def complete_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsEc2VolumeType(AwsResource, BaseVolumeType): kind: ClassVar[str] = "aws_ec2_volume_type" - kind_display: ClassVar[str] = "AWS EC2 Volume Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Volume Type" + _kind_description: ClassVar[str] = ( "EC2 Volume Types are different storage options for Amazon Elastic Block" " Store (EBS) volumes, such as General Purpose (SSD) and Magnetic." ) - kind_service = "ec2" - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:ec2:{region}:{account}:volume/{id}"} # fmt: skip + _kind_service = "ec2" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:ec2:{region}:{account}:volume/{id}"} # fmt: skip class GraphBuilder: @@ -507,7 +511,7 @@ def add_node( node._account = self.account node._region = region or self.region - meta = getattr(type(node), "aws_metadata", None) or {} + meta = getattr(type(node), "_aws_metadata", None) or {} # if there is no arn: try to create one from template if node.arn is None and (arn_tpl := meta.get("arn_tpl")): try: diff --git a/plugins/aws/fix_plugin_aws/resource/bedrock.py b/plugins/aws/fix_plugin_aws/resource/bedrock.py index 460917a133..300d54b730 100644 --- a/plugins/aws/fix_plugin_aws/resource/bedrock.py +++ b/plugins/aws/fix_plugin_aws/resource/bedrock.py @@ -85,14 +85,14 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsBedrockFoundationModel(BaseAIModel, AwsResource): kind: ClassVar[str] = "aws_bedrock_foundation_model" - kind_display: ClassVar[str] = "AWS Bedrock Foundation Model" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Foundation Model" + _kind_description: ClassVar[str] = ( "AWS Bedrock Foundation Model represents the base machine learning models provided by AWS Bedrock. " "These models are pre-trained and can be used as a starting point for various machine learning tasks." ) - kind_service: ClassVar[Optional[str]] = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/providers?model={id}"} # fmt: skip - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/providers?model={id}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("bedrock", "list-foundation-models", "modelSummaries") mapping: ClassVar[Dict[str, Bender]] = { "id": S("modelId"), @@ -131,15 +131,15 @@ class AwsBedrockValidationDataConfig: @define(eq=False, slots=False) class AwsBedrockCustomModel(BedrockTaggable, BaseAIModel, AwsResource): kind: ClassVar[str] = "aws_bedrock_custom_model" - kind_display: ClassVar[str] = "AWS Bedrock Custom Model" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Custom Model" + _kind_description: ClassVar[str] = ( "AWS Bedrock Custom Model enables users to create and train machine learning models " "tailored to specific needs, providing flexibility in model customization for a variety of applications." ) - kind_service: ClassVar[Optional[str]] = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/custom-models/{name}"} # fmt: skip - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/custom-models/{name}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_bedrock_model_customization_job", AwsKmsKey.kind]}, "predecessors": {"default": [AwsBedrockFoundationModel.kind]}, } @@ -232,15 +232,15 @@ def add_tags(job: AwsResource) -> None: @define(eq=False, slots=False) class AwsBedrockProvisionedModelThroughput(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_provisioned_model_throughput" - kind_display: ClassVar[str] = "AWS Bedrock Provisioned Model Throughput" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Provisioned Model Throughput" + _kind_description: ClassVar[str] = ( "AWS Bedrock Provisioned Model Throughput manages the throughput capacity for machine learning models, " "ensuring consistent performance and scalability to handle varying workloads." ) - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/provisioned-throughput/{name}"} # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/provisioned-throughput/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsBedrockCustomModel.kind, AwsBedrockFoundationModel.kind]}, } api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( @@ -412,18 +412,18 @@ class AwsBedrockGuardrailContextualGroundingPolicy: @define(eq=False, slots=False) class AwsBedrockGuardrail(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_guardrail" - kind_display: ClassVar[str] = "AWS Bedrock Guardrail" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Guardrail" + _kind_description: ClassVar[str] = ( "AWS Bedrock Guardrail provides safety mechanisms and policies to ensure responsible use of machine learning models, " "helping to enforce compliance, security, and ethical standards." ) api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( "bedrock", "list-guardrails", "guardrails", expected_errors=["AccessDeniedException"] ) - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/guardrails/guardrail/{name}/{id}"} # fmt: skip - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/guardrails/guardrail/{name}/{id}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [AwsKmsKey.kind]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -531,15 +531,15 @@ class AwsBedrockVpcConfig: @define(eq=False, slots=False) class AwsBedrockModelCustomizationJob(BedrockTaggable, BaseAIJob, AwsResource): kind: ClassVar[str] = "aws_bedrock_model_customization_job" - kind_display: ClassVar[str] = "AWS Bedrock Model Customization Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Model Customization Job" + _kind_description: ClassVar[str] = ( "AWS Bedrock Model Customization Job is responsible for executing the processes involved in tailoring a machine learning model " "to specific datasets and tasks, optimizing the model for unique use cases." ) - kind_service: ClassVar[Optional[str]] = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/custom-models/item/?arn={arn}"} # fmt: skip - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/custom-models/item/?arn={arn}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [AwsEc2Subnet.kind, AwsEc2SecurityGroup.kind, AwsIamRole.kind, AwsBedrockFoundationModel.kind] }, @@ -763,15 +763,15 @@ class AwsBedrockEvaluationInferenceConfig: @define(eq=False, slots=False) class AwsBedrockEvaluationJob(BedrockTaggable, BaseAIJob, AwsResource): kind: ClassVar[str] = "aws_bedrock_evaluation_job" - kind_display: ClassVar[str] = "AWS Bedrock Evaluation Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Evaluation Job" + _kind_description: ClassVar[str] = ( "AWS Bedrock Evaluation Job assesses the performance of machine learning models, running test datasets and producing metrics " "that indicate the effectiveness of the model's predictions." ) - aws_metadata: ClassVar[Dict[str, Any]] = {} - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsIamRole.kind]}, "successors": {"default": [AwsS3Bucket.kind, AwsKmsKey.kind]}, } @@ -923,17 +923,17 @@ class AwsBedrockPromptOverrideConfiguration: @define(eq=False, slots=False) class AwsBedrockAgent(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent" - kind_display: ClassVar[str] = "AWS Bedrock Agent" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent is an intelligent service designed to facilitate communication with machine learning models, " "acting as a mediator between applications and model execution workflows." ) - aws_metadata: ClassVar[Dict[str, Any]] = { + _aws_metadata: ClassVar[Dict[str, Any]] = { "provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/agents/{id}" } - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - reference_kinds: ClassVar[ModelReference] = { + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ AwsBedrockGuardrail.kind, @@ -1068,17 +1068,17 @@ def collect_agent_versions(agent: AwsBedrockAgent) -> None: @define(eq=False, slots=False) class AwsBedrockAgentVersion(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent_version" - kind_display: ClassVar[str] = "AWS Bedrock Agent Version" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent Version" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent Version refers to a specific iteration of the Bedrock Agent, ensuring compatibility " "and enhancements across different versions of the agent for improved functionality." ) - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _aws_metadata: ClassVar[Dict[str, Any]] = { "provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/agents/{id}/versions/{version}" } - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} - reference_kinds: ClassVar[ModelReference] = { + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsIamRole.kind, AwsBedrockFoundationModel.kind]}, "successors": {"default": [AwsBedrockGuardrail.kind, AwsKmsKey.kind]}, } @@ -1363,17 +1363,17 @@ class AwsBedrockStorageConfiguration: @define(eq=False, slots=False) class AwsBedrockAgentKnowledgeBase(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent_knowledge_base" - kind_display: ClassVar[str] = "AWS Bedrock Agent Knowledge Base" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent Knowledge Base" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent Knowledge Base contains the knowledge resources that the Bedrock Agent relies on " "to provide accurate responses and perform tasks based on learned information." ) - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - aws_metadata: ClassVar[Dict[str, Any]] = { + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _aws_metadata: ClassVar[Dict[str, Any]] = { "provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/knowledge-bases/knowledge-base/{name}/{id}/0" } - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - reference_kinds: ClassVar[ModelReference] = { + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsIamRole.kind]}, "successors": { "default": [ @@ -1532,15 +1532,15 @@ class AwsBedrockPromptVariant: @define(eq=False, slots=False) class AwsBedrockAgentPrompt(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent_prompt" - kind_display: ClassVar[str] = "AWS Bedrock Agent Prompt" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent Prompt" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent Prompt defines the input that the agent uses to generate responses or actions, " "guiding the interaction between users and machine learning models through structured prompts." ) - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-management/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-management/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [AwsBedrockCustomModel.kind, AwsKmsKey.kind]}, } api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( @@ -1838,15 +1838,15 @@ class AwsBedrockFlowValidation: @define(eq=False, slots=False) class AwsBedrockAgentFlow(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent_flow" - kind_display: ClassVar[str] = "AWS Bedrock Agent Flow" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent Flow" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent Flow outlines the logical sequence of interactions between the agent and the model, " "defining the steps to be followed in executing tasks or answering queries." ) - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-flows/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-flows/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsIamRole.kind]}, "successors": { "default": [ @@ -1969,15 +1969,15 @@ def collect_flow_versions(flow: AwsBedrockAgentFlow) -> None: @define(eq=False, slots=False) class AwsBedrockAgentFlowVersion(BedrockTaggable, AwsResource): kind: ClassVar[str] = "aws_bedrock_agent_flow_version" - kind_display: ClassVar[str] = "AWS Bedrock Agent Flow Version" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Bedrock Agent Flow Version" + _kind_description: ClassVar[str] = ( "AWS Bedrock Agent Flow Version tracks the version history of agent workflows, ensuring compatibility and stability " "as workflows evolve and improve over time." ) - kind_service: ClassVar[Optional[str]] = "bedrock-agent" - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-flows/{id}/versions/{version}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = "bedrock-agent" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/bedrock/home?region={region_id}#/prompt-flows/{id}/versions/{version}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsIamRole.kind]}, "successors": {"default": [AwsKmsKey.kind]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/cloudformation.py b/plugins/aws/fix_plugin_aws/resource/cloudformation.py index c534ba4650..a931fb3a66 100644 --- a/plugins/aws/fix_plugin_aws/resource/cloudformation.py +++ b/plugins/aws/fix_plugin_aws/resource/cloudformation.py @@ -90,15 +90,15 @@ class AwsCloudFormationStackDriftInformation: @define(eq=False, slots=False) class AwsCloudFormationStack(AwsResource, BaseStack): kind: ClassVar[str] = "aws_cloudformation_stack" - kind_display: ClassVar[str] = "AWS CloudFormation Stack" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudformation/home?region={region}#/stacks/stackinfo?stackId={id}", "arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack/{name}/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFormation Stack" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudformation/home?region={region}#/stacks/stackinfo?stackId={id}", "arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack/{name}/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "CloudFormation Stacks are a collection of AWS resources that are created," " updated, or deleted together as a single unit." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-stacks", "Stacks") - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_resource"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_resource"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("StackId"), "tags": S("Tags", default=[]) >> ToDict(), @@ -253,15 +253,15 @@ class AwsCloudFormationAutoDeployment: @define(eq=False, slots=False) class AwsCloudFormationStackSet(AwsResource): kind: ClassVar[str] = "aws_cloudformation_stack_set" - kind_display: ClassVar[str] = "AWS CloudFormation Stack Set" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFormation Stack Set" + _kind_description: ClassVar[str] = ( "CloudFormation Stack Set is a feature in AWS CloudFormation that enables you" " to create, update, or delete stacks across multiple accounts and regions" " with a single CloudFormation template." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudformation/home?region={region}#/stacksets/{name}/info?permissions=self", "arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack-set/{name}/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudformation/home?region={region}#/stacksets/{name}/info?permissions=self", "arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack-set/{name}/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-stack-sets", "Summaries", dict(Status="ACTIVE")) mapping: ClassVar[Dict[str, Bender]] = { "id": S("StackSetId"), @@ -374,14 +374,14 @@ def _stack_instance_id(stack: Json) -> str: class AwsCloudFormationStackInstanceSummary(AwsResource): # note: resource is collected via AwsCloudFormationStackSet kind: ClassVar[str] = "aws_cloud_formation_stack_instance_summary" - kind_display: ClassVar[str] = "AWS CloudFormation Stack Instance Summary" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFormation Stack Instance Summary" + _kind_description: ClassVar[str] = ( "CloudFormation Stack Instance Summary provides a summary of the overall stacks in a CloudFormation" " deployment. The information includes current status, name, and any associated resources or parameters." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack-instance/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "stack", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudformation:{region}:{account}:stack-instance/{id}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": F(_stack_instance_id), "stack_instance_stack_set_id": S("StackSetId"), diff --git a/plugins/aws/fix_plugin_aws/resource/cloudfront.py b/plugins/aws/fix_plugin_aws/resource/cloudfront.py index 118c7e6acb..d98830d250 100644 --- a/plugins/aws/fix_plugin_aws/resource/cloudfront.py +++ b/plugins/aws/fix_plugin_aws/resource/cloudfront.py @@ -580,16 +580,16 @@ class AwsCloudFrontDistributionConfig: class AwsCloudFrontDistribution(CloudFrontTaggable, CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_distribution" api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("cloudfront", "get-distribution", "Distribution") - kind_display: ClassVar[str] = "AWS CloudFront Distribution" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Distribution" + _kind_description: ClassVar[str] = ( "CloudFront Distributions are a content delivery network (CDN) offered by" " Amazon Web Services, which enables users to deliver their content to end-" " users with low latency and high transfer speeds." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cdn", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home#/distributions/{id}", "arn_tpl": "arn:{partition}:cloudfront::{account}:distribution/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cdn", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home#/distributions/{id}", "arn_tpl": "arn:{partition}:cloudfront::{account}:distribution/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_lambda_function"]}, "successors": { "default": [ @@ -762,15 +762,15 @@ class AwsCloudFrontFunctionConfig: @define(eq=False, slots=False) class AwsCloudFrontFunction(CloudFrontTaggable, BaseServerlessFunction, CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_function" - kind_display: ClassVar[str] = "AWS CloudFront Function" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Function" + _kind_description: ClassVar[str] = ( "CloudFront Functions are serverless functions that allow developers to" " customize and extend the functionality of CloudFront content delivery" " network, enabling advanced edge processing of HTTP requests and responses." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v3/home?region={region}#/functions/{name}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:function/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v3/home?region={region}#/functions/{name}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:function/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-functions", "FunctionList.Items", parameter={"Stage": "LIVE"} ) @@ -816,14 +816,14 @@ def delete_resource(self, client: AwsClient, graph: Graph) -> bool: @define(eq=False, slots=False) class AwsCloudFrontPublicKey(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_public_key" - kind_display: ClassVar[str] = "AWS CloudFront Public Key" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Public Key" + _kind_description: ClassVar[str] = ( "AWS CloudFront Public Key is a public key used in conjunction with a private key for managing the" " identity of the content distributors and validating access to content served by AWS CloudFront." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/publickey/edit/{id}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:public-key/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/publickey/edit/{id}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:public-key/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-public-keys", "PublicKeyList.Items") mapping: ClassVar[Dict[str, Bender]] = { "id": S("Id"), @@ -879,15 +879,15 @@ class AwsCloudFrontEndPoint: @define(eq=False, slots=False) class AwsCloudFrontRealtimeLogConfig(CloudFrontTaggable, CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_realtime_log_config" - kind_display: ClassVar[str] = "AWS CloudFront Real-time Log Configuration" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Real-time Log Configuration" + _kind_description: ClassVar[str] = ( "CloudFront Real-time Log Configuration allows you to configure real-time" " logging for your CloudFront distribution, enabling you to receive real-time" " logs for your web traffic." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/logs/realtime/{name}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:real-time-log-config/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/logs/realtime/{name}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:real-time-log-config/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-realtime-log-configs", "RealtimeLogConfigs.Items") mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), @@ -1116,15 +1116,15 @@ class AwsCloudFrontResponseHeadersPolicyConfig: @define(eq=False, slots=False) class AwsCloudFrontResponseHeadersPolicy(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_response_headers_policy" - kind_display: ClassVar[str] = "AWS CloudFront Response Headers Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Response Headers Policy" + _kind_description: ClassVar[str] = ( "The AWS CloudFront Response Headers Policy is a configuration that allows" " you to manage and control the response headers that are included in the HTTP" " responses delivered by CloudFront." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region=global#/policies/responseHeaders/{id}", "arn_tpl": "arn:{partition}:cloudfront::{account}:response-headers-policy/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region=global#/policies/responseHeaders/{id}", "arn_tpl": "arn:{partition}:cloudfront::{account}:response-headers-policy/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-response-headers-policies", "ResponseHeadersPolicyList.Items" ) @@ -1171,15 +1171,15 @@ class AwsCloudFrontS3Origin: @define(eq=False, slots=False) class AwsCloudFrontStreamingDistribution(CloudFrontTaggable, CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_streaming_distribution" - kind_display: ClassVar[str] = "AWS CloudFront Streaming Distribution" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Streaming Distribution" + _kind_description: ClassVar[str] = ( "CloudFront Streaming Distribution is a content delivery network (CDN)" " service provided by AWS that allows for fast and secure streaming of audio" " and video content over the internet." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cdn", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:streaming-distribution/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cdn", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:streaming-distribution/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-streaming-distributions", "StreamingDistributionList.Items" ) @@ -1210,15 +1210,15 @@ class AwsCloudFrontStreamingDistribution(CloudFrontTaggable, CloudFrontResource, @define(eq=False, slots=False) class AwsCloudFrontOriginAccessControl(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_origin_access_control" - kind_display: ClassVar[str] = "AWS CloudFront Origin Access Control" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Origin Access Control" + _kind_description: ClassVar[str] = ( "AWS CloudFront Origin Access Control is a security feature that allows you to control access" " to your S3 bucket or custom origin, ensuring that your content can only be accessed via" " CloudFront distributions and not directly from the origin itself." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:origin-access-identity/cloudfront/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:origin-access-identity/cloudfront/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-origin-access-controls", "OriginAccessControlList.Items" ) @@ -1351,15 +1351,15 @@ class AwsCloudFrontCachePolicyConfig: @define(eq=False, slots=False) class AwsCloudFrontCachePolicy(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_cache_policy" - kind_display: ClassVar[str] = "AWS CloudFront Cache Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Cache Policy" + _kind_description: ClassVar[str] = ( "CloudFront Cache Policies in AWS specify the caching behavior for CloudFront" " distributions, allowing users to control how content is cached and delivered" " to end users." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/policies/cache/{id}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:cache-policy/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudfront/v4/home?region={region}#/policies/cache/{id}", "arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:cache-policy/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-cache-policies", "CachePolicyList.Items") mapping: ClassVar[Dict[str, Bender]] = { "id": S("CachePolicy", "Id"), @@ -1455,19 +1455,19 @@ class AwsCloudFrontContentTypeProfileConfig: @define(eq=False, slots=False) class AwsCloudFrontFieldLevelEncryptionConfig(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_field_level_encryption_config" - kind_display: ClassVar[str] = "AWS CloudFront Field-Level Encryption Configuration" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Field-Level Encryption Configuration" + _kind_description: ClassVar[str] = ( "AWS CloudFront Field-Level Encryption Configuration is a feature that helps you to protect sensitive data" " by encrypting specific HTTP fields at CloudFront edge locations. It allows you to encrypt data within" " each individual field of an HTTPS request or response." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:field-level-encryption-config/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:field-level-encryption-config/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-field-level-encryption-configs", "FieldLevelEncryptionList.Items" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_cloudfront_field_level_encryption_profile"]} } mapping: ClassVar[Dict[str, Bender]] = { @@ -1532,19 +1532,19 @@ class AwsCloudFrontEncryptionEntity: @define(eq=False, slots=False) class AwsCloudFrontFieldLevelEncryptionProfile(CloudFrontResource, AwsResource): kind: ClassVar[str] = "aws_cloudfront_field_level_encryption_profile" - kind_display: ClassVar[str] = "AWS CloudFront Field Level Encryption Profile" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudFront Field Level Encryption Profile" + _kind_description: ClassVar[str] = ( "Field Level Encryption Profiles in AWS CloudFront allow users to encrypt" " specific fields in a web form, providing an extra layer of security to" " sensitive data." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:field-level-encryption-profile/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:cloudfront:{region}:{account}:field-level-encryption-profile/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-field-level-encryption-profiles", "FieldLevelEncryptionProfileList.Items" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_cloudfront_public_key"]}, } mapping: ClassVar[Dict[str, Bender]] = { diff --git a/plugins/aws/fix_plugin_aws/resource/cloudtrail.py b/plugins/aws/fix_plugin_aws/resource/cloudtrail.py index 46e647f488..5aa75e6fbf 100644 --- a/plugins/aws/fix_plugin_aws/resource/cloudtrail.py +++ b/plugins/aws/fix_plugin_aws/resource/cloudtrail.py @@ -136,14 +136,14 @@ class AwsCloudTrailStatus: @define(eq=False, slots=False) class AwsCloudTrail(AwsResource): kind: ClassVar[str] = "aws_cloud_trail" - kind_display: ClassVar[str] = "AWS CloudTrail" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudTrail" + _kind_description: ClassVar[str] = ( "CloudTrail is a service that enables governance, compliance, operational" " auditing, and risk auditing of your AWS account." ) - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudtrail/home?region={region}#/trails/{arn}:trail/{name}", "arn_tpl": "arn:{partition}:cloudtrail:{region}:{account}:trail/{name}"} # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudtrail/home?region={region}#/trails/{arn}:trail/{name}", "arn_tpl": "arn:{partition}:cloudtrail:{region}:{account}:trail/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-trails", "Trails") mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), @@ -164,7 +164,7 @@ class AwsCloudTrail(AwsResource): "trail_has_insight_selectors": S("HasInsightSelectors"), "trail_is_organization_trail": S("IsOrganizationTrail"), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_s3_bucket", "aws_sns_topic", "aws_kms_key"]}, } trail_s3_bucket_name: Optional[str] = attrs_field(default=None) diff --git a/plugins/aws/fix_plugin_aws/resource/cloudwatch.py b/plugins/aws/fix_plugin_aws/resource/cloudwatch.py index 046014eac3..4b7db16db1 100644 --- a/plugins/aws/fix_plugin_aws/resource/cloudwatch.py +++ b/plugins/aws/fix_plugin_aws/resource/cloudwatch.py @@ -234,15 +234,15 @@ class AwsCloudwatchMetricDataQuery: @define(eq=False, slots=False) class AwsCloudwatchAlarm(CloudwatchTaggable, AwsResource): kind: ClassVar[str] = "aws_cloudwatch_alarm" - kind_display: ClassVar[str] = "AWS CloudWatch Alarm" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudWatch Alarm" + _kind_description: ClassVar[str] = ( "CloudWatch Alarms allow you to monitor metrics and send notifications based on the thresholds you set." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#alarmsV2:alarm/{name}", "arn_tpl": "arn:{partition}:cloudwatch:{region}:{account}:alarm/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#alarmsV2:alarm/{name}", "arn_tpl": "arn:{partition}:cloudwatch:{region}:{account}:alarm/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-alarms", "MetricAlarms") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_ec2_instance"], "delete": ["aws_ec2_instance"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -335,17 +335,17 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsCloudwatchLogGroup(LogsTaggable, AwsResource): kind: ClassVar[str] = "aws_cloudwatch_log_group" - kind_display: ClassVar[str] = "AWS CloudWatch Log Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudWatch Log Group" + _kind_description: ClassVar[str] = ( "CloudWatch Log Groups are containers for log streams in Amazon's CloudWatch" " service, enabling centralized storage and analysis of log data from various" " AWS resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#logsV2:log-groups/log-group/{name}", "arn_tpl": "arn:{partition}:logs:{region}:{account}:log-group/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#logsV2:log-groups/log-group/{name}", "arn_tpl": "arn:{partition}:logs:{region}:{account}:log-group/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("logs", "describe-log-groups", "logGroups") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_kms_key"]}, "predecessors": {"delete": ["aws_kms_key"]}, } @@ -406,17 +406,17 @@ class AwsCloudwatchMetricTransformation: @define(eq=False, slots=False) class AwsCloudwatchMetricFilter(AwsResource): kind: ClassVar[str] = "aws_cloudwatch_metric_filter" - kind_display: ClassVar[str] = "AWS CloudWatch Metric Filter" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS CloudWatch Metric Filter" + _kind_description: ClassVar[str] = ( "CloudWatch Metric Filter is a feature in Amazon CloudWatch that allows you" " to define a pattern to extract information from your log events and use it" " to create CloudWatch metrics." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#logsV2:log-groups/log-group/{arn}", "arn_tpl": "arn:{partition}:logs:{region}:{account}:metric-filter/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cloudwatch/home?region={region}#logsV2:log-groups/log-group/{arn}", "arn_tpl": "arn:{partition}:logs:{region}:{account}:metric-filter/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("logs", "describe-metric-filters", "metricFilters") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_cloudwatch_log_group"]}, "successors": {"default": ["aws_cloudwatch_alarm"], "delete": ["aws_cloudwatch_log_group"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/cognito.py b/plugins/aws/fix_plugin_aws/resource/cognito.py index 6cfff439ed..660da20486 100644 --- a/plugins/aws/fix_plugin_aws/resource/cognito.py +++ b/plugins/aws/fix_plugin_aws/resource/cognito.py @@ -19,16 +19,16 @@ class AwsCognitoGroup(AwsResource): # collection of group resources happens in AwsCognitoUserPool.collect() kind: ClassVar[str] = "aws_cognito_group" - kind_display: ClassVar[str] = "AWS Cognito Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Cognito Group" + _kind_description: ClassVar[str] = ( "Cognito Groups are a way to manage and organize users in AWS Cognito, a" " fully managed service for user authentication, registration, and access" " control." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{UserPoolId}/groups/details/{name}?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:group/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{UserPoolId}/groups/details/{name}?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:group/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_iam_role"], "delete": ["aws_iam_role"]} } mapping: ClassVar[Dict[str, Bender]] = { @@ -98,15 +98,15 @@ class AwsCognitoMFAOptionType: class AwsCognitoUser(AwsResource, BaseUser): # collection of user resources happens in AwsCognitoUserPool.collect() kind: ClassVar[str] = "aws_cognito_user" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{_pool_id}/users/details/{id}?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:user/{id}"} # fmt: skip + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{_pool_id}/users/details/{id}?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:user/{id}"} # fmt: skip - kind_display: ClassVar[str] = "AWS Cognito User" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Cognito User" + _kind_description: ClassVar[str] = ( "AWS Cognito User represents a user account in the AWS Cognito service, which" " provides secure user authentication and authorization for web and mobile" " applications." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name mapping: ClassVar[Dict[str, Bender]] = { "id": S("Username"), "name": S("Username"), @@ -205,18 +205,18 @@ class AwsCognitoLambdaConfigType: @define(eq=False, slots=False) class AwsCognitoUserPool(AwsResource): kind: ClassVar[str] = "aws_cognito_user_pool" - kind_display: ClassVar[str] = "AWS Cognito User Pool" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Cognito User Pool" + _kind_description: ClassVar[str] = ( "An AWS Cognito User Pool is a managed user directory that enables user" " registration, authentication, and access control for your web and mobile" " apps." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{id}/users?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:userpool/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/cognito/v2/idp/user-pools/{id}/users?region={region}", "arn_tpl": "arn:{partition}:cognito-idp:{region}:{account}:userpool/{name}"} # fmt: skip # this call requires the MaxResult parameter, 60 is the maximum valid input api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-user-pools", "UserPools", {"MaxResults": 60}) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_cognito_user", "aws_cognito_group", "aws_lambda_function", "aws_kms_key"]}, "predecessors": {"delete": ["aws_lambda_function", "aws_kms_key"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/config.py b/plugins/aws/fix_plugin_aws/resource/config.py index bc668e0cc4..4817287c4f 100644 --- a/plugins/aws/fix_plugin_aws/resource/config.py +++ b/plugins/aws/fix_plugin_aws/resource/config.py @@ -63,15 +63,15 @@ class AwsConfigRecordingGroup: @define(eq=False, slots=False) class AwsConfigRecorder(AwsResource): kind: ClassVar[str] = "aws_config_recorder" - kind_display: ClassVar[str] = "AWS Config Recorder" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Config Recorder" + _kind_description: ClassVar[str] = ( "AWS Config Recorder is a service provided by Amazon Web Services that" " continuously records the configuration changes made to resources in an AWS" " account." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:config:{region}:{account}:config-recorder/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:config:{region}:{account}:config-recorder/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-configuration-recorders", "ConfigurationRecorders" ) diff --git a/plugins/aws/fix_plugin_aws/resource/dynamodb.py b/plugins/aws/fix_plugin_aws/resource/dynamodb.py index 7db467d4d3..ae253b6d29 100644 --- a/plugins/aws/fix_plugin_aws/resource/dynamodb.py +++ b/plugins/aws/fix_plugin_aws/resource/dynamodb.py @@ -358,17 +358,17 @@ class AwsDynamoDbContinuousBackup: @define(eq=False, slots=False) class AwsDynamoDbTable(DynamoDbTaggable, AwsResource): kind: ClassVar[str] = "aws_dynamodb_table" - kind_display: ClassVar[str] = "AWS DynamoDB Table" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS DynamoDB Table" + _kind_description: ClassVar[str] = ( "An AWS DynamoDB Table is a collection of data items organized by a primary key in Amazon DynamoDB," " a fully managed NoSQL database service that provides fast and predictable performance with seamless" " scalability." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/dynamodbv2/home?region={region}#table?name={name}", "arn_tpl": "arn:{partition}:dynamodb:{region}:{account}:table/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/dynamodbv2/home?region={region}#table?name={name}", "arn_tpl": "arn:{partition}:dynamodb:{region}:{account}:table/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-tables", "TableNames") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_kinesis_stream", "aws_kms_key"]}, "predecessors": {"delete": ["aws_kinesis_stream", "aws_kms_key"]}, } @@ -503,17 +503,17 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsDynamoDbGlobalTable(DynamoDbTaggable, AwsResource): kind: ClassVar[str] = "aws_dynamodb_global_table" - kind_display: ClassVar[str] = "AWS DynamoDB Global Table" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS DynamoDB Global Table" + _kind_description: ClassVar[str] = ( "AWS DynamoDB Global Tables provide fully managed, multi-region, and globally" " distributed replicas of DynamoDB tables, enabling low-latency and high-" " performance global access to data." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:dynamodb:{region}:{account}:table/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:dynamodb:{region}:{account}:table/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-global-tables", "GlobalTables") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_kms_key"]}, "predecessors": {"delete": ["aws_kms_key"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/ec2.py b/plugins/aws/fix_plugin_aws/resource/ec2.py index 8db14ce0b6..3b3b27b174 100644 --- a/plugins/aws/fix_plugin_aws/resource/ec2.py +++ b/plugins/aws/fix_plugin_aws/resource/ec2.py @@ -386,17 +386,17 @@ class AwsEc2InferenceAcceleratorInfo: @define(eq=False, slots=False) class AwsEc2InstanceType(AwsResource, BaseInstanceType): kind: ClassVar[str] = "aws_ec2_instance_type" - kind_display: ClassVar[str] = "AWS EC2 Instance Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Instance Type" + _kind_description: ClassVar[str] = ( "AWS EC2 Instance Type refers to the classification of an EC2 instance based on the resources and" " capabilities it offers, such as CPU, memory, storage, and networking capacity, tailored for different" " workload requirements and applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ec2:{region}:{account}:instance/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ec2:{region}:{account}:instance/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-instance-types", "InstanceTypes") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_ec2_instance"], "delete": [], @@ -514,16 +514,16 @@ class AwsEc2VolumeAttachment: @define(eq=False, slots=False) class AwsEc2Volume(EC2Taggable, AwsResource, BaseVolume): kind: ClassVar[str] = "aws_ec2_volume" - kind_display: ClassVar[str] = "AWS EC2 Volume" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#VolumeDetails:volumeId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:volume/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Volume" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#VolumeDetails:volumeId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:volume/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "EC2 Volumes are block-level storage devices that can be attached to EC2" " instances in Amazon's cloud, providing additional storage for applications" " and data." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-volumes", "Volumes") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_ec2_volume_type", "aws_ec2_instance"], "delete": ["aws_kms_key"]}, "successors": {"default": ["aws_kms_key"], "delete": ["aws_ec2_instance"]}, } @@ -735,18 +735,18 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsEc2Snapshot(EC2Taggable, AwsResource, BaseSnapshot): kind: ClassVar[str] = "aws_ec2_snapshot" - kind_display: ClassVar[str] = "AWS EC2 Snapshot" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#SnapshotDetails:snapshotId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:snapshot/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Snapshot" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#SnapshotDetails:snapshotId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:snapshot/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "EC2 Snapshots are backups of Amazon Elastic Block Store (EBS)" " volumes, allowing users to capture and store point-in-time copies of their" " data." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-snapshots", "Snapshots", dict(OwnerIds=["self"]) ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_ec2_volume"], "delete": ["aws_kms_key"]}, "successors": {"default": ["aws_kms_key"]}, } @@ -806,13 +806,13 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsEc2KeyPair(EC2Taggable, AwsResource, BaseKeyPair): kind: ClassVar[str] = "aws_ec2_keypair" - kind_display: ClassVar[str] = "AWS EC2 Keypair" - kind_description: ClassVar[str] = "EC2 Keypairs are SSH key pairs used to securely connect to EC2 instances in Amazon's cloud." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#KeyPairs:search={name}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:keypair/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS EC2 Keypair" + _kind_description: ClassVar[str] = "EC2 Keypairs are SSH key pairs used to securely connect to EC2 instances in Amazon's cloud." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#KeyPairs:search={name}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:keypair/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-key-pairs", "KeyPairs") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [], "delete": ["aws_ec2_instance"], @@ -1245,15 +1245,15 @@ class AwsEc2PrivateDnsNameOptionsResponse: @define(eq=False, slots=False) class AwsEc2Instance(EC2Taggable, AwsResource, BaseInstance): kind: ClassVar[str] = "aws_ec2_instance" - kind_display: ClassVar[str] = "AWS EC2 Instance" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#InstanceDetails:instanceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:instance/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Instance" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#InstanceDetails:instanceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:instance/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "EC2 Instances are virtual servers in Amazon's cloud, allowing users to run" " applications on the Amazon Web Services infrastructure." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-instances", "Reservations") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_subnet", "aws_ec2_image", "aws_iam_instance_profile"], "delete": ["aws_ec2_keypair", "aws_vpc", "aws_subnet"], @@ -1575,17 +1575,17 @@ class AwsEc2RecurringCharge: @define(eq=False, slots=False) class AwsEc2ReservedInstances(EC2Taggable, AwsResource): kind: ClassVar[str] = "aws_ec2_reserved_instances" - kind_display: ClassVar[str] = "AWS EC2 Reserved Instances" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Reserved Instances" + _kind_description: ClassVar[str] = ( "Reserved Instances are a purchasing option to save money on EC2 instance" " usage. Users can reserve instances for a one- or three-year term, allowing" " them to pay a lower hourly rate compared to on-demand instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ReservedInstances:instanceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:reserved-instances/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ReservedInstances:instanceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:reserved-instances/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-reserved-instances", "ReservedInstances") - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_ec2_instance_type"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_ec2_instance_type"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("ReservedInstancesId"), "tags": S("Tags", default=[]) >> ToDict(), @@ -1713,16 +1713,16 @@ class AwsEc2NetworkAclEntry: @define(eq=False, slots=False) class AwsEc2NetworkAcl(EC2Taggable, AwsResource, BaseNetworkAcl): kind: ClassVar[str] = "aws_ec2_network_acl" - kind_display: ClassVar[str] = "AWS EC2 Network ACL" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Network ACL" + _kind_description: ClassVar[str] = ( "EC2 Network ACLs are virtual stateless firewalls that control inbound and" " outbound traffic for EC2 instances in Amazon's cloud." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpc/home?region={region}#NetworkAclDetails:networkAclId={NetworkAclId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:network-acl/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpc/home?region={region}#NetworkAclDetails:networkAclId={NetworkAclId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:network-acl/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-network-acls", "NetworkAcls") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc", "aws_ec2_subnet"]}, "successors": {"default": ["aws_ec2_subnet"]}, } @@ -1766,16 +1766,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsEc2ElasticIp(EC2Taggable, AwsResource, BaseIPAddress): kind: ClassVar[str] = "aws_ec2_elastic_ip" - kind_display: ClassVar[str] = "AWS EC2 Elastic IP" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ElasticIpDetails:AllocationId={AllocationId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:elastic-ip/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Elastic IP" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ElasticIpDetails:AllocationId={AllocationId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:elastic-ip/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "Elastic IP addresses are static, IPv4 addresses designed for dynamic cloud" " computing. They allow you to mask the failure or replacement of an instance" " by rapidly remapping the address to another instance in your account." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-addresses", "Addresses") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_ec2_instance", "aws_ec2_network_interface"]}, "successors": {"delete": ["aws_ec2_instance", "aws_ec2_network_interface"]}, } @@ -1938,17 +1938,17 @@ class AwsEc2Tag: @define(eq=False, slots=False) class AwsEc2NetworkInterface(EC2Taggable, AwsResource, BaseNetworkInterface): kind: ClassVar[str] = "aws_ec2_network_interface" - kind_display: ClassVar[str] = "AWS EC2 Network Interface" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Network Interface" + _kind_description: ClassVar[str] = ( "An EC2 Network Interface is a virtual network interface that can be attached" " to EC2 instances in the AWS cloud, allowing for communication between" " instances and with external networks." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#NetworkInterface:networkInterfaceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:network-interface/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#NetworkInterface:networkInterfaceId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:network-interface/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-network-interfaces", "NetworkInterfaces") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_instance", "aws_ec2_security_group"], "delete": ["aws_vpc", "aws_ec2_instance"], @@ -2112,14 +2112,14 @@ class AwsEc2VpcCidrBlockAssociation: @define(eq=False, slots=False) class AwsEc2Vpc(EC2Taggable, AwsResource, BaseNetwork): kind: ClassVar[str] = "aws_vpc" - kind_display: ClassVar[str] = "AWS VPC" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#VpcDetails:VpcId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS VPC" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#VpcDetails:VpcId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "AWS VPC stands for Amazon Virtual Private Cloud. It is a virtual network" " dedicated to your AWS account, allowing you to launch AWS resources in a" " defined virtual network environment." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-vpcs", "Vpcs") mapping: ClassVar[Dict[str, Bender]] = { "id": S("VpcId"), @@ -2226,18 +2226,18 @@ class AwsEc2VpcPeeringConnectionStateReason: @define(eq=False, slots=False) class AwsEc2VpcPeeringConnection(EC2Taggable, AwsResource, BasePeeringConnection): kind: ClassVar[str] = "aws_vpc_peering_connection" - kind_display: ClassVar[str] = "AWS VPC Peering Connection" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#PeeringConnectionDetails:vpcPeeringConnectionId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc-peering-connection/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS VPC Peering Connection" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#PeeringConnectionDetails:vpcPeeringConnectionId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc-peering-connection/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "VPC Peering Connection is a networking connection between two Amazon Virtual" " Private Clouds (VPCs) that enables you to route traffic between them using" " private IP addresses." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-vpc-peering-connections", "VpcPeeringConnections" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2312,16 +2312,16 @@ class AwsEc2LastError: @define(eq=False, slots=False) class AwsEc2VpcEndpoint(EC2Taggable, AwsResource, BaseEndpoint): kind: ClassVar[str] = "aws_vpc_endpoint" - kind_display: ClassVar[str] = "AWS VPC Endpoint" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#Endpoints:vpcEndpointId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc-endpoint/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS VPC Endpoint" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#Endpoints:vpcEndpointId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:vpc-endpoint/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "VPC Endpoints enable secure and private communication between your VPC and" " supported AWS services without using public IPs or requiring traffic to" " traverse the internet." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-vpc-endpoints", "VpcEndpoints") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_route_table", "aws_ec2_subnet", "aws_ec2_security_group"], "delete": [ @@ -2455,16 +2455,16 @@ class AwsEc2PrivateDnsNameOptionsOnLaunch: @define(eq=False, slots=False) class AwsEc2Subnet(EC2Taggable, AwsResource, BaseSubnet): kind: ClassVar[str] = "aws_ec2_subnet" - kind_display: ClassVar[str] = "AWS EC2 Subnet" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#SubnetDetails:subnetId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:subnet/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Subnet" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#SubnetDetails:subnetId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:subnet/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "An AWS EC2 Subnet is a logical subdivision of a VPC (Virtual Private Cloud)" " in Amazon's cloud, allowing users to group resources and control network" " access within a specific network segment." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-subnets", "Subnets") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2628,16 +2628,16 @@ class AwsEc2IpPermission: @define(eq=False, slots=False) class AwsEc2SecurityGroup(EC2Taggable, AwsResource, BaseSecurityGroup): kind: ClassVar[str] = "aws_ec2_security_group" - kind_display: ClassVar[str] = "AWS EC2 Security Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Security Group" + _kind_description: ClassVar[str] = ( "An EC2 Security Group acts as a virtual firewall that controls inbound and" " outbound traffic for EC2 instances within a VPC." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#SecurityGroup:groupId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:security-group/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#SecurityGroup:groupId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:security-group/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-security-groups", "SecurityGroups") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2771,17 +2771,17 @@ class AwsEc2ProvisionedBandwidth: @define(eq=False, slots=False) class AwsEc2NatGateway(EC2Taggable, AwsResource, BaseGateway): kind: ClassVar[str] = "aws_ec2_nat_gateway" - kind_display: ClassVar[str] = "AWS EC2 NAT Gateway" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#NatGatewayDetails:natGatewayId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:nat-gateway/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 NAT Gateway" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#NatGatewayDetails:natGatewayId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:nat-gateway/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "A NAT Gateway is a fully managed network address translation (NAT) service" " provided by Amazon Web Services (AWS) that allows instances within a private" " subnet to connect outbound to the Internet while also preventing inbound" " connections from the outside." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-nat-gateways", "NatGateways") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_ec2_network_interface", "aws_vpc", "aws_ec2_subnet"]}, "successors": {"default": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_network_interface"]}, } @@ -2905,17 +2905,17 @@ class AwsEc2InternetGatewayAttachment: @define(eq=False, slots=False) class AwsEc2InternetGateway(EC2Taggable, AwsResource, BaseGateway): kind: ClassVar[str] = "aws_ec2_internet_gateway" - kind_display: ClassVar[str] = "AWS EC2 Internet Gateway" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Internet Gateway" + _kind_description: ClassVar[str] = ( "An Internet Gateway is a horizontally scalable, redundant, and highly" " available VPC component that allows communication between instances in your" " VPC and the internet." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpc/home?region={region}#InternetGateway:internetGatewayId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:internet-gateway/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpc/home?region={region}#InternetGateway:internetGatewayId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:internet-gateway/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-internet-gateways", "InternetGateways") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3055,15 +3055,15 @@ class AwsEc2Route: @define(eq=False, slots=False) class AwsEc2RouteTable(EC2Taggable, AwsResource, BaseRoutingTable): kind: ClassVar[str] = "aws_ec2_route_table" - kind_display: ClassVar[str] = "AWS EC2 Route Table" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#RouteTableDetails:RouteTableId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:route-table/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Route Table" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/vpcconsole/home?region={region}#RouteTableDetails:RouteTableId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:route-table/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "EC2 Route Tables are used to determine where network traffic is directed" " within a Virtual Private Cloud (VPC) in Amazon's cloud infrastructure." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-route-tables", "RouteTables") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc"], "delete": ["aws_vpc"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3200,15 +3200,15 @@ class AwsEc2HostInstance: @define(eq=False, slots=False) class AwsEc2Host(EC2Taggable, AwsResource): kind: ClassVar[str] = "aws_ec2_host" - kind_display: ClassVar[str] = "AWS EC2 Host" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Host" + _kind_description: ClassVar[str] = ( "EC2 Hosts are physical servers in Amazon's cloud that are used to run EC2 instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "host", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#Host:hostId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:host/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "host", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#Host:hostId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:host/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-hosts", "Hosts") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_ec2_instance"], "delete": ["aws_ec2_instance"]} } mapping: ClassVar[Dict[str, Bender]] = { @@ -3298,15 +3298,15 @@ class AwsEc2DestinationOption: @define(eq=False, slots=False) class AwsEc2FlowLog(EC2Taggable, AwsResource): kind: ClassVar[str] = "aws_ec2_flow_log" - kind_display: ClassVar[str] = "AWS EC2 Flow Log" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Flow Log" + _kind_description: ClassVar[str] = ( "EC2 Flow Logs capture information about the IP traffic going to and from" " network interfaces in an Amazon EC2 instance, helping to troubleshoot" " network connectivity issues." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ec2:{region}:{account}:flow-log/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ec2:{region}:{account}:flow-log/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-flow-logs", "FlowLogs") mapping: ClassVar[Dict[str, Bender]] = { "id": S("FlowLogId"), @@ -3327,7 +3327,7 @@ class AwsEc2FlowLog(EC2Taggable, AwsResource): "max_aggregation_interval": S("MaxAggregationInterval"), "destination_options": S("DestinationOptions") >> Bend(AwsEc2DestinationOption.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_s3_bucket"]}, "predecessors": {"default": ["aws_vpc"]}, } @@ -3401,15 +3401,15 @@ class AwsEc2BlockDeviceMapping: @define(eq=False, slots=False) class AwsEc2Image(AwsResource): kind: ClassVar[str] = "aws_ec2_image" - kind_display: ClassVar[str] = "AWS EC2 Image" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EC2 Image" + _kind_description: ClassVar[str] = ( "An Amazon Machine Image (AMI) is a supported and maintained image " "provided by AWS that provides the information required to launch an instance. " ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ImageDetails:imageId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:image/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_ec2_snapshot"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#ImageDetails:imageId={id}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:image/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_ec2_snapshot"]}} api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("ec2", "describe-images", "Images", {"Owners": ["self"]}) mapping: ClassVar[Dict[str, Bender]] = { "id": S("ImageId"), @@ -3973,11 +3973,11 @@ class AwsEc2LaunchTemplateData: @define(eq=False, slots=False) class AwsEc2LaunchTemplate(EC2Taggable, AwsResource): kind: ClassVar[str] = "aws_ec2_launch_template" - kind_display: ClassVar[str] = "AWS EC2 Launch Template" - kind_description: ClassVar[str] = "An AWS EC2 Launch Template provides a configurable blueprint for launching EC2 instances, allowing for the specification of settings like instance type, AMI, security groups, and block device mappings for consistency and automation in instance creation." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#LaunchTemplateDetails:launchTemplateId={LaunchTemplateId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:launch-template/{id}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS EC2 Launch Template" + _kind_description: ClassVar[str] = "An AWS EC2 Launch Template provides a configurable blueprint for launching EC2 instances, allowing for the specification of settings like instance type, AMI, security groups, and block device mappings for consistency and automation in instance creation." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/v2/home?region={region}#LaunchTemplateDetails:launchTemplateId={LaunchTemplateId}", "arn_tpl": "arn:{partition}:ec2:{region}:{account}:launch-template/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( "ec2", "describe-launch-template-versions", "LaunchTemplateVersions", {"Versions": ["$Default"]} ) diff --git a/plugins/aws/fix_plugin_aws/resource/ecr.py b/plugins/aws/fix_plugin_aws/resource/ecr.py index fa0a4336e8..f0342b3a72 100644 --- a/plugins/aws/fix_plugin_aws/resource/ecr.py +++ b/plugins/aws/fix_plugin_aws/resource/ecr.py @@ -27,11 +27,11 @@ class AwsEcrEncryptionConfiguration: @define(eq=False, slots=False) class AwsEcrRepository(AwsResource): kind: ClassVar[str] = "aws_ecr_repository" - kind_display: ClassVar[str] = "AWS ECR Repository" - kind_description: ClassVar[str] = "An AWS Elastic Container Registry (ECR) Repository is used for storing, managing, and deploying Docker container images in a secure, scalable, and private environment on AWS." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "repository", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecr/repositories/{name}?region={region}", "arn_tpl": "arn:{partition}:ecr:{region}:{account}:repository/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS ECR Repository" + _kind_description: ClassVar[str] = "An AWS Elastic Container Registry (ECR) Repository is used for storing, managing, and deploying Docker container images in a secure, scalable, and private environment on AWS." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "repository", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecr/repositories/{name}?region={region}", "arn_tpl": "arn:{partition}:ecr:{region}:{account}:repository/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("ecr", "describe-repositories", "repositories") public_spec: ClassVar[AwsApiSpec] = AwsApiSpec("ecr-public", "describe-repositories", "repositories") mapping: ClassVar[Dict[str, Bender]] = { diff --git a/plugins/aws/fix_plugin_aws/resource/ecs.py b/plugins/aws/fix_plugin_aws/resource/ecs.py index fae9cc27b1..bf571c46f6 100644 --- a/plugins/aws/fix_plugin_aws/resource/ecs.py +++ b/plugins/aws/fix_plugin_aws/resource/ecs.py @@ -105,15 +105,15 @@ class AwsEcsAutoScalingGroupProvider: class AwsEcsCapacityProvider(EcsTaggable, AwsResource): # collection of capacity provider resources happens in AwsEcsCluster.collect() kind: ClassVar[str] = "aws_ecs_capacity_provider" - kind_display: ClassVar[str] = "AWS ECS Capacity Provider" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Capacity Provider" + _kind_description: ClassVar[str] = ( "ECS Capacity Providers are used in Amazon's Elastic Container Service to" " manage the capacity and scaling for containerized applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "provider", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ecs:{region}:{account}:capacity-provider/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "provider", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ecs:{region}:{account}:capacity-provider/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_autoscaling_group"]}, "successors": {"default": ["aws_autoscaling_group"]}, } @@ -426,15 +426,15 @@ class AwsEcsTaskOverride: class AwsEcsTask(EcsTaggable, AwsResource): # collection of task resources happens in AwsEcsCluster.collect() kind: ClassVar[str] = "aws_ecs_task" - kind_display: ClassVar[str] = "AWS ECS Task" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Task" + _kind_description: ClassVar[str] = ( "ECS Tasks are containers managed by Amazon Elastic Container Service, which" " allow users to run and scale applications easily using Docker containers." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{clusterArn}/tasks/{id}/configuration?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:task/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{clusterArn}/tasks/{id}/configuration?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:task/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ecs_task_definition"], "delete": ["aws_iam_role"], @@ -1074,19 +1074,19 @@ class AwsEcsProxyConfiguration: @define(eq=False, slots=False) class AwsEcsTaskDefinition(EcsTaggable, AwsResource): kind: ClassVar[str] = "aws_ecs_task_definition" - kind_display: ClassVar[str] = "AWS ECS Task Definition" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Task Definition" + _kind_description: ClassVar[str] = ( "An ECS Task Definition is a blueprint for running tasks in AWS Elastic" " Container Service (ECS), providing information such as the Docker image," " CPU, memory, network configuration, and other parameters." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/task-definitions/{name}?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:task-definition/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/task-definitions/{name}?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:task-definition/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-task-definitions", "taskDefinitionArns", {"sort": "desc"} ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_iam_role"], "delete": ["aws_iam_role"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1497,16 +1497,16 @@ class AwsEcsPlacementStrategy: class AwsEcsService(EcsTaggable, AwsResource): # collection of service resources happens in AwsEcsCluster.collect() kind: ClassVar[str] = "aws_ecs_service" - kind_display: ClassVar[str] = "AWS ECS Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Service" + _kind_description: ClassVar[str] = ( "ECS (Elastic Container Service) is a scalable container orchestration" " service provided by AWS, allowing users to easily manage, deploy, and scale" " containerized applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{clusterArn}/services/{name}/health?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:service/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{clusterArn}/services/{name}/health?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:service/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], "delete": ["aws_alb_target_group", "aws_elb", "aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -1788,16 +1788,16 @@ class AwsEcsContainerInstanceHealthStatus: class AwsEcsContainerInstance(EcsTaggable, AwsResource): # collection of container instance resources happens in AwsEcsCluster.collect() kind: ClassVar[str] = "aws_ecs_container_instance" - kind_display: ClassVar[str] = "AWS ECS Container Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Container Instance" + _kind_description: ClassVar[str] = ( "ECS Container Instances are virtual servers in Amazon's Elastic Container" " Service (ECS) that are used to run and manage containers within the ECS" " environment." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ecs:{region}:{account}:container-instance/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ecs:{region}:{account}:container-instance/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_ec2_instance"], "delete": ["aws_ec2_instance"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1935,16 +1935,16 @@ class AwsEcsClusterSetting: @define(eq=False, slots=False) class AwsEcsCluster(EcsTaggable, AwsResource): kind: ClassVar[str] = "aws_ecs_cluster" - kind_display: ClassVar[str] = "AWS ECS Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ECS Cluster" + _kind_description: ClassVar[str] = ( "ECS (Elastic Container Service) Cluster is a managed cluster of Amazon EC2" " instances used to deploy and manage Docker containers." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{name}/services?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:cluster/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ecs/v2/clusters/{name}/services?region={region}", "arn_tpl": "arn:{partition}:ecs:{region}:{account}:cluster/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-clusters", "clusterArns") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_kms_key", "aws_s3_bucket"]}, "successors": { "default": [ diff --git a/plugins/aws/fix_plugin_aws/resource/efs.py b/plugins/aws/fix_plugin_aws/resource/efs.py index 0d9b6eafac..df5719f2dd 100644 --- a/plugins/aws/fix_plugin_aws/resource/efs.py +++ b/plugins/aws/fix_plugin_aws/resource/efs.py @@ -50,14 +50,14 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsEfsMountTarget(AwsResource): kind: ClassVar[str] = "aws_efs_mount_target" - kind_display: ClassVar[str] = "AWS EFS Mount Target" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EFS Mount Target" + _kind_description: ClassVar[str] = ( "EFS Mount Targets are endpoints in Amazon's Elastic File System that allow" " EC2 instances to mount the file system and access the shared data." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:efs:{region}:{account}:mount-target/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": None, "arn_tpl": "arn:{partition}:efs:{region}:{account}:mount-target/{id}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("MountTargetId"), "owner_id": S("OwnerId"), @@ -65,7 +65,7 @@ class AwsEfsMountTarget(AwsResource): "ip_address": S("IpAddress"), "availability_zone_name": S("AvailabilityZoneName"), } - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_ec2_network_interface"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_ec2_network_interface"]}} owner_id: Optional[str] = field(default=None) life_cycle_state: Optional[str] = field(default=None) ip_address: Optional[str] = field(default=None) @@ -79,13 +79,13 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsEfsFileSystem(EfsTaggable, AwsResource, BaseNetworkShare): kind: ClassVar[str] = "aws_efs_file_system" - kind_display: ClassVar[str] = "AWS EFS File System" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/efs/home?region={region}#/file-systems/{FileSystemId}", "arn_tpl": "arn:{partition}:efs:{region}:{account}:file-system/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EFS File System" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/efs/home?region={region}#/file-systems/{FileSystemId}", "arn_tpl": "arn:{partition}:efs:{region}:{account}:file-system/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "EFS (Elastic File System) provides a scalable and fully managed file storage" " service for Amazon EC2 instances." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-file-systems", @@ -110,7 +110,7 @@ class AwsEfsFileSystem(EfsTaggable, AwsResource, BaseNetworkShare): "throughput_mode": S("ThroughputMode"), "availability_zone_name": S("AvailabilityZoneName"), } - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_kms_key"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["aws_kms_key"]}} owner_id: Optional[str] = field(default=None) creation_token: Optional[str] = field(default=None) number_of_mount_targets: Optional[int] = field(default=None) @@ -231,15 +231,15 @@ class AwsEfsRootDirectory: @define(eq=False, slots=False) class AwsEfsAccessPoint(AwsResource, EfsTaggable): kind: ClassVar[str] = "aws_efs_access_point" - kind_display: ClassVar[str] = "AWS EFS Access Point" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EFS Access Point" + _kind_description: ClassVar[str] = ( "AWS EFS Access Point is a way to securely access files in Amazon EFS" " (Elastic File System) using a unique hostname and optional path, providing" " fine-grained access control." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/efs/home?region={region}#/access-points/{id}", "arn_tpl": "arn:{partition}:efs:{region}:{account}:access-point/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/efs/home?region={region}#/access-points/{id}", "arn_tpl": "arn:{partition}:efs:{region}:{account}:access-point/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-access-points", @@ -257,7 +257,7 @@ class AwsEfsAccessPoint(AwsResource, EfsTaggable): "owner_id": S("OwnerId"), "life_cycle_state": S("LifeCycleState"), } - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_efs_file_system"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["aws_efs_file_system"]}} client_token: Optional[str] = field(default=None) posix_user: Optional[AwsEfsPosixUser] = field(default=None) root_directory: Optional[AwsEfsRootDirectory] = field(default=None) diff --git a/plugins/aws/fix_plugin_aws/resource/eks.py b/plugins/aws/fix_plugin_aws/resource/eks.py index 3c4915a7ba..70b5ea7b77 100644 --- a/plugins/aws/fix_plugin_aws/resource/eks.py +++ b/plugins/aws/fix_plugin_aws/resource/eks.py @@ -189,16 +189,16 @@ class AwsEksLaunchTemplateSpecification: class AwsEksNodegroup(EKSTaggable, AwsResource): # Note: this resource is collected via AwsEksCluster kind: ClassVar[str] = "aws_eks_nodegroup" - kind_display: ClassVar[str] = "AWS EKS Nodegroup" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EKS Nodegroup" + _kind_description: ClassVar[str] = ( "An EKS Nodegroup is a set of EC2 instances that host containerized" " applications and run Kubernetes pods in Amazon Elastic Kubernetes Service" " (EKS) cluster." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "managed_kubernetes"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:eks:{region}:{account}:nodegroup/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "managed_kubernetes"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:eks:{region}:{account}:nodegroup/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_eks_cluster"], "delete": ["aws_eks_cluster", "aws_autoscaling_group"]}, "successors": {"default": ["aws_autoscaling_group"]}, } @@ -404,17 +404,17 @@ class AwsEksConnectorConfig: @define(eq=False, slots=False) class AwsEksCluster(EKSTaggable, BaseManagedKubernetesClusterProvider, AwsResource): kind: ClassVar[str] = "aws_eks_cluster" - kind_display: ClassVar[str] = "AWS EKS Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS EKS Cluster" + _kind_description: ClassVar[str] = ( "Amazon Elastic Kubernetes Service (EKS) Cluster is a managed Kubernetes" " service provided by AWS for running containerized applications using" " Kubernetes." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/eks/home?region={region}#/clusters/{name}", "arn_tpl": "arn:{partition}:eks:{region}:{account}:cluster/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/eks/home?region={region}#/clusters/{name}", "arn_tpl": "arn:{partition}:eks:{region}:{account}:cluster/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-clusters", "clusters") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role"], "delete": ["aws_iam_role"], diff --git a/plugins/aws/fix_plugin_aws/resource/elasticache.py b/plugins/aws/fix_plugin_aws/resource/elasticache.py index 2ae7d557e0..39f6be390a 100644 --- a/plugins/aws/fix_plugin_aws/resource/elasticache.py +++ b/plugins/aws/fix_plugin_aws/resource/elasticache.py @@ -248,17 +248,17 @@ class AwsElastiCacheLogDeliveryConfiguration: @define(eq=False, slots=False) class AwsElastiCacheCacheCluster(ElastiCacheTaggable, AwsResource): kind: ClassVar[str] = "aws_elasticache_cache_cluster" - kind_display: ClassVar[str] = "AWS ElastiCache Cache Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ElastiCache Cache Cluster" + _kind_description: ClassVar[str] = ( "ElastiCache is a web service that makes it easy to set up, manage, and scale" " a distributed in-memory cache environment in the cloud. A cache cluster is a" " collection of one or more cache nodes that work together to provide a highly" " scalable and available cache solution." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticache/home?region={region}#/{Engine}/{name}", "arn_tpl": "arn:{partition}:elasticache:{region}:{account}:cache-cluster/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticache/home?region={region}#/{Engine}/{name}", "arn_tpl": "arn:{partition}:elasticache:{region}:{account}:cache-cluster/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_ec2_security_group"], "delete": ["aws_ec2_security_group"], @@ -500,17 +500,17 @@ class AwsElastiCacheNodeGroup: @define(eq=False, slots=False) class AwsElastiCacheReplicationGroup(ElastiCacheTaggable, AwsResource): kind: ClassVar[str] = "aws_elasticache_replication_group" - kind_display: ClassVar[str] = "AWS ElastiCache Replication Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ElastiCache Replication Group" + _kind_description: ClassVar[str] = ( "ElastiCache Replication Groups in AWS are used to store and retrieve data in" " memory to improve the performance of web applications and reduce the load on" " databases." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:elasticache:{region}:{account}:replication-group/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:elasticache:{region}:{account}:replication-group/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-replication-groups", "ReplicationGroups") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["aws_elasticache_cache_cluster", "aws_kms_key"]}, "successors": {"default": ["aws_elasticache_cache_cluster", "aws_kms_key"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/elasticbeanstalk.py b/plugins/aws/fix_plugin_aws/resource/elasticbeanstalk.py index 5cbe2b777c..a8d90dfa68 100644 --- a/plugins/aws/fix_plugin_aws/resource/elasticbeanstalk.py +++ b/plugins/aws/fix_plugin_aws/resource/elasticbeanstalk.py @@ -91,14 +91,14 @@ class AwsBeanstalkApplicationResourceLifecycleConfig: @define(eq=False, slots=False) class AwsBeanstalkApplication(AwsResource): kind: ClassVar[str] = "aws_beanstalk_application" - kind_display: ClassVar[str] = "AWS Elastic Beanstalk Application" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Elastic Beanstalk Application" + _kind_description: ClassVar[str] = ( "Elastic Beanstalk is a fully managed service that makes it easy to deploy" " and run applications in multiple languages." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticbeanstalk/home?region={region}#/application/overview?applicationName={name}", "arn_tpl": "arn:{partition}:elasticbeanstalk:{region}:{account}:application/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticbeanstalk/home?region={region}#/application/overview?applicationName={name}", "arn_tpl": "arn:{partition}:elasticbeanstalk:{region}:{account}:application/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-applications", "Applications") mapping: ClassVar[Dict[str, Bender]] = { "id": S("ApplicationName"), @@ -288,17 +288,17 @@ class AwsBeanstalkEnvironmentResourcesDescription: @define(eq=False, slots=False) class AwsBeanstalkEnvironment(AwsResource): kind: ClassVar[str] = "aws_beanstalk_environment" - kind_display: ClassVar[str] = "AWS Elastic Beanstalk Environment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Elastic Beanstalk Environment" + _kind_description: ClassVar[str] = ( "An AWS Elastic Beanstalk environment is a collection of AWS resources running an application version." " It includes an application server, server instances, load balancers, and optionally, a database." " Each environment runs only one application and one version of that application at a time." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticbeanstalk/home?region={region}#/environment/dashboard?environmentId={id}", "arn_tpl": "arn:{partition}:elasticbeanstalk:{region}:{account}:environment/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/elasticbeanstalk/home?region={region}#/environment/dashboard?environmentId={id}", "arn_tpl": "arn:{partition}:elasticbeanstalk:{region}:{account}:environment/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-environments", "Environments") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_beanstalk_application"], "delete": ["aws_autoscaling_group", "aws_ec2_instance", "aws_alb", "aws_sqs_queue"], diff --git a/plugins/aws/fix_plugin_aws/resource/elb.py b/plugins/aws/fix_plugin_aws/resource/elb.py index 4097ea8290..56a3dced3e 100644 --- a/plugins/aws/fix_plugin_aws/resource/elb.py +++ b/plugins/aws/fix_plugin_aws/resource/elb.py @@ -249,23 +249,23 @@ class AwsElbLoadBalancerAttributes: @define(eq=False, slots=False) class AwsElb(ElbTaggable, AwsResource, BaseLoadBalancer): kind: ClassVar[str] = "aws_elb" - kind_display: ClassVar[str] = "AWS ELB" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ELB" + _kind_description: ClassVar[str] = ( "ELB stands for Elastic Load Balancer. It is a service provided by Amazon Web" " Services that automatically distributes incoming application traffic across" " multiple Amazon EC2 instances, making it easier to achieve fault tolerance" " in your applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#LoadBalancer:loadBalancerArn={name}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:loadbalancer/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#LoadBalancer:loadBalancerArn={name}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:loadbalancer/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-load-balancers", "LoadBalancerDescriptions", override_iam_permission="elasticloadbalancing:DescribeLoadBalancers", ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_security_group"], "delete": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_security_group", "aws_ec2_instance"], diff --git a/plugins/aws/fix_plugin_aws/resource/elbv2.py b/plugins/aws/fix_plugin_aws/resource/elbv2.py index 609922d157..3cba2aa93d 100644 --- a/plugins/aws/fix_plugin_aws/resource/elbv2.py +++ b/plugins/aws/fix_plugin_aws/resource/elbv2.py @@ -345,21 +345,21 @@ class AwsAlbListener: @define(eq=False, slots=False) class AwsAlb(ElbV2Taggable, AwsResource, BaseLoadBalancer): kind: ClassVar[str] = "aws_alb" - kind_display: ClassVar[str] = "AWS ALB" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#LoadBalancer:loadBalancerArn={arn}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:loadbalancer/app/{name}/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS ALB" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#LoadBalancer:loadBalancerArn={arn}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:loadbalancer/app/{name}/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "AWS ALB is an Application Load Balancer that distributes incoming" " application traffic across multiple targets, such as EC2 instances, in" " multiple availability zones." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-load-balancers", "LoadBalancers", override_iam_permission="elasticloadbalancing:DescribeLoadBalancers", ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_security_group"], "delete": ["aws_vpc", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -598,22 +598,22 @@ class AwsAlbTargetHealthDescription: @define(eq=False, slots=False) class AwsAlbTargetGroup(ElbV2Taggable, AwsResource): kind: ClassVar[str] = "aws_alb_target_group" - kind_display: ClassVar[str] = "AWS Alb Target Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Alb Target Group" + _kind_description: ClassVar[str] = ( "An ALB Target Group is a group of instances or IP addresses registered with" " an Application Load Balancer that receives traffic and distributes it to the" " registered targets." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#TargetGroup:targetGroupArn={arn}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:targetgroup/{name}/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/ec2/home?region={region}#TargetGroup:targetGroupArn={arn}", "arn_tpl": "arn:{partition}:elasticloadbalancing:{region}:{account}:targetgroup/{name}/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "describe-target-groups", "TargetGroups", override_iam_permission="elasticloadbalancing:DescribeTargetGroups", ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_vpc", "aws_alb"], "delete": ["aws_ec2_instance", "aws_vpc"]}, "successors": {"delete": ["aws_alb"], "default": ["aws_ec2_instance"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/glacier.py b/plugins/aws/fix_plugin_aws/resource/glacier.py index 8af3ccf495..b03383d597 100644 --- a/plugins/aws/fix_plugin_aws/resource/glacier.py +++ b/plugins/aws/fix_plugin_aws/resource/glacier.py @@ -136,15 +136,15 @@ class AwsGlacierJobOutputLocation: @define(eq=False, slots=False) class AwsGlacierJob(AwsResource): kind: ClassVar[str] = "aws_glacier_job" - kind_display: ClassVar[str] = "AWS Glacier Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Glacier Job" + _kind_description: ClassVar[str] = ( "AWS Glacier Jobs are used to manage and execute operations on data stored in" " Amazon S3 Glacier, such as data retrieval or inventory retrieval." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:glacier:{region}:{account}:job/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:glacier:{region}:{account}:job/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "delete": ["aws_kms_key"], }, @@ -211,16 +211,16 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsGlacierVault(AwsResource): kind: ClassVar[str] = "aws_glacier_vault" - kind_display: ClassVar[str] = "AWS Glacier Vault" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Glacier Vault" + _kind_description: ClassVar[str] = ( "AWS Glacier Vaults are used for long term data archiving and backup," " providing a secure and durable storage solution with low cost." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/glacier/home?region={region}#/vault/{name}/view/properties", "arn_tpl": "arn:{partition}:glacier:{region}:{account}:vault/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/glacier/home?region={region}#/vault/{name}/view/properties", "arn_tpl": "arn:{partition}:glacier:{region}:{account}:vault/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-vaults", "VaultList") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_glacier_job"], } diff --git a/plugins/aws/fix_plugin_aws/resource/iam.py b/plugins/aws/fix_plugin_aws/resource/iam.py index 35096b7443..c4d266ef07 100644 --- a/plugins/aws/fix_plugin_aws/resource/iam.py +++ b/plugins/aws/fix_plugin_aws/resource/iam.py @@ -108,16 +108,16 @@ class AwsIamRoleLastUsed: class AwsIamRole(AwsResource, BaseRole, BaseIamPrincipal): # Note: this resource is collected via AwsIamUser.collect. kind: ClassVar[str] = "aws_iam_role" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/roles/details/{RoleName}", "arn_tpl": "arn:{partition}:iam:{region}:{account}:role/{name}"} # fmt: skip - kind_display: ClassVar[str] = "AWS IAM Role" - kind_description: ClassVar[str] = ( + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/roles/details/{RoleName}", "arn_tpl": "arn:{partition}:iam:{region}:{account}:role/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS IAM Role" + _kind_description: ClassVar[str] = ( "IAM Roles are a way to delegate permissions to entities that you trust. IAM" " roles are similar to users, in that they are both AWS identity types." " However, instead of being uniquely associated with one person, IAM roles are" " intended to be assumable by anyone who needs it." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_iam_policy", "aws_iam_instance_profile"], "delete": ["aws_iam_policy", "aws_iam_instance_profile"], @@ -221,15 +221,15 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsIamServerCertificate(AwsResource, BaseCertificate): kind: ClassVar[str] = "aws_iam_server_certificate" - kind_display: ClassVar[str] = "AWS IAM Server Certificate" - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:iam:{region}:{account}:server-certificate/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS IAM Server Certificate" + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:iam:{region}:{account}:server-certificate/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "AWS IAM Server Certificate is a digital certificate that AWS Identity and" " Access Management (IAM) uses to verify the identity of a resource like an" " HTTPS server. It enables secure communication between the server and AWS" " services." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-server-certificates", "ServerCertificateMetadataList" ) @@ -315,13 +315,13 @@ def default_policy_document(policy: Json) -> Optional[AwsIamPolicyVersion]: class AwsIamPolicy(AwsResource, BasePolicy): # Note: this resource is collected via AwsIamUser.collect. kind: ClassVar[str] = "aws_iam_policy" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iamv2/home?region={region}#/policies/details/{arn}?section=permissions", "arn_tpl": "arn:{partition}:iam::{account}:policy/{name}"} # fmt: skip - kind_display: ClassVar[str] = "AWS IAM Policy" - kind_description: ClassVar[str] = ( + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iamv2/home?region={region}#/policies/details/{arn}?section=permissions", "arn_tpl": "arn:{partition}:iam::{account}:policy/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS IAM Policy" + _kind_description: ClassVar[str] = ( "IAM Policies in AWS are used to define permissions and access controls for" " users, groups, and roles within the AWS ecosystem." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name mapping: ClassVar[Dict[str, Bender]] = { "id": S("PolicyId"), "tags": S("Tags", default=[]) >> ToDict(), @@ -345,7 +345,7 @@ class AwsIamPolicy(AwsResource, BasePolicy): policy_is_attachable: Optional[bool] = field(default=None) policy_description: Optional[str] = field(default=None) policy_document: Optional[AwsIamPolicyVersion] = field(default=None) - managed: Optional[bool] = field(default=None, metadata=dict(ignore_history=True, desciption="Indicates if this policy is managed by AWS or custom.")) # fmt: skip + managed: Optional[bool] = field(default=None, metadata=dict(ignore_history=True, description="Indicates if this policy is managed by AWS or custom.")) # fmt: skip def update_resource_tag(self, client: AwsClient, key: str, value: str) -> bool: return iam_update_tag( @@ -392,15 +392,15 @@ def service_name(cls) -> str: class AwsIamGroup(AwsResource, BaseGroup): # Note: this resource is collected via AwsIamUser.collect. kind: ClassVar[str] = "aws_iam_group" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/groups/details/{name}", "arn_tpl": "arn:{partition}:iam::{account}:group/{name}"} # fmt: skip - kind_display: ClassVar[str] = "AWS IAM Group" - kind_description: ClassVar[str] = ( + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/groups/details/{name}", "arn_tpl": "arn:{partition}:iam::{account}:group/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS IAM Group" + _kind_description: ClassVar[str] = ( "IAM Groups are collections of IAM users. They allow you to manage" " permissions collectively for multiple users, making it easier to manage" " access to AWS resources." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_iam_policy"], "delete": ["aws_iam_policy"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -494,12 +494,12 @@ class AwsIamAccessKeyLastUsed: class AwsIamAccessKey(AwsResource, BaseAccessKey): # Note: this resource is collected via AwsIamUser.collect. kind: ClassVar[str] = "aws_iam_access_key" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/users/{UserName}?section=security_credentials&display=access_key&accessKeyID={AccessKeyId}"} # fmt: skip - kind_display: ClassVar[str] = "AWS IAM Access Key" - kind_description: ClassVar[str] = ( + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/users/{UserName}?section=security_credentials&display=access_key&accessKeyID={AccessKeyId}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS IAM Access Key" + _kind_description: ClassVar[str] = ( "An AWS IAM Access Key is used to securely access AWS services and resources using API operations." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name mapping: ClassVar[Dict[str, Bender]] = { "id": S("AccessKeyId"), "tags": S("Tags", default=[]) >> ToDict(), @@ -627,14 +627,14 @@ class AwsIamVirtualMfaDevice: @define(eq=False, slots=False) class AwsRootUser(AwsResource, BaseUser, BaseIamPrincipal): kind: ClassVar[str] = "aws_root_user" - kind_display: ClassVar[str] = "AWS Root User" - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:None:{region}:{account}:resource/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Root User" + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:None:{region}:{account}:resource/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "The AWS Root User is the initial user created when setting up an AWS account" " and has unrestricted access to all resources in the account." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_account"]}, } password_enabled: Optional[bool] = field(default=None) @@ -648,15 +648,15 @@ class AwsRootUser(AwsResource, BaseUser, BaseIamPrincipal): @define(eq=False, slots=False) class AwsIamUser(AwsResource, BaseUser, BaseIamPrincipal): kind: ClassVar[str] = "aws_iam_user" - kind_display: ClassVar[str] = "AWS IAM User" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/users/details/{name}", "arn_tpl": "arn:{partition}:iam::{account}:user/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS IAM User" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/iam/home?region={region}#/users/details/{name}", "arn_tpl": "arn:{partition}:iam::{account}:user/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "IAM Users are identities created within AWS Identity and Access Management" " (IAM) that can be assigned permissions to access and manage AWS resources." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "get-account-authorization-details") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_iam_group"]}, "successors": {"default": ["aws_iam_policy"], "delete": ["aws_iam_policy"]}, } @@ -814,14 +814,14 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsIamInstanceProfile(AwsResource, BaseInstanceProfile): kind: ClassVar[str] = "aws_iam_instance_profile" - kind_display: ClassVar[str] = "AWS IAM Instance Profile" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS IAM Instance Profile" + _kind_description: ClassVar[str] = ( "IAM Instance Profiles are used to associate IAM roles with EC2 instances," " allowing the instances to securely access AWS services and resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:iam:{region}:{account}:instance-profile/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:iam:{region}:{account}:instance-profile/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-instance-profiles", "InstanceProfiles") mapping: ClassVar[Dict[str, Bender]] = { "id": S("InstanceProfileId"), diff --git a/plugins/aws/fix_plugin_aws/resource/kinesis.py b/plugins/aws/fix_plugin_aws/resource/kinesis.py index 202d955451..70f0d5b792 100644 --- a/plugins/aws/fix_plugin_aws/resource/kinesis.py +++ b/plugins/aws/fix_plugin_aws/resource/kinesis.py @@ -91,16 +91,16 @@ class AwsKinesisEnhancedMetrics: @define(eq=False, slots=False) class AwsKinesisStream(AwsResource): kind: ClassVar[str] = "aws_kinesis_stream" - kind_display: ClassVar[str] = "AWS Kinesis Stream" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Kinesis Stream" + _kind_description: ClassVar[str] = ( "Kinesis Streams are scalable and durable real-time data streaming services" " in Amazon's cloud, enabling users to capture, process, and analyze data in" " real-time." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/kinesis/home?region={region}#/streams/details/{name}", "arn_tpl": "arn:{partition}:kinesis:{region}:{account}:stream/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/kinesis/home?region={region}#/streams/details/{name}", "arn_tpl": "arn:{partition}:kinesis:{region}:{account}:stream/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "delete": ["aws_kms_key"], }, diff --git a/plugins/aws/fix_plugin_aws/resource/kms.py b/plugins/aws/fix_plugin_aws/resource/kms.py index ff0c6e8a8a..005c35967c 100644 --- a/plugins/aws/fix_plugin_aws/resource/kms.py +++ b/plugins/aws/fix_plugin_aws/resource/kms.py @@ -65,15 +65,15 @@ class AwsKmsMultiRegionConfig: @define(eq=False, slots=False) class AwsKmsKey(AwsResource, BaseAccessKey): kind: ClassVar[str] = "aws_kms_key" - kind_display: ClassVar[str] = "AWS KMS Key" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS KMS Key" + _kind_description: ClassVar[str] = ( "AWS KMS (Key Management Service) Key is a managed service that allows you to" " create and control the encryption keys used to encrypt your data stored on" " various AWS services and applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/kms/home?region={region}#/kms/keys/{id}", "arn_tpl": "arn:{partition}:kms:{region}:{account}:key/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/kms/home?region={region}#/kms/keys/{id}", "arn_tpl": "arn:{partition}:kms:{region}:{account}:key/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-keys", "Keys") mapping: ClassVar[Dict[str, Bender]] = { "id": S("KeyId"), diff --git a/plugins/aws/fix_plugin_aws/resource/lambda_.py b/plugins/aws/fix_plugin_aws/resource/lambda_.py index 28b87a1a30..013eab440d 100644 --- a/plugins/aws/fix_plugin_aws/resource/lambda_.py +++ b/plugins/aws/fix_plugin_aws/resource/lambda_.py @@ -232,16 +232,16 @@ class AwsLambdaFunctionUrlConfig: @define(eq=False, slots=False) class AwsLambdaFunction(AwsResource, BaseServerlessFunction): kind: ClassVar[str] = "aws_lambda_function" - kind_display: ClassVar[str] = "AWS Lambda Function" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/lambda/home?region={region}#/functions/{FunctionName}", "arn_tpl": "arn:{partition}:lambda:{region}:{account}:function/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Lambda Function" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/lambda/home?region={region}#/functions/{FunctionName}", "arn_tpl": "arn:{partition}:lambda:{region}:{account}:function/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "AWS Lambda is a serverless computing service that lets you run your code" " without provisioning or managing servers. Lambda functions are the compute" " units that run your code in response to events." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-functions", "Functions") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_vpc", diff --git a/plugins/aws/fix_plugin_aws/resource/opensearch.py b/plugins/aws/fix_plugin_aws/resource/opensearch.py index fc11fa4b9f..cb9afeebe4 100644 --- a/plugins/aws/fix_plugin_aws/resource/opensearch.py +++ b/plugins/aws/fix_plugin_aws/resource/opensearch.py @@ -249,17 +249,17 @@ class AwsOpenSearchOffPeakWindowOptions: @define(eq=False, slots=False) class AwsOpenSearchDomain(AwsResource): kind: ClassVar[str] = "aws_opensearch_domain" - kind_display: ClassVar[str] = "AWS OpenSearch Domain" - kind_description: ClassVar[str] = "An AWS OpenSearch Domain provides a managed environment in the AWS cloud to easily deploy, operate, and scale OpenSearch, a popular search and analytics engine." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "AWS OpenSearch Domain" + _kind_description: ClassVar[str] = "An AWS OpenSearch Domain provides a managed environment in the AWS cloud to easily deploy, operate, and scale OpenSearch, a popular search and analytics engine." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [AwsEc2InstanceType.kind, AwsEc2Vpc.kind, AwsEc2SecurityGroup.kind, AwsEc2Subnet.kind] }, "successors": {"default": [AwsCognitoUserPool.kind]}, } - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/aos/home?region={region}#opensearch/domains/{name}", "arn_tpl": "arn:{partition}:opensearch:{region}:{account}:domain/{name}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/aos/home?region={region}#opensearch/domains/{name}", "arn_tpl": "arn:{partition}:opensearch:{region}:{account}:domain/{name}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("DomainId"), "tags": S("Tags", default=[]) >> ToDict(), diff --git a/plugins/aws/fix_plugin_aws/resource/rds.py b/plugins/aws/fix_plugin_aws/resource/rds.py index 02f4e25158..9a4a73bec4 100644 --- a/plugins/aws/fix_plugin_aws/resource/rds.py +++ b/plugins/aws/fix_plugin_aws/resource/rds.py @@ -321,16 +321,16 @@ class AwsRdsDBRole: @define(eq=False, slots=False) class AwsRdsInstance(RdsTaggable, AwsResource, BaseDatabase): kind: ClassVar[str] = "aws_rds_instance" - kind_display: ClassVar[str] = "AWS RDS Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS RDS Instance" + _kind_description: ClassVar[str] = ( "RDS instances are managed relational databases in Amazon's cloud, providing" " scalable and fast performance for applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#database:id={id};is-cluster=false", "arn_tpl": "arn:{partition}:rds:{region}:{account}:db:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#database:id={id};is-cluster=false", "arn_tpl": "arn:{partition}:rds:{region}:{account}:db:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-db-instances", "DBInstances") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_security_group", "aws_ec2_subnet"], "delete": ["aws_vpc", "aws_ec2_security_group", "aws_ec2_subnet", "aws_kms_key"], @@ -854,15 +854,15 @@ class AwsRdsMasterUserSecret: @define(eq=False, slots=False) class AwsRdsCluster(RdsTaggable, AwsResource, BaseDatabase): kind: ClassVar[str] = "aws_rds_cluster" - kind_display: ClassVar[str] = "AWS RDS Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS RDS Cluster" + _kind_description: ClassVar[str] = ( "RDS Clusters are managed relational database services in Amazon's cloud," " providing scalable and highly available databases for applications running" " on the Amazon Web Services infrastructure." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#database:id={id};is-cluster=true", "arn_tpl": "arn:{partition}:rds:{region}:{account}:cluster/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#database:id={id};is-cluster=true", "arn_tpl": "arn:{partition}:rds:{region}:{account}:cluster/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-db-clusters", "DBClusters") mapping: ClassVar[Dict[str, Bender]] = { "id": S("DBClusterIdentifier"), @@ -963,7 +963,7 @@ class AwsRdsCluster(RdsTaggable, AwsResource, BaseDatabase): "rds_db_system_id": S("DBSystemId"), "rds_master_user_secret": S("MasterUserSecret") >> Bend(AwsRdsMasterUserSecret.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_rds_instance", "aws_kms_key", "aws_kinesis_stream"], "delete": ["aws_rds_instance"], @@ -1063,11 +1063,11 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsRdsSnapshot(RdsTaggable, AwsResource, BaseSnapshot): kind: ClassVar[str] = "aws_rds_snapshot" - kind_display: ClassVar[str] = "AWS RDS Snapshot" - kind_description: ClassVar[str] = "An AWS RDS Snapshot is a backup tool used for creating a point-in-time copy of an RDS database instance, facilitating data recovery and replication." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": [AwsRdsInstance.kind, AwsEc2Vpc.kind]}} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#db-snapshot:engine={Engine};id={id}", "arn_tpl": "arn:{partition}:rds:{region}:{account}:snapshot:{id}/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS RDS Snapshot" + _kind_description: ClassVar[str] = "An AWS RDS Snapshot is a backup tool used for creating a point-in-time copy of an RDS database instance, facilitating data recovery and replication." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": [AwsRdsInstance.kind, AwsEc2Vpc.kind]}} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#db-snapshot:engine={Engine};id={id}", "arn_tpl": "arn:{partition}:rds:{region}:{account}:snapshot:{id}/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("rds", "describe-db-snapshots", "DBSnapshots") mapping: ClassVar[Dict[str, Bender]] = { "id": S("DBSnapshotIdentifier"), @@ -1164,15 +1164,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AwsRdsClusterSnapshot(AwsResource): kind: ClassVar[str] = "aws_rds_cluster_snapshot" - kind_display: ClassVar[str] = "AWS RDS Cluster Snapshot" - kind_description: ClassVar[str] = "An AWS RDS Cluster Snapshot is a point-in-time backup of an Amazon RDS cluster that provides data persistence and recovery for disaster management." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "AWS RDS Cluster Snapshot" + _kind_description: ClassVar[str] = "An AWS RDS Cluster Snapshot is a point-in-time backup of an Amazon RDS cluster that provides data persistence and recovery for disaster management." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AwsRdsCluster.kind, AwsEc2Vpc.kind]}, "successors": {"default": [AwsKmsKey.kind]}, } - metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#db-snapshot:engine={Engine};id={id}", "arn_tpl": "arn:{partition}:rds:{region}:{account}:snapshot/{name}"} # fmt: skip + _metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/rds/home?region={region}#db-snapshot:engine={Engine};id={id}", "arn_tpl": "arn:{partition}:rds:{region}:{account}:snapshot/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("rds", "describe-db-cluster-snapshots", "DBClusterSnapshots") mapping: ClassVar[Dict[str, Bender]] = { "id": S("DBClusterSnapshotIdentifier"), diff --git a/plugins/aws/fix_plugin_aws/resource/redshift.py b/plugins/aws/fix_plugin_aws/resource/redshift.py index 658031bb62..e91f36b795 100644 --- a/plugins/aws/fix_plugin_aws/resource/redshift.py +++ b/plugins/aws/fix_plugin_aws/resource/redshift.py @@ -416,16 +416,16 @@ class AwsRedshiftLoggingStatus: @define(eq=False, slots=False) class AwsRedshiftCluster(AwsResource): kind: ClassVar[str] = "aws_redshift_cluster" - kind_display: ClassVar[str] = "AWS Redshift Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Redshift Cluster" + _kind_description: ClassVar[str] = ( "Redshift Cluster is a fully managed, petabyte-scale data warehouse service provided by AWS." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:redshift:{region}:{account}:cluster/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:redshift:{region}:{account}:cluster/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "describe-clusters", "Clusters") _categories: ClassVar[List[Category]] = [Category.database, Category.analytics, Category.storage] - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_vpc", "aws_ec2_security_group", "aws_iam_role", "aws_ec2_subnet"], "delete": ["aws_kms_key", "aws_vpc", "aws_ec2_security_group", "aws_iam_role", "aws_ec2_subnet"], diff --git a/plugins/aws/fix_plugin_aws/resource/route53.py b/plugins/aws/fix_plugin_aws/resource/route53.py index 2de8b964af..fe3d524037 100644 --- a/plugins/aws/fix_plugin_aws/resource/route53.py +++ b/plugins/aws/fix_plugin_aws/resource/route53.py @@ -61,16 +61,16 @@ class AwsRoute53LoggingConfig: @define(eq=False, slots=False) class AwsRoute53Zone(AwsResource, BaseDNSZone): kind: ClassVar[str] = "aws_route53_zone" - kind_display: ClassVar[str] = "AWS Route53 Zone" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Route53 Zone" + _kind_description: ClassVar[str] = ( "AWS Route 53 Zones manage domain DNS settings, enabling users to direct" " internet traffic for their domains through various DNS records." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "zone", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/route53/v2/hostedzones?region={region}#ListRecordSets/{id}", "arn_tpl": "arn:{partition}:route53:{region}:{account}:zone/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "zone", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/route53/v2/hostedzones?region={region}#ListRecordSets/{id}", "arn_tpl": "arn:{partition}:route53:{region}:{account}:zone/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-hosted-zones", "HostedZones") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_route53_resource_record_set"], "delete": [], @@ -239,15 +239,15 @@ class AwsRoute53CidrRoutingConfig: @define(eq=False, slots=False) class AwsRoute53ResourceRecord(AwsResource, BaseDNSRecord): kind: ClassVar[str] = "aws_route53_resource_record" - kind_display: ClassVar[str] = "AWS Route53 Resource Record" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Route53 Resource Record" + _kind_description: ClassVar[str] = ( "Route 53 Resource Records are domain name system (DNS) records used by AWS" " Route 53 to route traffic to AWS resources or to external resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:route53:::{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:route53:::{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [], "delete": [], @@ -266,16 +266,16 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsRoute53ResourceRecordSet(AwsResource, BaseDNSRecordSet): kind: ClassVar[str] = "aws_route53_resource_record_set" - kind_display: ClassVar[str] = "AWS Route53 Resource Record Set" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Route53 Resource Record Set" + _kind_description: ClassVar[str] = ( "Route 53 Resource Record Sets are DNS records that map domain names to IP" " addresses or other DNS resources, allowing users to manage domain name" " resolution in the Amazon Route 53 service." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:route53::{account}:recordset/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:route53::{account}:recordset/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_route53_resource_record"], "delete": ["aws_route53_resource_record"], diff --git a/plugins/aws/fix_plugin_aws/resource/s3.py b/plugins/aws/fix_plugin_aws/resource/s3.py index 8097281c3b..2cbc30ce37 100644 --- a/plugins/aws/fix_plugin_aws/resource/s3.py +++ b/plugins/aws/fix_plugin_aws/resource/s3.py @@ -165,13 +165,13 @@ class AwsS3Logging: @define(eq=False, slots=False) class AwsS3Bucket(AwsResource, BaseBucket): kind: ClassVar[str] = "aws_s3_bucket" - kind_display: ClassVar[str] = "AWS S3 Bucket" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://s3.console.aws.amazon.com/s3/buckets/{name}?region={region_id}&bucketType=general&tab=objects", "arn_tpl": "arn:{partition}:s3:{region}:{account}:bucket/{name}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS S3 Bucket" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://s3.console.aws.amazon.com/s3/buckets/{name}?region={region_id}&bucketType=general&tab=objects", "arn_tpl": "arn:{partition}:s3:{region}:{account}:bucket/{name}"} # fmt: skip + _kind_description: ClassVar[str] = ( "S3 buckets are simple storage containers in Amazon's cloud, offering a" " scalable storage solution for various types of data." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-buckets", "Buckets", override_iam_permission="s3:ListAllMyBuckets" ) @@ -450,15 +450,15 @@ class AwsS3AccountSettings(AwsResource, PhantomBaseResource): # This resource is fetched once for every account. kind: ClassVar[str] = "aws_s3_account_settings" - kind_display: ClassVar[str] = "AWS S3 Account Settings" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS S3 Account Settings" + _kind_description: ClassVar[str] = ( "AWS S3 Account Settings refer to the configuration options and preferences" " available for an Amazon S3 (Simple Storage Service) account." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://s3.console.aws.amazon.com/s3/settings?region={region_id}", "arn_tpl": "arn:{partition}:s3control:{region}:{account}:account/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://s3.console.aws.amazon.com/s3/settings?region={region_id}", "arn_tpl": "arn:{partition}:s3control:{region}:{account}:account/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_account"]}, "successors": {"default": ["aws_s3_bucket"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/sagemaker.py b/plugins/aws/fix_plugin_aws/resource/sagemaker.py index 574c7f3ea8..497b2ffa1a 100644 --- a/plugins/aws/fix_plugin_aws/resource/sagemaker.py +++ b/plugins/aws/fix_plugin_aws/resource/sagemaker.py @@ -71,16 +71,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerNotebook(SagemakerTaggable, AwsResource): kind: ClassVar[str] = "aws_sagemaker_notebook" - kind_display: ClassVar[str] = "AWS SageMaker Notebook" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Notebook" + _kind_description: ClassVar[str] = ( "SageMaker Notebooks are a fully managed service by AWS that provides a" " Jupyter notebook environment for data scientists and developers to build," " train, and deploy machine learning models." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:notebook/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:notebook/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_ec2_subnet", "aws_ec2_security_group", "aws_iam_role", "aws_sagemaker_code_repository"], "delete": [ @@ -758,15 +758,15 @@ class AwsSagemakerAlgorithmStatusDetails: @define(eq=False, slots=False) class AwsSagemakerAlgorithm(AwsResource): kind: ClassVar[str] = "aws_sagemaker_algorithm" - kind_display: ClassVar[str] = "AWS SageMaker Algorithm" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Algorithm" + _kind_description: ClassVar[str] = ( "SageMaker Algorithms are pre-built machine learning algorithms provided by" " Amazon SageMaker, which can be used to train and deploy predictive models." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:algorithm/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:algorithm/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_iam_role"], "delete": ["aws_iam_role"]} } api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-algorithms", "AlgorithmSummaryList") @@ -900,15 +900,15 @@ class AwsSagemakerVpcConfig: @define(eq=False, slots=False) class AwsSagemakerModel(SagemakerTaggable, AwsResource): kind: ClassVar[str] = "aws_sagemaker_model" - kind_display: ClassVar[str] = "AWS SageMaker Model" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Model" + _kind_description: ClassVar[str] = ( "SageMaker Models are machine learning models built and trained using Amazon" " SageMaker, a fully-managed machine learning service by Amazon Web Services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:model/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:model/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], "delete": ["aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -1000,16 +1000,16 @@ class AwsSagemakerResourceSpec: @define(eq=False, slots=False) class AwsSagemakerApp(AwsResource): kind: ClassVar[str] = "aws_sagemaker_app" - kind_display: ClassVar[str] = "AWS SageMaker App" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker App" + _kind_description: ClassVar[str] = ( "The AWS SageMaker App facilitates the creation and management of machine learning applications, enabling" " users to engage in interactive model building and analysis. It provides a user-centric, customizable" " workspace, complete with monitoring of app health and activity." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:app/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:app/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_sagemaker_domain", "aws_sagemaker_user_profile"], }, @@ -1372,16 +1372,16 @@ class AwsSagemakerDefaultSpaceSettings: @define(eq=False, slots=False) class AwsSagemakerDomain(AwsResource): kind: ClassVar[str] = "aws_sagemaker_domain" - kind_display: ClassVar[str] = "AWS SageMaker Domain" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Domain" + _kind_description: ClassVar[str] = ( "A SageMaker Domain in AWS is a dedicated, managed environment within Amazon SageMaker that provides" " data scientists and developers with the necessary tools and permissions to build, train, and deploy" " machine learning models." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sagemaker/home?region={region}#/studio/{id}", "arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:domain/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sagemaker/home?region={region}#/studio/{id}", "arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:domain/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_iam_role", @@ -1574,15 +1574,15 @@ class AwsSagemakerExperimentSource: @define(eq=False, slots=False) class AwsSagemakerExperiment(AwsResource): kind: ClassVar[str] = "aws_sagemaker_experiment" - kind_display: ClassVar[str] = "AWS SageMaker Experiment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Experiment" + _kind_description: ClassVar[str] = ( "SageMaker Experiment is a service in AWS that enables users to organize," " track and compare machine learning experiments and their associated" " resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:experiment/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:experiment/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-experiments", "ExperimentSummaries") mapping: ClassVar[Dict[str, Bender]] = { "id": S("ExperimentName"), @@ -1657,16 +1657,16 @@ class AwsSagemakerMetadataProperties: @define(eq=False, slots=False) class AwsSagemakerTrial(AwsResource): kind: ClassVar[str] = "aws_sagemaker_trial" - kind_display: ClassVar[str] = "AWS SageMaker Trial" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Trial" + _kind_description: ClassVar[str] = ( "AWS SageMaker Trial represents a series of steps, known as trial components, which lead to the creation of" " a machine learning model. It is nested within a single SageMaker experiment for organizational" " and tracking purposes." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:trial/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:trial/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_sagemaker_experiment", @@ -1744,15 +1744,15 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerProject(AwsResource): kind: ClassVar[str] = "aws_sagemaker_project" - kind_display: ClassVar[str] = "AWS SageMaker Project" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Project" + _kind_description: ClassVar[str] = ( "SageMaker Projects in AWS provide a collaborative environment for machine" " learning teams to manage and track their ML workflows, datasets, models, and" " code." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:project/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:project/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-projects", "ProjectSummaryList") mapping: ClassVar[Dict[str, Bender]] = { "id": S("ProjectId"), @@ -1795,14 +1795,14 @@ class AwsSagemakerGitConfig: @define(eq=False, slots=False) class AwsSagemakerCodeRepository(AwsResource): kind: ClassVar[str] = "aws_sagemaker_code_repository" - kind_display: ClassVar[str] = "AWS SageMaker Code Repository" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Code Repository" + _kind_description: ClassVar[str] = ( "The AWS SageMaker Code Repository is a managed Git-based code repository for storing and versioning" " your machine learning code, making it easy to maintain and share code within your SageMaker projects." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "repository", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:code-repository/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "repository", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:code-repository/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-code-repositories", "CodeRepositorySummaryList") mapping: ClassVar[Dict[str, Bender]] = { "id": S("CodeRepositoryName"), @@ -2261,15 +2261,15 @@ class AwsSagemakerExplainerConfig: @define(eq=False, slots=False) class AwsSagemakerEndpoint(SagemakerTaggable, AwsResource): kind: ClassVar[str] = "aws_sagemaker_endpoint" - kind_display: ClassVar[str] = "AWS SageMaker Endpoint" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Endpoint" + _kind_description: ClassVar[str] = ( "SageMaker Endpoints are the locations where deployed machine learning models" " are hosted and can be accessed for making predictions or inferences." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:endpoint/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:endpoint/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "delete": ["aws_kms_key"], }, @@ -2363,16 +2363,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerImage(AwsResource): kind: ClassVar[str] = "aws_sagemaker_image" - kind_display: ClassVar[str] = "AWS SageMaker Image" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Image" + _kind_description: ClassVar[str] = ( "AWS SageMaker Images are pre-built machine learning environments that" " include all necessary frameworks and packages to train and deploy models" " using Amazon SageMaker." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:image/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:image/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role"], "delete": ["aws_iam_role"], @@ -2457,15 +2457,15 @@ class AwsSagemakerArtifactSource: @define(eq=False, slots=False) class AwsSagemakerArtifact(AwsResource): kind: ClassVar[str] = "aws_sagemaker_artifact" - kind_display: ClassVar[str] = "AWS SageMaker Artifact" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Artifact" + _kind_description: ClassVar[str] = ( "An Amazon SageMaker artifact is used for tracking the origin and usage of data" " or models within ML workflows, providing a clear history for auditing and reproducibility." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:artifact/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:artifact/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_sagemaker_user_profile", @@ -2546,16 +2546,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerUserProfile(AwsResource): kind: ClassVar[str] = "aws_sagemaker_user_profile" - kind_display: ClassVar[str] = "AWS SageMaker User Profile" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker User Profile" + _kind_description: ClassVar[str] = ( "SageMaker User Profiles are user-specific configurations in Amazon SageMaker" " that define settings and permissions for users accessing the SageMaker" " Studio environment." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:user-profile/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:user-profile/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_sagemaker_domain"]}, "successors": {"delete": ["aws_sagemaker_domain"]}, } @@ -2593,16 +2593,16 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerPipeline(AwsResource): kind: ClassVar[str] = "aws_sagemaker_pipeline" - kind_display: ClassVar[str] = "AWS SageMaker Pipeline" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Pipeline" + _kind_description: ClassVar[str] = ( "SageMaker Pipelines is a fully managed, easy-to-use CI/CD service for" " building, automating, and managing end-to-end machine learning workflows on" " Amazon SageMaker." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:pipeline/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:pipeline/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_sagemaker_user_profile", "aws_sagemaker_domain"], "delete": ["aws_iam_role"], @@ -2731,16 +2731,16 @@ class AwsSagemakerMemberDefinition: @define(eq=False, slots=False) class AwsSagemakerWorkteam(SagemakerTaggable, AwsResource): kind: ClassVar[str] = "aws_sagemaker_workteam" - kind_display: ClassVar[str] = "AWS SageMaker Workteam" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Workteam" + _kind_description: ClassVar[str] = ( "SageMaker Workteam is a service in Amazon's cloud that allows organizations" " to create and manage teams of workers to label data for machine learning" " models." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:workteam/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:workteam/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_cognito_user_pool", "aws_cognito_group", "aws_sns_topic"], } @@ -2810,15 +2810,15 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSagemakerJob(AwsResource): kind: ClassVar[str] = "aws_sagemaker_job" - kind_display: ClassVar[str] = "AWS SageMaker Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Job" + _kind_description: ClassVar[str] = ( "SageMaker Jobs in AWS are used to train and deploy machine learning models" " at scale, with built-in algorithms and frameworks provided by Amazon" " SageMaker." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:job/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:job/{id}"} # fmt: skip @define(eq=False, slots=False) @@ -3139,14 +3139,14 @@ class AwsSagemakerModelDeployConfig: @define(eq=False, slots=False) class AwsSagemakerAutoMLJob(AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_auto_ml_job" - kind_display: ClassVar[str] = "AWS SageMaker Auto ML Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Auto ML Job" + _kind_description: ClassVar[str] = ( "SageMaker AutoML Jobs in AWS provide automated machine learning" " capabilities, allowing users to automatically discover and build optimal" " machine learning models without manual intervention." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:automl-job/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:automl-job/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_security_group", "aws_ec2_subnet"], "delete": ["aws_kms_key", "aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -3347,15 +3347,15 @@ class AwsSagemakerNeoVpcConfig: @define(eq=False, slots=False) class AwsSagemakerCompilationJob(AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_compilation_job" - kind_display: ClassVar[str] = "AWS SageMaker Compilation Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Compilation Job" + _kind_description: ClassVar[str] = ( "SageMaker Compilation Job is a resource in Amazon SageMaker that allows" " users to compile machine learning models for deployment on edge devices or" " inference in the cloud." ) - kind_service = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:compilation-job/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:compilation-job/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_security_group", "aws_ec2_subnet"], "delete": ["aws_kms_key", "aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -3821,15 +3821,15 @@ class AwsSagemakerHyperParameterTuningJobWarmStartConfig: @define(eq=False, slots=False) class AwsSagemakerHyperParameterTuningJob(SagemakerTaggable, AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_hyper_parameter_tuning_job" - kind_display: ClassVar[str] = "AWS SageMaker Hyper Parameter Tuning Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Hyper Parameter Tuning Job" + _kind_description: ClassVar[str] = ( "SageMaker Hyperparameter Tuning Job is an automated process in Amazon" " SageMaker that helps optimize the hyperparameters of a machine learning" " model to achieve better performance." ) - kind_service = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:hyperparameter-tuning-job/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:hyperparameter-tuning-job/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_security_group", "aws_ec2_subnet"], "delete": ["aws_kms_key", "aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -4288,15 +4288,15 @@ class AwsSagemakerEndpointPerformance: @define(eq=False, slots=False) class AwsSagemakerInferenceRecommendationsJob(AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_inference_recommendations_job" - kind_display: ClassVar[str] = "AWS SageMaker Inference Recommendations Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Inference Recommendations Job" + _kind_description: ClassVar[str] = ( "AWS SageMaker Inference Recommendations Job evaluates different configurations for deploying machine" " learning models, providing suggestions to optimize performance and efficiency, along with monitoring" " job progress and outcomes." ) - kind_service = service_name - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:transform-job/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _kind_service = service_name + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:transform-job/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["aws_iam_role", "aws_ec2_security_group", "aws_ec2_subnet"], "delete": ["aws_kms_key", "aws_iam_role", "aws_ec2_subnet", "aws_ec2_security_group"], @@ -4639,13 +4639,13 @@ class AwsSagemakerLabelingJobOutput: @define(eq=False, slots=False) class AwsSagemakerLabelingJob(SagemakerTaggable, AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_labeling_job" - kind_display: ClassVar[str] = "AWS SageMaker Labeling Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Labeling Job" + _kind_description: ClassVar[str] = ( "SageMaker Labeling Jobs are used to annotate and label data for training" " machine learning models in Amazon SageMaker." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:labeling-job/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:labeling-job/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_iam_role", @@ -5036,14 +5036,14 @@ class AwsSagemakerNetworkConfig: @define(eq=False, slots=False) class AwsSagemakerProcessingJob(AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_processing_job" - kind_display: ClassVar[str] = "AWS SageMaker Processing Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Processing Job" + _kind_description: ClassVar[str] = ( "SageMaker Processing Jobs provide a managed infrastructure for executing" " data processing tasks in Amazon SageMaker, enabling users to preprocess and" " analyze data efficiently." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:processing-job/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:processing-job/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_iam_role", @@ -5441,13 +5441,13 @@ class AwsSagemakerWarmPoolStatus: @define(eq=False, slots=False) class AwsSagemakerTrainingJob(SagemakerTaggable, AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_training_job" - kind_display: ClassVar[str] = "AWS SageMaker Training Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Training Job" + _kind_description: ClassVar[str] = ( "SageMaker Training Job is a service provided by AWS that allows users to" " train machine learning models and build high-quality custom models." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:sagemaker-training-job/{id}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:sagemaker-training-job/{id}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_sagemaker_labeling_job", @@ -5685,14 +5685,14 @@ class AwsSagemakerDataProcessing: @define(eq=False, slots=False) class AwsSagemakerTransformJob(SagemakerTaggable, AwsSagemakerJob): kind: ClassVar[str] = "aws_sagemaker_transform_job" - kind_display: ClassVar[str] = "AWS SageMaker Transform Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SageMaker Transform Job" + _kind_description: ClassVar[str] = ( "SageMaker Transform Jobs are used in Amazon SageMaker to transform input" " data using a trained model, generating output results for further analysis" " or inference." ) - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:transform-job/{name}"} # fmt: skip - reference_kinds: ClassVar[ModelReference] = { + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sagemaker:{region}:{account}:transform-job/{name}"} # fmt: skip + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "aws_sagemaker_labeling_job", diff --git a/plugins/aws/fix_plugin_aws/resource/secretsmanager.py b/plugins/aws/fix_plugin_aws/resource/secretsmanager.py index 773fbe9870..ad0c53b034 100644 --- a/plugins/aws/fix_plugin_aws/resource/secretsmanager.py +++ b/plugins/aws/fix_plugin_aws/resource/secretsmanager.py @@ -30,12 +30,12 @@ class AwsSecretsManagerRotationRulesType: class AwsSecretsManagerSecret(AwsResource): kind: ClassVar[str] = "aws_secretsmanager_secret" api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-secrets", "SecretList") - kind_display: ClassVar[str] = "AWS Secrets Manager Secret" - kind_description: ClassVar[str] = "An AWS Secrets Manager Secret is used for securely storing and managing sensitive information, such as passwords, API keys, and database credentials, in AWS environments." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [AwsKmsKey.kind]}} - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/secretsmanager/home?region={region}#/secret?name={name}", "arn_tpl": "arn:{partition}:secretsmanager:{region}:{account}:secret/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS Secrets Manager Secret" + _kind_description: ClassVar[str] = "An AWS Secrets Manager Secret is used for securely storing and managing sensitive information, such as passwords, API keys, and database credentials, in AWS environments." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [AwsKmsKey.kind]}} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "access_control"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/secretsmanager/home?region={region}#/secret?name={name}", "arn_tpl": "arn:{partition}:secretsmanager:{region}:{account}:secret/{name}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), "tags": S("Tags", default=[]) >> ToDict(), diff --git a/plugins/aws/fix_plugin_aws/resource/service_quotas.py b/plugins/aws/fix_plugin_aws/resource/service_quotas.py index bfc0b4fef5..02168fd0d0 100644 --- a/plugins/aws/fix_plugin_aws/resource/service_quotas.py +++ b/plugins/aws/fix_plugin_aws/resource/service_quotas.py @@ -65,14 +65,14 @@ class AwsQuotaErrorReason: @define(eq=False, slots=False) class AwsServiceQuota(AwsResource, BaseQuota): kind: ClassVar[str] = "aws_service_quota" - kind_display: ClassVar[str] = "AWS Service Quota" - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/servicequotas/home/services/{source.ServiceCode}/quotas/{id}", "arn_tpl": "arn:{partition}:service-quotas:{region}:{account}:quotas/{id}"} # fmt: skip - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS Service Quota" + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/servicequotas/home/services/{source.ServiceCode}/quotas/{id}", "arn_tpl": "arn:{partition}:service-quotas:{region}:{account}:quotas/{id}"} # fmt: skip + _kind_description: ClassVar[str] = ( "AWS Service Quota is a feature that enables you to view and manage your" " quotas (also referred to as limits) for AWS services." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "aws_ec2_instance_type", diff --git a/plugins/aws/fix_plugin_aws/resource/sns.py b/plugins/aws/fix_plugin_aws/resource/sns.py index 45d358a01e..f83e35ff17 100644 --- a/plugins/aws/fix_plugin_aws/resource/sns.py +++ b/plugins/aws/fix_plugin_aws/resource/sns.py @@ -19,18 +19,18 @@ @define(eq=False, slots=False) class AwsSnsTopic(AwsResource): kind: ClassVar[str] = "aws_sns_topic" - kind_display: ClassVar[str] = "AWS SNS Topic" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SNS Topic" + _kind_description: ClassVar[str] = ( "AWS SNS (Simple Notification Service) Topic is a publish-subscribe messaging" " service provided by Amazon Web Services. It allows applications, services," " and devices to send and receive notifications via email, SMS, push" " notifications, and more." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sns/v3/home?region={region}#/topic/{arn}", "arn_tpl": "arn:{partition}:sns:{region}:{account}:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sns/v3/home?region={region}#/topic/{arn}", "arn_tpl": "arn:{partition}:sns:{region}:{account}:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-topics", "Topics") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "delete": ["aws_kms_key"], }, @@ -175,17 +175,17 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: @define(eq=False, slots=False) class AwsSnsSubscription(AwsResource): kind: ClassVar[str] = "aws_sns_subscription" - kind_display: ClassVar[str] = "AWS SNS Subscription" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SNS Subscription" + _kind_description: ClassVar[str] = ( "SNS Subscriptions in AWS allow applications to receive messages from topics" " of interest using different protocols such as HTTP, email, SMS, or Lambda" " function invocation." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sns/v3/home?region={region}#/topic/{arn}", "arn_tpl": "arn:{partition}:sns:{region}:{account}:{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sns/v3/home?region={region}#/topic/{arn}", "arn_tpl": "arn:{partition}:sns:{region}:{account}:{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-subscriptions", "Subscriptions") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["aws_sns_topic", "aws_iam_role"], "delete": ["aws_iam_role"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -264,15 +264,15 @@ def called_mutator_apis(cls) -> List[AwsApiSpec]: class AwsSnsEndpoint(AwsResource): # collection of endpoint resources happens in AwsSnsPlatformApplication.collect() kind: ClassVar[str] = "aws_sns_endpoint" - kind_display: ClassVar[str] = "AWS SNS Endpoint" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SNS Endpoint" + _kind_description: ClassVar[str] = ( "An endpoint in the AWS Simple Notification Service (SNS), which is used to" " send push notifications or SMS messages to mobile devices or other" " applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sns:{region}:{account}:endpoint/{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sns:{region}:{account}:endpoint/{id}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("Arn"), "arn": S("Arn"), @@ -298,19 +298,19 @@ def service_name(cls) -> str: @define(eq=False, slots=False) class AwsSnsPlatformApplication(AwsResource): kind: ClassVar[str] = "aws_sns_platform_application" - kind_display: ClassVar[str] = "AWS SNS Platform Application" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SNS Platform Application" + _kind_description: ClassVar[str] = ( "AWS SNS Platform Application is a service that allows you to create a" " platform application and register it with Amazon SNS so that your" " application can receive push notifications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sns:{region}:{account}:platform-application/{name}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:sns:{region}:{account}:platform-application/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( service_name, "list-platform-applications", "PlatformApplications", expected_errors=["InvalidAction"] ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["aws_sns_topic", "aws_sns_endpoint"], }, diff --git a/plugins/aws/fix_plugin_aws/resource/sqs.py b/plugins/aws/fix_plugin_aws/resource/sqs.py index e9714bb2a4..c586ca1f5d 100644 --- a/plugins/aws/fix_plugin_aws/resource/sqs.py +++ b/plugins/aws/fix_plugin_aws/resource/sqs.py @@ -37,17 +37,17 @@ class AwsSqsRedrivePolicy: @define(eq=False, slots=False) class AwsSqsQueue(AwsResource, BaseQueue): kind: ClassVar[str] = "aws_sqs_queue" - kind_display: ClassVar[str] = "AWS SQS Queue" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "AWS SQS Queue" + _kind_description: ClassVar[str] = ( "SQS (Simple Queue Service) is a fully managed message queuing service" " provided by Amazon Web Services. It enables you to decouple and scale" " microservices, distributed systems, and serverless applications." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "compute"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sqs/v3/home?region={region}#/queues/{QueueUrl}", "arn_tpl": "arn:{partition}:sqs:{region}:{account}:{id}"} # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "compute"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/sqs/v3/home?region={region}#/queues/{QueueUrl}", "arn_tpl": "arn:{partition}:sqs:{region}:{account}:{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(service_name, "list-queues", "QueueUrls") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_kms_key"]}, "predecessors": {"delete": ["aws_kms_key"]}, } diff --git a/plugins/aws/fix_plugin_aws/resource/ssm.py b/plugins/aws/fix_plugin_aws/resource/ssm.py index 960ba5f921..b1873cf405 100644 --- a/plugins/aws/fix_plugin_aws/resource/ssm.py +++ b/plugins/aws/fix_plugin_aws/resource/ssm.py @@ -34,13 +34,13 @@ class AwsSSMInstanceAggregatedAssociationOverview: @define(eq=False, slots=False) class AwsSSMInstance(AwsResource): kind: ClassVar[str] = "aws_ssm_instance" - kind_display: ClassVar[str] = "AWS SSM Instance" - kind_description: ClassVar[str] = "An AWS SSM Instance refers to an EC2 instance or a managed node that has been configured for management by AWS Systems Manager, enabling centralized and automated management of configuration, security, and software updates." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/systems-manager/fleet-manager/managed-nodes/{id}/general?region={region}", "arn_tpl": "arn:{partition}:ssm:{region}:{account}:instance/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS SSM Instance" + _kind_description: ClassVar[str] = "An AWS SSM Instance refers to an EC2 instance or a managed node that has been configured for management by AWS Systems Manager, enabling centralized and automated management of configuration, security, and software updates." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/systems-manager/fleet-manager/managed-nodes/{id}/general?region={region}", "arn_tpl": "arn:{partition}:ssm:{region}:{account}:instance/{name}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("ssm", "describe-instance-information", "InstanceInformationList") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_ec2_instance"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -151,11 +151,11 @@ class AwsSSMAccountSharingInfo: @define(eq=False, slots=False) class AwsSSMDocument(AwsResource): kind: ClassVar[str] = "aws_ssm_document" - kind_display: ClassVar[str] = "AWS SSM Document" - kind_description: ClassVar[str] = "An AWS Systems Manager (SSM) Document defines the actions that Systems Manager performs on your managed instances and other AWS resources." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/systems-manager/documents/{name}/description?region={region}", "arn_tpl": "arn:{partition}:ssm:{region}:{account}:document/{name}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS SSM Document" + _kind_description: ClassVar[str] = "An AWS Systems Manager (SSM) Document defines the actions that Systems Manager performs on your managed instances and other AWS resources." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/systems-manager/documents/{name}/description?region={region}", "arn_tpl": "arn:{partition}:ssm:{region}:{account}:document/{name}"} # fmt: skip mapping: ClassVar[Dict[str, Bender]] = { "id": S("Name"), "tags": S("Tags", default=[]) >> ToDict(), @@ -351,15 +351,15 @@ class AwsSSMNonCompliantSummary: @define(eq=False, slots=False) class AwsSSMResourceCompliance(AwsResource): kind: ClassVar[str] = "aws_ssm_resource_compliance" - kind_display: ClassVar[str] = "AWS SSM Resource Compliance" - kind_description: ClassVar[str] = "AWS SSM Resource Compliance is used to track the compliance status of your resources in relation to your AWS Systems Manager (SSM) configurations and policies." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} - aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ssm:{region}:{account}:resource-compliance/{id}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS SSM Resource Compliance" + _kind_description: ClassVar[str] = "AWS SSM Resource Compliance is used to track the compliance status of your resources in relation to your AWS Systems Manager (SSM) configurations and policies." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:ssm:{region}:{account}:resource-compliance/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec( "ssm", "list-resource-compliance-summaries", "ResourceComplianceSummaryItems" ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_ec2_instance", "aws_dynamodb_table", "aws_s3_bucket", "aws_ssm_document"]} } mapping: ClassVar[Dict[str, Bender]] = { diff --git a/plugins/aws/fix_plugin_aws/resource/waf.py b/plugins/aws/fix_plugin_aws/resource/waf.py index 299eefe8cc..5215f6543a 100644 --- a/plugins/aws/fix_plugin_aws/resource/waf.py +++ b/plugins/aws/fix_plugin_aws/resource/waf.py @@ -799,13 +799,13 @@ class AwsWafLoggingConfiguration: @define(eq=False, slots=False) class AwsWafWebACL(AwsResource, BaseFirewall): kind: ClassVar[str] = "aws_waf_web_acl" - kind_display: ClassVar[str] = "AWS WAF Web ACL" - kind_description: ClassVar[str] = "An AWS WAF Web ACL (Web Access Control List) is used for monitoring HTTP and HTTPS requests directed to AWS resources, allowing you to control access by permitting or blocking specific requests based on defined criteria." # fmt: skip - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} - aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/wafv2/homev2/web-acl/{name}/{id}/overview?region={region}", "arn_tpl": "arn:{partition}:wafv2:{region}:{account}:webacl/{id}"} # fmt: skip + _kind_display: ClassVar[str] = "AWS WAF Web ACL" + _kind_description: ClassVar[str] = "An AWS WAF Web ACL (Web Access Control List) is used for monitoring HTTP and HTTPS requests directed to AWS resources, allowing you to control access by permitting or blocking specific requests based on defined criteria." # fmt: skip + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} + _aws_metadata: ClassVar[Dict[str, Any]] = {"provider_link_tpl": "https://{region_id}.console.aws.amazon.com/wafv2/homev2/web-acl/{name}/{id}/overview?region={region}", "arn_tpl": "arn:{partition}:wafv2:{region}:{account}:webacl/{id}"} # fmt: skip api_spec: ClassVar[AwsApiSpec] = AwsApiSpec("wafv2", "get-web-acl", "WebACL") - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["aws_alb", "aws_apigateway_rest_api", "aws_cognito_user_pool"]} } mapping: ClassVar[Dict[str, Bender]] = { diff --git a/plugins/aws/test/collector_test.py b/plugins/aws/test/collector_test.py index e784201685..9c2b747013 100644 --- a/plugins/aws/test/collector_test.py +++ b/plugins/aws/test/collector_test.py @@ -103,8 +103,8 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: bases.update(all_base_classes(base)) return bases - expected_declared_properties = ["kind", "kind_display"] - expected_props_in_hierarchy = ["kind_service", "metadata"] + expected_declared_properties = ["kind", "_kind_display"] + expected_props_in_hierarchy = ["_kind_service", "_metadata"] for rc in all_resources: for prop in expected_declared_properties: assert prop in rc.__dict__, f"{rc.__name__} missing {prop}" @@ -114,5 +114,5 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: for base in with_bases: if "connect_in_graph" in base.__dict__: assert ( - "reference_kinds" in base.__dict__ - ), f"{rc.__name__} should define reference_kinds property, since it defines connect_in_graph" + "_reference_kinds" in base.__dict__ + ), f"{rc.__name__} should define _reference_kinds property, since it defines connect_in_graph" diff --git a/plugins/azure/fix_plugin_azure/resource/authorization.py b/plugins/azure/fix_plugin_azure/resource/authorization.py index 58f90221e8..0c3adac311 100644 --- a/plugins/azure/fix_plugin_azure/resource/authorization.py +++ b/plugins/azure/fix_plugin_azure/resource/authorization.py @@ -63,9 +63,9 @@ class AzurePrincipal: @define(eq=False, slots=False) class AzureAuthorizationDenyAssignment(MicrosoftResource): kind: ClassVar[str] = "azure_authorization_deny_assignment" - kind_display: ClassVar[str] = "Azure Authorization Deny Assignment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Authorization Deny Assignment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2022-04-01", @@ -116,9 +116,9 @@ class AzureAuthorizationDenyAssignment(MicrosoftResource): @define(eq=False, slots=False) class AzureAuthorizationRoleAssignment(MicrosoftResource): kind: ClassVar[str] = "azure_authorization_role_assignment" - kind_display: ClassVar[str] = "Azure Authorization Role Assignment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Authorization Role Assignment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2022-04-01", @@ -137,7 +137,7 @@ class AzureAuthorizationRoleAssignment(MicrosoftResource): "ResourceGroup": "azure_resource_group", "Resource": "azure_resource", } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["azure_authorization_role_definition", *(p.kind for p in MicrosoftGraphPrincipalTypes)] }, @@ -223,9 +223,9 @@ class AzurePermission: @define(eq=False, slots=False) class AzureAuthorizationRoleDefinition(MicrosoftResource, BaseRole): kind: ClassVar[str] = "azure_authorization_role_definition" - kind_display: ClassVar[str] = "Azure Authorization Role Definition" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Authorization Role Definition" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2022-04-01", @@ -262,10 +262,10 @@ class AzureAuthorizationRoleDefinition(MicrosoftResource, BaseRole): @define(eq=False, slots=False) class AzureAuthorizationManagementLock(MicrosoftResource): kind: ClassVar[str] = "azure_authorization_management_lock" - kind_display: ClassVar[str] = "Azure Authorization Management Lock" - kind_service: ClassVar[Optional[str]] = "resources" - metadata: ClassVar[Dict[str, Any]] = {"icon": "lock", "group": "access_control"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} + _kind_display: ClassVar[str] = "Azure Authorization Management Lock" + _kind_service: ClassVar[Optional[str]] = "resources" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "lock", "group": "access_control"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="resources", version="2020-05-01", diff --git a/plugins/azure/fix_plugin_azure/resource/base.py b/plugins/azure/fix_plugin_azure/resource/base.py index a153d44277..8a6ef2fd67 100644 --- a/plugins/azure/fix_plugin_azure/resource/base.py +++ b/plugins/azure/fix_plugin_azure/resource/base.py @@ -82,7 +82,7 @@ def parse_json( @define(eq=False, slots=False) class MicrosoftResource(BaseResource): kind: ClassVar[str] = "microsoft_resource" - kind_display: ClassVar[str] = "Microsoft Resource" + _kind_display: ClassVar[str] = "Microsoft Resource" # The mapping to transform the incoming API json into the internal representation. mapping: ClassVar[Dict[str, Bender]] = {} # Which API to call and what to expect in the result. @@ -307,9 +307,9 @@ class AzureAvailabilityZoneMappings: @define(eq=False, slots=False) class AzureLocation(MicrosoftResource, BaseRegion): kind: ClassVar[str] = "azure_location" - kind_display: ClassVar[str] = "Azure Location" - kind_service: ClassVar[str] = "resources" - metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "management"} + _kind_display: ClassVar[str] = "Azure Location" + _kind_service: ClassVar[str] = "resources" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="resources", version="2022-12-01", @@ -343,9 +343,9 @@ class AzureLocation(MicrosoftResource, BaseRegion): @define(eq=False, slots=False) class AzureResourceGroup(MicrosoftResource, BaseGroup): kind: ClassVar[str] = "azure_resource_group" - kind_display: ClassVar[str] = "Azure Resource Group" - kind_service: ClassVar[str] = "resources" - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _kind_display: ClassVar[str] = "Azure Resource Group" + _kind_service: ClassVar[str] = "resources" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="resources", version="2022-09-01", @@ -355,7 +355,7 @@ class AzureResourceGroup(MicrosoftResource, BaseGroup): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["microsoft_resource"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -546,9 +546,9 @@ class AzureSubscriptionPolicies: @define(eq=False, slots=False) class AzureSubscription(MicrosoftResource, BaseAccount): kind: ClassVar[str] = "azure_subscription" - kind_display: ClassVar[str] = "Azure Subscription" - kind_service: ClassVar[str] = "resources" - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} + _kind_display: ClassVar[str] = "Azure Subscription" + _kind_service: ClassVar[str] = "resources" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="resources", version="2022-12-01", diff --git a/plugins/azure/fix_plugin_azure/resource/compute.py b/plugins/azure/fix_plugin_azure/resource/compute.py index 669d448085..9f5d8ed98a 100644 --- a/plugins/azure/fix_plugin_azure/resource/compute.py +++ b/plugins/azure/fix_plugin_azure/resource/compute.py @@ -67,9 +67,9 @@ class AzureInstanceViewStatus: @define(eq=False, slots=False) class AzureComputeAvailabilitySet(MicrosoftResource): kind: ClassVar[str] = "azure_compute_availability_set" - kind_display: ClassVar[str] = "Azure Compute Availability Set" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Availability Set" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -79,7 +79,7 @@ class AzureComputeAvailabilitySet(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_proximity_placement_group", "azure_compute_virtual_machine_base"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -122,9 +122,9 @@ class AzureComputeCapacityReservationGroupInstanceView: @define(eq=False, slots=False) class AzureComputeCapacityReservationGroup(MicrosoftResource): kind: ClassVar[str] = "azure_compute_capacity_reservation_group" - kind_display: ClassVar[str] = "Azure Compute Capacity Reservation Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Capacity Reservation Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -134,7 +134,7 @@ class AzureComputeCapacityReservationGroup(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_virtual_machine_base"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -298,9 +298,9 @@ class AzureCloudServiceExtensionProfile: @define(eq=False, slots=False) class AzureComputeCloudService(MicrosoftResource): kind: ClassVar[str] = "azure_compute_cloud_service" - kind_display: ClassVar[str] = "Azure Compute Cloud Service" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Cloud Service" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2022-09-04", @@ -353,9 +353,9 @@ class AzureDedicatedHostGroupInstanceView: @define(eq=False, slots=False) class AzureComputeDedicatedHostGroup(MicrosoftResource): kind: ClassVar[str] = "azure_compute_dedicated_host_group" - kind_display: ClassVar[str] = "Azure Compute Dedicated Host Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Dedicated Host Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -719,9 +719,9 @@ class AzurePricingOffers: @define(eq=False, slots=False) class AzureComputeDiskTypePricing(MicrosoftResource): kind: ClassVar[str] = "azure_compute_disk_type_pricing" - kind_display: ClassVar[str] = "Azure Compute Disk Type Pricing" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Azure Compute Disk Type Pricing" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="", @@ -744,9 +744,9 @@ class AzureComputeDiskTypePricing(MicrosoftResource): @define(eq=False, slots=False) class AzureComputeDiskType(MicrosoftResource, BaseVolumeType): kind: ClassVar[str] = "azure_compute_disk_type" - kind_display: ClassVar[str] = "Azure Compute Disk Type" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Compute Disk Type" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} # Collect via AzureComputeDisk() mapping: ClassVar[Dict[str, Bender]] = { "id": S("skuName"), @@ -928,9 +928,9 @@ def create_unique_disk_sizes(collected_disks: List[MicrosoftResourceType], build @define(eq=False, slots=False) class AzureComputeDisk(MicrosoftResource, BaseVolume): kind: ClassVar[str] = "azure_compute_disk" - kind_display: ClassVar[str] = "Azure Compute Disk" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "volume", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Compute Disk" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "volume", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-01-02", @@ -940,7 +940,7 @@ class AzureComputeDisk(MicrosoftResource, BaseVolume): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_disk_encryption_set", "azure_compute_disk_type"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1183,9 +1183,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureComputeDiskAccess(MicrosoftResource): kind: ClassVar[str] = "azure_compute_disk_access" - kind_display: ClassVar[str] = "Azure Compute Disk Access" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Compute Disk Access" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-01-02", @@ -1271,9 +1271,9 @@ class AzureApiError: @define(eq=False, slots=False) class AzureComputeDiskEncryptionSet(MicrosoftResource): kind: ClassVar[str] = "azure_compute_disk_encryption_set" - kind_display: ClassVar[str] = "Azure Compute Disk Encryption Set" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Compute Disk Encryption Set" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-01-02", @@ -1372,9 +1372,9 @@ class AzureSharingStatus: @define(eq=False, slots=False) class AzureComputeGallery(MicrosoftResource): kind: ClassVar[str] = "azure_compute_gallery" - kind_display: ClassVar[str] = "Azure Compute Gallery" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Gallery" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2022-03-03", @@ -1447,9 +1447,9 @@ class AzureImageStorageProfile: @define(eq=False, slots=False) class AzureComputeImage(MicrosoftResource): kind: ClassVar[str] = "azure_compute_image" - kind_display: ClassVar[str] = "Azure Compute Image" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Image" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -1494,9 +1494,9 @@ class AzureVmSizes: @define(eq=False, slots=False) class AzureComputeProximityPlacementGroup(MicrosoftResource): kind: ClassVar[str] = "azure_compute_proximity_placement_group" - kind_display: ClassVar[str] = "Azure Compute Proximity Placement Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Proximity Placement Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -1506,7 +1506,7 @@ class AzureComputeProximityPlacementGroup(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_virtual_machine_scale_set"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2014,9 +2014,9 @@ class AzureRestorePoint(AzureProxyResource): @define(eq=False, slots=False) class AzureComputeRestorePointCollection(MicrosoftResource): kind: ClassVar[str] = "azure_compute_restore_point_collection" - kind_display: ClassVar[str] = "Azure Compute Restore Point Collection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Compute Restore Point Collection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -2026,7 +2026,7 @@ class AzureComputeRestorePointCollection(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_virtual_machine_base"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2069,9 +2069,9 @@ class AzureCopyCompletionError: @define(eq=False, slots=False) class AzureComputeVirtualMachineSnapshot(MicrosoftResource, BaseSnapshot): kind: ClassVar[str] = "azure_compute_virtual_machine_snapshot" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine Snapshot" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine Snapshot" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-01-02", @@ -2081,7 +2081,7 @@ class AzureComputeVirtualMachineSnapshot(MicrosoftResource, BaseSnapshot): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_compute_disk", "azure_compute_disk_access"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2160,9 +2160,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureComputeSshPublicKey(MicrosoftResource, BaseKeyPair): kind: ClassVar[str] = "azure_compute_ssh_public_key" - kind_display: ClassVar[str] = "Azure Compute SSH Public Key" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute SSH Public Key" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -2799,10 +2799,10 @@ class AzureVirtualMachineIdentity: @define(eq=False, slots=False) class AzureComputeVirtualMachineBase(MicrosoftResource, BaseInstance): kind: ClassVar[str] = "azure_compute_virtual_machine_base" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_compute_proximity_placement_group", @@ -3095,7 +3095,7 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureComputeVirtualMachine(AzureComputeVirtualMachineBase): kind: ClassVar[str] = "azure_compute_virtual_machine" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine" + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine" api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -3546,9 +3546,9 @@ class AzureVirtualMachineScaleSetIdentity: @define(eq=False, slots=False) class AzureComputeVirtualMachineScaleSet(MicrosoftResource, BaseAutoScalingGroup): kind: ClassVar[str] = "azure_compute_virtual_machine_scale_set" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine Scale Set" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "autoscaling_group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine Scale Set" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "autoscaling_group", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="compute", version="2023-03-01", @@ -3558,7 +3558,7 @@ class AzureComputeVirtualMachineScaleSet(MicrosoftResource, BaseAutoScalingGroup access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_load_balancer", "azure_network_subnet"]}, "successors": {"default": ["azure_compute_virtual_machine_scale_set_instance"]}, } @@ -3676,9 +3676,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureComputeVirtualMachineSize(MicrosoftResource, BaseInstanceType): kind: ClassVar[str] = "azure_compute_virtual_machine_size" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine Size" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine Size" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name"), "tags": S("tags", default={}), @@ -3723,7 +3723,7 @@ class AzureComputeVirtualMachineScaleSetInstance(AzureComputeVirtualMachineBase) # note: instances are collected as part of collecting AzureComputeVirtualMachineScaleSet kind: ClassVar[str] = "azure_compute_virtual_machine_scale_set_instance" - kind_display: ClassVar[str] = "Azure Compute Virtual Machine Scale Set Instance" + _kind_display: ClassVar[str] = "Azure Compute Virtual Machine Scale Set Instance" resources: List[Type[MicrosoftResource]] = [ diff --git a/plugins/azure/fix_plugin_azure/resource/containerservice.py b/plugins/azure/fix_plugin_azure/resource/containerservice.py index 6254c8ffa8..5248853cf2 100644 --- a/plugins/azure/fix_plugin_azure/resource/containerservice.py +++ b/plugins/azure/fix_plugin_azure/resource/containerservice.py @@ -65,9 +65,9 @@ class AzureFleetHubProfile: @define(eq=False, slots=False) class AzureContainerServiceFleet(MicrosoftResource): kind: ClassVar[str] = "azure_container_service_fleet" - kind_display: ClassVar[str] = "Azure Container Service Fleet" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "managed_kubernetes"} + _kind_display: ClassVar[str] = "Azure Container Service Fleet" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "managed_kubernetes"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="containerservice", version="2023-08-15-preview", @@ -77,7 +77,7 @@ class AzureContainerServiceFleet(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_container_service_managed_cluster"]}, } mapping: ClassVar[Dict[str, Bender]] = AzureTrackedResource.mapping | { @@ -748,9 +748,9 @@ class AzureServiceMeshProfile: @define(eq=False, slots=False) class AzureContainerServiceManagedCluster(MicrosoftResource, BaseManagedKubernetesClusterProvider): kind: ClassVar[str] = "azure_container_service_managed_cluster" - kind_display: ClassVar[str] = "Azure Container Service Managed Cluster" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} + _kind_display: ClassVar[str] = "Azure Container Service Managed Cluster" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="containerservice", version="2023-08-01", @@ -760,7 +760,7 @@ class AzureContainerServiceManagedCluster(MicrosoftResource, BaseManagedKubernet access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_compute_disk_encryption_set", "azure_compute_virtual_machine_scale_set"]}, } mapping: ClassVar[Dict[str, Bender]] = AzureTrackedResource.mapping | { @@ -893,9 +893,9 @@ def _get_poolnames_and_vmss_ids(self, builder: GraphBuilder) -> List[Tuple[str, @define(eq=False, slots=False) class AzureContainerServiceManagedClusterSnapshot(MicrosoftResource, BaseSnapshot): kind: ClassVar[str] = "azure_container_service_managed_cluster_snapshot" - kind_display: ClassVar[str] = "Azure Container Service Managed Cluster Snapshot" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "managed_kubernetes"} + _kind_display: ClassVar[str] = "Azure Container Service Managed Cluster Snapshot" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "snapshot", "group": "managed_kubernetes"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="containerservice", version="2023-08-01", @@ -905,7 +905,7 @@ class AzureContainerServiceManagedClusterSnapshot(MicrosoftResource, BaseSnapsho access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_container_service_managed_cluster"]}, } mapping: ClassVar[Dict[str, Bender]] = AzureTrackedResource.mapping | { diff --git a/plugins/azure/fix_plugin_azure/resource/cosmosdb.py b/plugins/azure/fix_plugin_azure/resource/cosmosdb.py index 3b9b862a44..31fdff24ed 100644 --- a/plugins/azure/fix_plugin_azure/resource/cosmosdb.py +++ b/plugins/azure/fix_plugin_azure/resource/cosmosdb.py @@ -164,9 +164,9 @@ class AzureCosmosDbNodes: @define(eq=False, slots=False) class AzureCosmosDBCassandraClusterPublicStatus(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_cassandra_cluster_public_status" - kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster Public Status" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster Public Status" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "database"} # Collect via AzureCosmosDBCassandraCluster() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -228,11 +228,11 @@ class AzureCassandraKeyspace(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBCassandraKeyspace(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_cassandra_keyspace" - kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Keyspace" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Keyspace" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_cassandra_table", @@ -321,9 +321,9 @@ class AzureCassandraTable(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBCassandraTable(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_cassandra_table" - kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Table" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Table" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBCassandraKeyspace() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -369,9 +369,9 @@ class AzureClientEncryptionKey(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBSqlDatabaseClientEncryptionKey(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_database_client_encryption_key" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database Client Encryption Key" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database Client Encryption Key" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBSqlDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -398,9 +398,9 @@ class AzureManagedCassandraManagedServiceIdentity: @define(eq=False, slots=False) class AzureCosmosDBCassandraCluster(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_cassandra_cluster" - kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2024-05-15", @@ -410,7 +410,7 @@ class AzureCosmosDBCassandraCluster(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_cassandra_cluster_public_status", @@ -562,11 +562,11 @@ class AzureAuthenticationMethodLdap: @define(eq=False, slots=False) class AzureCosmosDBCassandraClusterDataCenter(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_cassandra_cluster_data_center" - kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster Data Center" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Cassandra Cluster Data Center" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} # Collect via AzureCosmosDBCassandraCluster() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_network_subnet", @@ -786,9 +786,9 @@ class AzureDatabaseAccountKeysMetadata: @define(eq=False, slots=False) class AzureCosmosDBAccount(MicrosoftResource, BaseDatabase): kind: ClassVar[str] = "azure_cosmos_db_account" - kind_display: ClassVar[str] = "Azure Cosmos DB Account" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Account" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2024-05-15", @@ -798,7 +798,7 @@ class AzureCosmosDBAccount(MicrosoftResource, BaseDatabase): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_cassandra_keyspace", @@ -1078,11 +1078,11 @@ class AzureGremlinDatabase(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBGremlinDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_gremlin_database" - kind_display: ClassVar[str] = "Azure Cosmos DB Gremlin Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Gremlin Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_gremlin_graph", @@ -1251,9 +1251,9 @@ class AzureGremlinGraph(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBGremlinGraph(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_gremlin_graph" - kind_display: ClassVar[str] = "Azure Cosmos DB Gremlin Graph" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Gremlin Graph" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBGremlinDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1314,9 +1314,9 @@ class AzureMongoDBCollection(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBMongoDBCollection(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_mongo_db_collection" - kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Collection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Collection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBMongoDBDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1345,11 +1345,11 @@ class AzureMongoDBDatabase(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBMongoDBDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_mongo_db_database" - kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_mongo_db_collection", @@ -1419,9 +1419,9 @@ class AzureRole: @define(eq=False, slots=False) class AzureCosmosDBMongoDBRoleDefinition(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_mongo_db_role_definition" - kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Role Definition" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Role Definition" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1441,9 +1441,9 @@ class AzureCosmosDBMongoDBRoleDefinition(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBMongoDBUserDefinition(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_mongo_db_user_definition" - kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB User Definition" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB User Definition" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1467,9 +1467,9 @@ class AzureCosmosDBMongoDBUserDefinition(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBNotebookWorkspace(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_notebook_workspace" - kind_display: ClassVar[str] = "Azure Cosmos DB Notebook Workspace" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Notebook Workspace" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1485,9 +1485,9 @@ class AzureCosmosDBNotebookWorkspace(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBPrivateLink(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_private_link" - kind_display: ClassVar[str] = "Azure Cosmos DB Private Link" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Private Link" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1520,9 +1520,9 @@ class AzureRestorableLocationResource: @define(eq=False, slots=False) class AzureCosmosDBRestorableAccount(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_account" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Account" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Account" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2024-05-15", @@ -1532,7 +1532,7 @@ class AzureCosmosDBRestorableAccount(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_restorable_gremlin_database", @@ -1700,11 +1700,11 @@ class AzureSqlContainer(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBSqlDatabaseContainer(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_database_container" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database Container" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database Container" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBSqlDatabase() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_sql_database_client_encryption_key", @@ -1763,11 +1763,11 @@ class AzureCollsUsers(AzureSqlDatabaseResource, AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBSqlDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_database" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ AzureCosmosDBSqlDatabaseContainer.kind, @@ -1835,11 +1835,11 @@ def post_process(self, graph_builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureCosmosDBSqlRoleAssignment(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_role_assignment" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Role Assignment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Role Assignment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "access_control"} # Collect via AzureCosmosDBAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ MicrosoftGraphServicePrincipal.kind, @@ -1890,9 +1890,9 @@ class AzureRolePermission: @define(eq=False, slots=False) class AzureCosmosDBSqlRoleDefinition(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_role_definition" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Role Definition" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Role Definition" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1923,9 +1923,9 @@ class AzureDbTable(AzureCosmosDBResource): @define(eq=False, slots=False) class AzureCosmosDBTable(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_table" - kind_display: ClassVar[str] = "Azure Cosmos DB Table" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Table" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1941,9 +1941,9 @@ class AzureCosmosDBTable(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBSqlThroughputSetting(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_sql_throughput_setting" - kind_display: ClassVar[str] = "Azure Cosmos DB SQL Throughput Setting" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB SQL Throughput Setting" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} # Collect via AzureCosmosDBSqlDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1957,9 +1957,9 @@ class AzureCosmosDBSqlThroughputSetting(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBAccountUsage(MicrosoftResource, AzureBaseUsage): kind: ClassVar[str] = "azure_cosmos_db_account_usage" - kind_display: ClassVar[str] = "Azure Cosmos DB Account Usage" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Account Usage" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} # Collect via AzureCosmosDBAccount() mapping: ClassVar[Dict[str, Bender]] = AzureBaseUsage.mapping | { "id": K(None), @@ -1984,9 +1984,9 @@ def collect_usages(cls, account_id: str, raw: List[Json], builder: GraphBuilder) @define(eq=False, slots=False) class AzureCosmosDBLocation(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_location" - kind_display: ClassVar[str] = "Azure Cosmos DB Location" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Location" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2024-05-15", @@ -2048,9 +2048,9 @@ class AzureNodeGroupSpec: @define(eq=False, slots=False) class AzureCosmosDBMongoDBCluster(MicrosoftResource, AzureTrackedResource): kind: ClassVar[str] = "azure_cosmos_db_mongo_db_cluster" - kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Cluster" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Mongo DB Cluster" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2024-02-15-preview", @@ -2111,11 +2111,11 @@ class AzureRestorableDatabase: @define(eq=False, slots=False) class AzureCosmosDBRestorableGremlinDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_gremlin_database" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Gremlin Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Gremlin Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_restorable_gremlin_graph", @@ -2157,9 +2157,9 @@ def collect_restorable_graphs() -> None: @define(eq=False, slots=False) class AzureCosmosDBRestorableGremlinGraph(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_gremlin_graph" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Gremlin Graph" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Gremlin Graph" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2173,9 +2173,9 @@ class AzureCosmosDBRestorableGremlinGraph(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBRestorableMongoDBCollection(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_mongo_db_collection" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Mongo DB Collection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Mongo DB Collection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2189,11 +2189,11 @@ class AzureCosmosDBRestorableMongoDBCollection(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBRestorableMongoDBDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_mongo_db_database" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Mongo DB Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Mongo DB Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_restorable_mongo_db_collection", @@ -2235,9 +2235,9 @@ def collect_restorable_collections() -> None: @define(eq=False, slots=False) class AzureCosmosDBRestorableSqlContainer(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_sql_container" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable SQL Container" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable SQL Container" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2282,11 +2282,11 @@ class AzureExtendedPropertiesSqlDatabase(AzureSqlDatabaseResource): @define(eq=False, slots=False) class AzureCosmosDBRestorableSqlDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_sql_database" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable SQL Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable SQL Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_restorable_sql_container", @@ -2342,9 +2342,9 @@ def collect_restorable_containers() -> None: @define(eq=False, slots=False) class AzureCosmosDBRestorableTable(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_restorable_table" - kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Table" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB Restorable Table" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureCosmosDBRestorableAccount() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2384,9 +2384,9 @@ class AzureServerNameItem: @define(eq=False, slots=False) class AzureCosmosDBPostgresqlCluster(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="cosmos-db", version="2022-11-08", @@ -2396,7 +2396,7 @@ class AzureCosmosDBPostgresqlCluster(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_postgresql_cluster_server", @@ -2538,11 +2538,11 @@ def post_process(self, graph_builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterServer(MicrosoftResource, BaseDatabase, AzureProxyResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_server" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Server" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Server" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} # Collect via AzureCosmosDBPostgresqlCluster() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_cosmos_db_postgresql_cluster_server_configuration", @@ -2633,9 +2633,9 @@ def collect_server_configs() -> None: @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterConfiguration(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_configuration" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} # Collect via AzureCosmosDBPostgresqlCluster() config: Json = field(factory=dict) @@ -2671,9 +2671,9 @@ def collect_configs( @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterServerConfiguration(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_server_configuration" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Server Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Server Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} # Collect via AzureCosmosDBPostgresqlClusterServer() config: Json = field(factory=dict) @@ -2708,9 +2708,9 @@ def collect_configs( @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterPrivateEndpointConnection(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_private_endpoint_connection" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Private Endpoint Connection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Private Endpoint Connection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} # Collect via AzureCosmosDBPostgresqlCluster() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2734,9 +2734,9 @@ class AzureCosmosDBPostgresqlClusterPrivateEndpointConnection(MicrosoftResource) @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterPrivateLink(MicrosoftResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_private_link" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Private Link" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Private Link" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} # Collect via AzureCosmosDBPostgresqlCluster() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -2758,9 +2758,9 @@ class AzureCosmosDBPostgresqlClusterPrivateLink(MicrosoftResource): @define(eq=False, slots=False) class AzureCosmosDBPostgresqlClusterRole(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_cosmos_db_postgresql_cluster_role" - kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Role" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Cosmos DB PostgreSQL Cluster Role" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} # Collect via AzureCosmosDBPostgresqlCluster() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), diff --git a/plugins/azure/fix_plugin_azure/resource/keyvault.py b/plugins/azure/fix_plugin_azure/resource/keyvault.py index ef02f3551a..67c9d6bf1d 100644 --- a/plugins/azure/fix_plugin_azure/resource/keyvault.py +++ b/plugins/azure/fix_plugin_azure/resource/keyvault.py @@ -183,9 +183,9 @@ class AzureKeyReleasePolicy: @define(eq=False, slots=False) class AzureKeyVaultSecret(MicrosoftResource): kind: ClassVar[str] = "azure_key_vault_secret" - kind_display: ClassVar[str] = "Azure Key Vault Secret" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} + _kind_display: ClassVar[str] = "Azure Key Vault Secret" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} # collected via AzureKeyVault mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -209,9 +209,9 @@ class AzureKeyVaultSecret(MicrosoftResource): @define(eq=False, slots=False) class AzureKeyVaultManagedHsm(MicrosoftResource): kind: ClassVar[str] = "azure_key_vault_managed_hsm" - kind_display: ClassVar[str] = "Azure Key Vault Managed Hsm" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Key Vault Managed Hsm" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="keyvault", version="2023-07-01", @@ -272,9 +272,9 @@ class AzureKeyVaultManagedHsm(MicrosoftResource): @define(eq=False, slots=False) class AzureKeyVaultKey(MicrosoftResource): kind: ClassVar[str] = "azure_key_vault_key" - kind_display: ClassVar[str] = "Azure Key Vault Key" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} + _kind_display: ClassVar[str] = "Azure Key Vault Key" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "key", "group": "management"} # collected via AzureKeyVault mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -306,9 +306,9 @@ class AzureKeyVaultKey(MicrosoftResource): @define(eq=False, slots=False) class AzureKeyVault(MicrosoftResource): kind: ClassVar[str] = "azure_key_vault" - kind_display: ClassVar[str] = "Azure Key Vault" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "vault", "group": "management"} + _kind_display: ClassVar[str] = "Azure Key Vault" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "vault", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="keyvault", version="2023-07-01", @@ -318,7 +318,7 @@ class AzureKeyVault(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [AzureKeyVaultKey.kind, AzureMonitorDiagnosticSettings.kind, AzureKeyVaultManagedHsm.kind] }, diff --git a/plugins/azure/fix_plugin_azure/resource/machinelearning.py b/plugins/azure/fix_plugin_azure/resource/machinelearning.py index b5d77c3ca7..5707232cd0 100644 --- a/plugins/azure/fix_plugin_azure/resource/machinelearning.py +++ b/plugins/azure/fix_plugin_azure/resource/machinelearning.py @@ -66,11 +66,11 @@ class AzureEndpointAuthKeys: @define(eq=False, slots=False) class AzureMachineLearningBatchEndpoint(MicrosoftResource, AzureTrackedResource): kind: ClassVar[str] = "azure_machine_learning_batch_endpoint" - kind_display: ClassVar[str] = "Azure Machine Learning Batch Endpoint" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Batch Endpoint" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [MicrosoftGraphServicePrincipal.kind, MicrosoftGraphUser.kind]}, } mapping: ClassVar[Dict[str, Bender]] = AzureTrackedResource.mapping | { @@ -124,9 +124,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningCodeContainerBase(AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_code_container_base" - kind_display: ClassVar[str] = "Azure Machine Learning Code Container Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Code Container Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -152,8 +152,8 @@ class AzureMachineLearningCodeContainerBase(AzureProxyResource): class AzureMachineLearningWorkspaceCodeContainer(AzureMachineLearningCodeContainerBase, MicrosoftResource): # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_code_container" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Code Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Code Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_code_version", @@ -188,8 +188,8 @@ def collect_versions() -> None: class AzureMachineLearningRegistryCodeContainer(AzureMachineLearningCodeContainerBase, MicrosoftResource): # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_code_container" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Code Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Code Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_registry_code_version", @@ -223,9 +223,9 @@ def collect_versions() -> None: @define(eq=False, slots=False) class AzureMachineLearningCodeVersionBase(CheckVersionIsArchived, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_code_version_base" - kind_display: ClassVar[str] = "Azure Machine Learning Code Version Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Code Version Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningCodeContainerBase() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -251,23 +251,23 @@ class AzureMachineLearningCodeVersionBase(CheckVersionIsArchived, AzureProxyReso class AzureMachineLearningWorkspaceCodeVersion(AzureMachineLearningCodeVersionBase, MicrosoftResource): # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_code_version" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Code Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Code Version" @define(eq=False, slots=False) class AzureMachineLearningRegistryCodeVersion(AzureMachineLearningCodeVersionBase, MicrosoftResource): # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_code_version" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Code Version" - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Code Version" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} @define(eq=False, slots=False) class AzureMachineLearningComponentContainerBase(AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_component_container_base" - kind_display: ClassVar[str] = "Azure Machine Learning Component Container Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Component Container Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -294,8 +294,8 @@ class AzureMachineLearningWorkspaceComponentContainer(AzureMachineLearningCompon # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_component_container" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Component Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Component Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_component_version", @@ -331,8 +331,8 @@ class AzureMachineLearningRegistryComponentContainer(AzureMachineLearningCompone # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_component_container" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Component Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Component Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_registry_component_version", @@ -366,9 +366,9 @@ def collect_versions() -> None: @define(eq=False, slots=False) class AzureMachineLearningComponentVersionBase(CheckVersionIsArchived, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_component_version_base" - kind_display: ClassVar[str] = "Azure Machine Learning Component Version Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Component Version Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningComponentContainerBase() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -396,7 +396,7 @@ class AzureMachineLearningWorkspaceComponentVersion(AzureMachineLearningComponen # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_component_version" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Component Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Component Version" @define(eq=False, slots=False) @@ -404,16 +404,16 @@ class AzureMachineLearningRegistryComponentVersion(AzureMachineLearningComponent # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_component_version" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Component Version" - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Component Version" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} @define(eq=False, slots=False) class AzureMachineLearningComputeNode(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_compute_node" - kind_display: ClassVar[str] = "Azure Machine Learning Compute Node" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Machine Learning Compute Node" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} # Collected via AzureMachineLearningCompute() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("nodeId"), @@ -463,11 +463,11 @@ class AzureErrorResponse: @define(eq=False, slots=False) class AzureMachineLearningCompute(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_compute" - kind_display: ClassVar[str] = "Azure Machine Learning Compute" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Machine Learning Compute" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "compute"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_virtual_machine_size", @@ -592,9 +592,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningDataContainerBase(AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_data_container_base" - kind_display: ClassVar[str] = "Azure Machine Learning Data Container Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Data Container Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -621,8 +621,8 @@ class AzureMachineLearningWorkspaceDataContainer(AzureMachineLearningDataContain # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_data_container" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Data Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Data Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_data_version", @@ -658,8 +658,8 @@ class AzureMachineLearningRegistryDataContainer(AzureMachineLearningDataContaine # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_data_container" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Data Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Data Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_registry_data_version", @@ -693,9 +693,9 @@ def collect_versions() -> None: @define(eq=False, slots=False) class AzureMachineLearningDataVersionBase(CheckVersionIsArchived, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_data_version_base" - kind_display: ClassVar[str] = "Azure Machine Learning Data Version Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Data Version Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningDataContainerBase() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -725,7 +725,7 @@ class AzureMachineLearningWorkspaceDataVersion(AzureMachineLearningDataVersionBa # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_data_version" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Data Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Data Version" @define(eq=False, slots=False) @@ -733,16 +733,16 @@ class AzureMachineLearningRegistryDataVersion(AzureMachineLearningDataVersionBas # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_data_version" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Data Version" - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Data Version" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} @define(eq=False, slots=False) class AzureMachineLearningDatastore(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_datastore" - kind_display: ClassVar[str] = "Azure Machine Learning Datastore" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Machine Learning Datastore" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -785,9 +785,9 @@ class AzureEndpointDeploymentResourcePropertiesBasicResource: @define(eq=False, slots=False) class AzureMachineLearningEndpoint(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_endpoint" - kind_display: ClassVar[str] = "Azure Machine Learning Endpoint" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Endpoint" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -846,9 +846,9 @@ class AzureInferenceContainerProperties: @define(eq=False, slots=False) class AzureMachineLearningEnvironmentContainerBase(AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_environment_container_base" - kind_display: ClassVar[str] = "Azure Machine Learning Environment Container Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Environment Container Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -877,8 +877,8 @@ class AzureMachineLearningWorkspaceEnvironmentContainer( # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_environment_container" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Environment Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Environment Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_environment_version", @@ -914,8 +914,8 @@ class AzureMachineLearningRegistryEnvironmentContainer(AzureMachineLearningEnvir # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_environment_container" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Environment Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Environment Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_registry_environment_version", @@ -949,9 +949,9 @@ def collect_versions() -> None: @define(eq=False, slots=False) class AzureMachineLearningEnvironmentVersionBase(CheckVersionIsArchived, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_environment_version_base" - kind_display: ClassVar[str] = "Azure Machine Learning Environment Version Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Environment Version Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningEnvironmentContainerBase() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -993,7 +993,7 @@ class AzureMachineLearningWorkspaceEnvironmentVersion(AzureMachineLearningEnviro # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_environment_version" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Environment Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Environment Version" @define(eq=False, slots=False) @@ -1001,16 +1001,16 @@ class AzureMachineLearningRegistryEnvironmentVersion(AzureMachineLearningEnviron # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_environment_version" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Environment Version" - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Environment Version" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} @define(eq=False, slots=False) class AzureMachineLearningFeature(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_feature" - kind_display: ClassVar[str] = "Azure Machine Learning Feature" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Feature" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningFeaturesetVersion() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -1111,11 +1111,11 @@ class AzureMaterializationSettings: @define(eq=False, slots=False) class AzureMachineLearningFeaturesetContainer(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_featureset_container" - kind_display: ClassVar[str] = "Azure Machine Learning Featureset Container" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Featureset Container" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_featureset_version", @@ -1167,11 +1167,11 @@ def collect_versions() -> None: @define(eq=False, slots=False) class AzureMachineLearningFeaturesetVersion(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_featureset_version" - kind_display: ClassVar[str] = "Azure Machine Learning Featureset Version" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Featureset Version" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} # Collected via AzureMachineLearningFeaturesetContainer() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_feature", @@ -1231,11 +1231,11 @@ def collect_features() -> None: @define(eq=False, slots=False) class AzureMachineLearningFeaturestoreEntityContainer(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_featurestore_entity_container" - kind_display: ClassVar[str] = "Azure Machine Learning Featurestore Entity Container" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Featurestore Entity Container" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_featurestore_entity_version", @@ -1295,9 +1295,9 @@ class AzureIndexColumn: @define(eq=False, slots=False) class AzureMachineLearningFeaturestoreEntityVersion(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_featurestore_entity_version" - kind_display: ClassVar[str] = "Azure Machine Learning Featurestore Entity Version" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Featurestore Entity Version" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} # Collected via AzureMachineLearningFeaturestoreEntityContainer() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -1346,11 +1346,11 @@ class AzureJobService: @define(eq=False, slots=False) class AzureMachineLearningJob(BaseAIJob, MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_job" - kind_display: ClassVar[str] = "Azure Machine Learning Job" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Job" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_machine_learning_compute", @@ -1515,9 +1515,9 @@ class AzureStatusMessage: @define(eq=False, slots=False) class AzureMachineLearningLabelingJob(BaseAIJob, MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_labeling_job" - kind_display: ClassVar[str] = "Azure Machine Learning Labeling Job" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Labeling Job" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "ai"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "tags": S("tags", default={}), @@ -1556,9 +1556,9 @@ class AzureMachineLearningLabelingJob(BaseAIJob, MicrosoftResource): @define(eq=False, slots=False) class AzureMachineLearningModelContainerBase(AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_model_container_base" - kind_display: ClassVar[str] = "Azure Machine Learning Model Container Base" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Model Container Base" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "container", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -1587,8 +1587,8 @@ class AzureMachineLearningWorkspaceModelContainer( # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_model_container" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Model Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Model Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_model_version", @@ -1626,8 +1626,8 @@ class AzureMachineLearningRegistryModelContainer( # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_model_container" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Model Container" - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Model Container" + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_registry_model_version", @@ -1668,9 +1668,9 @@ class AzureFlavorData: @define(eq=False, slots=False) class AzureMachineLearningModelVersionBase(CheckVersionIsArchived, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_base_model_version" - kind_display: ClassVar[str] = "Azure Machine Learning Base Model Version" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Base Model Version" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "version", "group": "ai"} # Collected via AzureMachineLearningModelContainerBase() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -1706,7 +1706,7 @@ class AzureMachineLearningWorkspaceModelVersion(AzureMachineLearningModelVersion # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_workspace_model_version" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Model Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Model Version" @define(eq=False, slots=False) @@ -1714,17 +1714,17 @@ class AzureMachineLearningRegistryModelVersion(AzureMachineLearningModelVersionB # Defined to split registry and workspace resource kind: ClassVar[str] = "azure_machine_learning_registry_model_version" - kind_display: ClassVar[str] = "Azure Machine Learning Registry Model Version" + _kind_display: ClassVar[str] = "Azure Machine Learning Registry Model Version" @define(eq=False, slots=False) class AzureMachineLearningOnlineEndpoint(MicrosoftResource, AzureTrackedResource): kind: ClassVar[str] = "azure_machine_learning_online_endpoint" - kind_display: ClassVar[str] = "Azure Machine Learning Online Endpoint" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Online Endpoint" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_machine_learning_compute", @@ -1786,11 +1786,11 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningPrivateEndpointConnection(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_private_endpoint_connection" - kind_display: ClassVar[str] = "Azure Machine Learning Private Endpoint Connection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "connection", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Private Endpoint Connection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "connection", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [MicrosoftGraphServicePrincipal.kind, MicrosoftGraphUser.kind]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1837,11 +1837,11 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningPrivateLink(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_private_link" - kind_display: ClassVar[str] = "Azure Machine Learning Private Link" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Private Link" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [MicrosoftGraphServicePrincipal.kind, MicrosoftGraphUser.kind]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1999,9 +1999,9 @@ class AzureRegistryRegionArmDetails: @define(eq=False, slots=False) class AzureMachineLearningRegistry(MicrosoftResource, AzureTrackedResource): kind: ClassVar[str] = "azure_machine_learning_registry" - kind_display: ClassVar[str] = "Azure Machine Learning Registry" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Registry" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="machinelearningservices", version="2024-04-01", @@ -2011,7 +2011,7 @@ class AzureMachineLearningRegistry(MicrosoftResource, AzureTrackedResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ MicrosoftGraphServicePrincipal.kind, @@ -2122,9 +2122,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningQuota(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_quota" - kind_display: ClassVar[str] = "Azure Machine Learning Quota" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Quota" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "ai"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="machinelearningservices", version="2024-04-01", @@ -2150,9 +2150,9 @@ class AzureMachineLearningQuota(MicrosoftResource): @define(eq=False, slots=False) class AzureMachineLearningSchedule(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_machine_learning_schedule" - kind_display: ClassVar[str] = "Azure Machine Learning Schedule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Schedule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -2187,11 +2187,11 @@ class AzureServerlessInferenceEndpoint: @define(eq=False, slots=False) class AzureMachineLearningServerlessEndpoint(MicrosoftResource, AzureTrackedResource): kind: ClassVar[str] = "azure_machine_learning_serverless_endpoint" - kind_display: ClassVar[str] = "Azure Machine Learning Serverless Endpoint" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Serverless Endpoint" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "ai"} # Collected via AzureMachineLearningWorkspace() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_workspace_model_version", @@ -2257,9 +2257,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningUsage(MicrosoftResource, AzureBaseUsage): kind: ClassVar[str] = "azure_machine_learning_usage" - kind_display: ClassVar[str] = "Azure Machine Learning Usage" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Usage" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "ai"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="machinelearningservices", version="2024-04-01", @@ -2314,9 +2314,9 @@ class AzureEstimatedVMPrices: @define(eq=False, slots=False) class AzureMachineLearningVirtualMachineSize(MicrosoftResource, BaseInstanceType): kind: ClassVar[str] = "azure_machine_learning_virtual_machine_size" - kind_display: ClassVar[str] = "Azure Machine Learning Virtual Machine Size" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} + _kind_display: ClassVar[str] = "Azure Machine Learning Virtual Machine Size" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name"), "tags": S("tags", default={}), @@ -2495,9 +2495,9 @@ class AzureWorkspaceHubConfig: @define(eq=False, slots=False) class AzureMachineLearningWorkspace(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_workspace" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="machinelearningservices", version="2024-04-01", @@ -2507,7 +2507,7 @@ class AzureMachineLearningWorkspace(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_machine_learning_batch_endpoint", @@ -2718,9 +2718,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMachineLearningWorkspaceConnection(MicrosoftResource): kind: ClassVar[str] = "azure_machine_learning_workspace_connection" - kind_display: ClassVar[str] = "Azure Machine Learning Workspace Connection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} + _kind_display: ClassVar[str] = "Azure Machine Learning Workspace Connection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "ai"} # Collected via AzureMachineLearningWorkspace() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), diff --git a/plugins/azure/fix_plugin_azure/resource/microsoft_graph.py b/plugins/azure/fix_plugin_azure/resource/microsoft_graph.py index a5217e01d2..9b90b9e145 100644 --- a/plugins/azure/fix_plugin_azure/resource/microsoft_graph.py +++ b/plugins/azure/fix_plugin_azure/resource/microsoft_graph.py @@ -20,8 +20,8 @@ @define(eq=False, slots=False) class MicrosoftGraphEntity(MicrosoftResource): kind: ClassVar[str] = "microsoft_graph_entity" - kind_display: ClassVar[str] = "Microsoft Graph Entity" - kind_service: ClassVar[Optional[str]] = "graph" + _kind_display: ClassVar[str] = "Microsoft Graph Entity" + _kind_service: ClassVar[Optional[str]] = "graph" mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "deleted_date_time": S("deletedDateTime"), @@ -249,9 +249,9 @@ class MicrosoftGraphAssignedPlan: @define(eq=False, slots=False) class MicrosoftGraphRole(MicrosoftGraphEntity, BaseRole): kind: ClassVar[str] = "microsoft_graph_role" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Role" - metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Role" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "role", "group": "access_control"} api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/beta/roleManagement/directory/roleDefinitions", @@ -261,7 +261,7 @@ class MicrosoftGraphRole(MicrosoftGraphEntity, BaseRole): }, access_path="value", ) - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["microsoft_graph_role"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["microsoft_graph_role"]}} mapping: ClassVar[Dict[str, Bender]] = MicrosoftGraphEntity.mapping | { "id": S("id"), @@ -527,9 +527,9 @@ class MicrosoftGraphVerifiedDomain: @define(eq=False, slots=False) class MicrosoftGraphServicePrincipal(MicrosoftGraphEntity): kind: ClassVar[str] = "microsoft_graph_service_principal" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Service Principal" - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Service Principal" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/v1.0/serviceprincipals", @@ -539,7 +539,7 @@ class MicrosoftGraphServicePrincipal(MicrosoftGraphEntity): }, access_path="value", ) - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} mapping: ClassVar[Dict[str, Bender]] = MicrosoftGraphEntity.mapping | { "id": S("id"), "name": S("displayName"), @@ -636,9 +636,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class MicrosoftGraphDevice(MicrosoftGraphEntity): kind: ClassVar[str] = "microsoft_graph_device" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Device" - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Device" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "access_control"} api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/v1.0/devices", @@ -648,7 +648,7 @@ class MicrosoftGraphDevice(MicrosoftGraphEntity): }, access_path="value", ) - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} mapping: ClassVar[Dict[str, Bender]] = MicrosoftGraphEntity.mapping | { "id": S("id"), "name": S("name"), @@ -736,9 +736,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class MicrosoftGraphUser(MicrosoftGraphEntity, BaseUser): kind: ClassVar[str] = "microsoft_graph_user" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph User" - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph User" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/v1.0/users", @@ -748,7 +748,7 @@ class MicrosoftGraphUser(MicrosoftGraphEntity, BaseUser): }, access_path="value", ) - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["microsoft_graph_role"]}} mapping: ClassVar[Dict[str, Bender]] = MicrosoftGraphEntity.mapping | { "id": S("id"), "name": S("displayName"), @@ -906,9 +906,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class MicrosoftGraphGroup(MicrosoftGraphEntity, BaseGroup): kind: ClassVar[str] = "microsoft_graph_group" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Group" - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Group" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/v1.0/groups", @@ -918,7 +918,7 @@ class MicrosoftGraphGroup(MicrosoftGraphEntity, BaseGroup): }, access_path="value", ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["microsoft_graph_device", "microsoft_graph_service_principal", "microsoft_graph_user"] } @@ -1048,8 +1048,8 @@ def add_transitive(gp: MicrosoftGraphGroup) -> None: @define(eq=False, slots=False) class MicrosoftGraphOrganization(MicrosoftGraphEntity, BaseAccount): kind: ClassVar[str] = "microsoft_graph_organization" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Organization" + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Organization" api_spec: ClassVar[MicrosoftRestSpec] = RestApiSpec( "graph", "https://graph.microsoft.com/v1.0/organization", @@ -1133,16 +1133,16 @@ def deferred_edge_to_subscription(cls, builder: GraphBuilder) -> None: @define(eq=False, slots=False) class MicrosoftGraphOrganizationRoot(MicrosoftGraphEntity, BaseRegion): kind: ClassVar[str] = "microsoft_graph_organization_root" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Organization Root" + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Organization Root" @define(eq=False, slots=False) class MicrosoftGraphPolicy(MicrosoftGraphEntity): kind: ClassVar[str] = "microsoft_graph_policy" - kind_service: ClassVar[Optional[str]] = "entra_id" - kind_display: ClassVar[str] = "Microsoft Graph Policy" - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = "entra_id" + _kind_display: ClassVar[str] = "Microsoft Graph Policy" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "access_control"} policy_kind: Optional[str] = field(default=None, metadata={"description": "The kind of policy."}) enabled: Optional[bool] = field(default=None, metadata={"description": "Indicates whether the policy is enabled."}) diff --git a/plugins/azure/fix_plugin_azure/resource/monitor.py b/plugins/azure/fix_plugin_azure/resource/monitor.py index 421841c0b0..86b5aeb018 100644 --- a/plugins/azure/fix_plugin_azure/resource/monitor.py +++ b/plugins/azure/fix_plugin_azure/resource/monitor.py @@ -202,9 +202,9 @@ class AzureMonitorEventHubReceiver: @define(eq=False, slots=False) class AzureMonitorActionGroup(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_action_group" - kind_display: ClassVar[str] = "Azure Monitor Action Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Action Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -296,10 +296,10 @@ class AzureMonitorActionGroupRef: @define(eq=False, slots=False) class AzureMonitorActivityLogAlert(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_activity_log_alert" - kind_display: ClassVar[str] = "Azure Monitor Activity Log Alert" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Monitor Activity Log Alert" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": [AzureMonitorActionGroup.kind]}, } _create_provider_link: ClassVar[bool] = False @@ -364,9 +364,9 @@ class AzureMonitorRuleCondition: @define(eq=False, slots=False) class AzureMonitorAlertRule(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_alert_rule" - kind_display: ClassVar[str] = "Azure Monitor Alert Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Alert Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -426,9 +426,9 @@ class AzureMonitorAccessModeSettings: @define(eq=False, slots=False) class AzureMonitorPrivateLinkScope(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_private_link_scope" - kind_display: ClassVar[str] = "Azure Monitor Private Link Scope" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Private Link Scope" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -708,9 +708,9 @@ class AzureMonitorDataFlow: @define(eq=False, slots=False) class AzureMonitorWorkspace(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_workspace" - kind_display: ClassVar[str] = "Azure Monitor Workspace" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Workspace" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -746,9 +746,9 @@ class AzureMonitorWorkspace(MicrosoftResource): @define(eq=False, slots=False) class AzureMonitorDataCollectionRule(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_data_collection_rule" - kind_display: ClassVar[str] = "Azure Monitor Data Collection Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Data Collection Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -807,9 +807,9 @@ class AzureMonitorRetentionPolicy: @define(eq=False, slots=False) class AzureMonitorLogProfile(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_log_profile" - kind_display: ClassVar[str] = "Azure Monitor Log Profile" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Log Profile" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -851,9 +851,9 @@ class AzureMetricAlertAction: @define(eq=False, slots=False) class AzureMetricAlert(MicrosoftResource): kind: ClassVar[str] = "azure_metric_alert" - kind_display: ClassVar[str] = "Azure Metric Alert" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} + _kind_display: ClassVar[str] = "Azure Metric Alert" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "alarm", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -1116,9 +1116,9 @@ class AzureMonitorNetworkingConfiguration: @define(eq=False, slots=False) class AzureMonitorPipelineGroup(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_pipeline_group" - kind_display: ClassVar[str] = "Azure Monitor Pipeline Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Pipeline Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -1229,9 +1229,9 @@ class AzureMonitorRuleResolveConfiguration: @define(eq=False, slots=False) class AzureMonitorScheduledQueryRule(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_scheduled_query_rule" - kind_display: ClassVar[str] = "Azure Monitor Scheduled Query Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Scheduled Query Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -1325,9 +1325,9 @@ class AzureDiagnosticLogSetting: @define(eq=False, slots=False) class AzureMonitorDiagnosticSettings(MicrosoftResource): kind: ClassVar[str] = "azure_monitor_diagnostic_settings" - kind_display: ClassVar[str] = "Azure Monitor Diagnostic Settings" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Monitor Diagnostic Settings" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} _create_provider_link: ClassVar[bool] = False api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="monitor", @@ -1338,7 +1338,7 @@ class AzureMonitorDiagnosticSettings(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": [AzureStorageAccount.kind, AzureMonitorWorkspace.kind]}, } mapping: ClassVar[Dict[str, Bender]] = { diff --git a/plugins/azure/fix_plugin_azure/resource/mysql.py b/plugins/azure/fix_plugin_azure/resource/mysql.py index c9afadf12e..5a53df10c9 100644 --- a/plugins/azure/fix_plugin_azure/resource/mysql.py +++ b/plugins/azure/fix_plugin_azure/resource/mysql.py @@ -105,10 +105,10 @@ class AzureServerMaintenanceWindow: @define(eq=False, slots=False) class AzureMysqlServerADAdministrator(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_ad_administrator" - kind_display: ClassVar[str] = "Azure MySQL Server Ad Administrator" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftGraphUser.kind]}} + _kind_display: ClassVar[str] = "Azure MySQL Server Ad Administrator" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftGraphUser.kind]}} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -215,9 +215,9 @@ class AzureServerEditionCapability: @define(eq=False, slots=False) class AzureMysqlServerType(MicrosoftResource, BaseDatabaseInstanceType): kind: ClassVar[str] = "azure_mysql_server_type" - kind_display: ClassVar[str] = "Azure MySQL Server Type" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Type" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "database"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -325,9 +325,9 @@ def collect( @define(eq=False, slots=False) class AzureMysqlServerConfiguration(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_configuration" - kind_display: ClassVar[str] = "Azure MySQL Server Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} # Collect via AzureMysqlServer() config: Json = field(factory=dict) @@ -362,9 +362,9 @@ def collect_configs( @define(eq=False, slots=False) class AzureMysqlServerDatabase(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_database" - kind_display: ClassVar[str] = "Azure MySQL Server Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -386,9 +386,9 @@ class AzureMysqlServerDatabase(MicrosoftResource): @define(eq=False, slots=False) class AzureMysqlServerFirewallRule(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_firewall_rule" - kind_display: ClassVar[str] = "Azure MySQL Server Firewall Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure MySQL Server Firewall Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -410,9 +410,9 @@ class AzureMysqlServerFirewallRule(MicrosoftResource): @define(eq=False, slots=False) class AzureMysqlServerLogFile(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_log_file" - kind_display: ClassVar[str] = "Azure MySQL Server Log File" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Log File" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "database"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -438,9 +438,9 @@ class AzureMysqlServerLogFile(MicrosoftResource): @define(eq=False, slots=False) class AzureMysqlServerMaintenance(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_maintenance" - kind_display: ClassVar[str] = "Azure MySQL Server Maintenance" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Maintenance" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -529,9 +529,9 @@ class AzureImportSourceProperties: @define(eq=False, slots=False) class AzureMysqlServer(MicrosoftResource, BaseDatabase): kind: ClassVar[str] = "azure_mysql_server" - kind_display: ClassVar[str] = "Azure MySQL Server" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="mysql", version="2023-12-30", @@ -541,7 +541,7 @@ class AzureMysqlServer(MicrosoftResource, BaseDatabase): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_mysql_server_backup", @@ -769,9 +769,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureMysqlServerBackup(MicrosoftResource): kind: ClassVar[str] = "azure_mysql_server_backup" - kind_display: ClassVar[str] = "Azure MySQL Server Backup" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} + _kind_display: ClassVar[str] = "Azure MySQL Server Backup" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} # Collect via AzureMysqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), diff --git a/plugins/azure/fix_plugin_azure/resource/network.py b/plugins/azure/fix_plugin_azure/resource/network.py index c887eec5cd..3048507a77 100644 --- a/plugins/azure/fix_plugin_azure/resource/network.py +++ b/plugins/azure/fix_plugin_azure/resource/network.py @@ -956,9 +956,9 @@ class AzureApplicationGatewayGlobalConfiguration: @define(eq=False, slots=False) class AzureNetworkApplicationGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_application_gateway" - kind_display: ClassVar[str] = "Azure Network Application Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Application Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -968,7 +968,7 @@ class AzureNetworkApplicationGateway(MicrosoftResource, BaseGateway): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, "successors": {"default": ["azure_network_web_application_firewall_policy"]}, } @@ -1119,9 +1119,9 @@ class AzureApplicationGatewayFirewallRuleGroup: @define(eq=False, slots=False) class AzureNetworkApplicationGatewayFirewallRuleSet(MicrosoftResource): kind: ClassVar[str] = "azure_network_application_gateway_firewall_rule_set" - kind_display: ClassVar[str] = "Azure Network Application Gateway Firewall Rule Set" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Application Gateway Firewall Rule Set" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1350,9 +1350,9 @@ class AzureFirewallSku: @define(eq=False, slots=False) class AzureNetworkFirewall(MicrosoftResource, BaseFirewall): kind: ClassVar[str] = "azure_network_firewall" - kind_display: ClassVar[str] = "Azure Network Firewall" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Firewall" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1362,7 +1362,7 @@ class AzureNetworkFirewall(MicrosoftResource, BaseFirewall): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, "successors": {"default": ["azure_network_firewall_policy", "azure_network_virtual_hub"]}, } @@ -1449,9 +1449,9 @@ class AzureIpRules: @define(eq=False, slots=False) class AzureNetworkBastionHost(MicrosoftResource): kind: ClassVar[str] = "azure_network_bastion_host" - kind_display: ClassVar[str] = "Azure Network Bastion Host" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "host", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Bastion Host" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "host", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1461,7 +1461,7 @@ class AzureNetworkBastionHost(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_network", "azure_network_subnet"]}, "successors": {"default": ["azure_network_public_ip_address"]}, } @@ -1517,9 +1517,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkCustomIpPrefix(MicrosoftResource): kind: ClassVar[str] = "azure_network_custom_ip_prefix" - kind_display: ClassVar[str] = "Azure Network Custom IP Prefix" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Custom IP Prefix" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1571,9 +1571,9 @@ class AzureNetworkCustomIpPrefix(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkDdosProtectionPlan(MicrosoftResource): kind: ClassVar[str] = "azure_network_ddos_protection_plan" - kind_display: ClassVar[str] = "Azure Network DDoS Protection Plan" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network DDoS Protection Plan" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1583,7 +1583,7 @@ class AzureNetworkDdosProtectionPlan(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_public_ip_address", "azure_network_virtual_network"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1753,11 +1753,11 @@ class AzureTrafficAnalyticsProperties: @define(eq=False, slots=False) class AzureNetworkFlowLog(MicrosoftResource): kind: ClassVar[str] = "azure_network_flow_log" - kind_display: ClassVar[str] = "Azure Network Flow Log" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Flow Log" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} # Collect via AzureNetworkWatcher() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_storage_account"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1797,9 +1797,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkSecurityGroup(MicrosoftResource, BaseSecurityGroup): kind: ClassVar[str] = "azure_network_security_group" - kind_display: ClassVar[str] = "Azure Network Security Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Security Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "security_group", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -1809,7 +1809,7 @@ class AzureNetworkSecurityGroup(MicrosoftResource, BaseSecurityGroup): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_flow_log"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -1877,9 +1877,9 @@ class AzureRoute(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkRouteTable(MicrosoftResource, BaseRoutingTable): kind: ClassVar[str] = "azure_network_route_table" - kind_display: ClassVar[str] = "Azure Network Route Table" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Route Table" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-09-01", @@ -2016,9 +2016,9 @@ class AzureIpTag: @define(eq=False, slots=False) class AzureNetworkNatGateway(MicrosoftResource): kind: ClassVar[str] = "azure_network_nat_gateway" - kind_display: ClassVar[str] = "Azure Network NAT Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network NAT Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2058,9 +2058,9 @@ class AzureNetworkNatGateway(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkPublicIPAddress(MicrosoftResource, BaseIPAddress): kind: ClassVar[str] = "azure_network_public_ip_address" - kind_display: ClassVar[str] = "Azure Network Public IP Address" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Public IP Address" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2070,7 +2070,7 @@ class AzureNetworkPublicIPAddress(MicrosoftResource, BaseIPAddress): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_nat_gateway", "azure_network_public_ip_prefix"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -2232,10 +2232,10 @@ class AzureDelegation(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkSubnet(MicrosoftResource, BaseSubnet): kind: ClassVar[str] = "azure_network_subnet" - kind_display: ClassVar[str] = "Azure Network Subnet" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "subnet", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Network Subnet" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "subnet", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_network_nat_gateway", @@ -2349,9 +2349,9 @@ class AzureFrontendIPConfiguration(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualNetworkTap(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_network_tap" - kind_display: ClassVar[str] = "Azure Network Virtual Network TAP" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Network TAP" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2553,9 +2553,9 @@ class AzureResourceSet: @define(eq=False, slots=False) class AzureNetworkPrivateLinkService(MicrosoftResource): kind: ClassVar[str] = "azure_network_private_link_service" - kind_display: ClassVar[str] = "Azure Network Private Link Service" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Private Link Service" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2604,9 +2604,9 @@ class AzureNetworkPrivateLinkService(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkInterface(MicrosoftResource, BaseNetworkInterface): kind: ClassVar[str] = "azure_network_interface" - kind_display: ClassVar[str] = "Azure Network Interface" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Interface" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2616,7 +2616,7 @@ class AzureNetworkInterface(MicrosoftResource, BaseNetworkInterface): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_network_virtual_network_tap", @@ -2718,9 +2718,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkDscpConfiguration(MicrosoftResource): kind: ClassVar[str] = "azure_network_dscp_configuration" - kind_display: ClassVar[str] = "Azure Network Dscp Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Dscp Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -2730,7 +2730,7 @@ class AzureNetworkDscpConfiguration(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3005,9 +3005,9 @@ class AzureExpressRouteCircuitServiceProviderProperties: @define(eq=False, slots=False) class AzureNetworkExpressRouteCircuit(MicrosoftResource): kind: ClassVar[str] = "azure_network_express_route_circuit" - kind_display: ClassVar[str] = "Azure Network Express Route Circuit" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Express Route Circuit" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3017,7 +3017,7 @@ class AzureNetworkExpressRouteCircuit(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_express_route_port", "azure_network_express_route_ports_location"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3135,9 +3135,9 @@ class AzureExpressRouteCrossConnectionPeering(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkExpressRouteCrossConnection(MicrosoftResource): kind: ClassVar[str] = "azure_network_express_route_cross_connection" - kind_display: ClassVar[str] = "Azure Network Express Route Cross Connection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Express Route Cross Connection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3282,9 +3282,9 @@ class AzureExpressRouteConnection(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkExpressRouteGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_express_route_gateway" - kind_display: ClassVar[str] = "Azure Network Express Route Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure Network Express Route Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "access_control"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3359,9 +3359,9 @@ class AzureExpressRouteLink(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkExpressRoutePort(MicrosoftResource): kind: ClassVar[str] = "azure_network_express_route_port" - kind_display: ClassVar[str] = "Azure Network Express Route Port" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Express Route Port" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3415,9 +3415,9 @@ class AzureExpressRoutePortsLocationBandwidths: @define(eq=False, slots=False) class AzureNetworkExpressRoutePortsLocation(MicrosoftResource): kind: ClassVar[str] = "azure_network_express_route_ports_location" - kind_display: ClassVar[str] = "Azure Network Express Route Ports Location" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Express Route Ports Location" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3602,9 +3602,9 @@ class AzureFirewallPolicyTransportSecurity: @define(eq=False, slots=False) class AzureNetworkFirewallPolicy(MicrosoftResource, BasePolicy): kind: ClassVar[str] = "azure_network_firewall_policy" - kind_display: ClassVar[str] = "Azure Network Firewall Policy" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Firewall Policy" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3661,9 +3661,9 @@ class AzureNetworkFirewallPolicy(MicrosoftResource, BasePolicy): @define(eq=False, slots=False) class AzureNetworkIpAllocation(MicrosoftResource): kind: ClassVar[str] = "azure_network_ip_allocation" - kind_display: ClassVar[str] = "Azure Network IP Allocation" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network IP Allocation" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3673,7 +3673,7 @@ class AzureNetworkIpAllocation(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_network", "azure_network_subnet"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3707,9 +3707,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkIpGroup(MicrosoftResource): kind: ClassVar[str] = "azure_network_ip_group" - kind_display: ClassVar[str] = "Azure Network IP Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network IP Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -3719,7 +3719,7 @@ class AzureNetworkIpGroup(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_network"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -3769,9 +3769,9 @@ def _get_virtual_network_ips_and_ids(self, builder: GraphBuilder) -> List[Tuple[ @define(eq=False, slots=False) class AzureNetworkLoadBalancerProbe(MicrosoftResource, BaseHealthCheck): kind: ClassVar[str] = "azure_network_load_balancer_probe" - kind_display: ClassVar[str] = "Azure Network Load Balancer Probe" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Load Balancer Probe" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} # Collect via AzureNetworkLoadBalancer mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -3996,9 +3996,9 @@ class AzureOutboundRule(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkLoadBalancer(MicrosoftResource, BaseLoadBalancer): kind: ClassVar[str] = "azure_network_load_balancer" - kind_display: ClassVar[str] = "Azure Network Load Balancer" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Load Balancer" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4008,7 +4008,7 @@ class AzureNetworkLoadBalancer(MicrosoftResource, BaseLoadBalancer): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_network_virtual_network", @@ -4197,9 +4197,9 @@ class AzureContainerNetworkInterface(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkProfile(MicrosoftResource): kind: ClassVar[str] = "azure_network_profile" - kind_display: ClassVar[str] = "Azure Network Profile" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Profile" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4209,7 +4209,7 @@ class AzureNetworkProfile(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, "successors": {"default": ["azure_compute_virtual_machine_base"]}, } @@ -4332,9 +4332,9 @@ class AzurePartnerManagedResourceProperties: @define(eq=False, slots=False) class AzureNetworkVirtualAppliance(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_appliance" - kind_display: ClassVar[str] = "Azure Network Virtual Appliance" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Appliance" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4344,7 +4344,7 @@ class AzureNetworkVirtualAppliance(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, "successors": {"default": ["azure_network_virtual_appliance_sku"]}, } @@ -4456,9 +4456,9 @@ class AzureNetworkVirtualApplianceSkuInstances: @define(eq=False, slots=False) class AzureNetworkVirtualApplianceSku(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_appliance_sku" - kind_display: ClassVar[str] = "Azure Network Virtual Appliance SKU" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Azure Network Virtual Appliance SKU" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-04-01", @@ -4487,9 +4487,9 @@ class AzureNetworkVirtualApplianceSku(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkWatcher(MicrosoftResource): kind: ClassVar[str] = "azure_network_watcher" - kind_display: ClassVar[str] = "Azure Network Watcher" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Watcher" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4499,7 +4499,7 @@ class AzureNetworkWatcher(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_network"]}, "successors": {"default": ["azure_network_flow_log"]}, } @@ -4647,9 +4647,9 @@ class AzureVpnClientConnectionHealth: @define(eq=False, slots=False) class AzureNetworkP2SVpnGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_p2_s_vpn_gateway" - kind_display: ClassVar[str] = "Azure Network P2 S VPN Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network P2 S VPN Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4659,7 +4659,7 @@ class AzureNetworkP2SVpnGateway(MicrosoftResource, BaseGateway): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_virtual_hub"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -4694,9 +4694,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkPublicIPPrefix(MicrosoftResource): kind: ClassVar[str] = "azure_network_public_ip_prefix" - kind_display: ClassVar[str] = "Azure Network Public IP Prefix" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Public IP Prefix" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4761,9 +4761,9 @@ class AzureRouteFilterRule(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkRouteFilter(MicrosoftResource): kind: ClassVar[str] = "azure_network_route_filter" - kind_display: ClassVar[str] = "Azure Network Route Filter" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Route Filter" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4791,9 +4791,9 @@ class AzureNetworkRouteFilter(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkSecurityPartnerProvider(MicrosoftResource): kind: ClassVar[str] = "azure_network_security_partner_provider" - kind_display: ClassVar[str] = "Azure Network Security Partner Provider" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Security Partner Provider" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4821,9 +4821,9 @@ class AzureNetworkSecurityPartnerProvider(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkUsage(MicrosoftResource, AzureBaseUsage, BaseNetworkQuota): kind: ClassVar[str] = "azure_network_usage" - kind_display: ClassVar[str] = "Azure Network Usage" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Usage" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4896,9 +4896,9 @@ class AzureVirtualHubRouteTableV2(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualHub(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_hub" - kind_display: ClassVar[str] = "Azure Network Virtual Hub" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Hub" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -4908,7 +4908,7 @@ class AzureNetworkVirtualHub(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_network_express_route_gateway", @@ -5098,9 +5098,9 @@ class AzureVirtualNetworkPeering(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualNetwork(MicrosoftResource, BaseNetwork): kind: ClassVar[str] = "azure_network_virtual_network" - kind_display: ClassVar[str] = "Azure Network Virtual Network" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Network" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5110,7 +5110,7 @@ class AzureNetworkVirtualNetwork(MicrosoftResource, BaseNetwork): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_subnet"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -5178,9 +5178,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureNetworkVirtualRouter(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_router" - kind_display: ClassVar[str] = "Azure Network Virtual Router" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Router" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5212,9 +5212,9 @@ class AzureNetworkVirtualRouter(MicrosoftResource): @define(eq=False, slots=False) class AzureNetworkVirtualWAN(MicrosoftResource): kind: ClassVar[str] = "azure_network_virtual_wan" - kind_display: ClassVar[str] = "Azure Network Virtual WAN" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual WAN" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5345,9 +5345,9 @@ class AzureVpnSiteLinkConnection(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualWANVpnConnection(MicrosoftResource, BaseTunnel): kind: ClassVar[str] = "azure_network_virtual_wan_vpn_connection" - kind_display: ClassVar[str] = "Azure Network Virtual WAN VPN Connection" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual WAN VPN Connection" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} # Collect via AzureNetworkVirtualWANVpnGateway mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -5481,9 +5481,9 @@ class AzureVpnGatewayNatRule(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualWANVpnGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_virtual_wan_vpn_gateway" - kind_display: ClassVar[str] = "Azure Network Virtual WAN VPN Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual WAN VPN Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5493,7 +5493,7 @@ class AzureNetworkVirtualWANVpnGateway(MicrosoftResource, BaseGateway): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_network_virtual_wan_vpn_connection"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -5607,9 +5607,9 @@ class AzureAadAuthenticationParameters: @define(eq=False, slots=False) class AzureNetworkVpnServerConfiguration(MicrosoftResource): kind: ClassVar[str] = "azure_network_vpn_server_configuration" - kind_display: ClassVar[str] = "Azure Network VPN Server Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network VPN Server Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5736,9 +5736,9 @@ class AzureO365PolicyProperties: @define(eq=False, slots=False) class AzureNetworkVpnSite(MicrosoftResource, BasePeeringConnection): kind: ClassVar[str] = "azure_network_vpn_site" - kind_display: ClassVar[str] = "Azure Network VPN Site" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network VPN Site" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -5748,7 +5748,7 @@ class AzureNetworkVpnSite(MicrosoftResource, BasePeeringConnection): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_wan"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -5985,9 +5985,9 @@ class AzureManagedRulesDefinition: @define(eq=False, slots=False) class AzureNetworkWebApplicationFirewallPolicy(MicrosoftResource): kind: ClassVar[str] = "azure_network_web_application_firewall_policy" - kind_display: ClassVar[str] = "Azure Network Web Application Firewall Policy" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Web Application Firewall Policy" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2023-05-01", @@ -6222,9 +6222,9 @@ class AzureVirtualNetworkGatewayNatRule(AzureSubResource): @define(eq=False, slots=False) class AzureNetworkVirtualNetworkGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_virtual_network_gateway" - kind_display: ClassVar[str] = "Azure Network Virtual Network Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Network Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} # Collect via AzureResourceGroup mapping: ClassVar[Dict[str, Bender]] = { "active_active": S("properties", "activeActive"), @@ -6298,9 +6298,9 @@ class AzureNetworkVirtualNetworkGateway(MicrosoftResource, BaseGateway): @define(eq=False, slots=False) class AzureNetworkLocalNetworkGateway(MicrosoftResource, BaseGateway): kind: ClassVar[str] = "azure_network_local_network_gateway" - kind_display: ClassVar[str] = "Azure Network Local Network Gateway" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Local Network Gateway" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} # Collect via AzureResourceGroup mapping: ClassVar[Dict[str, Bender]] = { "bgp_settings": S("properties", "bgpSettings") >> Bend(AzureBgpSettings.mapping), @@ -6345,11 +6345,11 @@ class AzureTunnelConnectionHealth: @define(eq=False, slots=False) class AzureNetworkVirtualNetworkGatewayConnection(MicrosoftResource, BaseTunnel): kind: ClassVar[str] = "azure_network_virtual_network_gateway_connection" - kind_display: ClassVar[str] = "Azure Network Virtual Network Gateway Connection" - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network Virtual Network Gateway Connection" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} # Collect via AzureResourceGroup - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_virtual_network_gateway", "azure_network_local_network_gateway"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -6505,10 +6505,10 @@ class AzureCaaRecord: @define(eq=False, slots=False) class AzureNetworkDNSRecordSet(MicrosoftResource, BaseDNSRecordSet): kind: ClassVar[str] = "azure_network_dns_record_set" - kind_display: ClassVar[str] = "Azure Network DNS Record Set" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Azure Network DNS Record Set" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_dns_zone"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -6551,9 +6551,9 @@ class AzureNetworkDNSRecordSet(MicrosoftResource, BaseDNSRecordSet): @define(eq=False, slots=False) class AzureNetworkDNSZone(MicrosoftResource, BaseDNSZone): kind: ClassVar[str] = "azure_network_dns_zone" - kind_display: ClassVar[str] = "Azure Network DNS Zone" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Network DNS Zone" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns_record", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="network", version="2018-05-01", diff --git a/plugins/azure/fix_plugin_azure/resource/postgresql.py b/plugins/azure/fix_plugin_azure/resource/postgresql.py index f74fe36d6f..a4b9ef6bff 100644 --- a/plugins/azure/fix_plugin_azure/resource/postgresql.py +++ b/plugins/azure/fix_plugin_azure/resource/postgresql.py @@ -37,9 +37,9 @@ @define(eq=False, slots=False) class AzurePostgresqlServerADAdministrator(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_postgresql_ad_administrator" - kind_display: ClassVar[str] = "Azure PostgreSQL Ad Administrator" - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} - kind_service: ClassVar[Optional[str]] = service_name + _kind_display: ClassVar[str] = "Azure PostgreSQL Ad Administrator" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} + _kind_service: ClassVar[Optional[str]] = service_name # Collect via AzurePostgresqlServer() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -201,9 +201,9 @@ class AzureFastProvisioningEditionCapability: @define(eq=False, slots=False) class AzurePostgresqlServerType(MicrosoftResource, BaseDatabaseInstanceType): kind: ClassVar[str] = "azure_postgresql_server_type" - kind_display: ClassVar[str] = "Azure PostgreSQL Server Type" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server Type" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "management"} # Collect via AzurePostgresqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -319,9 +319,9 @@ def collect(cls, raw: List[Json], builder: GraphBuilder) -> List[AzurePostgresql @define(eq=False, slots=False) class AzurePostgresqlServerConfiguration(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_postgresql_server_configuration" - kind_display: ClassVar[str] = "Azure PostgreSQL Server Configuration" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server Configuration" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "database"} # Collect via AzurePostgresqlServer() config: Json = field(factory=dict) @@ -356,9 +356,9 @@ def collect_configs( @define(eq=False, slots=False) class AzurePostgresqlServerDatabase(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_postgresql_server_database" - kind_display: ClassVar[str] = "Azure PostgreSQL Server Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzurePostgresqlServer() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -376,9 +376,9 @@ class AzurePostgresqlServerDatabase(MicrosoftResource, AzureProxyResource): @define(eq=False, slots=False) class AzurePostgresqlServerFirewallRule(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_postgresql_server_firewall_rule" - kind_display: ClassVar[str] = "Azure PostgreSQL Server Firewall Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server Firewall Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} # Collect via AzurePostgresqlServer() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), @@ -411,9 +411,9 @@ class AzureAuthConfig: @define(eq=False, slots=False) class AzurePostgresqlServer(MicrosoftResource, AzureTrackedResource, BaseDatabase): kind: ClassVar[str] = "azure_postgresql_server" - kind_display: ClassVar[str] = "Azure PostgreSQL Server" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="postgresql", version="2023-06-01-preview", @@ -423,7 +423,7 @@ class AzurePostgresqlServer(MicrosoftResource, AzureTrackedResource, BaseDatabas access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_postgresql_ad_administrator", @@ -652,9 +652,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzurePostgresqlServerBackup(MicrosoftResource, AzureProxyResource): kind: ClassVar[str] = "azure_postgresql_server_backup" - kind_display: ClassVar[str] = "Azure PostgreSQL Server Backup" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} + _kind_display: ClassVar[str] = "Azure PostgreSQL Server Backup" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} # Collect via AzurePostgresqlServer() mapping: ClassVar[Dict[str, Bender]] = AzureProxyResource.mapping | { "id": S("id"), diff --git a/plugins/azure/fix_plugin_azure/resource/security.py b/plugins/azure/fix_plugin_azure/resource/security.py index b169c36328..5a4e781a23 100644 --- a/plugins/azure/fix_plugin_azure/resource/security.py +++ b/plugins/azure/fix_plugin_azure/resource/security.py @@ -38,9 +38,9 @@ class AzureSecurityExtension: @define(eq=False, slots=False) class AzureSecurityPricing(MicrosoftResource): kind: ClassVar[str] = "azure_security_pricing" - kind_display: ClassVar[str] = "Azure Security Pricing" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Azure Security Pricing" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2023-01-01", @@ -92,10 +92,10 @@ class AzureAssessmentStatus: @define(eq=False, slots=False) class AzureSecurityAssessment(MicrosoftResource): kind: ClassVar[str] = "azure_security_assessment" - kind_display: ClassVar[str] = "Azure Security Assessment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} + _kind_display: ClassVar[str] = "Azure Security Assessment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2021-06-01", @@ -135,9 +135,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSecurityServerVulnerabilityAssessmentsSetting(MicrosoftResource): kind: ClassVar[str] = "azure_security_server_vulnerability_assessments_setting" - kind_display: ClassVar[str] = "Azure Security Server Vulnerability Assessments Setting" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Security Server Vulnerability Assessments Setting" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2023-05-01", @@ -163,9 +163,9 @@ class AzureSecurityServerVulnerabilityAssessmentsSetting(MicrosoftResource): @define(eq=False, slots=False) class AzureSecuritySetting(MicrosoftResource): kind: ClassVar[str] = "azure_security_setting" - kind_display: ClassVar[str] = "Azure Security Setting" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Security Setting" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2022-05-01", @@ -189,9 +189,9 @@ class AzureSecuritySetting(MicrosoftResource): @define(eq=False, slots=False) class AzureSecurityAutoProvisioningSetting(MicrosoftResource): kind: ClassVar[str] = "azure_security_auto_provisioning_setting" - kind_display: ClassVar[str] = "Azure Security Auto Provisioning Setting" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} + _kind_display: ClassVar[str] = "Azure Security Auto Provisioning Setting" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service=service_name, version="2017-08-01-preview", diff --git a/plugins/azure/fix_plugin_azure/resource/sql_server.py b/plugins/azure/fix_plugin_azure/resource/sql_server.py index c7e87ef7b5..d3328d4136 100644 --- a/plugins/azure/fix_plugin_azure/resource/sql_server.py +++ b/plugins/azure/fix_plugin_azure/resource/sql_server.py @@ -28,10 +28,10 @@ @define(eq=False, slots=False) class AzureSqlServerADAdministrator(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_ad_administrator" - kind_display: ClassVar[str] = "Azure SQL Server Ad Administrator" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} + _kind_display: ClassVar[str] = "Azure SQL Server Ad Administrator" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} # Collect via AzureSqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -84,11 +84,11 @@ class AzureDatabaseIdentity: @define(eq=False, slots=False) class AzureSqlServerDatabase(MicrosoftResource, BaseDatabase): kind: ClassVar[str] = "azure_sql_server_database" - kind_display: ClassVar[str] = "Azure SQL Server Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureSqlServer() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_sql_server_database_workload_group", @@ -322,9 +322,9 @@ class AzureElasticPoolPerDatabaseSettings: @define(eq=False, slots=False) class AzureSqlServerElasticPool(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_elastic_pool" - kind_display: ClassVar[str] = "Azure SQL Server Elastic Pool" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "compute"} + _kind_display: ClassVar[str] = "Azure SQL Server Elastic Pool" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "compute"} # Collect via AzureSqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -388,11 +388,11 @@ class AzurePartnerInfo: @define(eq=False, slots=False) class AzureSqlServerFailoverGroup(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_failover_group" - kind_display: ClassVar[str] = "Azure SQL Server Failover Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure SQL Server Failover Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} # Collect via AzureSqlServer() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_sql_server_database"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -427,9 +427,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerFirewallRule(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_firewall_rule" - kind_display: ClassVar[str] = "Azure SQL Server Firewall Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} + _kind_display: ClassVar[str] = "Azure SQL Server Firewall Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "firewall", "group": "networking"} # Collect via AzureSqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -447,9 +447,9 @@ class AzureSqlServerFirewallRule(MicrosoftResource): @define(eq=False, slots=False) class AzureSqlServerDatabaseGeoBackupPolicy(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_database_geo_backup_policy" - kind_display: ClassVar[str] = "Azure SQL Server Database Geo Backup Policy" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Database Geo Backup Policy" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "database"} # Collect via AzureSqlServerDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -499,11 +499,11 @@ class AzureManagedInstancePairInfo: @define(eq=False, slots=False) class AzureSqlServerManagedInstanceFailoverGroup(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_managed_instance_failover_group" - kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Failover Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Failover Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureSqlServerManagedInstance() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_sql_server_managed_instance"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -553,9 +553,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerManagedInstancePool(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_managed_instance_pool" - kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Pool" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Pool" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="sql", version="2021-11-01", @@ -565,7 +565,7 @@ class AzureSqlServerManagedInstancePool(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_network_subnet"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -594,11 +594,11 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerJobAgent(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_job_agent" - kind_display: ClassVar[str] = "Azure SQL Server Job Agent" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Job Agent" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "database"} # Collect via AzureSqlServer() - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["azure_sql_server_database"]}, } mapping: ClassVar[Dict[str, Bender]] = { @@ -627,10 +627,10 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerManagedInstanceADAdministrator(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_managed_instance_ad_administrator" - kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Ad Administrator" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} + _kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Ad Administrator" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "access_control"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": [MicrosoftResource.kind]}} # Collect via AzureSqlManagedInstance() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -660,9 +660,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerManagedInstanceDatabase(MicrosoftResource, BaseDatabase): kind: ClassVar[str] = "azure_sql_server_managed_instance_database" - kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Database" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Managed Instance Database" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} # Collect via AzureSqlServerManagedInstance() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -817,9 +817,9 @@ class AzureServicePrincipal: @define(eq=False, slots=False) class AzureSqlServerManagedInstance(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_managed_instance" - kind_display: ClassVar[str] = "Azure SQL Server Managed Instance" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Managed Instance" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="sql", version="2021-11-01", @@ -829,7 +829,7 @@ class AzureSqlServerManagedInstance(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_sql_server_managed_instance_database", @@ -1030,9 +1030,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerVirtualCluster(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_virtual_cluster" - kind_display: ClassVar[str] = "Azure SQL Server Virtual Cluster" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Virtual Cluster" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="sql", version="2022-05-01-preview", @@ -1042,7 +1042,7 @@ class AzureSqlServerVirtualCluster(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["azure_sql_server_managed_instance"]}, "predecessors": {"default": ["azure_network_subnet"]}, } @@ -1077,9 +1077,9 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class AzureSqlServerTrustGroup(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_trust_group" - kind_display: ClassVar[str] = "Azure SQL Server Trust Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} + _kind_display: ClassVar[str] = "Azure SQL Server Trust Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "access_control"} # Collect via AzureSqlServerManagedInstance() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1097,9 +1097,9 @@ class AzureSqlServerTrustGroup(MicrosoftResource): @define(eq=False, slots=False) class AzureSqlServerVirtualNetworkRule(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_virtual_network_rule" - kind_display: ClassVar[str] = "Azure SQL Server Virtual Network Rule" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _kind_display: ClassVar[str] = "Azure SQL Server Virtual Network Rule" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} # Collect via AzureSqlServer() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1119,9 +1119,9 @@ class AzureSqlServerVirtualNetworkRule(MicrosoftResource): @define(eq=False, slots=False) class AzureSqlServerDatabaseWorkloadGroup(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_database_workload_group" - kind_display: ClassVar[str] = "Azure SQL Server Database Workload Group" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _kind_display: ClassVar[str] = "Azure SQL Server Database Workload Group" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} # Collect via AzureSqlServerDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1273,9 +1273,9 @@ class AzureRecommendedAction: @define(eq=False, slots=False) class AzureSqlServerAdvisor(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server_advisor" - kind_display: ClassVar[str] = "Azure SQL Server Advisor" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server Advisor" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "profile", "group": "database"} # Collect via AzureSqlServer() and AzureSqlServerDatabase() mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), @@ -1374,9 +1374,9 @@ class AzureSqlEncryptionProtector: @define(eq=False, slots=False) class AzureSqlServer(MicrosoftResource): kind: ClassVar[str] = "azure_sql_server" - kind_display: ClassVar[str] = "Azure SQL Server" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_display: ClassVar[str] = "Azure SQL Server" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="sql", version="2021-11-01", @@ -1386,7 +1386,7 @@ class AzureSqlServer(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_sql_server_database", diff --git a/plugins/azure/fix_plugin_azure/resource/storage.py b/plugins/azure/fix_plugin_azure/resource/storage.py index 76420b7331..1526b43870 100644 --- a/plugins/azure/fix_plugin_azure/resource/storage.py +++ b/plugins/azure/fix_plugin_azure/resource/storage.py @@ -133,9 +133,9 @@ class AzureImmutableStorageWithVersioning: @define(eq=False, slots=False) class AzureStorageBlobContainer(MicrosoftResource, BaseBucket): kind: ClassVar[str] = "azure_storage_blob_container" - kind_display: ClassVar[str] = "Azure Storage Blob Container" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage Blob Container" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "storage"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "tags": S("tags", default={}), @@ -188,9 +188,9 @@ class AzureStorageBlobContainer(MicrosoftResource, BaseBucket): @define(eq=False, slots=False) class AzureStorageAccountDeleted(MicrosoftResource): kind: ClassVar[str] = "azure_storage_account_deleted" - kind_display: ClassVar[str] = "Azure Storage Account Deleted" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage Account Deleted" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="storage", version="2023-01-01", @@ -246,9 +246,9 @@ class AzureSignedIdentifier: @define(eq=False, slots=False) class AzureStorageFileShare(MicrosoftResource, BaseNetworkShare): kind: ClassVar[str] = "azure_storage_file_share" - kind_display: ClassVar[str] = "Azure Storage File Share" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network_share", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage File Share" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network_share", "group": "storage"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "tags": S("tags", default={}), @@ -300,9 +300,9 @@ class AzureStorageFileShare(MicrosoftResource, BaseNetworkShare): @define(eq=False, slots=False) class AzureStorageQueue(MicrosoftResource, BaseQueue): kind: ClassVar[str] = "azure_storage_queue" - kind_display: ClassVar[str] = "Azure Storage Queue" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage Queue" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "queue", "group": "storage"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "tags": S("tags", default={}), @@ -334,9 +334,9 @@ class AzureRestriction: @define(eq=False, slots=False) class AzureStorageSku(MicrosoftResource): kind: ClassVar[str] = "azure_storage_sku" - kind_display: ClassVar[str] = "Azure Storage SKU" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} + _kind_display: ClassVar[str] = "Azure Storage SKU" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "misc"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="storage", version="2023-01-01", @@ -708,9 +708,9 @@ class AzureStorageAccountSkuConversionStatus: @define(eq=False, slots=False) class AzureStorageAccount(MicrosoftResource): kind: ClassVar[str] = "azure_storage_account" - kind_display: ClassVar[str] = "Azure Storage Account" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage Account" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "storage"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="storage", version="2023-01-01", @@ -720,7 +720,7 @@ class AzureStorageAccount(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_storage_sku", @@ -1054,9 +1054,9 @@ def collect_usage_metrics( @define(eq=False, slots=False) class AzureStorageAccountUsage(MicrosoftResource, AzureBaseUsage): kind: ClassVar[str] = "azure_storage_account_usage" - kind_display: ClassVar[str] = "Azure Storage Account Usage" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _kind_display: ClassVar[str] = "Azure Storage Account Usage" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="storage", version="2023-01-01", @@ -1100,9 +1100,9 @@ class AzureTableSignedIdentifier: @define(eq=False, slots=False) class AzureStorageTable(MicrosoftResource): kind: ClassVar[str] = "azure_storage_table" - kind_display: ClassVar[str] = "Azure Storage Table" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "storage"} + _kind_display: ClassVar[str] = "Azure Storage Table" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "storage"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("id"), "tags": S("tags", default={}), diff --git a/plugins/azure/fix_plugin_azure/resource/web.py b/plugins/azure/fix_plugin_azure/resource/web.py index 6ccffd3450..f706d23316 100644 --- a/plugins/azure/fix_plugin_azure/resource/web.py +++ b/plugins/azure/fix_plugin_azure/resource/web.py @@ -70,9 +70,9 @@ class AzureKubeEnvironmentProfile: @define(eq=False, slots=False) class AzureWebAppServicePlan(MicrosoftResource): kind: ClassVar[str] = "azure_web_app_service_plan" - kind_display: ClassVar[str] = "Azure Web App Service Plan" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "misc"} + _kind_display: ClassVar[str] = "Azure Web App Service Plan" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "misc"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", @@ -145,9 +145,9 @@ class AzureWebAppServicePlan(MicrosoftResource): @define(eq=False, slots=False) class AzureWebCertificate(MicrosoftResource): kind: ClassVar[str] = "azure_web_certificate" - kind_display: ClassVar[str] = "Azure Web Certificate" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Web Certificate" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", @@ -157,7 +157,7 @@ class AzureWebCertificate(MicrosoftResource): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": [ "azure_web_app_service_plan", @@ -390,9 +390,9 @@ class AzureTemplate: @define(eq=False, slots=False) class AzureWebContainerApp(MicrosoftResource): kind: ClassVar[str] = "azure_web_container_app" - kind_display: ClassVar[str] = "Azure Web Container App" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Web Container App" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "application", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2021-03-01", @@ -501,9 +501,9 @@ class AzureDomainPurchaseConsent: @define(eq=False, slots=False) class AzureWebDomain(MicrosoftResource): kind: ClassVar[str] = "azure_web_domain" - kind_display: ClassVar[str] = "Azure Web Domain" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _kind_display: ClassVar[str] = "Azure Web Domain" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", @@ -644,9 +644,9 @@ class AzureNetworkAccessControlEntry: @define(eq=False, slots=False) class AzureWebHostingEnvironment(MicrosoftResource): kind: ClassVar[str] = "azure_web_hosting_environment" - kind_display: ClassVar[str] = "Azure Web Hosting Environment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Web Hosting Environment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2015-08-01", @@ -788,9 +788,9 @@ class AzureContainerAppsConfiguration: @define(eq=False, slots=False) class AzureWebKubeEnvironment(MicrosoftResource): kind: ClassVar[str] = "azure_web_kube_environment" - kind_display: ClassVar[str] = "Azure Web Kube Environment" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "managed_kubernetes"} + _kind_display: ClassVar[str] = "Azure Web Kube Environment" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "environment", "group": "managed_kubernetes"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", @@ -1388,9 +1388,9 @@ class AzureWebAppAuthSettings: @define(eq=False, slots=False) class AzureWebApp(MicrosoftResource, BaseServerlessFunction): kind: ClassVar[str] = "azure_web_app" - kind_display: ClassVar[str] = "Azure Web App" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Web App" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "function", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", @@ -1400,7 +1400,7 @@ class AzureWebApp(MicrosoftResource, BaseServerlessFunction): access_path="value", expect_array=True, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "azure_web_app_service_plan", @@ -1647,9 +1647,9 @@ class AzureDatabaseConnectionOverview: @define(eq=False, slots=False) class AzureWebAppStaticSite(MicrosoftResource): kind: ClassVar[str] = "azure_web_app_static_site" - kind_display: ClassVar[str] = "Azure Web App Static Site" - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} + _kind_display: ClassVar[str] = "Azure Web App Static Site" + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "compute"} api_spec: ClassVar[AzureResourceSpec] = AzureResourceSpec( service="web", version="2023-12-01", diff --git a/plugins/azure/test/collector_test.py b/plugins/azure/test/collector_test.py index 1ac729146b..546b491945 100644 --- a/plugins/azure/test/collector_test.py +++ b/plugins/azure/test/collector_test.py @@ -119,8 +119,8 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: bases.update(all_base_classes(base)) return bases - expected_declared_properties = ["kind", "kind_display"] - expected_props_in_hierarchy = ["kind_service", "metadata"] + expected_declared_properties = ["kind", "_kind_display"] + expected_props_in_hierarchy = ["_kind_service", "_metadata"] for rc in all_resources: for prop in expected_declared_properties: assert prop in rc.__dict__, f"{rc.__name__} missing {prop}" @@ -130,5 +130,5 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: for base in with_bases: if "connect_in_graph" in base.__dict__: assert ( - "reference_kinds" in base.__dict__ - ), f"{rc.__name__} should define reference_kinds property, since it defines connect_in_graph" + "_reference_kinds" in base.__dict__ + ), f"{rc.__name__} should define _reference_kinds property, since it defines connect_in_graph" diff --git a/plugins/digitalocean/fix_plugin_digitalocean/resources.py b/plugins/digitalocean/fix_plugin_digitalocean/resources.py index 94dc2bd736..4b62a6b39e 100644 --- a/plugins/digitalocean/fix_plugin_digitalocean/resources.py +++ b/plugins/digitalocean/fix_plugin_digitalocean/resources.py @@ -47,8 +47,8 @@ class DigitalOceanResource(BaseResource): """ kind: ClassVar[str] = "digitalocean_resource" - kind_display: ClassVar[str] = "DigitalOcean Resource" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Resource" + _kind_description: ClassVar[str] = ( "DigitalOcean Resources are virtual servers provided by DigitalOcean," " allowing users to deploy and manage scalable cloud infrastructure on their" " platform." @@ -97,11 +97,11 @@ class DigitalOceanTeam(DigitalOceanResource, BaseAccount): """DigitalOcean Team""" kind: ClassVar[str] = "digitalocean_team" - kind_display: ClassVar[str] = "DigitalOcean Team" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Team" + _kind_description: ClassVar[str] = ( "A team is a group of users within DigitalOcean that can collaborate on projects and share resources." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_alert_policy", @@ -139,12 +139,12 @@ class DigitalOceanRegion(DigitalOceanResource, BaseRegion): """DigitalOcean region""" kind: ClassVar[str] = "digitalocean_region" - kind_display: ClassVar[str] = "DigitalOcean Region" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Region" + _kind_description: ClassVar[str] = ( "A region in DigitalOcean's cloud infrastructure where resources such as" " droplets, volumes, and networks can be deployed." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_app", @@ -174,12 +174,12 @@ class DigitalOceanProject(DigitalOceanResource, BaseResource): """DigitalOcean project""" kind: ClassVar[str] = "digitalocean_project" - kind_display: ClassVar[str] = "DigitalOcean Project" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Project" + _kind_description: ClassVar[str] = ( "A DigitalOcean Project is a flexible way to organize and manage resources in" " the DigitalOcean cloud platform." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_database", @@ -218,13 +218,13 @@ def delete_uri_path(self) -> Optional[str]: @define(eq=False, slots=False) class DigitalOceanDropletSize(DigitalOceanResource, BaseInstanceType): kind: ClassVar[str] = "digitalocean_droplet_size" - kind_display: ClassVar[str] = "DigitalOcean Droplet Size" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Droplet Size" + _kind_description: ClassVar[str] = ( "Droplet Sizes are different configurations of virtual private servers" " (Droplets) provided by DigitalOcean with varying amounts of CPU, memory, and" " storage." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_droplet", @@ -243,12 +243,12 @@ class DigitalOceanDroplet(DigitalOceanResource, BaseInstance): """ kind: ClassVar[str] = "digitalocean_droplet" - kind_display: ClassVar[str] = "DigitalOcean Droplet" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Droplet" + _kind_description: ClassVar[str] = ( "A DigitalOcean Droplet is a virtual machine instance that can be provisioned" " and managed on the DigitalOcean cloud platform." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_floating_ip", @@ -279,8 +279,8 @@ class DigitalOceanDropletNeighborhood(DigitalOceanResource, PhantomBaseResource) """ kind: ClassVar[str] = "digitalocean_droplet_neighborhood" - kind_display: ClassVar[str] = "DigitalOcean Droplet Neighborhood" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Droplet Neighborhood" + _kind_description: ClassVar[str] = ( "A Droplet Neighborhood refers to a group of Droplets that are running on the" " same physical hardware or in close proximity within a data center." ) @@ -292,12 +292,12 @@ class DigitalOceanKubernetesCluster(DigitalOceanResource, BaseManagedKubernetesC """DigitalOcean Kubernetes Cluster""" kind: ClassVar[str] = "digitalocean_kubernetes_cluster" - kind_display: ClassVar[str] = "DigitalOcean Kubernetes Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Kubernetes Cluster" + _kind_description: ClassVar[str] = ( "A Kubernetes cluster hosted on the DigitalOcean cloud platform, providing" " managed container orchestration and scalability." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_droplet"], "delete": [], @@ -320,12 +320,12 @@ def delete_uri_path(self) -> Optional[str]: @define(eq=False, slots=False) class DigitalOceanVolume(DigitalOceanResource, BaseVolume): kind: ClassVar[str] = "digitalocean_volume" - kind_display: ClassVar[str] = "DigitalOcean Volume" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Volume" + _kind_description: ClassVar[str] = ( "DigitalOcean Volume is a block storage service provided by DigitalOcean that" " allows users to attach additional storage to their Droplets." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_snapshot"], "delete": ["digitalocean_droplet"], @@ -357,11 +357,11 @@ def tag_resource_name(self) -> Optional[str]: @define(eq=False, slots=False) class DigitalOceanDatabase(DigitalOceanResource, BaseDatabase): kind: ClassVar[str] = "digitalocean_database" - kind_display: ClassVar[str] = "DigitalOcean Database" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Database" + _kind_description: ClassVar[str] = ( "A database service provided by DigitalOcean that allows users to store and manage their data." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_app"], "delete": [], @@ -383,13 +383,13 @@ class DigitalOceanVPC(DigitalOceanResource, BaseNetwork): """ kind: ClassVar[str] = "digitalocean_vpc" - kind_display: ClassVar[str] = "DigitalOcean VPC" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean VPC" + _kind_description: ClassVar[str] = ( "A Virtual Private Cloud (VPC) is a virtual network dedicated to your" " DigitalOcean account. It allows you to isolate your resources and securely" " connect them to other resources within your account." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "digitalocean_load_balancer", @@ -418,8 +418,8 @@ class DigitalOceanSnapshot(DigitalOceanResource, BaseSnapshot): """DigitalOcean snapshot""" kind: ClassVar[str] = "digitalocean_snapshot" - kind_display: ClassVar[str] = "DigitalOcean Snapshot" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Snapshot" + _kind_description: ClassVar[str] = ( "DigitalOcean Snapshots are point-in-time copies of your Droplets (virtual" " machines) that can be used for creating new Droplets or restoring existing" " ones." @@ -440,13 +440,13 @@ class DigitalOceanLoadBalancer(DigitalOceanResource, BaseLoadBalancer): """DigitalOcean load balancer""" kind: ClassVar[str] = "digitalocean_load_balancer" - kind_display: ClassVar[str] = "DigitalOcean Load Balancer" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Load Balancer" + _kind_description: ClassVar[str] = ( "A load balancer service provided by DigitalOcean that distributes incoming" " network traffic across multiple servers to ensure high availability and" " reliability." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_droplet"], "delete": [], @@ -469,8 +469,8 @@ class DigitalOceanFloatingIP(DigitalOceanResource, BaseIPAddress): """DigitalOcean floating IP""" kind: ClassVar[str] = "digitalocean_floating_ip" - kind_display: ClassVar[str] = "DigitalOcean Floating IP" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Floating IP" + _kind_description: ClassVar[str] = ( "A DigitalOcean Floating IP is a static IP address that can be easily" " reassigned between DigitalOcean Droplets, providing flexibility and high" " availability for your applications." @@ -500,12 +500,12 @@ class DigitalOceanImage(DigitalOceanResource, BaseResource): """DigitalOcean image""" kind: ClassVar[str] = "digitalocean_image" - kind_display: ClassVar[str] = "DigitalOcean Image" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Image" + _kind_description: ClassVar[str] = ( "A DigitalOcean Image is a template for creating virtual machines (known as" " Droplets) on the DigitalOcean cloud platform." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_droplet"], "delete": [], @@ -533,8 +533,8 @@ class DigitalOceanSpace(DigitalOceanResource, BaseBucket): """DigitalOcean space""" kind: ClassVar[str] = "digitalocean_space" - kind_display: ClassVar[str] = "DigitalOcean Space" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean Space" + _kind_description: ClassVar[str] = ( "DigitalOcean Spaces is an object storage service that allows you to store" " and serve large amounts of unstructured data." ) @@ -559,8 +559,8 @@ class DigitalOceanApp(DigitalOceanResource, BaseResource): """DigitalOcean app""" kind: ClassVar[str] = "digitalocean_app" - kind_display: ClassVar[str] = "DigitalOcean App" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "DigitalOcean App" + _kind_description: ClassVar[str] = ( "DigitalOcean App is a platform that allows users to deploy and manage" " applications on DigitalOcean's cloud infrastructure." ) @@ -580,8 +580,8 @@ class DigitalOceanCdnEndpoint(DigitalOceanResource, BaseEndpoint): """DigitalOcean CDN endpoint""" kind = "digitalocean_cdn_endpoint" - kind_display: ClassVar[str] = "DigitalOcean CDN Endpoint" - kind_description: ClassVar[str] = "A DigitalOcean CDN Endpoint." + _kind_display: ClassVar[str] = "DigitalOcean CDN Endpoint" + _kind_description: ClassVar[str] = "A DigitalOcean CDN Endpoint." origin: Optional[str] = None endpoint: Optional[str] = None @@ -598,8 +598,8 @@ class DigitalOceanCertificate(DigitalOceanResource, BaseCertificate): """DigitalOcean certificate""" kind = "digitalocean_certificate" - kind_display: ClassVar[str] = "DigitalOcean Certificate" - kind_description: ClassVar[str] = "A DigitalOcean Certificate." + _kind_display: ClassVar[str] = "DigitalOcean Certificate" + _kind_description: ClassVar[str] = "A DigitalOcean Certificate." certificate_state: Optional[str] = None certificate_type: Optional[str] = None @@ -613,9 +613,9 @@ class DigitalOceanContainerRegistry(DigitalOceanResource, BaseResource): """DigitalOcean container registry""" kind = "digitalocean_container_registry" - kind_display: ClassVar[str] = "DigitalOcean Container Registry" - kind_description: ClassVar[str] = "A DigitalOcean Container Registry." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "DigitalOcean Container Registry" + _kind_description: ClassVar[str] = "A DigitalOcean Container Registry." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_container_registry_repository"], "delete": [], @@ -647,9 +647,9 @@ class DigitalOceanContainerRegistryRepository(DigitalOceanResource, BaseResource """DigitalOcean container registry repository""" kind = "digitalocean_container_registry_repository" - kind_display: ClassVar[str] = "DigitalOcean Container Registry Repository" - kind_description: ClassVar[str] = "A DigitalOcean Container Registry Repository." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "DigitalOcean Container Registry Repository" + _kind_description: ClassVar[str] = "A DigitalOcean Container Registry Repository." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_container_registry_repository_tag"], "delete": [], @@ -665,8 +665,8 @@ class DigitalOceanContainerRegistryRepositoryTag(DigitalOceanResource, BaseResou """DigitalOcean container registry repository tag""" kind = "digitalocean_container_registry_repository_tag" - kind_display: ClassVar[str] = "DigitalOcean Container Registry Repository Tag" - kind_description: ClassVar[str] = "A DigitalOcean Container Registry Repository Tag." + _kind_display: ClassVar[str] = "DigitalOcean Container Registry Repository Tag" + _kind_description: ClassVar[str] = "A DigitalOcean Container Registry Repository Tag." registry_name: Optional[str] = None repository_name: Optional[str] = None manifest_digest: Optional[str] = None @@ -682,8 +682,8 @@ class DigitalOceanSSHKey(DigitalOceanResource, BaseKeyPair): """DigitalOcean ssh key""" kind = "digitalocean_ssh_key" - kind_display: ClassVar[str] = "DigitalOcean SSH Key" - kind_description: ClassVar[str] = "A DigitalOcean SSH Key." + _kind_display: ClassVar[str] = "DigitalOcean SSH Key" + _kind_description: ClassVar[str] = "A DigitalOcean SSH Key." public_key: Optional[str] = None @@ -696,9 +696,9 @@ class DigitalOceanDomain(DigitalOceanResource, BaseDNSZone): """DigitalOcean domain""" kind = "digitalocean_domain" - kind_display: ClassVar[str] = "DigitalOcean Domain" - kind_description: ClassVar[str] = "A DigitalOcean Domain." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "DigitalOcean Domain" + _kind_description: ClassVar[str] = "A DigitalOcean Domain." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_domain_record"], "delete": [], @@ -716,8 +716,8 @@ class DigitalOceanDomainRecord(DigitalOceanResource, BaseDNSRecord): """DigitalOcean domain record""" kind = "digitalocean_domain_record" - kind_display: ClassVar[str] = "DigitalOcean Domain Record" - kind_description: ClassVar[str] = "A DigitalOcean Domain Record." + _kind_display: ClassVar[str] = "DigitalOcean Domain Record" + _kind_description: ClassVar[str] = "A DigitalOcean Domain Record." domain_name: Optional[str] = None def delete_uri_path(self) -> Optional[str]: @@ -729,9 +729,9 @@ class DigitalOceanFirewall(DigitalOceanResource, BaseResource): """DigitalOcean firewall""" kind = "digitalocean_firewall" - kind_display: ClassVar[str] = "DigitalOcean Firewall" - kind_description: ClassVar[str] = "A DigitalOcean Firewall." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "DigitalOcean Firewall" + _kind_description: ClassVar[str] = "A DigitalOcean Firewall." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["digitalocean_droplet"], "delete": [], @@ -749,8 +749,8 @@ class DigitalOceanAlertPolicy(DigitalOceanResource, BaseResource): """DigitalOcean alert policy""" kind = "digitalocean_alert_policy" - kind_display: ClassVar[str] = "DigitalOcean Alert Policy" - kind_description: ClassVar[str] = "A DigitalOcean Alert Policy." + _kind_display: ClassVar[str] = "DigitalOcean Alert Policy" + _kind_description: ClassVar[str] = "A DigitalOcean Alert Policy." policy_type: Optional[str] = None description: Optional[str] = None diff --git a/plugins/dockerhub/fix_plugin_dockerhub/resources.py b/plugins/dockerhub/fix_plugin_dockerhub/resources.py index edca856575..cd5c4bfeb4 100644 --- a/plugins/dockerhub/fix_plugin_dockerhub/resources.py +++ b/plugins/dockerhub/fix_plugin_dockerhub/resources.py @@ -29,8 +29,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class DockerHubNamespace(DockerHubResource, BaseAccount): kind: ClassVar[str] = "dockerhub_namespace" - kind_display: ClassVar[str] = "DockerHub Namespace" - kind_description: ClassVar[str] = "A DockerHub Namespace." + _kind_display: ClassVar[str] = "DockerHub Namespace" + _kind_description: ClassVar[str] = "A DockerHub Namespace." count: Optional[int] = None @@ -38,8 +38,8 @@ class DockerHubNamespace(DockerHubResource, BaseAccount): @define(eq=False, slots=False) class DockerHubRepository(DockerHubResource, BaseResource): kind: ClassVar[str] = "dockerhub_repository" - kind_display: ClassVar[str] = "DockerHub Repository" - kind_description: ClassVar[str] = "A DockerHub Repository." + _kind_display: ClassVar[str] = "DockerHub Repository" + _kind_description: ClassVar[str] = "A DockerHub Repository." repository_type: Optional[str] = None is_private: Optional[bool] = None diff --git a/plugins/gcp/fix_plugin_gcp/resources/base.py b/plugins/gcp/fix_plugin_gcp/resources/base.py index 936140de14..9e002c23be 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/base.py +++ b/plugins/gcp/fix_plugin_gcp/resources/base.py @@ -282,8 +282,8 @@ def for_region(self, region: GcpRegion) -> GraphBuilder: @define(eq=False, slots=False) class GcpResource(BaseResource): kind: ClassVar[str] = "gcp_resource" - kind_display: ClassVar[str] = "GCP Resource" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Resource" + _kind_description: ClassVar[str] = ( "GCP Resource refers to any resource or service available on the Google Cloud" " Platform, such as virtual machines, databases, storage buckets, and" " networking components." @@ -447,9 +447,9 @@ def called_mutator_apis(cls) -> List[GcpApiSpec]: @define(eq=False, slots=False) class GcpProject(GcpResource, BaseAccount): kind: ClassVar[str] = "gcp_project" - kind_display: ClassVar[str] = "GCP Project" - metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Project" + _metadata: ClassVar[Dict[str, Any]] = {"icon": "access_control", "group": "networking"} + _kind_description: ClassVar[str] = ( "A GCP Project is a container for resources in the Google Cloud Platform," " allowing users to organize and manage their cloud resources." ) @@ -501,13 +501,13 @@ class GcpLimit: @define(eq=False, slots=False) class GcpRegionQuota(GcpResource): kind: ClassVar[str] = "gcp_region_quota" - kind_display: ClassVar[str] = "GCP Region Quota" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Region Quota" + _kind_description: ClassVar[str] = ( "Region Quota in GCP refers to the maximum limits of resources that can be" " provisioned in a specific region, such as compute instances, storage, or" " networking resources." ) - metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "misc"} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "quota", "group": "misc"} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name").or_else(S("id")).or_else(S("selfLink")), "name": S("name"), @@ -523,8 +523,8 @@ class GcpRegionQuota(GcpResource): @define(eq=False, slots=False) class GcpRegion(GcpResource, BaseRegion): kind: ClassVar[str] = "gcp_region" - kind_display: ClassVar[str] = "GCP Region" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Region" + _kind_description: ClassVar[str] = ( "A GCP Region is a specific geographical location where Google Cloud Platform" " resources are deployed and run." ) @@ -549,7 +549,7 @@ class GcpRegion(GcpResource, BaseRegion): "region_deprecated": S("deprecated", default={}) >> Bend(GcpDeprecationStatus.mapping), "region_supports_pzs": S("supportsPzs"), } - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_zone"]}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_zone"]}} description: Optional[str] = field(default=None) status: Optional[str] = field(default=None) region_deprecated: Optional[GcpDeprecationStatus] = field(default=None) @@ -579,8 +579,8 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpZone(GcpResource, BaseZone): kind: ClassVar[str] = "gcp_zone" - kind_display: ClassVar[str] = "GCP Zone" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Zone" + _kind_description: ClassVar[str] = ( "A GCP Zone is a specific geographic location where Google Cloud Platform" " resources can be deployed. Zones are isolated from each other within a" " region, providing fault tolerance and high availability for applications and" diff --git a/plugins/gcp/fix_plugin_gcp/resources/billing.py b/plugins/gcp/fix_plugin_gcp/resources/billing.py index 86d06b0ff2..525153f2fc 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/billing.py +++ b/plugins/gcp/fix_plugin_gcp/resources/billing.py @@ -19,14 +19,14 @@ @define(eq=False, slots=False) class GcpBillingAccount(GcpResource): kind: ClassVar[str] = "gcp_billing_account" - kind_display: ClassVar[str] = "GCP Billing Account" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Billing Account" + _kind_description: ClassVar[str] = ( "GCP Billing Account is a financial account used to manage the payment and" " billing information for Google Cloud Platform services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "account", "group": "management"} + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["gcp_project_billing_info"]}, } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -71,13 +71,13 @@ def called_collect_apis(cls) -> List[GcpApiSpec]: @define(eq=False, slots=False) class GcpProjectBillingInfo(GcpResource): kind: ClassVar[str] = "gcp_project_billing_info" - kind_display: ClassVar[str] = "GCP Project Billing Info" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Project Billing Info" + _kind_description: ClassVar[str] = ( "GCP Project Billing Info provides information and management capabilities" " for the billing aspects of a Google Cloud Platform project." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "management"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -113,15 +113,15 @@ class GcpProjectBillingInfo(GcpResource): @define(eq=False, slots=False) class GcpService(GcpResource): kind: ClassVar[str] = "gcp_service" - kind_display: ClassVar[str] = "GCP Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Service" + _kind_description: ClassVar[str] = ( "GCP Service refers to any of the various services and products offered by" " Google Cloud Platform, which provide scalable cloud computing solutions for" " businesses and developers." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "management"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "management"} + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["gcp_sku"]}, } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -317,12 +317,12 @@ class GcpPricingInfo: @define(eq=False, slots=False) class GcpSku(GcpResource): kind: ClassVar[str] = "gcp_sku" - kind_display: ClassVar[str] = "GCP SKU" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SKU" + _kind_description: ClassVar[str] = ( "GCP SKU represents a Stock Keeping Unit in Google Cloud Platform, providing" " unique identifiers for different resources and services." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", diff --git a/plugins/gcp/fix_plugin_gcp/resources/compute.py b/plugins/gcp/fix_plugin_gcp/resources/compute.py index 9c5d00207d..6969c185bc 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/compute.py +++ b/plugins/gcp/fix_plugin_gcp/resources/compute.py @@ -49,14 +49,14 @@ def health_check_types() -> Tuple[Type[GcpResource], ...]: @define(eq=False, slots=False) class GcpAcceleratorType(GcpResource): kind: ClassVar[str] = "gcp_accelerator_type" - kind_display: ClassVar[str] = "GCP Accelerator Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Accelerator Type" + _kind_description: ClassVar[str] = ( "GCP Accelerator Types are specialized hardware accelerators offered by" " Google Cloud Platform (GCP) that are designed to enhance the performance of" " certain workloads, such as machine learning models or graphics processing." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -95,15 +95,15 @@ def get_ip_address_type(ip_address: str) -> str: @define(eq=False, slots=False) class GcpAddress(GcpResource, BaseIPAddress): kind: ClassVar[str] = "gcp_address" - kind_display: ClassVar[str] = "GCP Address" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Address" + _kind_description: ClassVar[str] = ( "GCP Address is a resource in Google Cloud Platform that provides a static IP" " address for virtual machine instances or other resources within the Google" " Cloud network." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_subnetwork"]}, "successors": { "delete": ["gcp_subnetwork"], @@ -328,14 +328,14 @@ class GcpAutoscalerStatusDetails: @define(eq=False, slots=False) class GcpAutoscaler(GcpResource, BaseAutoScalingGroup): kind: ClassVar[str] = "gcp_autoscaler" - kind_display: ClassVar[str] = "GCP Autoscaler" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Autoscaler" + _kind_description: ClassVar[str] = ( "GCP Autoscaler is a feature in Google Cloud Platform that automatically" " adjusts the number of instances in a managed instance group based on the" " workload, helping to maintain cost efficiency and performance." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["gcp_instance_group_manager"], "delete": ["gcp_instance_group_manager"], @@ -459,12 +459,12 @@ class GcpBackendBucketCdnPolicy: @define(eq=False, slots=False) class GcpBackendBucket(GcpResource, BaseBucket): kind: ClassVar[str] = "gcp_backend_bucket" - kind_display: ClassVar[str] = "GCP Backend Bucket" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Backend Bucket" + _kind_description: ClassVar[str] = ( "A GCP Backend Bucket is a storage bucket used to distribute static content" " for a load balanced website or application running on Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -852,15 +852,15 @@ class GcpSecuritySettings: @define(eq=False, slots=False) class GcpBackendService(GcpResource): kind: ClassVar[str] = "gcp_backend_service" - kind_display: ClassVar[str] = "GCP Backend Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Backend Service" + _kind_description: ClassVar[str] = ( "GCP Backend Service is a managed load balancing service provided by Google" " Cloud Platform that allows you to distribute traffic across multiple" " backends and regions in a flexible and scalable manner." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "load_balancer", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["gcp_network"], "delete": [ @@ -983,13 +983,13 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpDiskType(GcpResource, BaseVolumeType): kind: ClassVar[str] = "gcp_disk_type" - kind_display: ClassVar[str] = "GCP Disk Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Disk Type" + _kind_description: ClassVar[str] = ( "GCP Disk Types are storage options provided by Google Cloud Platform, which" " define the performance characteristics and pricing of persistent disks." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "storage"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1001,7 +1001,7 @@ class GcpDiskType(GcpResource, BaseVolumeType): response_regional_sub_path="diskTypes", mutate_iam_permissions=[], # can not be mutated ) - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sku"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sku"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name").or_else(S("id")).or_else(S("selfLink")), "tags": S("labels", default={}), @@ -1109,13 +1109,13 @@ class GcpDiskParams: @define(eq=False, slots=False) class GcpDisk(GcpResource, BaseVolume): kind: ClassVar[str] = "gcp_disk" - kind_display: ClassVar[str] = "GCP Disk" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Disk" + _kind_description: ClassVar[str] = ( "GCP Disk is a persistent block storage service provided by Google Cloud" " Platform, allowing users to store and manage data in the cloud." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_disk_type", "gcp_instance"]}, "successors": {"delete": ["gcp_instance"]}, } @@ -1238,12 +1238,12 @@ class GcpExternalVpnGatewayInterface: @define(eq=False, slots=False) class GcpExternalVpnGateway(GcpResource, BaseGateway): kind: ClassVar[str] = "gcp_external_vpn_gateway" - kind_display: ClassVar[str] = "GCP External VPN Gateway" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP External VPN Gateway" + _kind_description: ClassVar[str] = ( "GCP External VPN Gateway is a resource that provides connectivity from Google Cloud to external networks" " via VPN, featuring interfaces for tunnel configuration and redundancy options for high availability." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1385,14 +1385,14 @@ class GcpFirewallPolicyRule: @define(eq=False, slots=False) class GcpFirewallPolicy(GcpResource): kind: ClassVar[str] = "gcp_firewall_policy" - kind_display: ClassVar[str] = "GCP Firewall Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Firewall Policy" + _kind_description: ClassVar[str] = ( "GCP Firewall Policy is a security rule set that controls incoming and" " outgoing network traffic for resources in the Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_network"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_network"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1481,14 +1481,14 @@ class GcpFirewallLogConfig: @define(eq=False, slots=False) class GcpFirewall(GcpResource, BaseFirewall): kind: ClassVar[str] = "gcp_firewall" - kind_display: ClassVar[str] = "GCP Firewall" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Firewall" + _kind_description: ClassVar[str] = ( "GCP Firewall is a network security feature provided by Google Cloud Platform" " that controls incoming and outgoing traffic to and from virtual machine" " instances." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_network"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_network"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1590,15 +1590,15 @@ class GcpForwardingRuleServiceDirectoryRegistration: @define(eq=False, slots=False) class GcpForwardingRule(GcpResource, BaseLoadBalancer): kind: ClassVar[str] = "gcp_forwarding_rule" - kind_display: ClassVar[str] = "GCP Forwarding Rule" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Forwarding Rule" + _kind_description: ClassVar[str] = ( "Forwarding rules are used in Google Cloud Platform to route traffic to" " different destinations based on the configuration settings. They can be used" " to load balance or redirect traffic within a network or between networks." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"]}, "successors": { "default": [ @@ -1810,15 +1810,15 @@ class GcpNetworkEndpointGroupPscData: @define(eq=False, slots=False) class GcpNetworkEndpointGroup(GcpResource): kind: ClassVar[str] = "gcp_network_endpoint_group" - kind_display: ClassVar[str] = "GCP Network Endpoint Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Network Endpoint Group" + _kind_description: ClassVar[str] = ( "A GCP Network Endpoint Group is a logical grouping of network endpoints," " allowing users to distribute network traffic across multiple endpoints in" " Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network", "gcp_subnetwork"], "delete": ["gcp_network", "gcp_subnetwork"]} } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -2010,14 +2010,14 @@ class GcpWarnings: @define(eq=False, slots=False) class GcpOperation(GcpResource): kind: ClassVar[str] = "gcp_operation" - kind_display: ClassVar[str] = "GCP Operation" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Operation" + _kind_description: ClassVar[str] = ( "An operation represents a long-running asynchronous API call in Google Cloud" " Platform (GCP), allowing users to create, update, or delete resources" ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "log", "group": "management"} + _reference_kinds: ClassVar[ModelReference] = { "successors": { # operation can target multiple resources, unclear which others are possible "default": ["gcp_disk"], @@ -2111,14 +2111,14 @@ class GcpPublicDelegatedPrefixPublicDelegatedSubPrefix: @define(eq=False, slots=False) class GcpPublicDelegatedPrefix(GcpResource): kind: ClassVar[str] = "gcp_public_delegated_prefix" - kind_display: ClassVar[str] = "GCP Public Delegated Prefix" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Public Delegated Prefix" + _kind_description: ClassVar[str] = ( "A Public Delegated Prefix in Google Cloud Platform (GCP) allows customers to" " use their own IPv6 addresses on GCP resources for public internet" " connectivity." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -2310,14 +2310,14 @@ class GcpTCPHealthCheck: @define(eq=False, slots=False) class GcpHealthCheck(GcpResource, BaseHealthCheck): kind: ClassVar[str] = "gcp_health_check" - kind_display: ClassVar[str] = "GCP Health Check" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Health Check" + _kind_description: ClassVar[str] = ( "Health Check is a feature in Google Cloud Platform that allows you to" " monitor the health and availability of your resources by periodically" " sending requests to them and verifying the responses." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -2368,14 +2368,14 @@ class GcpHealthCheck(GcpResource, BaseHealthCheck): @define(eq=False, slots=False) class GcpHttpHealthCheck(GcpResource): kind: ClassVar[str] = "gcp_http_health_check" - kind_display: ClassVar[str] = "GCP HTTP Health Check" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP HTTP Health Check" + _kind_description: ClassVar[str] = ( "HTTP Health Checks are used by Google Cloud Platform to monitor the health" " of web services and determine if they are reachable and responding correctly" " to requests." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -2416,14 +2416,14 @@ class GcpHttpHealthCheck(GcpResource): @define(eq=False, slots=False) class GcpHttpsHealthCheck(GcpResource): kind: ClassVar[str] = "gcp_https_health_check" - kind_display: ClassVar[str] = "GCP HTTPS Health Check" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP HTTPS Health Check" + _kind_description: ClassVar[str] = ( "The GCP HTTPS Health Check is a monitoring service that allows users to" " check the availability and performance of their HTTPS endpoints on Google" " Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "health", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -2515,14 +2515,14 @@ class GcpInitialStateConfig: @define(eq=False, slots=False) class GcpImage(GcpResource): kind: ClassVar[str] = "gcp_image" - kind_display: ClassVar[str] = "GCP Image" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Image" + _kind_description: ClassVar[str] = ( "GCP Images are pre-configured virtual machine templates that can be used to" " create and deploy virtual machines in the Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service="compute", version="v1", @@ -2817,14 +2817,14 @@ class GcpInstanceGroupManagerVersion: @define(eq=False, slots=False) class GcpInstanceGroupManager(GcpResource): kind: ClassVar[str] = "gcp_instance_group_manager" - kind_display: ClassVar[str] = "GCP Instance Group Manager" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Instance Group Manager" + _kind_description: ClassVar[str] = ( "GCP Instance Group Manager is a resource in Google Cloud Platform that helps" " manage and scale groups of Compute Engine instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["gcp_instance_group"], "delete": ["gcp_instance_group", "gcp_health_check", "gcp_http_health_check", "gcp_https_health_check"], @@ -2901,16 +2901,16 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpInstanceGroup(GcpResource): kind: ClassVar[str] = "gcp_instance_group" - kind_display: ClassVar[str] = "GCP Instance Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Instance Group" + _kind_description: ClassVar[str] = ( "Instance Group is a resource in Google Cloud Platform that allows you to" " manage and scale multiple instances together as a single unit." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network", "gcp_subnetwork"], "delete": ["gcp_network", "gcp_subnetwork"]} } - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -3401,14 +3401,14 @@ class GcpSourceInstanceParams: @define(eq=False, slots=False) class GcpInstanceTemplate(GcpResource): kind: ClassVar[str] = "gcp_instance_template" - kind_display: ClassVar[str] = "GCP Instance Template" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Instance Template" + _kind_description: ClassVar[str] = ( "GCP Instance Templates are reusable configuration templates that define the" " settings for Google Compute Engine virtual machine instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_machine_type"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_machine_type"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -3455,13 +3455,13 @@ class GcpInstanceParams: @define(eq=False, slots=False) class GcpInstance(GcpResource, BaseInstance): kind: ClassVar[str] = "gcp_instance" - kind_display: ClassVar[str] = "GCP Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Instance" + _kind_description: ClassVar[str] = ( "GCP Instances are virtual machines in Google Cloud Platform that can be used" " to run applications and services on Google's infrastructure." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["gcp_network", "gcp_subnetwork", "gcp_machine_type"], "delete": ["gcp_network", "gcp_subnetwork"], @@ -3654,14 +3654,14 @@ class GcpInterconnectAttachmentPartnerMetadata: @define(eq=False, slots=False) class GcpInterconnectAttachment(GcpResource): kind: ClassVar[str] = "gcp_interconnect_attachment" - kind_display: ClassVar[str] = "GCP Interconnect Attachment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Interconnect Attachment" + _kind_description: ClassVar[str] = ( "Interconnect Attachment is a resource that allows you to connect your on-" " premises network to Google Cloud Platform (GCP) using a dedicated physical" " link." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -3761,15 +3761,15 @@ class GcpInterconnectLocationRegionInfo: @define(eq=False, slots=False) class GcpInterconnectLocation(GcpResource): kind: ClassVar[str] = "gcp_interconnect_location" - kind_display: ClassVar[str] = "GCP Interconnect Location" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Interconnect Location" + _kind_description: ClassVar[str] = ( "GCP Interconnect Location refers to the physical location where Google Cloud" " Platform (GCP) Interconnects are available. Interconnects provide dedicated" " connectivity options between an organization's on-premises network and GCP's" " network." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "region", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -3864,14 +3864,14 @@ class GcpInterconnectOutageNotification: @define(eq=False, slots=False) class GcpInterconnect(GcpResource): kind: ClassVar[str] = "gcp_interconnect" - kind_display: ClassVar[str] = "GCP Interconnect" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Interconnect" + _kind_description: ClassVar[str] = ( "GCP Interconnect is a dedicated connection between your on-premises network" " and Google Cloud Platform, providing a high-speed and reliable link for data" " transfer." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -3947,12 +3947,12 @@ class GcpLicenseResourceRequirements: @define(eq=False, slots=False) class GcpLicense(GcpResource): kind: ClassVar[str] = "gcp_license" - kind_display: ClassVar[str] = "GCP License" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP License" + _kind_description: ClassVar[str] = ( "GCP Licenses are used to authorize the use of certain Google Cloud Platform services and resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "compute"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "certificate", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4110,15 +4110,15 @@ class GcpSourceInstanceProperties: @define(eq=False, slots=False) class GcpMachineImage(GcpResource): kind: ClassVar[str] = "gcp_machine_image" - kind_display: ClassVar[str] = "GCP Machine Image" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Machine Image" + _kind_description: ClassVar[str] = ( "Machine Images in Google Cloud Platform are snapshots of a virtual machine's" " disk that can be used to create new instances with the same configuration" " and data." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "image", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "default": ["gcp_disk"], } @@ -4199,13 +4199,13 @@ class GcpAccelerators: @define(eq=False, slots=False) class GcpMachineType(GcpResource, BaseInstanceType): kind: ClassVar[str] = "gcp_machine_type" - kind_display: ClassVar[str] = "GCP Machine Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Machine Type" + _kind_description: ClassVar[str] = ( "GCP Machine Types are predefined hardware configurations that define the" " virtualized hardware resources for Google Cloud Platform virtual machines." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4226,7 +4226,7 @@ class GcpMachineType(GcpResource, BaseInstanceType): request_parameter={"project": "{project}", "zone": "{zone}", "machineType": "{machineType}"}, request_parameter_in={"project", "zone", "machineType"}, ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_sku"]}, "successors": {"default": ["gcp_accelerator_type"]}, } @@ -4372,14 +4372,14 @@ def filter(sku: GcpSku) -> bool: @define(eq=False, slots=False) class GcpNetworkEdgeSecurityService(GcpResource): kind: ClassVar[str] = "gcp_network_edge_security_service" - kind_display: ClassVar[str] = "GCP Network Edge Security Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Network Edge Security Service" + _kind_description: ClassVar[str] = ( "GCP Network Edge Security Service provides secure and reliable access to" " resources in the Google Cloud Platform network, reducing the risk of" " unauthorized access and data breaches." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4452,12 +4452,12 @@ class GcpNetworkPeering: @define(eq=False, slots=False) class GcpNetwork(GcpResource, BaseNetwork): kind: ClassVar[str] = "gcp_network" - kind_display: ClassVar[str] = "GCP Network" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Network" + _kind_description: ClassVar[str] = ( "GCP Network is a virtual network infrastructure that allows users to" " securely connect and isolate their resources in the Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4569,15 +4569,15 @@ class GcpShareSettings: @define(eq=False, slots=False) class GcpNodeGroup(GcpResource): kind: ClassVar[str] = "gcp_node_group" - kind_display: ClassVar[str] = "GCP Node Group" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Node Group" + _kind_description: ClassVar[str] = ( "The GCP Node Group is a service that manages groups of sole-tenant nodes in Google Cloud, providing" " capabilities for autoscaling, scheduled maintenance, and specifying node affinity to optimize placement" " and utilization." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_node_template"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_node_template"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4659,14 +4659,14 @@ class GcpNodeTemplateNodeTypeFlexibility: @define(eq=False, slots=False) class GcpNodeTemplate(GcpResource): kind: ClassVar[str] = "gcp_node_template" - kind_display: ClassVar[str] = "GCP Node Template" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Node Template" + _kind_description: ClassVar[str] = ( "GCP Node Template is a reusable configuration template used to create and" " manage virtual machine instances in the Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk_type"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk_type"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4717,14 +4717,14 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpNodeType(GcpResource): kind: ClassVar[str] = "gcp_node_type" - kind_display: ClassVar[str] = "GCP Node Type" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Node Type" + _kind_description: ClassVar[str] = ( "GCP Node Types determine the hardware configuration of virtual machines in" " Google Cloud Platform (GCP). Each node type has specific CPU, memory, and" " storage capacity." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "type", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4854,15 +4854,15 @@ class GcpPacketMirroringNetworkInfo: @define(eq=False, slots=False) class GcpPacketMirroring(GcpResource): kind: ClassVar[str] = "gcp_packet_mirroring" - kind_display: ClassVar[str] = "GCP Packet Mirroring" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Packet Mirroring" + _kind_description: ClassVar[str] = ( "GCP Packet Mirroring is a service provided by Google Cloud Platform that" " allows users to capture and mirror network traffic in order to monitor and" " analyze network data for security and troubleshooting purposes." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_instance", "gcp_subnetwork"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_instance", "gcp_subnetwork"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -4932,14 +4932,14 @@ class GcpPublicAdvertisedPrefixPublicDelegatedPrefix: @define(eq=False, slots=False) class GcpPublicAdvertisedPrefix(GcpResource): kind: ClassVar[str] = "gcp_public_advertised_prefix" - kind_display: ClassVar[str] = "GCP Public Advertised Prefix" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Public Advertised Prefix" + _kind_description: ClassVar[str] = ( "A GCP Public Advertised Prefix is a range of IP addresses that can be" " advertised over the internet to allow communication with GCP resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_public_delegated_prefix"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "dns", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_public_delegated_prefix"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5123,13 +5123,13 @@ class GcpResourceCommitment: @define(eq=False, slots=False) class GcpCommitment(GcpResource): kind: ClassVar[str] = "gcp_commitment" - kind_display: ClassVar[str] = "GCP Commitment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Commitment" + _kind_description: ClassVar[str] = ( "A GCP Commitment is a pre-purchased commitment in Google Cloud Platform," " which provides discounted pricing for certain services and resources." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "compute"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5183,14 +5183,14 @@ class GcpCommitment(GcpResource): @define(eq=False, slots=False) class GcpHealthCheckService(GcpResource): kind: ClassVar[str] = "gcp_health_check_service" - kind_display: ClassVar[str] = "GCP Health Check Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Health Check Service" + _kind_description: ClassVar[str] = ( "The GCP Health Check Service is a feature provided by Google Cloud Platform" " (GCP) that monitors the health and availability of backend services and" " instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "access_control"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "service", "group": "access_control"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5251,13 +5251,13 @@ class GcpNotificationEndpointGrpcSettings: @define(eq=False, slots=False) class GcpNotificationEndpoint(GcpResource): kind: ClassVar[str] = "gcp_notification_endpoint" - kind_display: ClassVar[str] = "GCP Notification Endpoint" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Notification Endpoint" + _kind_description: ClassVar[str] = ( "A GCP Notification Endpoint is a specific destination to send notifications" " from Google Cloud Platform services to, such as Pub/Sub or HTTP endpoints." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "management"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "endpoint", "group": "management"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5519,14 +5519,14 @@ class GcpSecurityPolicyRule: @define(eq=False, slots=False) class GcpSecurityPolicy(GcpResource): kind: ClassVar[str] = "gcp_security_policy" - kind_display: ClassVar[str] = "GCP Security Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Security Policy" + _kind_description: ClassVar[str] = ( "GCP Security Policy is a feature of Google Cloud Platform that allows users" " to define and enforce security rules and policies for their virtual machine" " instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5602,14 +5602,14 @@ class GcpSslCertificateSelfManagedSslCertificate: @define(eq=False, slots=False) class GcpSslCertificate(GcpResource, BaseCertificate): kind: ClassVar[str] = "gcp_ssl_certificate" - kind_display: ClassVar[str] = "GCP SSL Certificate" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SSL Certificate" + _kind_description: ClassVar[str] = ( "SSL Certificate is a digital certificate that authenticates the identity of" " a website and encrypts information sent to the server, ensuring secure" " communication over the Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "resource", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5652,13 +5652,13 @@ class GcpSslCertificate(GcpResource, BaseCertificate): @define(eq=False, slots=False) class GcpSslPolicy(GcpResource): kind: ClassVar[str] = "gcp_ssl_policy" - kind_display: ClassVar[str] = "GCP SSL Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SSL Policy" + _kind_description: ClassVar[str] = ( "SSL policies in Google Cloud Platform (GCP) manage how SSL/TLS connections" " are established and maintained for HTTPS services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "networking"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -5697,14 +5697,14 @@ class GcpSslPolicy(GcpResource): @define(eq=False, slots=False) class GcpTargetHttpProxy(GcpResource): kind: ClassVar[str] = "gcp_target_http_proxy" - kind_display: ClassVar[str] = "GCP Target HTTP Proxy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target HTTP Proxy" + _kind_description: ClassVar[str] = ( "GCP Target HTTP Proxy is a resource in Google Cloud Platform that allows for" " load balancing and routing of HTTP traffic to backend services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["gcp_url_map"]}, "successors": {"default": ["gcp_url_map"]}, } @@ -5744,15 +5744,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetHttpsProxy(GcpResource): kind: ClassVar[str] = "gcp_target_https_proxy" - kind_display: ClassVar[str] = "GCP Target HTTPS Proxy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target HTTPS Proxy" + _kind_description: ClassVar[str] = ( "A GCP Target HTTPS Proxy is a Google Cloud Platform resource that enables" " you to configure SSL/TLS termination for HTTP(S) load balancing, allowing" " secure communication between clients and your backend services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_ssl_certificate", "gcp_ssl_policy"], "delete": ["gcp_url_map"]}, "successors": {"default": ["gcp_url_map"]}, } @@ -5809,15 +5809,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetTcpProxy(GcpResource): kind: ClassVar[str] = "gcp_target_tcp_proxy" - kind_display: ClassVar[str] = "GCP Target TCP Proxy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target TCP Proxy" + _kind_description: ClassVar[str] = ( "Target TCP Proxy is a Google Cloud Platform service that allows you to load" " balance TCP traffic to backend instances based on target proxy" " configuration." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["gcp_backend_service"]}, "successors": {"default": ["gcp_backend_service"]}, } @@ -6303,15 +6303,15 @@ class GcpUrlMapTest: @define(eq=False, slots=False) class GcpUrlMap(GcpResource): kind: ClassVar[str] = "gcp_url_map" - kind_display: ClassVar[str] = "GCP URL Map" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP URL Map" + _kind_description: ClassVar[str] = ( "A GCP URL Map is a resource that maps a URL path to a specific backend" " service in Google Cloud Platform. It allows for routing of requests based on" " the URL path." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_backend_service"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "config", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_backend_service"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -6578,14 +6578,14 @@ class GcpResourcePolicySnapshotSchedulePolicy: @define(eq=False, slots=False) class GcpResourcePolicy(GcpResource): kind: ClassVar[str] = "gcp_resource_policy" - kind_display: ClassVar[str] = "GCP Resource Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Resource Policy" + _kind_description: ClassVar[str] = ( "GCP Resource Policy is a tool that helps manage compute resources for VM instances in Google" " Cloud, enabling users to define scheduling for instance creation, automated snapshots, and" " resource grouping, which can optimize costs and maintain the necessary resource availability." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "management"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "policy", "group": "management"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -6892,14 +6892,14 @@ class GcpRouterNat: @define(eq=False, slots=False) class GcpRouter(GcpResource): kind: ClassVar[str] = "gcp_router" - kind_display: ClassVar[str] = "GCP Router" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Router" + _kind_description: ClassVar[str] = ( "GCP Router is a networking component in Google Cloud Platform that directs" " traffic between virtual networks." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_network"]} } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -6963,14 +6963,14 @@ class GcpRouteAsPath: @define(eq=False, slots=False) class GcpRoute(GcpResource): kind: ClassVar[str] = "gcp_route" - kind_display: ClassVar[str] = "GCP Route" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Route" + _kind_description: ClassVar[str] = ( "A GCP Route is a rule that specifies the next-hop information for network" " traffic within a Google Cloud Platform virtual network." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "routing_table", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_network"]} } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -7082,15 +7082,15 @@ class GcpUint128: @define(eq=False, slots=False) class GcpServiceAttachment(GcpResource): kind: ClassVar[str] = "gcp_service_attachment" - kind_display: ClassVar[str] = "GCP Service Attachment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Service Attachment" + _kind_description: ClassVar[str] = ( "GCP Service Attachment is a networking feature that manages connectivity and security policies between" " Google Cloud services and external services, offering controls like connection preferences, domain" " names management, and protocol support." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "compute"} - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_backend_service", "gcp_subnetwork"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "compute"} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["gcp_backend_service", "gcp_subnetwork"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -7148,13 +7148,13 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpSnapshot(GcpResource, BaseSnapshot): kind: ClassVar[str] = "gcp_snapshot" - kind_display: ClassVar[str] = "GCP Snapshot" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Snapshot" + _kind_description: ClassVar[str] = ( "GCP Snapshot is a point-in-time copy of the data in a persistent disk in" " Google Cloud Platform, allowing for data backup and recovery." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_disk"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -7273,15 +7273,15 @@ class GcpSubnetworkSecondaryRange: @define(eq=False, slots=False) class GcpSubnetwork(GcpResource, BaseSubnet): kind: ClassVar[str] = "gcp_subnetwork" - kind_display: ClassVar[str] = "GCP Subnetwork" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Subnetwork" + _kind_description: ClassVar[str] = ( "A GCP Subnetwork is a segmented network within a Virtual Private Cloud (VPC)" " that allows for more granular control over network traffic and IP address" " allocation." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "network", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_network"]} } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -7348,14 +7348,14 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetGrpcProxy(GcpResource): kind: ClassVar[str] = "gcp_target_grpc_proxy" - kind_display: ClassVar[str] = "GCP Target gRPC Proxy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target gRPC Proxy" + _kind_description: ClassVar[str] = ( "GCP Target gRPC Proxy is a service in Google Cloud Platform that allows you" " to load balance gRPC traffic to backend services." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": { "delete": ["gcp_url_map"], }, @@ -7399,14 +7399,14 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetInstance(GcpResource): kind: ClassVar[str] = "gcp_target_instance" - kind_display: ClassVar[str] = "GCP Target Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target Instance" + _kind_description: ClassVar[str] = ( "Target Instances in Google Cloud Platform are virtual machine instances that" " are used as forwarding targets for load balancing and traffic routing." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_instance"]}, "successors": {"default": ["gcp_instance"]}, } @@ -7448,15 +7448,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetPool(GcpResource): kind: ClassVar[str] = "gcp_target_pool" - kind_display: ClassVar[str] = "GCP Target Pool" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target Pool" + _kind_description: ClassVar[str] = ( "Target Pools in Google Cloud Platform (GCP) are groups of instances that can" " receive traffic from a load balancer. They are used to distribute incoming" " requests across multiple backend instances." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "group", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["gcp_http_health_check", "gcp_instance"]}, "successors": {"delete": ["gcp_http_health_check", "gcp_instance"]}, } @@ -7504,15 +7504,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetSslProxy(GcpResource): kind: ClassVar[str] = "gcp_target_ssl_proxy" - kind_display: ClassVar[str] = "GCP Target SSL Proxy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target SSL Proxy" + _kind_description: ClassVar[str] = ( "A GCP Target SSL Proxy is a resource that terminates SSL/TLS traffic for a" " specific target HTTPS or SSL Proxy load balancing setup in Google Cloud" " Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "proxy", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"delete": ["gcp_ssl_certificate", "gcp_backend_service"]}, "successors": {"default": ["gcp_ssl_certificate", "gcp_backend_service"]}, } @@ -7559,15 +7559,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpTargetVpnGateway(GcpResource): kind: ClassVar[str] = "gcp_target_vpn_gateway" - kind_display: ClassVar[str] = "GCP Target VPN Gateway" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Target VPN Gateway" + _kind_description: ClassVar[str] = ( "Target VPN Gateway is a virtual private network (VPN) gateway that allows" " secure communication between on-premises networks and networks running on" " Google Cloud Platform (GCP)." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "gateway", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_network"]}, } api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( @@ -7627,14 +7627,14 @@ class GcpVpnGatewayVpnGatewayInterface: @define(eq=False, slots=False) class GcpVpnGateway(GcpResource, BaseGateway): kind: ClassVar[str] = "gcp_vpn_gateway" - kind_display: ClassVar[str] = "GCP VPN Gateway" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP VPN Gateway" + _kind_description: ClassVar[str] = ( "GCP VPN Gateway is a virtual private network (VPN) gateway on Google Cloud" " Platform that allows users to securely connect their on-premises network to" " their GCP network." ) - kind_service: ClassVar[Optional[str]] = service_name - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _reference_kinds: ClassVar[ModelReference] = { "predecessors": {"default": ["gcp_network"], "delete": ["gcp_network"]}, "successors": {"default": ["gcp_interconnect_attachment"]}, } @@ -7677,15 +7677,15 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class GcpVpnTunnel(GcpResource, BaseTunnel): kind: ClassVar[str] = "gcp_vpn_tunnel" - kind_display: ClassVar[str] = "GCP VPN Tunnel" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP VPN Tunnel" + _kind_description: ClassVar[str] = ( "A GCP VPN Tunnel is a secure virtual connection that allows users to connect" " their on-premises network to their Google Cloud Platform (GCP) Virtual" " Private Cloud (VPC)." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} - reference_kinds: ClassVar[ModelReference] = { + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "link", "group": "networking"} + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["gcp_target_vpn_gateway", "gcp_vpn_gateway", "gcp_router"], "delete": ["gcp_target_vpn_gateway", "gcp_vpn_gateway"], diff --git a/plugins/gcp/fix_plugin_gcp/resources/container.py b/plugins/gcp/fix_plugin_gcp/resources/container.py index ceda107c0e..903bb919b1 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/container.py +++ b/plugins/gcp/fix_plugin_gcp/resources/container.py @@ -1087,14 +1087,14 @@ class GcpContainerResourceUsageExportConfig: @define(eq=False, slots=False) class GcpContainerCluster(BaseManagedKubernetesClusterProvider, GcpResource): kind: ClassVar[str] = "gcp_container_cluster" - kind_display: ClassVar[str] = "GCP Container Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Container Cluster" + _kind_description: ClassVar[str] = ( "Container Cluster is a managed Kubernetes cluster service provided by Google" " Cloud Platform, which allows users to deploy, manage, and scale" " containerized applications using Kubernetes." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "cluster", "group": "managed_kubernetes"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1300,15 +1300,15 @@ class GcpContainerOperationProgress: @define(eq=False, slots=False) class GcpContainerOperation(GcpResource): kind: ClassVar[str] = "gcp_container_operation" - kind_display: ClassVar[str] = "GCP Container Operation" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Container Operation" + _kind_description: ClassVar[str] = ( "Container Operations are management tasks performed on containers in Google" " Cloud Platform, including creating, starting, stopping, and deleting" " containers." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "managed_kubernetes"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_container_cluster"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "managed_kubernetes"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_container_cluster"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", diff --git a/plugins/gcp/fix_plugin_gcp/resources/sqladmin.py b/plugins/gcp/fix_plugin_gcp/resources/sqladmin.py index 25937eacf5..18230971df 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/sqladmin.py +++ b/plugins/gcp/fix_plugin_gcp/resources/sqladmin.py @@ -33,14 +33,14 @@ class GcpSqlOperationError: class GcpSqlBackupRun(GcpResource): # collected via GcpSqlDatabaseInstance kind: ClassVar[str] = "gcp_sql_backup_run" - kind_display: ClassVar[str] = "GCP SQL Backup Run" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SQL Backup Run" + _kind_description: ClassVar[str] = ( "GCP SQL Backup Run is a feature in Google Cloud Platform that allows users" " to schedule and execute automated backups of their SQL databases." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_database_instance"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "backup", "group": "database"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_database_instance"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -115,12 +115,12 @@ class GcpSqlSqlServerDatabaseDetails: class GcpSqlDatabase(GcpResource): # collected via GcpSqlDatabaseInstance kind: ClassVar[str] = "gcp_sql_database" - kind_display: ClassVar[str] = "GCP SQL Database" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SQL Database" + _kind_description: ClassVar[str] = ( "GCP SQL Database is a managed relational database service provided by Google Cloud Platform." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "database", "group": "database"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -133,7 +133,7 @@ class GcpSqlDatabase(GcpResource): required_iam_permissions=["cloudsql.databases.list"], mutate_iam_permissions=["cloudsql.databases.update", "cloudsql.databases.delete"], ) - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name").or_else(S("id")).or_else(S("selfLink")), "tags": S("labels", default={}), @@ -645,14 +645,14 @@ class GcpSqlSettings: @define(eq=False, slots=False) class GcpSqlDatabaseInstance(GcpResource, BaseDatabase): kind: ClassVar[str] = "gcp_sql_database_instance" - kind_display: ClassVar[str] = "GCP SQL Database Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SQL Database Instance" + _kind_description: ClassVar[str] = ( "GCP SQL Database Instance is a resource provided by Google Cloud Platform" " that allows users to create and manage relational databases in the cloud." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_ssl_certificate"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "instance", "group": "database"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_ssl_certificate"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -942,15 +942,15 @@ class GcpSqlImportContext: @define(eq=False, slots=False) class GcpSqlOperation(GcpResource): kind: ClassVar[str] = "gcp_sql_operation" - kind_display: ClassVar[str] = "GCP SQL Operation" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SQL Operation" + _kind_description: ClassVar[str] = ( "The GCP SQL Operation is a representation of an administrative operation performed on a GCP SQL Database" " instance, such as backups, imports, and exports, including details about execution times, status, and any" " errors encountered." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "database"} - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "job", "group": "database"} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1062,13 +1062,13 @@ class GcpSqlSqlServerUserDetails: class GcpSqlUser(GcpResource): # collected via GcpSqlDatabaseInstance kind: ClassVar[str] = "gcp_sql_user" - kind_display: ClassVar[str] = "GCP SQL User" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP SQL User" + _kind_description: ClassVar[str] = ( "A GCP SQL User refers to a user account that can access and manage databases" " in Google Cloud SQL, a fully-managed relational database service." ) - kind_service: ClassVar[Optional[str]] = service_name - metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} + _kind_service: ClassVar[Optional[str]] = service_name + _metadata: ClassVar[Dict[str, Any]] = {"icon": "user", "group": "database"} api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -1081,7 +1081,7 @@ class GcpSqlUser(GcpResource): required_iam_permissions=["cloudsql.users.list"], mutate_iam_permissions=["cloudsql.users.update", "cloudsql.users.delete"], ) - reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} + _reference_kinds: ClassVar[ModelReference] = {"predecessors": {"default": ["gcp_sql_database_instance"]}} mapping: ClassVar[Dict[str, Bender]] = { "id": S("name").or_else(K("(anonymous)@") + S("host", default="localhost")), "tags": S("labels", default={}), diff --git a/plugins/gcp/fix_plugin_gcp/resources/storage.py b/plugins/gcp/fix_plugin_gcp/resources/storage.py index 84256b0411..70630298d5 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/storage.py +++ b/plugins/gcp/fix_plugin_gcp/resources/storage.py @@ -316,12 +316,12 @@ class GcpObject(GcpResource): # GcpObjects are necessary to empty buckets before deletion # they are not intended to be collected and stored in the graph kind: ClassVar[str] = "gcp_object" - kind_display: ClassVar[str] = "GCP Object" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Object" + _kind_description: ClassVar[str] = ( "GCP Object, specifically referring to the Google Cloud Storage, is a basic unit of data that is stored" " in Google Cloud Storage, often matching to an individual file." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", @@ -341,12 +341,12 @@ class GcpObject(GcpResource): @define(eq=False, slots=False) class GcpBucket(GcpResource, BaseBucket): kind: ClassVar[str] = "gcp_bucket" - kind_display: ClassVar[str] = "GCP Bucket" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "GCP Bucket" + _kind_description: ClassVar[str] = ( "A GCP Bucket is a cloud storage container provided by Google Cloud Platform," " allowing users to store and access data in a scalable and durable manner." ) - kind_service: ClassVar[Optional[str]] = service_name + _kind_service: ClassVar[Optional[str]] = service_name api_spec: ClassVar[GcpApiSpec] = GcpApiSpec( service=service_name, version="v1", diff --git a/plugins/gcp/test/test_collector.py b/plugins/gcp/test/test_collector.py index 70a17514ce..365a8f53ff 100644 --- a/plugins/gcp/test/test_collector.py +++ b/plugins/gcp/test/test_collector.py @@ -84,8 +84,8 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: bases.update(all_base_classes(base)) return bases - expected_declared_properties = ["kind", "kind_display"] - expected_props_in_hierarchy = ["kind_service", "metadata"] + expected_declared_properties = ["kind", "_kind_display"] + expected_props_in_hierarchy = ["_kind_service", "_metadata"] for rc in all_resources: for prop in expected_declared_properties: assert prop in rc.__dict__, f"{rc.__name__} missing {prop}" @@ -95,5 +95,5 @@ def all_base_classes(cls: Type[Any]) -> Set[Type[Any]]: for base in with_bases: if "connect_in_graph" in base.__dict__: assert ( - "reference_kinds" in base.__dict__ - ), f"{rc.__name__} should define reference_kinds property, since it defines connect_in_graph" + "_reference_kinds" in base.__dict__ + ), f"{rc.__name__} should define _reference_kinds property, since it defines connect_in_graph" diff --git a/plugins/github/fix_plugin_github/resources.py b/plugins/github/fix_plugin_github/resources.py index aa4267e196..c669ed1334 100644 --- a/plugins/github/fix_plugin_github/resources.py +++ b/plugins/github/fix_plugin_github/resources.py @@ -24,8 +24,8 @@ @define(eq=False, slots=False) class GithubAccount(BaseAccount): kind: ClassVar[str] = "github_account" - kind_display: ClassVar[str] = "Github Account" - kind_description: ClassVar[str] = "A Github Account." + _kind_display: ClassVar[str] = "Github Account" + _kind_description: ClassVar[str] = "A Github Account." def delete(self, graph: Graph) -> bool: return False @@ -34,8 +34,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class GithubRegion(BaseRegion): kind: ClassVar[str] = "github_region" - kind_display: ClassVar[str] = "Github Region" - kind_description: ClassVar[str] = "A Github Region." + _kind_display: ClassVar[str] = "Github Region" + _kind_description: ClassVar[str] = "A Github Region." def delete(self, graph: Graph) -> bool: return False @@ -60,8 +60,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class GithubOrg(GithubResource, BaseResource): kind: ClassVar[str] = "github_org" - kind_display: ClassVar[str] = "Github Organization" - kind_description: ClassVar[str] = "A Github Organization." + _kind_display: ClassVar[str] = "Github Organization" + _kind_description: ClassVar[str] = "A Github Organization." avatar_url: Optional[str] = None billing_email: Optional[str] = None @@ -146,8 +146,8 @@ def new(org: Organization) -> BaseResource: @define(eq=False, slots=False) class GithubUser(GithubResource, BaseUser): kind: ClassVar[str] = "github_user" - kind_display: ClassVar[str] = "Github User" - kind_description: ClassVar[str] = "A Github User." + _kind_display: ClassVar[str] = "Github User" + _kind_description: ClassVar[str] = "A Github User." avatar_url: Optional[str] = None bio: Optional[str] = None @@ -352,8 +352,8 @@ def new(path: Path): @define(eq=False, slots=False) class GithubPullRequest(GithubResource, BaseResource): kind: ClassVar[str] = "github_pull_request" - kind_display: ClassVar[str] = "Github Pull Request" - kind_description: ClassVar[str] = "A Github Pull Request." + _kind_display: ClassVar[str] = "Github Pull Request" + _kind_description: ClassVar[str] = "A Github Pull Request." additions: Optional[int] = None # assignee: Optional[str] = None @@ -445,8 +445,8 @@ def new(pr: PullRequest): @define(eq=False, slots=False) class GithubRepo(GithubResource, BaseResource): kind: ClassVar[str] = "github_repo" - kind_display: ClassVar[str] = "Github Repository" - kind_description: ClassVar[str] = "A Github Repository." + _kind_display: ClassVar[str] = "Github Repository" + _kind_description: ClassVar[str] = "A Github Repository." allow_merge_commit: Optional[bool] = None allow_rebase_merge: Optional[bool] = None diff --git a/plugins/hetzner/fix_plugin_hetzner/resources.py b/plugins/hetzner/fix_plugin_hetzner/resources.py index dbd4514044..263e469532 100644 --- a/plugins/hetzner/fix_plugin_hetzner/resources.py +++ b/plugins/hetzner/fix_plugin_hetzner/resources.py @@ -19,8 +19,8 @@ @define(eq=False, slots=False) class HcloudResource(BaseResource): kind: ClassVar[str] = "hcloud_resource" - kind_display: ClassVar[str] = "Hetzner Cloud Resource" - kind_description: ClassVar[str] = "A Hetzner Cloud Resource represents a single resource in the Hetzner Cloud" + _kind_display: ClassVar[str] = "Hetzner Cloud Resource" + _kind_description: ClassVar[str] = "A Hetzner Cloud Resource represents a single resource in the Hetzner Cloud" hcloud_id: Optional[int] = None diff --git a/plugins/k8s/fix_plugin_k8s/base.py b/plugins/k8s/fix_plugin_k8s/base.py index e6b04ade81..f625ac8c33 100644 --- a/plugins/k8s/fix_plugin_k8s/base.py +++ b/plugins/k8s/fix_plugin_k8s/base.py @@ -30,7 +30,7 @@ @define(eq=False, slots=False) class KubernetesResource(BaseResource): kind: ClassVar[str] = "kubernetes_resource" - kind_service: ClassVar[Optional[str]] = "kubernetes" + _kind_service: ClassVar[Optional[str]] = "kubernetes" mapping: ClassVar[Dict[str, Bender]] = { "id": S("metadata", "uid"), diff --git a/plugins/k8s/fix_plugin_k8s/resources.py b/plugins/k8s/fix_plugin_k8s/resources.py index 0a99b86e69..ab7c9b5377 100644 --- a/plugins/k8s/fix_plugin_k8s/resources.py +++ b/plugins/k8s/fix_plugin_k8s/resources.py @@ -387,8 +387,8 @@ class KubernetesNodeSpec: @define(eq=False, slots=False) class KubernetesNode(KubernetesResource, BaseInstance): kind: ClassVar[str] = "kubernetes_node" - kind_display: ClassVar[str] = "Kubernetes Node" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Node" + _kind_description: ClassVar[str] = ( "A Kubernetes Node is a worker machine in a Kubernetes cluster that runs" " containers. It is responsible for running and managing the containers that" " make up the applications within the cluster." @@ -402,7 +402,7 @@ class KubernetesNode(KubernetesResource, BaseInstance): "instance_type": K("kubernetes_node"), "instance_status": K(InstanceStatus.RUNNING.value), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_csi_node", "kubernetes_pod"], "delete": [], @@ -953,8 +953,8 @@ class KubernetesPodSpec: @define(eq=False, slots=False) class KubernetesPod(KubernetesResource): kind: ClassVar[str] = "kubernetes_pod" - kind_display: ClassVar[str] = "Kubernetes Pod" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Pod" + _kind_description: ClassVar[str] = ( "A Kubernetes Pod is the basic building block of a Kubernetes cluster, it" " represents a running process, or a group of running processes, on a node." ) @@ -962,7 +962,7 @@ class KubernetesPod(KubernetesResource): "pod_status": S("status") >> Bend(KubernetesPodStatus.mapping), "pod_spec": S("spec") >> Bend(KubernetesPodSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_secret", "kubernetes_persistent_volume_claim", "kubernetes_config_map"], "delete": ["kubernetes_stateful_set", "kubernetes_replica_set", "kubernetes_job", "kubernetes_daemon_set"], @@ -1109,8 +1109,8 @@ class KubernetesPersistentVolumeClaimSpec: @define(eq=False, slots=False) class KubernetesPersistentVolumeClaim(KubernetesResource): kind: ClassVar[str] = "kubernetes_persistent_volume_claim" - kind_display: ClassVar[str] = "Kubernetes Persistent Volume Claim" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Persistent Volume Claim" + _kind_description: ClassVar[str] = ( "A Kubernetes Persistent Volume Claim is a request for storage resources in a" " Kubernetes cluster. It allows users to request specific storage capacity and" " access modes for their applications." @@ -1119,7 +1119,7 @@ class KubernetesPersistentVolumeClaim(KubernetesResource): "persistent_volume_claim_status": S("status") >> Bend(KubernetesPersistentVolumeClaimStatus.mapping), "persistent_volume_claim_spec": S("spec") >> Bend(KubernetesPersistentVolumeClaimSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["kubernetes_persistent_volume"], "delete": []} } @@ -1302,8 +1302,8 @@ class KubernetesServiceSpec: @define(eq=False, slots=False) class KubernetesService(KubernetesResource, BaseLoadBalancer): kind: ClassVar[str] = "kubernetes_service" - kind_display: ClassVar[str] = "Kubernetes Service" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Service" + _kind_description: ClassVar[str] = ( "A Kubernetes Service is an abstraction layer that defines a logical set of" " Pods and a policy by which to access them, providing a stable endpoint for" " accessing applications deployed on a Kubernetes cluster." @@ -1313,7 +1313,7 @@ class KubernetesService(KubernetesResource, BaseLoadBalancer): "service_spec": S("spec") >> Bend(KubernetesServiceSpec.mapping), "public_ip_address": S("spec", "externalIPs", 0), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_pod", "kubernetes_endpoint_slice"], "delete": [], @@ -1353,8 +1353,8 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class KubernetesPodTemplate(KubernetesResource): kind: ClassVar[str] = "kubernetes_pod_template" - kind_display: ClassVar[str] = "Kubernetes Pod Template" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Pod Template" + _kind_description: ClassVar[str] = ( "A Kubernetes Pod Template is a blueprint for creating and organizing pods," " which are the smallest and simplest building blocks in a Kubernetes cluster." " It defines the specifications for containers, volumes, and other resources" @@ -1380,12 +1380,12 @@ class KubernetesClusterInfo: @define(eq=False, slots=False) class KubernetesCluster(KubernetesResource, BaseAccount): kind: ClassVar[str] = "kubernetes_cluster" - kind_display: ClassVar[str] = "Kubernetes Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Cluster" + _kind_description: ClassVar[str] = ( "A Kubernetes cluster is a group of nodes (physical or virtual machines) that" " run containerized applications managed by Kubernetes." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "kubernetes_volume_attachment", @@ -1414,13 +1414,13 @@ class KubernetesCluster(KubernetesResource, BaseAccount): @define(eq=False, slots=False) class KubernetesConfigMap(KubernetesResource): kind: ClassVar[str] = "kubernetes_config_map" - kind_display: ClassVar[str] = "Kubernetes Config Map" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Config Map" + _kind_description: ClassVar[str] = ( "A Kubernetes Config Map is a way to store key-value pairs of configuration" " data that can be accessed by containers within a cluster." ) # only use changed data for making a history change (not any base prop( - metadata: ClassVar[Dict[str, Any]] = {"ignore_history": True} + _metadata: ClassVar[Dict[str, Any]] = {"ignore_history": True} mapping: ClassVar[Dict[str, Bender]] = KubernetesResource.mapping | {"data": S("data")} data: Optional[Dict[str, str]] = field(default=None) @@ -1484,12 +1484,14 @@ class KubernetesEndpointSubset: @define(eq=False, slots=False) class KubernetesEndpoints(KubernetesResource): kind: ClassVar[str] = "kubernetes_endpoint" - kind_display: ClassVar[str] = "Kubernetes Endpoint" - kind_description: ClassVar[str] = "A Kubernetes Endpoint defines a network address where a service can be accessed." + _kind_display: ClassVar[str] = "Kubernetes Endpoint" + _kind_description: ClassVar[str] = ( + "A Kubernetes Endpoint defines a network address where a service can be accessed." + ) mapping: ClassVar[Dict[str, Bender]] = KubernetesResource.mapping | { "subsets": S("subsets", default=[]) >> ForallBend(KubernetesEndpointSubset.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_pod", "kubernetes_node", "kubernetes_endpoint_slice"], "delete": [], @@ -1509,13 +1511,13 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class KubernetesEndpointSlice(KubernetesResource): kind: ClassVar[str] = "kubernetes_endpoint_slice" - kind_display: ClassVar[str] = "Kubernetes Endpoint Slice" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Endpoint Slice" + _kind_description: ClassVar[str] = ( "Kubernetes Endpoint Slices are a feature that allows for more efficient and" " scalable service discovery in a Kubernetes cluster by splitting endpoints" " into smaller slices." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [], "delete": ["kubernetes_service", "kubernetes_endpoint"], @@ -1526,8 +1528,8 @@ class KubernetesEndpointSlice(KubernetesResource): @define(eq=False, slots=False) class KubernetesLimitRange(KubernetesResource): kind: ClassVar[str] = "kubernetes_limit_range" - kind_display: ClassVar[str] = "Kubernetes Limit Range" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Limit Range" + _kind_description: ClassVar[str] = ( "Kubernetes Limit Range is a feature that allows you to define resource" " constraints (such as CPU and memory limits) for containers and pods running" " on a Kubernetes cluster." @@ -1578,15 +1580,15 @@ class KubernetesNamespaceStatus: @define(eq=False, slots=False) class KubernetesNamespace(KubernetesResource, BaseRegion): kind: ClassVar[str] = "kubernetes_namespace" - kind_display: ClassVar[str] = "Kubernetes Namespace" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Namespace" + _kind_description: ClassVar[str] = ( "A Kubernetes Namespace is a virtual cluster that allows users to divide" " resources and control access within a Kubernetes cluster." ) mapping: ClassVar[Dict[str, Bender]] = KubernetesResource.mapping | { "namespace_status": S("status") >> Bend(KubernetesNamespaceStatus.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [ "kubernetes_stateful_set", @@ -1735,8 +1737,8 @@ class KubernetesPersistentVolumeSpec: @define(eq=False, slots=False) class KubernetesPersistentVolume(KubernetesResource, BaseVolume): kind: ClassVar[str] = "kubernetes_persistent_volume" - kind_display: ClassVar[str] = "Kubernetes Persistent Volume" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Persistent Volume" + _kind_description: ClassVar[str] = ( "A Kubernetes Persistent Volume is a storage abstraction that provides access" " to persisted data for a Kubernetes cluster." ) @@ -1811,8 +1813,8 @@ class KubernetesReplicationControllerStatus: @define(eq=False, slots=False) class KubernetesReplicationController(KubernetesResource): kind: ClassVar[str] = "kubernetes_replication_controller" - kind_display: ClassVar[str] = "Kubernetes Replication Controller" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Replication Controller" + _kind_description: ClassVar[str] = ( "A Replication Controller is responsible for maintaining a specified number" " of pod replicas in a Kubernetes cluster. It ensures that the desired number" " of pods are always running in the cluster, even in the event of failures." @@ -1863,8 +1865,8 @@ class KubernetesResourceQuotaSpec: @define(eq=False, slots=False) class KubernetesResourceQuota(KubernetesResource, BaseQuota): kind: ClassVar[str] = "kubernetes_resource_quota" - kind_display: ClassVar[str] = "Kubernetes Resource Quota" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Resource Quota" + _kind_description: ClassVar[str] = ( "Kubernetes Resource Quota is a mechanism in Kubernetes for limiting and" " allocating resources to namespaces, ensuring fairness and preventing one" " namespace from using excessive resources." @@ -1882,8 +1884,8 @@ class KubernetesResourceQuota(KubernetesResource, BaseQuota): @define(eq=False, slots=False) class KubernetesSecret(KubernetesResource): kind: ClassVar[str] = "kubernetes_secret" - kind_display: ClassVar[str] = "Kubernetes Secret" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Secret" + _kind_description: ClassVar[str] = ( "Kubernetes Secret is an object that contains sensitive data such as" " passwords, API keys, and tokens, which can be securely stored and accessed" " by containers in a Kubernetes cluster." @@ -1893,12 +1895,12 @@ class KubernetesSecret(KubernetesResource): @define(eq=False, slots=False) class KubernetesServiceAccount(KubernetesResource): kind: ClassVar[str] = "kubernetes_service_account" - kind_display: ClassVar[str] = "Kubernetes Service Account" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Service Account" + _kind_description: ClassVar[str] = ( "A Kubernetes service account provides an identity and set of permissions for" " processes running in a pod within a Kubernetes cluster." ) - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["kubernetes_secret"], "delete": []}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["kubernetes_secret"], "delete": []}} def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: super().connect_in_graph(builder, source) @@ -1910,8 +1912,8 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class KubernetesMutatingWebhookConfiguration(KubernetesResource): kind: ClassVar[str] = "kubernetes_mutating_webhook_configuration" - kind_display: ClassVar[str] = "Kubernetes Mutating Webhook Configuration" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Mutating Webhook Configuration" + _kind_description: ClassVar[str] = ( "Kubernetes Mutating Webhook Configuration allows you to define and configure" " webhooks that modify or mutate incoming requests to the Kubernetes API" " server." @@ -1921,8 +1923,8 @@ class KubernetesMutatingWebhookConfiguration(KubernetesResource): @define(eq=False, slots=False) class KubernetesValidatingWebhookConfiguration(KubernetesResource): kind: ClassVar[str] = "kubernetes_validating_webhook_configuration" - kind_display: ClassVar[str] = "Kubernetes Validating Webhook Configuration" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Validating Webhook Configuration" + _kind_description: ClassVar[str] = ( "A Kubernetes Validating Webhook Configuration is used to intercept and" " validate requests made to the Kubernetes API server, ensuring compliance" " with user-defined policies and preventing unauthorized access." @@ -1932,11 +1934,11 @@ class KubernetesValidatingWebhookConfiguration(KubernetesResource): @define(eq=False, slots=False) class KubernetesControllerRevision(KubernetesResource): kind: ClassVar[str] = "kubernetes_controller_revision" - kind_display: ClassVar[str] = "Kubernetes Controller Revision" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Controller Revision" + _kind_description: ClassVar[str] = ( "Controller Revision in Kubernetes represents a specific revision of a controller's configuration and state." ) - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": [], "delete": ["kubernetes_stateful_set", "kubernetes_daemon_set"], @@ -2040,15 +2042,15 @@ class KubernetesDaemonSetSpec: @define(eq=False, slots=False) class KubernetesDaemonSet(KubernetesResource): kind: ClassVar[str] = "kubernetes_daemon_set" - kind_display: ClassVar[str] = "Kubernetes DaemonSet" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes DaemonSet" + _kind_description: ClassVar[str] = ( "A Kubernetes DaemonSet ensures that all (or some) nodes in a cluster run a copy of a specified pod." ) mapping: ClassVar[Dict[str, Bender]] = KubernetesResource.mapping | { "daemon_set_status": S("status") >> Bend(KubernetesDaemonSetStatus.mapping), "daemon_set_spec": S("spec") >> Bend(KubernetesDaemonSetSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_pod", "kubernetes_controller_revision"], "delete": [], @@ -2180,8 +2182,8 @@ class KubernetesDeploymentSpec: @define(eq=False, slots=False) class KubernetesDeployment(KubernetesResource): kind: ClassVar[str] = "kubernetes_deployment" - kind_display: ClassVar[str] = "Kubernetes Deployment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Deployment" + _kind_description: ClassVar[str] = ( "A Kubernetes Deployment is a resource object in Kubernetes that defines how" " an application should be deployed and managed within a cluster." ) @@ -2189,7 +2191,7 @@ class KubernetesDeployment(KubernetesResource): "deployment_status": S("status") >> Bend(KubernetesDeploymentStatus.mapping), "deployment_spec": S("spec") >> Bend(KubernetesDeploymentSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_replica_set"], "delete": [], @@ -2276,8 +2278,8 @@ class KubernetesReplicaSetSpec: @define(eq=False, slots=False) class KubernetesReplicaSet(KubernetesResource): kind: ClassVar[str] = "kubernetes_replica_set" - kind_display: ClassVar[str] = "Kubernetes Replica Set" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Replica Set" + _kind_description: ClassVar[str] = ( "A ReplicaSet is a Kubernetes object that ensures a specified number of pod" " replicas are running at any given time, and handles scaling and self-healing" " of pods." @@ -2286,7 +2288,7 @@ class KubernetesReplicaSet(KubernetesResource): "replica_set_status": S("status") >> Bend(KubernetesReplicaSetStatus.mapping), "replica_set_spec": S("spec") >> Bend(KubernetesReplicaSetSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_pod"], "delete": ["kubernetes_deployment"], @@ -2387,8 +2389,8 @@ class KubernetesStatefulSetSpec: @define(eq=False, slots=False) class KubernetesStatefulSet(KubernetesResource): kind: ClassVar[str] = "kubernetes_stateful_set" - kind_display: ClassVar[str] = "Kubernetes Stateful Set" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Stateful Set" + _kind_description: ClassVar[str] = ( "A Kubernetes Stateful Set is a higher-level resource that allows for the" " management of stateful applications in a Kubernetes cluster. It ensures" " ordered deployment, scaling, and termination of replicas while maintaining" @@ -2398,7 +2400,7 @@ class KubernetesStatefulSet(KubernetesResource): "stateful_set_status": S("status") >> Bend(KubernetesStatefulSetStatus.mapping), "stateful_set_spec": S("spec") >> Bend(KubernetesStatefulSetSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["kubernetes_pod", "kubernetes_controller_revision"], "delete": [], @@ -2473,8 +2475,8 @@ class KubernetesHorizontalPodAutoscalerSpec: @define(eq=False, slots=False) class KubernetesHorizontalPodAutoscaler(KubernetesResource): kind: ClassVar[str] = "kubernetes_horizontal_pod_autoscaler" - kind_display: ClassVar[str] = "Kubernetes Horizontal Pod Autoscaler" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Horizontal Pod Autoscaler" + _kind_description: ClassVar[str] = ( "The Kubernetes Horizontal Pod Autoscaler automatically scales the number of" " pods in a deployment up or down based on CPU usage or other specified" " metrics." @@ -2609,8 +2611,8 @@ class KubernetesCronJobSpec: @define(eq=False, slots=False) class KubernetesCronJob(KubernetesResource): kind: ClassVar[str] = "kubernetes_cron_job" - kind_display: ClassVar[str] = "Kubernetes Cron Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Cron Job" + _kind_description: ClassVar[str] = ( "Kubernetes Cron Jobs are used to schedule and run jobs, which are tasks or" " scripts, at specified intervals within a Kubernetes cluster." ) @@ -2618,7 +2620,7 @@ class KubernetesCronJob(KubernetesResource): "cron_job_status": S("status") >> Bend(KubernetesCronJobStatus.mapping), "cron_job_spec": S("spec") >> Bend(KubernetesCronJobSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["kubernetes_job"], "delete": []}} + _reference_kinds: ClassVar[ModelReference] = {"successors": {"default": ["kubernetes_job"], "delete": []}} cron_job_status: Optional[KubernetesCronJobStatus] = field(default=None, metadata=dict(ignore_history=True)) cron_job_spec: Optional[KubernetesCronJobSpec] = field(default=None) @@ -2680,8 +2682,8 @@ class KubernetesJobStatus: @define(eq=False, slots=False) class KubernetesJob(KubernetesResource): kind: ClassVar[str] = "kubernetes_job" - kind_display: ClassVar[str] = "Kubernetes Job" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Job" + _kind_description: ClassVar[str] = ( "A Kubernetes Job is a resource that creates one or more pods and ensures" " that a specified number of them successfully terminate." ) @@ -2689,7 +2691,7 @@ class KubernetesJob(KubernetesResource): "job_status": S("status") >> Bend(KubernetesJobStatus.mapping), "job_spec": S("spec") >> Bend(KubernetesJobSpec.mapping), } - reference_kinds: ClassVar[ModelReference] = { + _reference_kinds: ClassVar[ModelReference] = { "successors": {"default": ["kubernetes_pod"], "delete": ["kubernetes_cron_job"]} } @@ -2737,8 +2739,8 @@ class KubernetesFlowSchemaStatus: @define(eq=False, slots=False) class KubernetesFlowSchema(KubernetesResource): kind: ClassVar[str] = "kubernetes_flow_schema" - kind_display: ClassVar[str] = "Kubernetes Flow Schema" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Flow Schema" + _kind_description: ClassVar[str] = ( "A Kubernetes Flow Schema configures the prioritization and fairness for requests in the API server, managing" " the sequence and concurrency of request processing." ) @@ -2789,8 +2791,8 @@ class KubernetesPriorityLevelConfigurationStatus: @define(eq=False, slots=False) class KubernetesPriorityLevelConfiguration(KubernetesResource): kind: ClassVar[str] = "kubernetes_priority_level_configuration" - kind_display: ClassVar[str] = "Kubernetes Priority Level Configuration" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Priority Level Configuration" + _kind_description: ClassVar[str] = ( "The Kubernetes Priority Level Configuration represents resource configuration for establishing priority" " levels of network traffic in a cluster." ) @@ -2945,8 +2947,8 @@ def get_backend_service_names(json: Json) -> List[str]: @define(eq=False, slots=False) class KubernetesIngress(KubernetesResource, BaseLoadBalancer): kind: ClassVar[str] = "kubernetes_ingress" - kind_display: ClassVar[str] = "Kubernetes Ingress" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Ingress" + _kind_description: ClassVar[str] = ( "Kubernetes Ingress is an API object that manages external access to services within a Kubernetes cluster." ) mapping: ClassVar[Dict[str, Bender]] = KubernetesResource.mapping | { @@ -2996,8 +2998,8 @@ def connect_in_graph(self, builder: GraphBuilder, source: Json) -> None: @define(eq=False, slots=False) class KubernetesIngressClass(KubernetesResource): kind: ClassVar[str] = "kubernetes_ingress_class" - kind_display: ClassVar[str] = "Kubernetes Ingress Class" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Ingress Class" + _kind_description: ClassVar[str] = ( "Kubernetes Ingress Class is a resource that defines a class of Ingress" " controllers in a cluster, providing a way to configure external access to" " services within the cluster." @@ -3048,8 +3050,8 @@ class KubernetesNetworkPolicyStatus: @define(eq=False, slots=False) class KubernetesNetworkPolicy(KubernetesResource): kind: ClassVar[str] = "kubernetes_network_policy" - kind_display: ClassVar[str] = "Kubernetes Network Policy" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Network Policy" + _kind_description: ClassVar[str] = ( "Kubernetes Network Policy is used to define and enforce network rules and" " policies for communication between pods in a Kubernetes cluster." ) @@ -3064,8 +3066,8 @@ class KubernetesNetworkPolicy(KubernetesResource): @define(eq=False, slots=False) class KubernetesRuntimeClass(KubernetesResource): kind: ClassVar[str] = "kubernetes_runtime_class" - kind_display: ClassVar[str] = "Kubernetes Runtime Class" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Runtime Class" + _kind_description: ClassVar[str] = ( "Kubernetes Runtime Class is a resource in Kubernetes that allows you to" " specify different runtime configurations for pods, such as the container" " runtime or resource limits." @@ -3146,8 +3148,8 @@ class KubernetesPodDisruptionBudgetSpec: @define(eq=False, slots=False) class KubernetesPodDisruptionBudget(KubernetesResource): kind: ClassVar[str] = "kubernetes_pod_disruption_budget" - kind_display: ClassVar[str] = "Kubernetes Pod Disruption Budget" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Pod Disruption Budget" + _kind_description: ClassVar[str] = ( "A Kubernetes Pod Disruption Budget (PDB) is used to ensure that a specified number or percentage of" " pods within a replicated application remain available during voluntary disruptions." ) @@ -3164,8 +3166,8 @@ class KubernetesPodDisruptionBudget(KubernetesResource): @define(eq=False, slots=False) class KubernetesClusterRole(KubernetesResource): kind: ClassVar[str] = "kubernetes_cluster_role" - kind_display: ClassVar[str] = "Kubernetes Cluster Role" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Cluster Role" + _kind_description: ClassVar[str] = ( "A Kubernetes Cluster Role is a set of permissions that defines what actions" " a user or group can perform within a Kubernetes cluster." ) @@ -3174,8 +3176,8 @@ class KubernetesClusterRole(KubernetesResource): @define(eq=False, slots=False) class KubernetesClusterRoleBinding(KubernetesResource): kind: ClassVar[str] = "kubernetes_cluster_role_binding" - kind_display: ClassVar[str] = "Kubernetes Cluster Role Binding" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Cluster Role Binding" + _kind_description: ClassVar[str] = ( "Cluster Role Binding is a Kubernetes resource that grants permissions to a" " Role or ClusterRole within a specific cluster." ) @@ -3184,8 +3186,8 @@ class KubernetesClusterRoleBinding(KubernetesResource): @define(eq=False, slots=False) class KubernetesRole(KubernetesResource): kind: ClassVar[str] = "kubernetes_role" - kind_display: ClassVar[str] = "Kubernetes Role" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Role" + _kind_description: ClassVar[str] = ( "A Kubernetes role is a set of permissions that define what actions a user or" " group can perform on resources within a Kubernetes cluster." ) @@ -3194,8 +3196,8 @@ class KubernetesRole(KubernetesResource): @define(eq=False, slots=False) class KubernetesRoleBinding(KubernetesResource): kind: ClassVar[str] = "kubernetes_role_binding" - kind_display: ClassVar[str] = "Kubernetes Role Binding" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Role Binding" + _kind_description: ClassVar[str] = ( "Kubernetes Role Binding is used to bind roles with groups or users, granting" " them permission to access and manage resources within a Kubernetes cluster." ) @@ -3204,8 +3206,8 @@ class KubernetesRoleBinding(KubernetesResource): @define(eq=False, slots=False) class KubernetesPriorityClass(KubernetesResource): kind: ClassVar[str] = "kubernetes_priority_class" - kind_display: ClassVar[str] = "Kubernetes Priority Class" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Priority Class" + _kind_description: ClassVar[str] = ( "Kubernetes Priority Classes are used to assign priority to Pods in a" " Kubernetes cluster, allowing system administrators to control scheduling" " preferences and resource allocation for different workloads." @@ -3215,8 +3217,8 @@ class KubernetesPriorityClass(KubernetesResource): @define(eq=False, slots=False) class KubernetesCSIDriver(KubernetesResource): kind: ClassVar[str] = "kubernetes_csi_driver" - kind_display: ClassVar[str] = "Kubernetes CSI Driver" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes CSI Driver" + _kind_description: ClassVar[str] = ( "A Kubernetes Container Storage Interface (CSI) driver is a plugin that" " allows external storage systems to be dynamically provisioned and managed by" " Kubernetes." @@ -3226,8 +3228,8 @@ class KubernetesCSIDriver(KubernetesResource): @define(eq=False, slots=False) class KubernetesCSINode(KubernetesResource): kind: ClassVar[str] = "kubernetes_csi_node" - kind_display: ClassVar[str] = "Kubernetes CSI Node" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes CSI Node" + _kind_description: ClassVar[str] = ( "A Kubernetes CSI (Container Storage Interface) Node is a cluster node where a CSI driver is installed," " enabling it to interact with the storage backends to attach, mount, or unmount volumes as required" " by Pods on that node." @@ -3237,8 +3239,8 @@ class KubernetesCSINode(KubernetesResource): @define(eq=False, slots=False) class KubernetesCSIStorageCapacity(KubernetesResource): kind: ClassVar[str] = "kubernetes_csi_storage_capacity" - kind_display: ClassVar[str] = "Kubernetes CSI Storage Capacity" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes CSI Storage Capacity" + _kind_description: ClassVar[str] = ( "Kubernetes CSI (Container Storage Interface) Storage Capacity refers to the" " amount of storage available for use by containers in a Kubernetes cluster" " using the CSI storage driver." @@ -3248,8 +3250,8 @@ class KubernetesCSIStorageCapacity(KubernetesResource): @define(eq=False, slots=False) class KubernetesStorageClass(KubernetesResource): kind: ClassVar[str] = "kubernetes_storage_class" - kind_display: ClassVar[str] = "Kubernetes Storage Class" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Storage Class" + _kind_description: ClassVar[str] = ( "A Storage Class in Kubernetes provides a way to define different types of" " storage with different performance characteristics for application pods." ) @@ -3313,8 +3315,8 @@ class KubernetesVolumeAttachmentSpec: @define(eq=False, slots=False) class KubernetesVolumeAttachment(KubernetesResource): kind: ClassVar[str] = "kubernetes_volume_attachment" - kind_display: ClassVar[str] = "Kubernetes Volume Attachment" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "Kubernetes Volume Attachment" + _kind_description: ClassVar[str] = ( "Kubernetes Volume Attachment is a resource that allows persistent volumes to" " be attached to a pod in a Kubernetes cluster." ) diff --git a/plugins/k8s/tools/successors.py b/plugins/k8s/tools/successors.py index ca54de7bab..82d308d5c0 100644 --- a/plugins/k8s/tools/successors.py +++ b/plugins/k8s/tools/successors.py @@ -15,7 +15,7 @@ def get_successors(client: FixInventoryClient) -> None: ) if any(a for a in succesors.values()): print(name) - print("reference_kinds: ClassVar[ModelReference] = " + json.dumps({"successors": succesors})) + print("_reference_kinds: ClassVar[ModelReference] = " + json.dumps({"successors": succesors})) if __name__ == "__main__": diff --git a/plugins/onelogin/fix_plugin_onelogin/__init__.py b/plugins/onelogin/fix_plugin_onelogin/__init__.py index 0527668e98..6450fe75ee 100644 --- a/plugins/onelogin/fix_plugin_onelogin/__init__.py +++ b/plugins/onelogin/fix_plugin_onelogin/__init__.py @@ -27,22 +27,22 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class OneLoginAccount(OneLoginResource, BaseAccount): kind: ClassVar[str] = "onelogin_account" - kind_display: ClassVar[str] = "OneLogin Account" - kind_description: ClassVar[str] = "A OneLogin Account." + _kind_display: ClassVar[str] = "OneLogin Account" + _kind_description: ClassVar[str] = "A OneLogin Account." @define(eq=False, slots=False) class OneLoginRegion(OneLoginResource, BaseRegion): kind: ClassVar[str] = "onelogin_region" - kind_display: ClassVar[str] = "OneLogin Region" - kind_description: ClassVar[str] = "A OneLogin Region." + _kind_display: ClassVar[str] = "OneLogin Region" + _kind_description: ClassVar[str] = "A OneLogin Region." @define(eq=False, slots=False) class OneLoginUser(OneLoginResource, BaseUser): kind: ClassVar[str] = "onelogin_user" - kind_display: ClassVar[str] = "OneLogin User" - kind_description: ClassVar[str] = "A OneLogin User." + _kind_display: ClassVar[str] = "OneLogin User" + _kind_description: ClassVar[str] = "A OneLogin User." user_id: Optional[int] = field(default=None, metadata={"description": "User ID"}) external_id: Optional[str] = None email: Optional[str] = None diff --git a/plugins/onprem/fix_plugin_onprem/resources.py b/plugins/onprem/fix_plugin_onprem/resources.py index 0500f393a8..fc2354567d 100644 --- a/plugins/onprem/fix_plugin_onprem/resources.py +++ b/plugins/onprem/fix_plugin_onprem/resources.py @@ -12,8 +12,8 @@ @define(eq=False, slots=False) class OnpremLocation(BaseAccount): kind: ClassVar[str] = "onprem_location" - kind_display: ClassVar[str] = "Onprem Location" - kind_description: ClassVar[str] = "An Onprem Location." + _kind_display: ClassVar[str] = "Onprem Location" + _kind_description: ClassVar[str] = "An Onprem Location." def delete(self, graph: Graph) -> bool: return False @@ -22,8 +22,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class OnpremRegion(BaseRegion): kind: ClassVar[str] = "onprem_region" - kind_display: ClassVar[str] = "Onprem Region" - kind_description: ClassVar[str] = "An Onprem Region." + _kind_display: ClassVar[str] = "Onprem Region" + _kind_description: ClassVar[str] = "An Onprem Region." def delete(self, graph: Graph) -> bool: return False @@ -48,8 +48,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class OnpremInstance(OnpremResource, BaseInstance): kind: ClassVar[str] = "onprem_instance" - kind_display: ClassVar[str] = "Onprem Instance" - kind_description: ClassVar[str] = "An Onprem Instance." + _kind_display: ClassVar[str] = "Onprem Instance" + _kind_description: ClassVar[str] = "An Onprem Instance." network_device: Optional[str] = None network_ip4: Optional[str] = None network_ip6: Optional[str] = None @@ -58,5 +58,5 @@ class OnpremInstance(OnpremResource, BaseInstance): @define(eq=False, slots=False) class OnpremNetwork(OnpremResource, BaseNetwork): kind: ClassVar[str] = "onprem_network" - kind_display: ClassVar[str] = "Onprem Network" - kind_description: ClassVar[str] = "An Onprem Network." + _kind_display: ClassVar[str] = "Onprem Network" + _kind_description: ClassVar[str] = "An Onprem Network." diff --git a/plugins/posthog/fix_plugin_posthog/resources.py b/plugins/posthog/fix_plugin_posthog/resources.py index 2a1884ce96..202d101a6a 100644 --- a/plugins/posthog/fix_plugin_posthog/resources.py +++ b/plugins/posthog/fix_plugin_posthog/resources.py @@ -24,8 +24,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class PosthogProject(PosthogResource, BaseAccount): kind: ClassVar[str] = "posthog_project" - kind_display: ClassVar[str] = "Posthog Project" - kind_description: ClassVar[str] = "A Posthog Project." + _kind_display: ClassVar[str] = "Posthog Project" + _kind_description: ClassVar[str] = "A Posthog Project." project_id: int app_urls: Optional[List[str]] = (None,) @@ -75,8 +75,8 @@ def new(data: Dict) -> "PosthogProject": @define(eq=False, slots=False) class PosthogEvent(PosthogResource, BaseResource): kind: ClassVar[str] = "posthog_event" - kind_display: ClassVar[str] = "Posthog Event" - kind_description: ClassVar[str] = "A Posthog Event." + _kind_display: ClassVar[str] = "Posthog Event" + _kind_description: ClassVar[str] = "A Posthog Event." project_id: int count: int = 0 diff --git a/plugins/scarf/fix_plugin_scarf/resources.py b/plugins/scarf/fix_plugin_scarf/resources.py index 4e6a0b206f..11496d29c4 100644 --- a/plugins/scarf/fix_plugin_scarf/resources.py +++ b/plugins/scarf/fix_plugin_scarf/resources.py @@ -27,8 +27,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class ScarfOrganization(ScarfResource, BaseAccount): kind: ClassVar[str] = "scarf_organization" - kind_display: ClassVar[str] = "Scarf Organization" - kind_description: ClassVar[str] = "A Scarf Organization." + _kind_display: ClassVar[str] = "Scarf Organization" + _kind_description: ClassVar[str] = "A Scarf Organization." description: Optional[str] = None billing_email: Optional[str] = None website: Optional[str] = None @@ -48,8 +48,8 @@ def new(data: Dict) -> BaseResource: @define(eq=False, slots=False) class ScarfPackage(ScarfResource, BaseResource): kind: ClassVar[str] = "scarf_package" - kind_display: ClassVar[str] = "Scarf Package" - kind_description: ClassVar[str] = "A Scarf Package." + _kind_display: ClassVar[str] = "Scarf Package" + _kind_description: ClassVar[str] = "A Scarf Package." short_description: Optional[str] = None long_description: Optional[str] = None diff --git a/plugins/slack/fix_plugin_slack/resources.py b/plugins/slack/fix_plugin_slack/resources.py index 4a54ecc0af..0f734fd9af 100644 --- a/plugins/slack/fix_plugin_slack/resources.py +++ b/plugins/slack/fix_plugin_slack/resources.py @@ -25,9 +25,9 @@ def delete(self, graph) -> bool: @define(eq=False, slots=False) class SlackTeam(SlackResource, BaseAccount): kind: ClassVar[str] = "slack_team" - kind_display: ClassVar[str] = "Slack Team" - kind_description: ClassVar[str] = "A Slack Team." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Slack Team" + _kind_description: ClassVar[str] = "A Slack Team." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["slack_region"], "delete": [], @@ -52,9 +52,9 @@ def new(team: Dict) -> BaseAccount: @define(eq=False, slots=False) class SlackRegion(SlackResource, BaseRegion): kind = "slack_region" - kind_display: ClassVar[str] = "Slack Region" - kind_description: ClassVar[str] = "A Slack Region." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Slack Region" + _kind_description: ClassVar[str] = "A Slack Region." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["slack_usergroup", "slack_user", "slack_conversation"], "delete": [], @@ -65,8 +65,8 @@ class SlackRegion(SlackResource, BaseRegion): @define(eq=False, slots=False) class SlackUser(SlackResource, BaseUser): kind: ClassVar[str] = "slack_user" - kind_display: ClassVar[str] = "Slack User" - kind_description: ClassVar[str] = "A Slack User." + _kind_display: ClassVar[str] = "Slack User" + _kind_description: ClassVar[str] = "A Slack User." real_name: Optional[str] = None team_id: Optional[str] = None @@ -154,9 +154,9 @@ def new(member: Dict) -> BaseUser: @define(eq=False, slots=False) class SlackUsergroup(SlackResource, BaseGroup): kind: ClassVar[str] = "slack_usergroup" - kind_display: ClassVar[str] = "Slack Usergroup" - kind_description: ClassVar[str] = "A Slack Usergroup." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Slack Usergroup" + _kind_description: ClassVar[str] = "A Slack Usergroup." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["slack_user"], "delete": [], @@ -208,9 +208,9 @@ def new(usergroup: Dict) -> BaseGroup: @define(eq=False, slots=False) class SlackConversation(SlackResource, BaseResource): kind: ClassVar[str] = "slack_conversation" - kind_display: ClassVar[str] = "Slack Conversation" - kind_description: ClassVar[str] = "A Slack Conversation." - reference_kinds: ClassVar[ModelReference] = { + _kind_display: ClassVar[str] = "Slack Conversation" + _kind_description: ClassVar[str] = "A Slack Conversation." + _reference_kinds: ClassVar[ModelReference] = { "successors": { "default": ["slack_user"], "delete": [], diff --git a/plugins/vsphere/fix_plugin_vsphere/resources.py b/plugins/vsphere/fix_plugin_vsphere/resources.py index 7738097c3c..98876da1b0 100644 --- a/plugins/vsphere/fix_plugin_vsphere/resources.py +++ b/plugins/vsphere/fix_plugin_vsphere/resources.py @@ -18,8 +18,8 @@ @define(eq=False, slots=False) class VSphereHost(BaseAccount): kind: ClassVar[str] = "vsphere_host" - kind_display: ClassVar[str] = "vSphere Host" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Host" + _kind_description: ClassVar[str] = ( "vSphere Host is a physical server that runs the VMware vSphere hypervisor," " allowing for virtualization and management of multiple virtual machines." ) @@ -31,8 +31,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereDataCenter(BaseRegion): kind: ClassVar[str] = "vsphere_data_center" - kind_display: ClassVar[str] = "vSphere Data Center" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Data Center" + _kind_description: ClassVar[str] = ( "vSphere Data Center is a virtualization platform provided by VMware for" " managing and organizing virtual resources in a data center environment." ) @@ -44,8 +44,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereCluster(BaseZone): kind: ClassVar[str] = "vsphere_cluster" - kind_display: ClassVar[str] = "vSphere Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Cluster" + _kind_description: ClassVar[str] = ( "A vSphere Cluster is a group of ESXi hosts that work together to provide" " resource pooling and high availability for virtual machines." ) @@ -57,8 +57,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereESXiHost(BaseResource): kind: ClassVar[str] = "vsphere_esxi_host" - kind_display: ClassVar[str] = "vSphere ESXi Host" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere ESXi Host" + _kind_description: ClassVar[str] = ( "vSphere ESXi Host is a virtualization platform by VMware which allows users" " to run multiple virtual machines on a single physical server." ) @@ -70,8 +70,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereDataStore(BaseResource): kind: ClassVar[str] = "vsphere_datastore" - kind_display: ClassVar[str] = "vSphere Datastore" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Datastore" + _kind_description: ClassVar[str] = ( "vSphere Datastore is a storage abstraction layer used in VMware vSphere to" " manage and store virtual machine files and templates." ) @@ -83,8 +83,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereDataStoreCluster(BaseResource): kind: ClassVar[str] = "vsphere_datastore_cluster" - kind_display: ClassVar[str] = "vSphere Datastore Cluster" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Datastore Cluster" + _kind_description: ClassVar[str] = ( "vSphere Datastore Cluster is a feature in VMware's virtualization platform" " that allows users to combine multiple storage resources into a single" " datastore cluster, providing advanced management and high availability for" @@ -98,8 +98,8 @@ def delete(self, graph: Graph) -> bool: @define(eq=False, slots=False) class VSphereResourcePool(BaseResource): kind: ClassVar[str] = "vsphere_resource_pool" - kind_display: ClassVar[str] = "vSphere Resource Pool" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Resource Pool" + _kind_description: ClassVar[str] = ( "vSphere Resource Pool is a feature in VMware's vSphere virtualization" " platform that allows for the efficient allocation and management of CPU," " memory, and storage resources in a virtual datacenter." @@ -126,8 +126,8 @@ def _vsphere_client(self) -> VSphereClient: @define(eq=False, slots=False) class VSphereInstance(BaseInstance, VSphereResource): kind: ClassVar[str] = "vsphere_instance" - kind_display: ClassVar[str] = "vSphere Instance" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Instance" + _kind_description: ClassVar[str] = ( "vSphere Instances are virtual servers in VMware's cloud infrastructure," " enabling users to run applications on VMware's virtualization platform." ) @@ -166,8 +166,8 @@ def delete_tag(self, key) -> bool: @define(eq=False, slots=False) class VSphereTemplate(BaseResource, VSphereResource): kind: ClassVar[str] = "vsphere_template" - kind_display: ClassVar[str] = "vSphere Template" - kind_description: ClassVar[str] = ( + _kind_display: ClassVar[str] = "vSphere Template" + _kind_description: ClassVar[str] = ( "vSphere templates are pre-configured virtual machine images that can be used" " to deploy and scale virtual infrastructure within the VMware vSphere" " platform."