Python源码示例:botocore.utils.switch_host_s3_accelerate()

示例1
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events,
            client.meta.partition
        )
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'before-sign.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例2
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events,
            client.meta.partition
        )
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'before-sign.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例3
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events,
            client.meta.partition
        )
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'before-sign.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例4
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events,
            client.meta.partition
        )
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'before-sign.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例5
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events)
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'request-created.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例6
def _register_s3_events(self, client, endpoint_bridge, endpoint_url,
                            client_config, scoped_config):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events,
            client.meta.partition
        )
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'before-sign.s3', switch_host_s3_accelerate)

        self._set_s3_presign_signature_version(
            client.meta, client_config, scoped_config) 
示例7
def _register_s3_events(self, client, endpoint_bridge, endpoint_url):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events)
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'request-created.s3', switch_host_s3_accelerate) 
示例8
def _register_s3_events(self, client, endpoint_bridge, endpoint_url):
        if client.meta.service_model.service_name != 's3':
            return
        S3RegionRedirector(endpoint_bridge, client).register()
        self._set_s3_addressing_style(
            endpoint_url, client.meta.config.s3, client.meta.events)
        # Enable accelerate if the configuration is set to to true or the
        # endpoint being used matches one of the accelerate endpoints.
        if self._is_s3_accelerate(endpoint_url, client.meta.config.s3):
            # Also make sure that the hostname gets switched to
            # s3-accelerate.amazonaws.com
            client.meta.events.register_first(
                'request-created.s3', switch_host_s3_accelerate)