INNER CODE UNIT · Python

__init__

grycap/scar · scar/providers/aws/__init__.py:44

    def __init__(self, resource_info: Dict =None):
        self.properties = {}
        if resource_info:
            region = resource_info.get('region')
            if region:
                self.properties['client'] = {'region_name': region}
            session = resource_info.get('boto_profile')
            if session:
                self.properties['session'] = {'profile_name': session}

    @lazy_property
    def client(self):
        """Returns the required boto client based on the implementing class name."""
        client = self._CLIENTS[self.__class__.__name__.upper()](self.properties)
        return client

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…