What is cloudconsolelink?
This project for generate console links for AWS, GCP, Azure and OCI cloud resources, and web links for GitHub, GitLab, Bitbucket and Azure DevOps entities
Install
Run pip install cloudconsolelink to install our code
For local development, install the package with dev extras:
pip install -e '.[dev]'
Verification shortcuts:
make test
make coverage
make test-arn
make test-aws-links
make check
Usage
Import Package
For AWS
from cloudconsolelink.clouds.aws import AWSLinker
For Azure
from cloudconsolelink.clouds.azure import AzureLinker
For GCP
from cloudconsolelink.clouds.gcp import GCPLinker
For OCI
from cloudconsolelink.clouds.oci import OCILinker
For GitHub, GitLab, Bitbucket, Azure DevOps
from cloudconsolelink.clouds.git import GitLinker
For container images (ECR, GAR/GCR, ACR, Docker Hub, OCIR)
from cloudconsolelink.clouds.registry import image_console_link
To get console link
call method get_console_link()
The Followings Are The Some Example
AWS:
from cloudconsolelink.clouds.aws import AWSLinker
aws = AWSLinker()
arn = "arn:aws:ec2:us-east1:1234567890:instance/instance1"
console_link = aws.get_console_link(arn=arn)
Azure Management:
from cloudconsolelink.clouds.azure import AzureLinker
azure = AzureLinker()
id = "/subscriptions/5592e8dc/resourceGroups/testgroup"
primary_ad_domain_name = "QA123.onmicrosoft.com"
console_link = azure.get_console_link(id=id, primary_ad_domain_name=primary_ad_domain_name)
Azure IAM:
from cloudconsolelink.clouds.azure import AzureLinker
azure = AzureLinker()
id = "1234567890"
iam_entity_type = "user"
console_link = azure.get_console_link(id=id, iam_entity_type=iam_entity_type)
GCP:
from cloudconsolelink.clouds.gcp import GCPLinker
gcp = GCPLinker()
bucket_name = "xyz"
resource_name = "storage_bucket"
console_link = gcp.get_console_link(bucket_name=bucket_name, resource_name=resource_name)
Container image (ECR, GAR/GCR, ACR, Docker Hub, OCIR):
from cloudconsolelink.clouds.registry import image_console_link
# Provider is detected from the registry hostname of the image reference.
console_link = image_console_link(
"602401143452.dkr.ecr.us-east-2.amazonaws.com/amazon-k8s-cni-init"
)
# Azure Container Registry needs subscription/resource-group hints for a deep
# link (they are not present in the image reference); without them it degrades
# to a registry browse link.
console_link = image_console_link(
"myregistry.azurecr.io/app",
subscription_id="5592e8dc-...",
resource_group="my-rg",
)
Git providers:
from cloudconsolelink.clouds.git import GitLinker
git = GitLinker()
git.get_console_link("github", "branch", owner="acme", repo="api", branch="main")
# https://github.com/acme/api/tree/main
# Self-hosted GitHub Enterprise / GitLab: pass base_url
git.get_console_link("gitlab", "project", base_url="https://gitlab.acme.com", project_path="platform/api")
# https://gitlab.acme.com/platform/api
Resource names per provider are the keys of LINKS in cloudconsolelink/clouds/git/__init__.py.
get_console_link() parameters description:
AWS:
- arn: arn of resource
Azure:
IAM:
- iam_entity_type: type of iam resource(user, group, application)
- id: object id
Management:
- id: id of entity
- primary_ad_domain_name: name of the active derectory primary domain
GCP:
- resource_name: name of resource(storage_bucket, compute_instance, compute_instance_vpc_network, compute_instance_vpc_network_subnet, compute_instance_disk, compute_firewall_rule, compute_forwarding_rule, api, api_config, api_gateway, big_table_instance, big_table_cluster, big_table, big_table_backup, cloud_function, kms_key_ring, kms_key, dns_zone, dns_resource_record_set, gke_cluster, sql_instance, sql_user, service_account, service_account_key, iam_role, iam_group, iam_user, firestore_collection, cloud_run_revision, cloud_run_service)
- project_id
- region
- zone
- bucket_name
- instance_name
- network_name
- subnet_name
- rule_name
- api_name
- managed_service_name
- api_config_name
- api_configuration_id
- api_gateway_name
- bigtable_instance_name
- bigtable_cluster_id
- bigtable_table_id
- cloud_function_name
- kms_key_ring_name
- kms_key_name
- dns_zone_name
- dns_rrset_name
- dns_type
- gke_cluster_name
- sql_instance_name
- service_account_unique_id
- role_id
- group_unique_id
- firestore_collection_name
- cloud_run_service_name
The full, current list of GCP resource names is the resources dict in cloudconsolelink/clouds/gcp/__init__.py.
Who uses cloudconsolelink?
- Cloudanix
- {Your company here} :-)
If your organization uses Cloudconsolelink, please file a PR and update this list.
Metadata
Release files for cloudconsolelink 4.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cloudconsolelink-4.3.0.tar.gz | 61.9 kB | Details |
Release files / cloudconsolelink-4.3.0.tar.gz
| Download URL | cloudconsolelink-4.3.0.tar.gz |
|---|---|
| Size | 61.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
853828d95bb5ae415169453d4d182f627b44e77db36b157f3488a61f6b9627db
|
|
BLAKE2b-256 checksum How to use checksums |
693d284ebec8ac4a0e5c991278b1a236a2d33c0b5730a7c314b9c10cb293f91f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.8
|