Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[plugins][chore] Remove provider links #2206

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion fixlib/fixlib/baseresources.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ class BaseResource(ABC):
_protected: bool = False
_deferred_connections: List[Dict[str, Any]] = field(factory=list)
_resource_usage: Dict[MetricNameWithUnit, Dict[str, float]] = field(factory=lambda: defaultdict(dict))
_metadata: Dict[str, Any] = field(factory=dict) # values will be exported in the metadata section of the node
_categories: ClassVar[List[Category]] = []

ctime: Optional[datetime] = field(
Expand Down
1 change: 0 additions & 1 deletion fixlib/fixlib/core/model_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ def node_to_dict(node: BaseResource, changes_only: bool = False, include_revisio
"phantom": node.phantom,
"protected": node.protected,
"categories": node.categories(),
**node._metadata,
},
"usage": node._resource_usage,
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/fix_plugin_aws/resource/acm.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class AwsAcmExtendedKeyUsage:
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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")
Expand Down
2 changes: 0 additions & 2 deletions plugins/aws/fix_plugin_aws/resource/amazonq.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class AwsQBusinessApplication(AmazonQTaggable, AwsResource):
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] = {
Expand Down Expand Up @@ -356,7 +355,6 @@ class AwsQBusinessDataSource(AmazonQTaggable, AwsResource):
metadata: ClassVar[Dict[str, Any]] = {"icon": "bucket", "group": "ai"}
# Collected via AwsQBusinessApplication()
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"],
}
Expand Down
12 changes: 6 additions & 6 deletions plugins/aws/fix_plugin_aws/resource/apigateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class AwsApiGatewayResource(AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -255,7 +255,7 @@ class AwsApiGatewayAuthorizer(AwsResource):
" 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}&region={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:authorizer/{name}/{id}"} # fmt: skip
aws_metadata: ClassVar[Dict[str, Any]] = {"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] = {
Expand Down Expand Up @@ -350,7 +350,7 @@ class AwsApiGatewayStage(ApiGatewayTaggable, AwsResource):
)
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}&region={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:/restapis/{id}/stages/{name}"} # fmt: skip
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -414,7 +414,7 @@ class AwsApiGatewayDeployment(AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"]}}

Expand Down Expand Up @@ -476,7 +476,7 @@ class AwsApiGatewayRestApi(ApiGatewayTaggable, AwsResource):
)
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&region={region}", "arn_tpl": "arn:{partition}:apigateway:{region}:{account}:restapi/{id}"} # fmt: skip
aws_metadata: ClassVar[Dict[str, Any]] = {"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"
)
Expand Down Expand Up @@ -634,7 +634,7 @@ class AwsApiGatewayDomainName(ApiGatewayTaggable, AwsResource):
)
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}&&region={region}", "arn_tpl": "arn:aws:apigateway:{region}:{account}:domainname/{name}"} # fmt: skip
aws_metadata: ClassVar[Dict[str, Any]] = {"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"
)
Expand Down
4 changes: 2 additions & 2 deletions plugins/aws/fix_plugin_aws/resource/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class AwsAthenaWorkGroup(AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -216,7 +216,7 @@ class AwsAthenaDataCatalog(AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down
2 changes: 1 addition & 1 deletion plugins/aws/fix_plugin_aws/resource/autoscaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class AwsAutoScalingWarmPoolConfiguration:
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"
Expand Down
17 changes: 6 additions & 11 deletions plugins/aws/fix_plugin_aws/resource/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class AwsBackupJob(AwsResource):
)
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"]},
Expand Down Expand Up @@ -159,7 +158,6 @@ class AwsBackupProtectedResource(AwsResource):
)
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": {
Expand Down Expand Up @@ -237,7 +235,7 @@ class AwsBackupPlan(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -319,7 +317,7 @@ class AwsBackupVault(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -452,7 +450,6 @@ class AwsBackupRecoveryPoint(AwsResource):
)
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"]},
}
Expand Down Expand Up @@ -605,7 +602,7 @@ class AwsBackupReportPlan(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:backup:{region}:{account}:report-plan:{name}"} # fmt: skip
reference_kinds: ClassVar[ModelReference] = {
"predecessors": {"default": ["aws_backup_framework"]},
}
Expand Down Expand Up @@ -695,7 +692,7 @@ class AwsBackupRestoreTestingPlan(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -775,7 +772,7 @@ class AwsBackupLegalHold(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"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"),
Expand Down Expand Up @@ -842,7 +839,6 @@ class AwsBackupRestoreJob(AwsResource):
)
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"]},
}
Expand Down Expand Up @@ -908,7 +904,6 @@ class AwsBackupCopyJob(AwsResource):
)
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"]},
Expand Down Expand Up @@ -983,7 +978,7 @@ class AwsBackupFramework(BackupResourceTaggable, AwsResource):
)
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
aws_metadata: ClassVar[Dict[str, Any]] = {"arn_tpl": "arn:{partition}:backup:{region}:{account}:framework:{name}"} # fmt: skip
api_spec: ClassVar[AwsApiSpec] = AwsApiSpec(
"backup", "list-frameworks", "Frameworks", expected_errors=["AccessDeniedException"]
)
Expand Down
Loading
Loading