MCPcopy
hub / github.com/san089/Udacity-Data-Engineering-Projects / get_group

Function get_group

Redshift_Cluster_IaC.py:192–196  ·  view source on GitHub ↗
(ec2_client, group_name)

Source from the content-addressed store, hash-verified

190 return response['ResponseMetadata']['HTTPStatusCode']
191
192def get_group(ec2_client, group_name):
193 groups = \
194 ec2_client.describe_security_groups(Filters=[{'Name': 'group-name', 'Values': [group_name]}])[
195 'SecurityGroups']
196 return None if(len(groups) == 0) else groups[0]
197
198
199def create_ec2_security_group(ec2_client):

Callers 3

Calls

no outgoing calls

Tested by

no test coverage detected