MCPcopy Index your code
hub / github.com/aws/aws-cli / validate_instance_name

Function validate_instance_name

awscli/customizations/codedeploy/utils.py:65–78  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

63
64
65def validate_instance_name(params):
66 if params.instance_name:
67 if not re.match(INSTANCE_NAME_PATTERN, params.instance_name):
68 raise ParamValidationError(
69 'Instance name contains invalid characters.'
70 )
71 if params.instance_name.startswith('i-'):
72 raise ParamValidationError(
73 'Instance name cannot start with \'i-\'.'
74 )
75 if len(params.instance_name) > MAX_INSTANCE_NAME_LENGTH:
76 raise ParamValidationError(
77 f'Instance name cannot be longer than {MAX_INSTANCE_NAME_LENGTH} characters.'
78 )
79
80
81def validate_tags(params):

Calls 2

matchMethod · 0.80