當前位置: 首頁>>代碼示例>>Python>>正文


Python service_client.ServiceClient方法代碼示例

本文整理匯總了Python中msrest.service_client.ServiceClient方法的典型用法代碼示例。如果您正苦於以下問題:Python service_client.ServiceClient方法的具體用法?Python service_client.ServiceClient怎麽用?Python service_client.ServiceClient使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在msrest.service_client的用法示例。


在下文中一共展示了service_client.ServiceClient方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(
            self, credentials, base_url=None):

        self.config = SubscriptionClientConfiguration(credentials, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.operations = Operations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscription_operations = SubscriptionOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscription_factory = SubscriptionFactoryOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.subscriptions = SubscriptionsOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.tenants = TenantsOperations(
            self._client, self.config, self._serialize, self._deserialize) 
開發者ID:Azure,項目名稱:azure-cli-extensions,代碼行數:22,代碼來源:subscription_client.py

示例2: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default):
        super(NetworkManagementClient, self).__init__(
            credentials=credentials,
            subscription_id=subscription_id,
            api_version=api_version,
            base_url=base_url,
            profile=profile
        )

        self.config = NetworkManagementClientConfiguration(credentials, subscription_id, base_url)
        self._client = ServiceClient(self.config.credentials, self.config) 
開發者ID:Azure,項目名稱:azure-cli-extensions,代碼行數:13,代碼來源:network_management_client.py

示例3: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(
            self, credentials, base_url=None):

        self.config = ACEProvisioningManagementPartnerAPIConfiguration(credentials, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '2018-02-01'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.partner = PartnerOperations(
            self._client, self.config, self._serialize, self._deserialize)
        self.operation = OperationOperations(
            self._client, self.config, self._serialize, self._deserialize) 
開發者ID:Azure,項目名稱:azure-cli-extensions,代碼行數:17,代碼來源:ace_provisioning_management_partner_api.py

示例4: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url='https://{}.visualstudio.com', organization_name="", creds=None,
                 create_project_url='https://dev.azure.com'):
        """Inits Project as per BaseManager and adds relevant other needed fields"""
        super(ProjectManager, self).__init__(creds, organization_name=organization_name)
        base_url = base_url.format(organization_name)
        self._config = Configuration(base_url=base_url)
        self._client = ServiceClient(creds, self._config)
        self._credentials = creds
        # Need to make a secondary client for the creating project as it uses a different base url
        self._create_project_config = Configuration(base_url=create_project_url)
        self._create_project_client = ServiceClient(creds, self._create_project_config)
        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._deserialize = Deserializer(client_models)
        self._user_mgr = UserManager(creds=self._creds) 
開發者ID:Azure,項目名稱:azure-functions-devops-build,代碼行數:16,代碼來源:project_manager.py

示例5: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url='https://api.github.com', pat=None):
        """Inits UserManager as to be able to send the right requests"""
        self._pat = pat
        self._config = Configuration(base_url=base_url)
        self._client = ServiceClient(None, self._config) 
開發者ID:Azure,項目名稱:azure-functions-devops-build,代碼行數:7,代碼來源:base_github_manager.py

示例6: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url='https://{}.visualstudio.com', creds=None, organization_name="", project_name=""):
        """Inits PoolManager"""
        super(PoolManager, self).__init__(creds, organization_name=organization_name, project_name=project_name)
        base_url = base_url.format(organization_name)
        self._config = Configuration(base_url=base_url)
        self._client = ServiceClient(creds, self._config)
        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._deserialize = Deserializer(client_models)
        self._user_mgr = UserManager(creds=self._creds) 
開發者ID:Azure,項目名稱:azure-functions-devops-build,代碼行數:11,代碼來源:pool_manager.py

示例7: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, organization_name="", project_name="", creds=None):
        base_url = 'https://dev.azure.com'
        self._config = Configuration(base_url=base_url)
        self._client = ServiceClient(creds, self._config)
        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._deserialize = Deserializer(client_models)
        super(RepositoryManager, self).__init__(creds, organization_name=organization_name, project_name=project_name) 
開發者ID:Azure,項目名稱:azure-functions-devops-build,代碼行數:9,代碼來源:repository_manager.py

示例8: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url='https://peprodscussu2.portalext.visualstudio.com', creds=None):
        """Inits UserManager as to be able to send the right requests"""
        self._config = Configuration(base_url=base_url)
        self._client = ServiceClient(creds, self._config)
        #create the deserializer for the models
        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self._deserialize = Deserializer(client_models)

        # create cache for two user type
        self._cache_aad_user = None
        self._cache_msa_user = None 
開發者ID:Azure,項目名稱:azure-functions-devops-build,代碼行數:13,代碼來源:user_manager.py

示例9: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url=None):

        self.config = IotHubGatewayServiceAPIs20180630Configuration(base_url)
        self._client = ServiceClient(None, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = "2018-06-30"
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models)

        self.service = ServiceOperations(
            self._client, self.config, self._serialize, self._deserialize
        ) 
開發者ID:Azure,項目名稱:azure-iot-sdk-python,代碼行數:15,代碼來源:iot_hub_gateway_service_ap_is20180630.py

示例10: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url=None, creds=None):
        self.config = ClientConfiguration(base_url)
        self.config.credentials = creds
        self._client = ServiceClient(creds, config=self.config)
        _base_client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
        self._base_deserialize = Deserializer(_base_client_models)
        self._base_serialize = Serializer(_base_client_models)
        self._all_host_types_locations = None
        self._locations = None
        self._suppress_fedauth_redirect = True
        self._force_msa_pass_through = True
        self.normalized_url = Client._normalize_url(base_url) 
開發者ID:Azure,項目名稱:azure-devops-cli-extension,代碼行數:14,代碼來源:client.py

示例11: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, base_url=None, creds=None, user_agent=None):
        self._config = ClientConfiguration(base_url)
        self._config.credentials = creds
        self._addition_user_agent = user_agent
        if user_agent is not None:
            self._config.add_user_agent(user_agent)
        self._client = ServiceClient(creds, self._config)
        self._client_cache = {}
        self.base_url = base_url
        self._creds = creds
        self._resource_areas = None
        self.clients = ClientFactory(self)
        self.clients_v5_0 = ClientFactoryV5_0(self)
        self.clients_v5_1 = ClientFactoryV5_1(self)
        self.use_fiddler = False 
開發者ID:Azure,項目名稱:azure-devops-cli-extension,代碼行數:17,代碼來源:connection.py

示例12: client

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def client():
    # We need a ServiceClient instance, but the poller itself don't use it, so we don't need
    # Something functional
    return ServiceClient(None, Configuration("http://example.org")) 
開發者ID:Azure,項目名稱:msrest-for-python,代碼行數:6,代碼來源:test_polling.py

示例13: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(self, credentials, subscription_id, base_url=None):
        self.config = GenericRestClientConfiguration(credentials, subscription_id, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)
        self.models = None 
開發者ID:microsoft,項目名稱:AnsibleLabs,代碼行數:6,代碼來源:azure_rm_common_rest.py

示例14: __init__

# 需要導入模塊: from msrest import service_client [as 別名]
# 或者: from msrest.service_client import ServiceClient [as 別名]
def __init__(
            self, credentials, base_url=None):

        self.config = RestClientConfiguration(credentials, base_url)
        self._client = ServiceClient(self.config.credentials, self.config)

        client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
        self.api_version = '0.0.1'
        self._serialize = Serializer(client_models)
        self._deserialize = Deserializer(client_models) 
開發者ID:opendifferentialprivacy,項目名稱:whitenoise-system,代碼行數:12,代碼來源:rest_client.py


注:本文中的msrest.service_client.ServiceClient方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。