File: utils.py

package info (click to toggle)
python-moto 5.1.18-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 116,520 kB
  • sloc: python: 636,725; javascript: 181; makefile: 39; sh: 3
file content (8 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
from moto.moto_api._internal import mock_random
from moto.utilities.utils import get_partition


def make_arn_for_certificate(account_id: str, region_name: str) -> str:
    # Example
    # arn:aws:acm:eu-west-2:764371465172:certificate/c4b738b8-56fe-4b3a-b841-1c047654780b
    return f"arn:{get_partition(region_name)}:acm:{region_name}:{account_id}:certificate/{mock_random.uuid4()}"