本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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
示例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
)
示例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)
示例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
示例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"))
示例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
示例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)