Skip to content

Instantly share code, notes, and snippets.

@gmariette
Created March 27, 2021 19:56
Show Gist options
  • Select an option

  • Save gmariette/1552cbaa6c462cb415b88aad5fb952d9 to your computer and use it in GitHub Desktop.

Select an option

Save gmariette/1552cbaa6c462cb415b88aad5fb952d9 to your computer and use it in GitHub Desktop.
def dumpConfigToDisk(self, comp, az):
# Dump config file to disk as backup
pass
def addActionToDf(self, action):
# Add action to DataFrame
pass
def dumpDfToDisk(self):
# Dump DF to disk
pass
def graphPlots(self):
# Graph plot with our DF
pass
def assumeRole(self, action):
# Assume a role with an explicit session name
pass
def initec2client(self, action):
# Return the ec2 client
pass
def initStsClient(self):
# Return the sts client
pass
def initeRdsClient(self, action):
# Return the rds client
pass
def initeASGClient(self, action):
# Return the autoscaling client
pass
def describeAZ(self):
# Return the AZ list for a region
pass
def describeInstances(self, az=None):
# List instances running [in an AZ] (optionnal)
pass
def terminateInstance(self, instances_list):
# Terminate ec2 instances based on a list
pass
def describeASG(self):
# List available ASGs
pass
def saveASGConfig(self):
# Backup the ASGs configs
pass
def restoreASGConfig(self):
# Restore the asg configs
pass
def updateASGAZ(self, asg, azs, vpc_zone_identifier):
# Update AZ for an asg (you can add or remove subnets)
pass
def describeSubnets(self, az):
# Describe subnets based on an az
pass
def describeVPC(self):
# Describe VPC - return the first VPC ID
pass
def describeNACL(self, subnets_list):
# Describe NACL based on subnet list
pass
def createNACL(self, vpc_id, az):
# Create a NACL
pass
def decribeNACLEntries(self, nacl_id):
# Describe NACL entries
pass
def createDenyAllNACLEntry(self, nacl_id, egress=False):
# Create a NACL entry which deny all trafic
pass
def replaceNACLAssociation(self, nacl_id, association_id):
# Replace NACL association - used to linked our AZ subnets
# to the deny all DRP ACL
pass
def deleteNACL(self, nacl_id):
# Delete a NACL
pass
def describeRDSinstances(self):
# List available rds instances
pass
def restartRDSinstance(self, db_identifier, failover):
# Restart a db instance and force AZ failover
pass
def waitRDSavailable(self, db_identifier):
# Wait until a db instance is restarted
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment