arnmatch 2026.1.0__py3-none-any.whl → 2026.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arnmatch/__init__.py +14 -2
- arnmatch/arn_patterns.py +366 -5
- {arnmatch-2026.1.0.dist-info → arnmatch-2026.1.2.dist-info}/METADATA +12 -9
- arnmatch-2026.1.2.dist-info/RECORD +6 -0
- arnmatch-2026.1.0.dist-info/RECORD +0 -6
- {arnmatch-2026.1.0.dist-info → arnmatch-2026.1.2.dist-info}/WHEEL +0 -0
- {arnmatch-2026.1.0.dist-info → arnmatch-2026.1.2.dist-info}/entry_points.txt +0 -0
arnmatch/__init__.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""ARN pattern matching using regex patterns."""
|
|
2
2
|
|
|
3
|
-
__version__ = "2026.01.
|
|
3
|
+
__version__ = "2026.01.2"
|
|
4
4
|
|
|
5
5
|
import sys
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from functools import cached_property
|
|
8
8
|
|
|
9
|
-
from .arn_patterns import ARN_PATTERNS
|
|
9
|
+
from .arn_patterns import ARN_PATTERNS, AWS_SDK_SERVICES
|
|
10
10
|
|
|
11
11
|
# Standard groups that are not resource-specific
|
|
12
12
|
STANDARD_GROUPS = {"Partition", "Region", "Account"}
|
|
@@ -77,6 +77,17 @@ class ARN:
|
|
|
77
77
|
# Fall back to resource_id
|
|
78
78
|
return self.resource_id
|
|
79
79
|
|
|
80
|
+
@cached_property
|
|
81
|
+
def aws_sdk_services(self):
|
|
82
|
+
"""Get AWS SDK (boto3) client names for this resource's service.
|
|
83
|
+
|
|
84
|
+
Returns list of client names that can interact with this resource type.
|
|
85
|
+
May return multiple clients for services with versioned APIs
|
|
86
|
+
(e.g., ['elb', 'elbv2'] for elasticloadbalancing).
|
|
87
|
+
Returns empty list if no SDK client exists.
|
|
88
|
+
"""
|
|
89
|
+
return AWS_SDK_SERVICES.get(self.aws_service, [])
|
|
90
|
+
|
|
80
91
|
|
|
81
92
|
def arnmatch(arn: str) -> ARN:
|
|
82
93
|
"""Match ARN against patterns.
|
|
@@ -121,6 +132,7 @@ def main() -> None:
|
|
|
121
132
|
try:
|
|
122
133
|
result = arnmatch(arn)
|
|
123
134
|
print(f"aws_service: {result.aws_service}")
|
|
135
|
+
print(f"aws_sdk_services: {','.join(result.aws_sdk_services)}")
|
|
124
136
|
print(f"aws_region: {result.aws_region}")
|
|
125
137
|
print(f"aws_account: {result.aws_account}")
|
|
126
138
|
print(f"resource_type: {result.resource_type}")
|
arnmatch/arn_patterns.py
CHANGED
|
@@ -2414,15 +2414,17 @@ ARN_PATTERNS = {
|
|
|
2414
2414
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):security-ir:(?P<Region>[\w-]*):(?P<Account>\d{12}):membership/(?P<MembershipId>.+?)$"), ['membership']),
|
|
2415
2415
|
],
|
|
2416
2416
|
'securityagent': [
|
|
2417
|
-
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-
|
|
2418
|
-
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-
|
|
2419
|
-
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-
|
|
2420
|
-
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-
|
|
2421
|
-
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-
|
|
2417
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)/artifact/(?P<ArtifactId>.+?)$"), ['Artifact']),
|
|
2418
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)/finding/(?P<FindingId>.+?)$"), ['Finding']),
|
|
2419
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)/pentest/(?P<PentestId>.+?)$"), ['Pentest']),
|
|
2420
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)/pentest-job/(?P<JobId>.+?)$"), ['PentestJob']),
|
|
2421
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)/pentest-task/(?P<TaskId>.+?)$"), ['PentestTask']),
|
|
2422
2422
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-instance/(?P<AgentId>.+?)$"), ['AgentInstance']),
|
|
2423
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):agent-space/(?P<AgentId>.+?)$"), ['AgentSpace']),
|
|
2423
2424
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):application/(?P<ApplicationId>.+?)$"), ['Application']),
|
|
2424
2425
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):control/(?P<ControlId>.+?)$"), ['Control']),
|
|
2425
2426
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):integration/(?P<IntegrationId>.+?)$"), ['Integration']),
|
|
2427
|
+
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityagent:(?P<Region>[\w-]*):(?P<Account>\d{12}):security-requirement/(?P<SecurityRequirementId>.+?)$"), ['SecurityRequirement']),
|
|
2426
2428
|
],
|
|
2427
2429
|
'securityhub': [
|
|
2428
2430
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):securityhub:(?P<Region>[\w-]*):(?P<Account>\d{12}):product/(?P<Company>.+?)/(?P<ProductId>.+?)$"), ['product']),
|
|
@@ -2794,3 +2796,362 @@ ARN_PATTERNS = {
|
|
|
2794
2796
|
(re.compile(r"^arn:(?P<Partition>[\w-]+):xray:(?P<Region>[\w-]*):(?P<Account>\d{12}):sampling-rule/(?P<SamplingRuleName>.+?)$"), ['sampling-rule']),
|
|
2795
2797
|
],
|
|
2796
2798
|
}
|
|
2799
|
+
|
|
2800
|
+
# Auto-generated mapping: ARN service -> AWS SDK client names
|
|
2801
|
+
AWS_SDK_SERVICES = {
|
|
2802
|
+
'a4b': [],
|
|
2803
|
+
'access-analyzer': ['accessanalyzer'],
|
|
2804
|
+
'account': ['account'],
|
|
2805
|
+
'acm': ['acm'],
|
|
2806
|
+
'acm-pca': ['acm-pca'],
|
|
2807
|
+
'aidevops': ['aiops'],
|
|
2808
|
+
'aiops': ['aiops'],
|
|
2809
|
+
'airflow': ['mwaa'],
|
|
2810
|
+
'airflow-serverless': ['mwaa-serverless'],
|
|
2811
|
+
'amplify': ['amplify'],
|
|
2812
|
+
'amplifybackend': ['amplifybackend'],
|
|
2813
|
+
'amplifyuibuilder': ['amplifyuibuilder'],
|
|
2814
|
+
'aoss': ['opensearchserverless'],
|
|
2815
|
+
'apigateway': ['apigateway', 'apigatewayv2'],
|
|
2816
|
+
'app-integrations': ['appintegrations'],
|
|
2817
|
+
'appconfig': ['appconfig', 'appconfigdata'],
|
|
2818
|
+
'appfabric': ['appfabric'],
|
|
2819
|
+
'appflow': ['appflow'],
|
|
2820
|
+
'application-autoscaling': ['application-autoscaling'],
|
|
2821
|
+
'application-signals': ['application-signals'],
|
|
2822
|
+
'appmesh': ['appmesh'],
|
|
2823
|
+
'appmesh-preview': ['appmesh'],
|
|
2824
|
+
'apprunner': ['apprunner'],
|
|
2825
|
+
'appstream': ['appstream'],
|
|
2826
|
+
'appstudio': [],
|
|
2827
|
+
'appsync': ['appsync'],
|
|
2828
|
+
'apptest': [],
|
|
2829
|
+
'aps': ['amp'],
|
|
2830
|
+
'arc-region-switch': ['arc-region-switch'],
|
|
2831
|
+
'artifact': ['artifact'],
|
|
2832
|
+
'athena': ['athena'],
|
|
2833
|
+
'auditmanager': ['auditmanager'],
|
|
2834
|
+
'autoscaling': ['autoscaling'],
|
|
2835
|
+
'aws-marketplace': ['marketplace-agreement', 'marketplace-catalog', 'marketplace-deployment', 'marketplace-entitlement', 'marketplace-reporting', 'meteringmarketplace'],
|
|
2836
|
+
'b2bi': ['b2bi'],
|
|
2837
|
+
'backup': ['backup'],
|
|
2838
|
+
'backup-gateway': ['backup-gateway'],
|
|
2839
|
+
'backup-search': ['backupsearch'],
|
|
2840
|
+
'batch': ['batch'],
|
|
2841
|
+
'bcm-data-exports': ['bcm-data-exports'],
|
|
2842
|
+
'bcm-pricing-calculator': ['bcm-pricing-calculator'],
|
|
2843
|
+
'bedrock': ['bedrock', 'bedrock-agent', 'bedrock-agent-runtime', 'bedrock-data-automation', 'bedrock-data-automation-runtime', 'bedrock-runtime'],
|
|
2844
|
+
'bedrock-agentcore': ['bedrock-agentcore', 'bedrock-agentcore-control'],
|
|
2845
|
+
'bedrock-mantle': [],
|
|
2846
|
+
'billing': ['billing'],
|
|
2847
|
+
'billingconductor': ['billingconductor'],
|
|
2848
|
+
'braket': ['braket'],
|
|
2849
|
+
'budgets': ['budgets'],
|
|
2850
|
+
'bugbust': [],
|
|
2851
|
+
'cases': ['connectcases'],
|
|
2852
|
+
'cassandra': ['keyspaces', 'keyspacesstreams'],
|
|
2853
|
+
'catalog': ['servicecatalog'],
|
|
2854
|
+
'ce': ['ce'],
|
|
2855
|
+
'chatbot': ['chatbot'],
|
|
2856
|
+
'chime': ['chime', 'chime-sdk-identity', 'chime-sdk-media-pipelines', 'chime-sdk-meetings', 'chime-sdk-messaging', 'chime-sdk-voice'],
|
|
2857
|
+
'cleanrooms': ['cleanrooms'],
|
|
2858
|
+
'cleanrooms-ml': ['cleanroomsml'],
|
|
2859
|
+
'cloud9': ['cloud9'],
|
|
2860
|
+
'clouddirectory': ['clouddirectory'],
|
|
2861
|
+
'cloudformation': ['cloudformation'],
|
|
2862
|
+
'cloudfront': ['cloudfront'],
|
|
2863
|
+
'cloudhsm': ['cloudhsm', 'cloudhsmv2'],
|
|
2864
|
+
'cloudsearch': ['cloudsearch', 'cloudsearchdomain'],
|
|
2865
|
+
'cloudshell': [],
|
|
2866
|
+
'cloudtrail': ['cloudtrail'],
|
|
2867
|
+
'cloudwatch': ['cloudwatch'],
|
|
2868
|
+
'codeartifact': ['codeartifact'],
|
|
2869
|
+
'codebuild': ['codebuild'],
|
|
2870
|
+
'codecatalyst': ['codecatalyst'],
|
|
2871
|
+
'codecommit': ['codecommit'],
|
|
2872
|
+
'codeconnections': ['codeconnections'],
|
|
2873
|
+
'codedeploy': ['codedeploy'],
|
|
2874
|
+
'codeguru-profiler': ['codeguruprofiler'],
|
|
2875
|
+
'codeguru-reviewer': ['codeguru-reviewer'],
|
|
2876
|
+
'codeguru-security': ['codeguru-security'],
|
|
2877
|
+
'codepipeline': ['codepipeline'],
|
|
2878
|
+
'codestar': [],
|
|
2879
|
+
'codestar-connections': ['codestar-connections'],
|
|
2880
|
+
'codestar-notifications': ['codestar-notifications'],
|
|
2881
|
+
'codewhisperer': [],
|
|
2882
|
+
'cognito-identity': ['cognito-identity'],
|
|
2883
|
+
'cognito-idp': ['cognito-idp'],
|
|
2884
|
+
'cognito-sync': ['cognito-sync'],
|
|
2885
|
+
'comprehend': ['comprehend'],
|
|
2886
|
+
'compute-optimizer': ['compute-optimizer'],
|
|
2887
|
+
'config': ['config'],
|
|
2888
|
+
'connect': ['connect', 'connect-contact-lens'],
|
|
2889
|
+
'connect-campaigns': ['connectcampaigns', 'connectcampaignsv2'],
|
|
2890
|
+
'consoleapp': [],
|
|
2891
|
+
'controlcatalog': ['controlcatalog'],
|
|
2892
|
+
'controltower': ['controltower'],
|
|
2893
|
+
'cur': ['cur'],
|
|
2894
|
+
'databrew': ['databrew'],
|
|
2895
|
+
'dataexchange': ['dataexchange'],
|
|
2896
|
+
'datapipeline': ['datapipeline'],
|
|
2897
|
+
'datasync': ['datasync'],
|
|
2898
|
+
'datazone': ['datazone'],
|
|
2899
|
+
'dax': ['dax'],
|
|
2900
|
+
'deadline': ['deadline'],
|
|
2901
|
+
'detective': ['detective'],
|
|
2902
|
+
'devicefarm': ['devicefarm'],
|
|
2903
|
+
'directconnect': ['directconnect'],
|
|
2904
|
+
'dlm': ['dlm'],
|
|
2905
|
+
'dms': ['dms'],
|
|
2906
|
+
'docdb-elastic': ['docdb-elastic'],
|
|
2907
|
+
'drs': ['drs'],
|
|
2908
|
+
'ds': ['ds'],
|
|
2909
|
+
'dsql': ['dsql'],
|
|
2910
|
+
'dynamodb': ['dynamodb', 'dynamodbstreams'],
|
|
2911
|
+
'ec2': ['ec2'],
|
|
2912
|
+
'ecr': ['ecr'],
|
|
2913
|
+
'ecr-public': ['ecr-public'],
|
|
2914
|
+
'ecs': ['ecs'],
|
|
2915
|
+
'eks': ['eks'],
|
|
2916
|
+
'elastic-inference': [],
|
|
2917
|
+
'elasticache': ['elasticache'],
|
|
2918
|
+
'elasticbeanstalk': ['elasticbeanstalk'],
|
|
2919
|
+
'elasticfilesystem': ['efs'],
|
|
2920
|
+
'elasticloadbalancing': ['elb', 'elbv2'],
|
|
2921
|
+
'elasticmapreduce': ['emr'],
|
|
2922
|
+
'elastictranscoder': [],
|
|
2923
|
+
'elemental-appliances-software': [],
|
|
2924
|
+
'elemental-support-cases': [],
|
|
2925
|
+
'emr-containers': ['emr-containers'],
|
|
2926
|
+
'emr-serverless': ['emr-serverless'],
|
|
2927
|
+
'entityresolution': ['entityresolution'],
|
|
2928
|
+
'es': ['es', 'opensearch'],
|
|
2929
|
+
'events': ['events'],
|
|
2930
|
+
'evidently': ['evidently'],
|
|
2931
|
+
'evs': ['evs'],
|
|
2932
|
+
'execute-api': ['apigatewaymanagementapi', 'connectparticipant'],
|
|
2933
|
+
'finspace': ['finspace'],
|
|
2934
|
+
'finspace-api': ['finspace-data'],
|
|
2935
|
+
'firehose': ['firehose'],
|
|
2936
|
+
'fis': ['fis'],
|
|
2937
|
+
'fms': ['fms'],
|
|
2938
|
+
'forecast': ['forecast', 'forecastquery'],
|
|
2939
|
+
'frauddetector': ['frauddetector'],
|
|
2940
|
+
'freertos': [],
|
|
2941
|
+
'fsx': ['fsx'],
|
|
2942
|
+
'gamelift': ['gamelift'],
|
|
2943
|
+
'gameliftstreams': ['gameliftstreams'],
|
|
2944
|
+
'geo': ['location'],
|
|
2945
|
+
'geo-maps': ['geo-maps'],
|
|
2946
|
+
'geo-places': ['geo-places'],
|
|
2947
|
+
'geo-routes': ['geo-routes'],
|
|
2948
|
+
'glacier': ['glacier'],
|
|
2949
|
+
'globalaccelerator': ['globalaccelerator'],
|
|
2950
|
+
'glue': ['glue'],
|
|
2951
|
+
'grafana': ['grafana'],
|
|
2952
|
+
'greengrass': ['greengrass', 'greengrassv2'],
|
|
2953
|
+
'groundstation': ['groundstation'],
|
|
2954
|
+
'guardduty': ['guardduty'],
|
|
2955
|
+
'health': ['health'],
|
|
2956
|
+
'healthlake': ['healthlake'],
|
|
2957
|
+
'honeycode': [],
|
|
2958
|
+
'iam': ['iam'],
|
|
2959
|
+
'identity-sync': [],
|
|
2960
|
+
'identitystore': ['identitystore'],
|
|
2961
|
+
'imagebuilder': ['imagebuilder'],
|
|
2962
|
+
'inspector': ['inspector'],
|
|
2963
|
+
'inspector2': ['inspector2'],
|
|
2964
|
+
'internetmonitor': ['internetmonitor'],
|
|
2965
|
+
'invoicing': ['invoicing'],
|
|
2966
|
+
'iot': ['iot'],
|
|
2967
|
+
'iotanalytics': ['iotanalytics'],
|
|
2968
|
+
'iotdeviceadvisor': ['iotdeviceadvisor'],
|
|
2969
|
+
'iotevents': ['iotevents'],
|
|
2970
|
+
'iotfleethub': [],
|
|
2971
|
+
'iotfleetwise': ['iotfleetwise'],
|
|
2972
|
+
'iotmanagedintegrations': ['iot-managed-integrations'],
|
|
2973
|
+
'iotsitewise': ['iotsitewise'],
|
|
2974
|
+
'iottwinmaker': ['iottwinmaker'],
|
|
2975
|
+
'iotwireless': ['iotwireless'],
|
|
2976
|
+
'iq': [],
|
|
2977
|
+
'iq-permission': [],
|
|
2978
|
+
'ivs': ['ivs', 'ivs-realtime'],
|
|
2979
|
+
'ivschat': ['ivschat'],
|
|
2980
|
+
'kafka': ['kafka'],
|
|
2981
|
+
'kafkaconnect': ['kafkaconnect'],
|
|
2982
|
+
'kendra': ['kendra'],
|
|
2983
|
+
'kendra-ranking': ['kendra-ranking'],
|
|
2984
|
+
'kinesis': ['kinesis'],
|
|
2985
|
+
'kinesisanalytics': ['kinesisanalytics', 'kinesisanalyticsv2'],
|
|
2986
|
+
'kinesisvideo': ['kinesisvideo', 'kinesis-video-archived-media', 'kinesis-video-media', 'kinesis-video-signaling', 'kinesis-video-webrtc-storage'],
|
|
2987
|
+
'kms': ['kms'],
|
|
2988
|
+
'lambda': ['lambda'],
|
|
2989
|
+
'launchwizard': ['launch-wizard'],
|
|
2990
|
+
'lex': ['lex-models', 'lex-runtime', 'lexv2-models', 'lexv2-runtime'],
|
|
2991
|
+
'license-manager': ['license-manager'],
|
|
2992
|
+
'license-manager-linux-subscriptions': ['license-manager-linux-subscriptions'],
|
|
2993
|
+
'license-manager-user-subscriptions': ['license-manager-user-subscriptions'],
|
|
2994
|
+
'lightsail': ['lightsail'],
|
|
2995
|
+
'logs': ['logs'],
|
|
2996
|
+
'lookoutequipment': ['lookoutequipment'],
|
|
2997
|
+
'lookoutmetrics': [],
|
|
2998
|
+
'lookoutvision': [],
|
|
2999
|
+
'm2': ['m2'],
|
|
3000
|
+
'machinelearning': ['machinelearning'],
|
|
3001
|
+
'macie2': ['macie2'],
|
|
3002
|
+
'managedblockchain': ['managedblockchain'],
|
|
3003
|
+
'mapcredits': [],
|
|
3004
|
+
'mediaconnect': ['mediaconnect'],
|
|
3005
|
+
'mediaconvert': ['mediaconvert'],
|
|
3006
|
+
'medialive': ['medialive'],
|
|
3007
|
+
'mediapackage': ['mediapackage'],
|
|
3008
|
+
'mediapackage-vod': ['mediapackage-vod'],
|
|
3009
|
+
'mediapackagev2': ['mediapackagev2'],
|
|
3010
|
+
'mediastore': ['mediastore', 'mediastore-data'],
|
|
3011
|
+
'mediatailor': ['mediatailor'],
|
|
3012
|
+
'medical-imaging': ['medical-imaging'],
|
|
3013
|
+
'memorydb': ['memorydb'],
|
|
3014
|
+
'mgh': ['mgh', 'migrationhub-config'],
|
|
3015
|
+
'mgn': ['mgn'],
|
|
3016
|
+
'migrationhub-orchestrator': ['migrationhuborchestrator'],
|
|
3017
|
+
'mobiletargeting': ['pinpoint'],
|
|
3018
|
+
'monitron': [],
|
|
3019
|
+
'mpa': ['mpa'],
|
|
3020
|
+
'mq': ['mq'],
|
|
3021
|
+
'neptune-db': ['neptunedata'],
|
|
3022
|
+
'neptune-graph': ['neptune-graph'],
|
|
3023
|
+
'network-firewall': ['network-firewall'],
|
|
3024
|
+
'networkflowmonitor': ['networkflowmonitor'],
|
|
3025
|
+
'networkmanager': ['networkmanager'],
|
|
3026
|
+
'networkmonitor': ['networkmonitor'],
|
|
3027
|
+
'nimble': [],
|
|
3028
|
+
'notifications': ['notifications'],
|
|
3029
|
+
'notifications-contacts': ['notificationscontacts'],
|
|
3030
|
+
'nova-act': ['nova-act'],
|
|
3031
|
+
'oam': ['oam'],
|
|
3032
|
+
'observabilityadmin': ['observabilityadmin'],
|
|
3033
|
+
'odb': ['odb'],
|
|
3034
|
+
'omics': ['omics'],
|
|
3035
|
+
'one': [],
|
|
3036
|
+
'opensearch': ['opensearch'],
|
|
3037
|
+
'opsworks': [],
|
|
3038
|
+
'opsworks-cm': [],
|
|
3039
|
+
'organizations': ['organizations'],
|
|
3040
|
+
'osis': ['osis'],
|
|
3041
|
+
'outposts': ['outposts'],
|
|
3042
|
+
'panorama': ['panorama'],
|
|
3043
|
+
'partnercentral': ['partnercentral-account', 'partnercentral-benefits', 'partnercentral-channel', 'partnercentral-selling'],
|
|
3044
|
+
'payment-cryptography': ['payment-cryptography', 'payment-cryptography-data'],
|
|
3045
|
+
'payments': [],
|
|
3046
|
+
'pca-connector-ad': ['pca-connector-ad'],
|
|
3047
|
+
'pca-connector-scep': ['pca-connector-scep'],
|
|
3048
|
+
'pcs': ['pcs'],
|
|
3049
|
+
'personalize': ['personalize', 'personalize-events', 'personalize-runtime'],
|
|
3050
|
+
'pi': ['pi'],
|
|
3051
|
+
'pipes': ['pipes'],
|
|
3052
|
+
'polly': ['polly'],
|
|
3053
|
+
'pricingplanmanager': [],
|
|
3054
|
+
'private-networks': ['privatenetworks'],
|
|
3055
|
+
'profile': ['customer-profiles'],
|
|
3056
|
+
'proton': ['proton'],
|
|
3057
|
+
'purchase-orders': [],
|
|
3058
|
+
'qapps': ['qapps'],
|
|
3059
|
+
'qbusiness': ['qbusiness'],
|
|
3060
|
+
'qdeveloper': [],
|
|
3061
|
+
'qldb': [],
|
|
3062
|
+
'quicksight': ['quicksight'],
|
|
3063
|
+
'ram': ['ram'],
|
|
3064
|
+
'rbin': ['rbin'],
|
|
3065
|
+
'rds': ['rds', 'docdb', 'neptune'],
|
|
3066
|
+
'rds-db': ['rds'],
|
|
3067
|
+
'redshift': ['redshift'],
|
|
3068
|
+
'redshift-serverless': ['redshift-serverless'],
|
|
3069
|
+
'refactor-spaces': ['migration-hub-refactor-spaces'],
|
|
3070
|
+
'rekognition': ['rekognition'],
|
|
3071
|
+
'repostspace': ['repostspace'],
|
|
3072
|
+
'resiliencehub': ['resiliencehub'],
|
|
3073
|
+
'resource-explorer-2': ['resource-explorer-2'],
|
|
3074
|
+
'resource-groups': ['resource-groups'],
|
|
3075
|
+
'robomaker': [],
|
|
3076
|
+
'rolesanywhere': ['rolesanywhere'],
|
|
3077
|
+
'route53': ['route53'],
|
|
3078
|
+
'route53-recovery-control': ['route53-recovery-cluster', 'route53-recovery-control-config'],
|
|
3079
|
+
'route53-recovery-readiness': ['route53-recovery-readiness'],
|
|
3080
|
+
'route53globalresolver': ['route53globalresolver'],
|
|
3081
|
+
'route53profiles': ['route53profiles'],
|
|
3082
|
+
'route53resolver': ['route53resolver'],
|
|
3083
|
+
'rum': ['rum'],
|
|
3084
|
+
's3': ['s3', 's3control'],
|
|
3085
|
+
's3-object-lambda': ['s3'],
|
|
3086
|
+
's3-outposts': ['s3outposts'],
|
|
3087
|
+
's3express': ['s3'],
|
|
3088
|
+
's3tables': ['s3tables'],
|
|
3089
|
+
's3vectors': ['s3vectors'],
|
|
3090
|
+
'sagemaker': ['sagemaker', 'sagemaker-a2i-runtime', 'sagemaker-edge', 'sagemaker-featurestore-runtime', 'sagemaker-metrics', 'sagemaker-runtime'],
|
|
3091
|
+
'sagemaker-geospatial': ['sagemaker-geospatial'],
|
|
3092
|
+
'savingsplans': ['savingsplans'],
|
|
3093
|
+
'scheduler': ['scheduler'],
|
|
3094
|
+
'schemas': ['schemas'],
|
|
3095
|
+
'scn': ['supplychain'],
|
|
3096
|
+
'sdb': ['sdb'],
|
|
3097
|
+
'secretsmanager': ['secretsmanager'],
|
|
3098
|
+
'security-ir': ['security-ir'],
|
|
3099
|
+
'securityagent': [],
|
|
3100
|
+
'securityhub': ['securityhub'],
|
|
3101
|
+
'securitylake': ['securitylake'],
|
|
3102
|
+
'serverlessrepo': ['serverlessrepo'],
|
|
3103
|
+
'servicecatalog': ['servicecatalog', 'servicecatalog-appregistry'],
|
|
3104
|
+
'servicediscovery': ['servicediscovery'],
|
|
3105
|
+
'servicequotas': ['service-quotas'],
|
|
3106
|
+
'ses': ['ses', 'mailmanager', 'pinpoint-email', 'sesv2'],
|
|
3107
|
+
'shield': ['shield'],
|
|
3108
|
+
'signer': ['signer'],
|
|
3109
|
+
'simspaceweaver': ['simspaceweaver'],
|
|
3110
|
+
'sms-voice': ['sms-voice', 'pinpoint-sms-voice', 'pinpoint-sms-voice-v2'],
|
|
3111
|
+
'snow-device-management': ['snow-device-management'],
|
|
3112
|
+
'sns': ['sns'],
|
|
3113
|
+
'social-messaging': ['socialmessaging'],
|
|
3114
|
+
'sqlworkbench': [],
|
|
3115
|
+
'sqs': ['sqs'],
|
|
3116
|
+
'ssm': ['ssm'],
|
|
3117
|
+
'ssm-contacts': ['ssm-contacts'],
|
|
3118
|
+
'ssm-incidents': ['ssm-incidents'],
|
|
3119
|
+
'ssm-quicksetup': ['ssm-quicksetup'],
|
|
3120
|
+
'ssm-sap': ['ssm-sap'],
|
|
3121
|
+
'sso': ['sso', 'sso-admin'],
|
|
3122
|
+
'states': ['stepfunctions'],
|
|
3123
|
+
'storagegateway': ['storagegateway'],
|
|
3124
|
+
'sts': ['sts'],
|
|
3125
|
+
'swf': ['swf'],
|
|
3126
|
+
'synthetics': ['synthetics'],
|
|
3127
|
+
'textract': ['textract'],
|
|
3128
|
+
'thinclient': ['workspaces-thin-client'],
|
|
3129
|
+
'timestream': ['timestream-query', 'timestream-write'],
|
|
3130
|
+
'timestream-influxdb': ['timestream-influxdb'],
|
|
3131
|
+
'tnb': ['tnb'],
|
|
3132
|
+
'transcribe': ['transcribe'],
|
|
3133
|
+
'transfer': ['transfer'],
|
|
3134
|
+
'transform': [],
|
|
3135
|
+
'transform-custom': [],
|
|
3136
|
+
'translate': ['translate'],
|
|
3137
|
+
'trustedadvisor': ['trustedadvisor'],
|
|
3138
|
+
'ts': [],
|
|
3139
|
+
'vendor-insights': [],
|
|
3140
|
+
'verifiedpermissions': ['verifiedpermissions'],
|
|
3141
|
+
'voiceid': ['voice-id'],
|
|
3142
|
+
'vpc-lattice': ['vpc-lattice'],
|
|
3143
|
+
'waf': ['waf'],
|
|
3144
|
+
'waf-regional': ['waf-regional'],
|
|
3145
|
+
'wafv2': ['wafv2'],
|
|
3146
|
+
'wellarchitected': ['wellarchitected'],
|
|
3147
|
+
'wickr': ['wickr'],
|
|
3148
|
+
'wisdom': ['wisdom', 'qconnect'],
|
|
3149
|
+
'workdocs': ['workdocs'],
|
|
3150
|
+
'worklink': [],
|
|
3151
|
+
'workmail': ['workmail'],
|
|
3152
|
+
'workmailmessageflow': ['workmailmessageflow'],
|
|
3153
|
+
'workspaces': ['workspaces'],
|
|
3154
|
+
'workspaces-instances': ['workspaces-instances'],
|
|
3155
|
+
'workspaces-web': ['workspaces-web'],
|
|
3156
|
+
'xray': ['xray'],
|
|
3157
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arnmatch
|
|
3
|
-
Version: 2026.1.
|
|
3
|
+
Version: 2026.1.2
|
|
4
4
|
Summary: Parse AWS ARNs into structured data (2000+ resource types)
|
|
5
5
|
Author-email: Andrey Gubarev <andrey@andreygubarev.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -37,6 +37,7 @@ pip install arnmatch
|
|
|
37
37
|
```bash
|
|
38
38
|
$ uvx arnmatch "arn:aws:lambda:us-east-1:123456789012:function:my-function"
|
|
39
39
|
aws_service: lambda
|
|
40
|
+
aws_sdk_services: lambda
|
|
40
41
|
aws_region: us-east-1
|
|
41
42
|
aws_account: 123456789012
|
|
42
43
|
resource_type: function
|
|
@@ -52,13 +53,14 @@ from arnmatch import arnmatch
|
|
|
52
53
|
arn = "arn:aws:lambda:us-east-1:123456789012:function:my-function"
|
|
53
54
|
result = arnmatch(arn)
|
|
54
55
|
|
|
55
|
-
print(result.aws_service)
|
|
56
|
-
print(result.
|
|
57
|
-
print(result.
|
|
58
|
-
print(result.
|
|
59
|
-
print(result.
|
|
60
|
-
print(result.
|
|
61
|
-
print(result.
|
|
56
|
+
print(result.aws_service) # lambda
|
|
57
|
+
print(result.aws_sdk_services) # ['lambda']
|
|
58
|
+
print(result.aws_region) # us-east-1
|
|
59
|
+
print(result.aws_account) # 123456789012
|
|
60
|
+
print(result.resource_type) # function
|
|
61
|
+
print(result.resource_id) # my-function
|
|
62
|
+
print(result.resource_name) # my-function
|
|
63
|
+
print(result.attributes) # {'Partition': 'aws', 'Region': 'us-east-1', ...}
|
|
62
64
|
```
|
|
63
65
|
|
|
64
66
|
## API Reference
|
|
@@ -89,6 +91,7 @@ Properties:
|
|
|
89
91
|
|----------|-------------|
|
|
90
92
|
| `resource_id` | Resource identifier (prefers groups ending in `Id`, falls back to `Name`, then last group) |
|
|
91
93
|
| `resource_name` | Resource name (prefers groups ending in `Name`, falls back to `resource_id`) |
|
|
94
|
+
| `aws_sdk_services` | List of boto3 client names for this service (e.g., `['elb', 'elbv2']` for elasticloadbalancing) |
|
|
92
95
|
|
|
93
96
|
### `ARNError`
|
|
94
97
|
|
|
@@ -96,7 +99,7 @@ Exception raised when ARN parsing fails. Inherits from `ValueError`.
|
|
|
96
99
|
|
|
97
100
|
## Versioning
|
|
98
101
|
|
|
99
|
-
This project uses [CalVer](https://calver.org/) with format `YYYY.
|
|
102
|
+
This project uses [CalVer](https://calver.org/) with format `YYYY.0M.MICRO` (e.g., `2026.01.0`).
|
|
100
103
|
|
|
101
104
|
## Development
|
|
102
105
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
arnmatch/__init__.py,sha256=QLhY7NjxUUehy0i756GrXAAJApXal4p9UxRZJ-bO20s,4478
|
|
2
|
+
arnmatch/arn_patterns.py,sha256=-vBbH31MbM_0XVQSc0Aq4LY3R1rfTSq1-720GfIsahA,365211
|
|
3
|
+
arnmatch-2026.1.2.dist-info/METADATA,sha256=1JIAeD3WhalwItj-d0aVrIRvOIQ5XAWQFK_PpvzQvjs,3353
|
|
4
|
+
arnmatch-2026.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
5
|
+
arnmatch-2026.1.2.dist-info/entry_points.txt,sha256=k4tR_yh3Rodi-BfwVhc_6TktgYhE7BfMy6s0Zzq6EFk,43
|
|
6
|
+
arnmatch-2026.1.2.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
arnmatch/__init__.py,sha256=QOU1UsHrmWmpDypPLeaxrdSVECVAkOQv_N-sw0Ann3Y,3930
|
|
2
|
-
arnmatch/arn_patterns.py,sha256=_1ZzNbqTrHWrdMMQAvpu78cdrNmsLaFSpae3auPA7cI,351568
|
|
3
|
-
arnmatch-2026.1.0.dist-info/METADATA,sha256=-SCS4GI_VCDxe1pyj5NecvlicE6Zw2usWq9STSNrxRU,3149
|
|
4
|
-
arnmatch-2026.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
5
|
-
arnmatch-2026.1.0.dist-info/entry_points.txt,sha256=k4tR_yh3Rodi-BfwVhc_6TktgYhE7BfMy6s0Zzq6EFk,43
|
|
6
|
-
arnmatch-2026.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|