当前位置: 首页>>代码示例>>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;未经允许,请勿转载。