original_docstring: Any steps that run as part of key compromises.
docstring: Any steps that run as part of key compromises.
docstring_tokens: Any steps that run as part of key compromises .
code: def mitigate(self):
          """Any steps that run as part of key compromises."""
          access_key = self.compromised_access_key_id
          compromised_resource = compromised.CompromisedMetadata(
              compromised_object_inventory={
                  'access_key_id': access_key,
                  'region': self.region
              },
              case_number=self.case.case_number,
              type_of_compromise='key_compromise'
          ).data()
  
          session = connection.Connection(
              type='session',
              region='us-west-2'
          ).connect()
  
          logger.info("Attempting key disable.")
  
          for action in self.steps:
              step = self.plugins.source.load_plugin(action)
              step.Plugin(
                  boto_session=session,
                  compromised_resource=compromised_resource,
                  dry_run=False
              )
code_tokens: def mitigate ( self ) : access_key = self . compromised_access_key_id compromised_resource = compromised . CompromisedMetadata ( compromised_object_inventory = { 'access_key_id' : access_key , 'region' : self . region } , case_number = self . case . case_number , type_of_compromise = 'key_compromise' ) . data ( ) session = connection . Connection ( type = 'session' , region = 'us-west-2' ) . connect ( ) logger . info ( "Attempting key disable." ) for action in self . steps : step = self . plugins . source . load_plugin ( action ) step . Plugin ( boto_session = session , compromised_resource = compromised_resource , dry_run = False )
short_docstring: Any steps that run as part of key compromises.
short_docstring_tokens: Any steps that run as part of key compromises .
comment: """Any steps that run as part of key compromises."""