How to use the aliyun-python-sdk-core-v3.aliyunsdkcore.request.RpcRequest function in aliyun-python-sdk-core-v3

To help you get started, we’ve selected a few aliyun-python-sdk-core-v3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / profile / location_service.py View on Github external
from ..acs_exception import error_code, error_msg

LOCATION_SERVICE_PRODUCT_NAME = "Location"
LOCATION_SERVICE_DOMAIN = "location-readonly.aliyuncs.com"
LOCATION_SERVICE_VERSION = "2015-06-12"
LOCATION_SERVICE_DESCRIBE_ENDPOINT_ACTION = "DescribeEndpoints"
LOCATION_SERVICE_REGION = "cn-hangzhou"
LOCATION_CACHE_EXPIRE_TIME = 3600  # Seconds

# location endpoint list
__location_endpoints = dict()
__last_cache_clear_time_per_product = dict()
__location_service_domain = 'location-readonly.aliyuncs.com'


class DescribeEndpointRequest(RpcRequest):
    def __init__(
            self,
            product_name,
            version,
            action_name,
            region_id,
            service_code,
            endpoint_type):
        RpcRequest.__init__(self, product_name, version, action_name)

        self.add_query_param("Id", region_id)
        self.add_query_param("ServiceCode", service_code)
        self.add_query_param("Type", endpoint_type)
        self.set_accept_format("JSON")
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / profile / location_service.py View on Github external
def __init__(
            self,
            product_name,
            version,
            action_name,
            region_id,
            service_code,
            endpoint_type):
        RpcRequest.__init__(self, product_name, version, action_name)

        self.add_query_param("Id", region_id)
        self.add_query_param("ServiceCode", service_code)
        self.add_query_param("Type", endpoint_type)
        self.set_accept_format("JSON")
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / aliyunsdkcore / request.py View on Github external
raise exceptions.ClientException(error_code.SDK_INVALID_PARAMS,
                                             'At least one of [action] and [uri_pattern] has a value')
        if not self.endpoint and not self._product:
            raise exceptions.ClientException(error_code.SDK_INVALID_PARAMS,
                                             'At least one of [domain] and [product_name] has a value')

        if self._uri_pattern:
            self._style = STYLE_ROA
            self.request = RoaRequest(product=self.get_product(), version=self.get_version(),
                                      action_name=self.get_action_name(),
                                      location_endpoint_type=self.get_location_endpoint_type()
                                      )
            self.fill_params()
        else:
            self._style = STYLE_RPC
            self.request = RpcRequest(product=self.get_product(), version=self.get_version(),
                                      action_name=self.get_action_name(),
                                      location_endpoint_type=self.get_location_endpoint_type(),
                                      )
            self.fill_params()

aliyun-python-sdk-core-v3

The core module of Aliyun Python SDK.

Apache-2.0
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis

Similar packages