Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions azure-mgmt-engagementfabric/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:

Release History
===============

0.1.0 (1970-01-01)
++++++++++++++++++

* Initial Release
4 changes: 4 additions & 0 deletions azure-mgmt-engagementfabric/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

49 changes: 49 additions & 0 deletions azure-mgmt-engagementfabric/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure MyService Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

For code examples, see `MyService Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-engagementfabric/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
1 change: 1 addition & 0 deletions azure-mgmt-engagementfabric/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .engagement_fabric import EngagementFabric
from .version import VERSION

__all__ = ['EngagementFabric']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from msrest.pipeline import ClientRawResponse
from msrestazure.azure_exceptions import CloudError
import uuid
from .operations.accounts_operations import AccountsOperations
from .operations.channels_operations import ChannelsOperations
from .operations.operations import Operations
from .operations.sk_us_operations import SKUsOperations
from . import models


class EngagementFabricConfiguration(AzureConfiguration):
"""Configuration for EngagementFabric
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription ID
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(EngagementFabricConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-engagementfabric/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class EngagementFabric(SDKClient):
"""Microsoft Customer Engagement Fabric

:ivar config: Configuration for client.
:vartype config: EngagementFabricConfiguration

:ivar accounts: Accounts operations
:vartype accounts: azure.mgmt.engagementfabric.operations.AccountsOperations
:ivar channels: Channels operations
:vartype channels: azure.mgmt.engagementfabric.operations.ChannelsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.engagementfabric.operations.Operations
:ivar sk_us: SKUs operations
:vartype sk_us: azure.mgmt.engagementfabric.operations.SKUsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription ID
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = EngagementFabricConfiguration(credentials, subscription_id, base_url)
super(EngagementFabric, self).__init__(self.config.credentials, self.config)

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

self.accounts = AccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.channels = ChannelsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.sk_us = SKUsOperations(
self._client, self.config, self._serialize, self._deserialize)

def check_name_availability(
self, resource_group_name, name, type, custom_headers=None, raw=False, **operation_config):
"""Check availability of EngagementFabric resource.

:param resource_group_name: Resource Group Name
:type resource_group_name: str
:param name: The name to be checked
:type name: str
:param type: The fully qualified resource type for the name to be
checked
:type type: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: CheckNameAvailabilityResult or ClientRawResponse if raw=true
:rtype:
~azure.mgmt.engagementfabric.models.CheckNameAvailabilityResult or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.CheckNameAvailabilityParameter(name=name, type=type)

# Construct URL
url = self.check_name_availability.metadata['url']
path_format_arguments = {
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct body
body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter')

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('CheckNameAvailabilityResult', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EngagementFabric/checkNameAvailability'}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

try:
from .sku_py3 import SKU
from .resource_py3 import Resource
from .tracked_resource_py3 import TrackedResource
from .account_py3 import Account
from .account_patch_py3 import AccountPatch
from .key_description_py3 import KeyDescription
from .regenerate_key_parameter_py3 import RegenerateKeyParameter
from .channel_type_description_py3 import ChannelTypeDescription
from .channel_type_description_list_py3 import ChannelTypeDescriptionList
from .proxy_only_resource_py3 import ProxyOnlyResource
from .channel_py3 import Channel
from .check_name_availability_parameter_py3 import CheckNameAvailabilityParameter
from .check_name_availability_result_py3 import CheckNameAvailabilityResult
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .sku_location_info_item_py3 import SkuLocationInfoItem
from .sku_description_py3 import SkuDescription
except (SyntaxError, ImportError):
from .sku import SKU
from .resource import Resource
from .tracked_resource import TrackedResource
from .account import Account
from .account_patch import AccountPatch
from .key_description import KeyDescription
from .regenerate_key_parameter import RegenerateKeyParameter
from .channel_type_description import ChannelTypeDescription
from .channel_type_description_list import ChannelTypeDescriptionList
from .proxy_only_resource import ProxyOnlyResource
from .channel import Channel
from .check_name_availability_parameter import CheckNameAvailabilityParameter
from .check_name_availability_result import CheckNameAvailabilityResult
from .operation_display import OperationDisplay
from .operation import Operation
from .sku_location_info_item import SkuLocationInfoItem
from .sku_description import SkuDescription
from .account_paged import AccountPaged
from .key_description_paged import KeyDescriptionPaged
from .channel_paged import ChannelPaged
from .operation_paged import OperationPaged
from .sku_description_paged import SkuDescriptionPaged
from .engagement_fabric_enums import (
KeyRank,
CheckNameUnavailableReason,
)

__all__ = [
'SKU',
'Resource',
'TrackedResource',
'Account',
'AccountPatch',
'KeyDescription',
'RegenerateKeyParameter',
'ChannelTypeDescription',
'ChannelTypeDescriptionList',
'ProxyOnlyResource',
'Channel',
'CheckNameAvailabilityParameter',
'CheckNameAvailabilityResult',
'OperationDisplay',
'Operation',
'SkuLocationInfoItem',
'SkuDescription',
'AccountPaged',
'KeyDescriptionPaged',
'ChannelPaged',
'OperationPaged',
'SkuDescriptionPaged',
'KeyRank',
'CheckNameUnavailableReason',
]
Loading