Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support #10306

Merged
merged 7 commits into from
Mar 19, 2020
Merged

Support #10306

Show file tree
Hide file tree
Changes from 5 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
14 changes: 13 additions & 1 deletion sdk/support/azure-mgmt-support/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 0.2.0 (2020-03-14)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed version to 0.2.0, no need for 1.0.0


**Features**

- Model UpdateSupportTicket has a new parameter status
- Model Service has a new parameter resource_types

**Breaking changes**

- Model SupportTicketDetails no longer has parameter production_outage
- Operation SupportTicketsOperations.update has a new signature

## 0.1.0 (2020-01-31)

* Initial Release
* Initial Release
28 changes: 10 additions & 18 deletions sdk/support/azure-mgmt-support/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
## Microsoft Azure SDK for Python
# Microsoft Azure SDK for Python

This is the Microsoft Azure Support 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.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)

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.
# Usage

## Usage
For code examples, see [Support Management](https://docs.microsoft.com/python/api/overview/azure/)
on docs.microsoft.com.

For code examples, see [Support
Management](https://docs.microsoft.com/python/api/overview/azure/) on
docs.microsoft.com.

## Provide Feedback
# 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)
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.

![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-support%2FREADME.png)

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-support%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(
super(MicrosoftSupport, 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 = '2019-05-01-preview'
self.api_version = '2020-04-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
PreferredContactMethod,
CommunicationType,
CommunicationDirection,
Status,
)

__all__ = [
Expand Down Expand Up @@ -92,4 +93,5 @@
'PreferredContactMethod',
'CommunicationType',
'CommunicationDirection',
'Status',
]
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class SeverityLevel(str, Enum):
minimal = "minimal"
moderate = "moderate"
critical = "critical"
highestcriticalimpact = "highestcriticalimpact"


class PreferredContactMethod(str, Enum):
Expand All @@ -41,3 +42,9 @@ class CommunicationDirection(str, Enum):

inbound = "inbound"
outbound = "outbound"


class Status(str, Enum):

open = "open"
closed = "closed"
70 changes: 37 additions & 33 deletions sdk/support/azure-mgmt-support/azure/mgmt/support/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ class CommunicationDetails(Model):
include: 'inbound', 'outbound'
:vartype communication_direction: str or
~azure.mgmt.support.models.CommunicationDirection
:param sender: Email address of the sender
:param sender: Email address of the sender. This property is required if
called by a service principal
:type sender: str
:param subject: Required. Subject of the communication
:type subject: str
Expand Down Expand Up @@ -174,22 +175,21 @@ class ContactProfile(Model):
method is phone.
:type phone_number: str
:param preferred_time_zone: Required. Time zone of the user. This is the
name of the time zone from <a target='_blank'
href='https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values'>Microsoft
Time Zone Index Values</a>.
name of the time zone from [Microsoft Time Zone Index
Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values).
:type preferred_time_zone: str
:param country: Required. Country of the user. This is the ISO 3166-1
alpha-3 code.
:type country: str
:param preferred_support_language: Required. Preferred language of support
from Azure. Support languages vary based on the severity you choose for
your support ticket. Learn more at <a target='_blank'
href='https://azure.microsoft.com/support/plans/response/'>Azure Severity
and responsiveness</a>. Use the standard language-country code. Valid
values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for
Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean,
'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw'
for Chinese and 'de-de' for German.
your support ticket. Learn more at [Azure Severity and
responsiveness](https://azure.microsoft.com/support/plans/response). Use
the standard language-country code. Valid values are 'en-us' for English,
'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp'
for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for
Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for
German.
:type preferred_support_language: str
"""

Expand Down Expand Up @@ -382,9 +382,8 @@ def __init__(self, **kwargs):
class QuotaTicketDetails(Model):
"""Additional set of information required for quota increase support ticket
for certain quota types, e.g.: Virtual machine cores. Get complete details
about Quota payload support request along with examples at <a target=''
href='https://aka.ms/supportrpquotarequestpayload'>Support quota
request</a>.
about Quota payload support request along with examples at [Support quota
request](https://aka.ms/supportrpquotarequestpayload).

:param quota_change_request_sub_type: Required for certain quota types
when there is a sub type that you are requesting quota increase for.
Expand Down Expand Up @@ -425,6 +424,8 @@ class Service(Model):
:vartype type: str
:param display_name: Localized name of Azure service
:type display_name: str
:param resource_types: ARM Resource types
:type resource_types: list[str]
"""

_validation = {
Expand All @@ -438,6 +439,7 @@ class Service(Model):
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'display_name': {'key': 'properties.displayName', 'type': 'str'},
'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'},
}

def __init__(self, **kwargs):
Expand All @@ -446,6 +448,7 @@ def __init__(self, **kwargs):
self.name = None
self.type = None
self.display_name = kwargs.get('display_name', None)
self.resource_types = kwargs.get('resource_types', None)


class ServiceError(Model):
Expand Down Expand Up @@ -604,13 +607,13 @@ class SupportTicketDetails(Model):
:vartype problem_classification_display_name: str
:param severity: Required. A value that indicates the urgency of the case,
which in turn determines the response time according to the service level
agreement of the technical support plan you have with Azure. Possible
values include: 'minimal', 'moderate', 'critical'
agreement of the technical support plan you have with Azure. Note:
'Highest critical impact' severity is reserved only to our Premium
customers. Possible values include: 'minimal', 'moderate', 'critical',
'highestcriticalimpact'
:type severity: str or ~azure.mgmt.support.models.SeverityLevel
:ivar enrollment_id: Enrollment ID associated with the support ticket.
:vartype enrollment_id: str
:ivar production_outage: Indicates if this issue is a production outage.
:vartype production_outage: bool
:param require24_x7_response: Indicates if this requires a 24x7 response
from Azure.
:type require24_x7_response: bool
Expand Down Expand Up @@ -663,7 +666,6 @@ class SupportTicketDetails(Model):
'problem_classification_display_name': {'readonly': True},
'severity': {'required': True},
'enrollment_id': {'readonly': True},
'production_outage': {'readonly': True},
'contact_details': {'required': True},
'support_plan_type': {'readonly': True},
'title': {'required': True},
Expand All @@ -684,7 +686,6 @@ class SupportTicketDetails(Model):
'problem_classification_display_name': {'key': 'properties.problemClassificationDisplayName', 'type': 'str'},
'severity': {'key': 'properties.severity', 'type': 'str'},
'enrollment_id': {'key': 'properties.enrollmentId', 'type': 'str'},
'production_outage': {'key': 'properties.productionOutage', 'type': 'bool'},
'require24_x7_response': {'key': 'properties.require24X7Response', 'type': 'bool'},
'contact_details': {'key': 'properties.contactDetails', 'type': 'ContactProfile'},
'service_level_agreement': {'key': 'properties.serviceLevelAgreement', 'type': 'ServiceLevelAgreement'},
Expand Down Expand Up @@ -712,7 +713,6 @@ def __init__(self, **kwargs):
self.problem_classification_display_name = None
self.severity = kwargs.get('severity', None)
self.enrollment_id = None
self.production_outage = None
self.require24_x7_response = kwargs.get('require24_x7_response', None)
self.contact_details = kwargs.get('contact_details', None)
self.service_level_agreement = kwargs.get('service_level_agreement', None)
Expand Down Expand Up @@ -767,21 +767,20 @@ class UpdateContactProfile(Model):
method is phone.
:type phone_number: str
:param preferred_time_zone: Time zone of the user. This is the name of the
time zone from <a target='_blank'
href='https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values'>Microsoft
Time Zone Index Values</a>.
time zone from [Microsoft Time Zone Index
Values](https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values).
:type preferred_time_zone: str
:param country: Country of the user. This is the ISO 3166-1 alpha-3 code.
:type country: str
:param preferred_support_language: Preferred language of support from
Azure. Support languages vary based on the severity you choose for your
support ticket. Learn more at <a target='_blank'
href='https://azure.microsoft.com/support/plans/response/'>Azure Severity
and responsiveness</a>. Use the standard language-country code. Valid
values are 'en-us' for English, 'zh-hans' for Chinese, 'es-es' for
Spanish, 'fr-fr' for French, 'ja-jp' for Japanese, 'ko-kr' for Korean,
'ru-ru' for Russian, 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw'
for Chinese and 'de-de' for German.
support ticket. Learn more at [Azure Severity and
responsiveness](https://azure.microsoft.com/support/plans/response/). Use
the standard language-country code. Valid values are 'en-us' for English,
'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for French, 'ja-jp'
for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian, 'pt-br' for
Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and 'de-de' for
German.
:type preferred_support_language: str
"""

Expand Down Expand Up @@ -811,22 +810,27 @@ def __init__(self, **kwargs):


class UpdateSupportTicket(Model):
"""Updates severity and contact details in the support ticket.
"""Updates severity, ticket status and contact details in the support ticket.

:param severity: Severity level. Possible values include: 'minimal',
'moderate', 'critical'
'moderate', 'critical', 'highestcriticalimpact'
:type severity: str or ~azure.mgmt.support.models.SeverityLevel
:param status: Status to be updated on the ticket. Possible values
include: 'open', 'closed'
:type status: str or ~azure.mgmt.support.models.Status
:param contact_details: Contact details to be updated on the support
ticket.
:type contact_details: ~azure.mgmt.support.models.UpdateContactProfile
"""

_attribute_map = {
'severity': {'key': 'severity', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'contact_details': {'key': 'contactDetails', 'type': 'UpdateContactProfile'},
}

def __init__(self, **kwargs):
super(UpdateSupportTicket, self).__init__(**kwargs)
self.severity = kwargs.get('severity', None)
self.status = kwargs.get('status', None)
self.contact_details = kwargs.get('contact_details', None)
Loading