From fd411acae5be1a8d0ccf5c03176145ad393a273d Mon Sep 17 00:00:00 2001 From: Azure CLI Bot Date: Mon, 7 Jun 2021 10:20:51 +0800 Subject: [PATCH] [AutoRelease] t1-media-2021-06-03-99773 (#19066) * CodeGen from PR 14161 in Azure/azure-rest-api-specs add tags for go SDK release v54.0.0 (#14161) * add tags for go SDK release v54.0.0 * add a new tag * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines --- sdk/media/azure-mgmt-media/CHANGELOG.md | 16 +++ sdk/media/azure-mgmt-media/MANIFEST.in | 1 + sdk/media/azure-mgmt-media/_meta.json | 8 ++ .../azure/mgmt/media/_azure_media_services.py | 1 - .../azure/mgmt/media/models/__init__.py | 13 ++ .../models/_azure_media_services_enums.py | 11 ++ .../azure/mgmt/media/models/_models.py | 124 +++++++++++++++++ .../azure/mgmt/media/models/_models_py3.py | 128 +++++++++++++++++- .../media/operations/_locations_operations.py | 4 +- .../operations/_mediaservices_operations.py | 67 +-------- .../mgmt/media/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 4 +- .../_private_link_resources_operations.py | 4 +- .../azure/mgmt/media/version.py | 2 +- 14 files changed, 312 insertions(+), 75 deletions(-) create mode 100644 sdk/media/azure-mgmt-media/_meta.json diff --git a/sdk/media/azure-mgmt-media/CHANGELOG.md b/sdk/media/azure-mgmt-media/CHANGELOG.md index f7dbeaabf25b..e785e462606b 100644 --- a/sdk/media/azure-mgmt-media/CHANGELOG.md +++ b/sdk/media/azure-mgmt-media/CHANGELOG.md @@ -1,5 +1,21 @@ # Release History +## 4.0.0 (2021-06-03) + +**Features** + + - Model Operation has a new parameter is_data_action + - Model Operation has a new parameter action_type + - Model MediaService has a new parameter key_delivery + - Model MetricSpecification has a new parameter supported_time_grain_types + - Model MetricSpecification has a new parameter source_mdm_namespace + - Model MetricSpecification has a new parameter source_mdm_account + - Model MetricSpecification has a new parameter enable_regional_mdm_account + +**Breaking changes** + + - Removed operation MediaservicesOperations.get_by_subscription + ## 3.1.0 (2021-02-24) **Features** diff --git a/sdk/media/azure-mgmt-media/MANIFEST.in b/sdk/media/azure-mgmt-media/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/media/azure-mgmt-media/MANIFEST.in +++ b/sdk/media/azure-mgmt-media/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/media/azure-mgmt-media/_meta.json b/sdk/media/azure-mgmt-media/_meta.json new file mode 100644 index 000000000000..0ef5900c072e --- /dev/null +++ b/sdk/media/azure-mgmt-media/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "d78e99bbaa8170a72c38d8a6dad8a896f9a5c636", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/mediaservices/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py index 63680195b4c3..aba56940f2d1 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/_azure_media_services.py @@ -87,7 +87,6 @@ def __init__( super(AzureMediaServices, 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 = '2020-05-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py index 058a19b780a9..60f6a467199f 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/__init__.py @@ -12,6 +12,7 @@ try: from ._models_py3 import AacAudio from ._models_py3 import AbsoluteClipTime + from ._models_py3 import AccessControl from ._models_py3 import AccountEncryption from ._models_py3 import AccountFilter from ._models_py3 import AkamaiAccessControl @@ -105,6 +106,7 @@ from ._models_py3 import JpgFormat from ._models_py3 import JpgImage from ._models_py3 import JpgLayer + from ._models_py3 import KeyDelivery from ._models_py3 import KeyVaultProperties from ._models_py3 import Layer from ._models_py3 import ListContainerSasInput @@ -128,6 +130,7 @@ from ._models_py3 import LogSpecification from ._models_py3 import MediaService from ._models_py3 import MediaServiceIdentity + from ._models_py3 import MediaServiceUpdate from ._models_py3 import MetricDimension from ._models_py3 import MetricSpecification from ._models_py3 import Mp4Format @@ -192,6 +195,7 @@ except (SyntaxError, ImportError): from ._models import AacAudio from ._models import AbsoluteClipTime + from ._models import AccessControl from ._models import AccountEncryption from ._models import AccountFilter from ._models import AkamaiAccessControl @@ -285,6 +289,7 @@ from ._models import JpgFormat from ._models import JpgImage from ._models import JpgLayer + from ._models import KeyDelivery from ._models import KeyVaultProperties from ._models import Layer from ._models import ListContainerSasInput @@ -308,6 +313,7 @@ from ._models import LogSpecification from ._models import MediaService from ._models import MediaServiceIdentity + from ._models import MediaServiceUpdate from ._models import MetricDimension from ._models import MetricSpecification from ._models import Mp4Format @@ -388,9 +394,11 @@ CreatedByType, MetricUnit, MetricAggregationType, + ActionType, StorageAccountType, StorageAuthentication, AccountEncryptionKeyType, + DefaultAction, ManagedIdentityType, PrivateEndpointConnectionProvisioningState, PrivateEndpointServiceConnectionStatus, @@ -443,6 +451,7 @@ __all__ = [ 'AacAudio', 'AbsoluteClipTime', + 'AccessControl', 'AccountEncryption', 'AccountFilter', 'AkamaiAccessControl', @@ -536,6 +545,7 @@ 'JpgFormat', 'JpgImage', 'JpgLayer', + 'KeyDelivery', 'KeyVaultProperties', 'Layer', 'ListContainerSasInput', @@ -559,6 +569,7 @@ 'LogSpecification', 'MediaService', 'MediaServiceIdentity', + 'MediaServiceUpdate', 'MetricDimension', 'MetricSpecification', 'Mp4Format', @@ -638,9 +649,11 @@ 'CreatedByType', 'MetricUnit', 'MetricAggregationType', + 'ActionType', 'StorageAccountType', 'StorageAuthentication', 'AccountEncryptionKeyType', + 'DefaultAction', 'ManagedIdentityType', 'PrivateEndpointConnectionProvisioningState', 'PrivateEndpointServiceConnectionStatus', diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py index 92075ef6f54c..5513e1cab62d 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_azure_media_services_enums.py @@ -50,6 +50,11 @@ class MetricAggregationType(str, Enum): total = "Total" #: The sum. +class ActionType(str, Enum): + + internal = "Internal" #: An internal action. + + class StorageAccountType(str, Enum): primary = "Primary" #: The primary storage account for the Media Services account. @@ -68,6 +73,12 @@ class AccountEncryptionKeyType(str, Enum): customer_key = "CustomerKey" #: The Account Key is encrypted with a Customer Key. +class DefaultAction(str, Enum): + + allow = "Allow" #: All public IP addresses are allowed. + deny = "Deny" #: Public IP addresses are blocked. + + class ManagedIdentityType(str, Enum): system_assigned = "SystemAssigned" #: A system-assigned managed identity. diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py index 3eb742ecb99a..dde71d02f903 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models.py @@ -195,6 +195,29 @@ def __init__(self, **kwargs): self.odatatype = '#Microsoft.Media.AbsoluteClipTime' +class AccessControl(Model): + """AccessControl. + + :param default_action: The behavior for IP access control in Key Delivery. + Possible values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.media.models.DefaultAction + :param ip_allow_list: The IP allow list for access control in Key + Delivery. If the default action is set to 'Allow', the IP allow list must + be empty. + :type ip_allow_list: list[str] + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_allow_list': {'key': 'ipAllowList', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(AccessControl, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', None) + self.ip_allow_list = kwargs.get('ip_allow_list', None) + + class AccountEncryption(Model): """AccountEncryption. @@ -4255,6 +4278,22 @@ def __init__(self, **kwargs): self.odatatype = '#Microsoft.Media.JpgLayer' +class KeyDelivery(Model): + """KeyDelivery. + + :param access_control: The access control properties for Key Delivery. + :type access_control: ~azure.mgmt.media.models.AccessControl + """ + + _attribute_map = { + 'access_control': {'key': 'accessControl', 'type': 'AccessControl'}, + } + + def __init__(self, **kwargs): + super(KeyDelivery, self).__init__(**kwargs) + self.access_control = kwargs.get('access_control', None) + + class KeyVaultProperties(Model): """KeyVaultProperties. @@ -5031,6 +5070,9 @@ class MediaService(TrackedResource): ~azure.mgmt.media.models.StorageAuthentication :param encryption: The account encryption properties. :type encryption: ~azure.mgmt.media.models.AccountEncryption + :param key_delivery: The Key Delivery properties for Media Services + account. + :type key_delivery: ~azure.mgmt.media.models.KeyDelivery :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity :ivar system_data: The system metadata relating to this resource. @@ -5056,6 +5098,7 @@ class MediaService(TrackedResource): 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } @@ -5066,6 +5109,7 @@ def __init__(self, **kwargs): self.storage_accounts = kwargs.get('storage_accounts', None) self.storage_authentication = kwargs.get('storage_authentication', None) self.encryption = kwargs.get('encryption', None) + self.key_delivery = kwargs.get('key_delivery', None) self.identity = kwargs.get('identity', None) self.system_data = None @@ -5106,6 +5150,56 @@ def __init__(self, **kwargs): self.tenant_id = None +class MediaServiceUpdate(Model): + """A Media Services account update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar media_service_id: The Media Services account ID. + :vartype media_service_id: str + :param storage_accounts: The storage accounts for this resource. + :type storage_accounts: list[~azure.mgmt.media.models.StorageAccount] + :param storage_authentication: Possible values include: 'System', + 'ManagedIdentity' + :type storage_authentication: str or + ~azure.mgmt.media.models.StorageAuthentication + :param encryption: The account encryption properties. + :type encryption: ~azure.mgmt.media.models.AccountEncryption + :param key_delivery: The Key Delivery properties for Media Services + account. + :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param identity: The Managed Identity for the Media Services account. + :type identity: ~azure.mgmt.media.models.MediaServiceIdentity + """ + + _validation = { + 'media_service_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'media_service_id': {'key': 'properties.mediaServiceId', 'type': 'str'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, + 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, + } + + def __init__(self, **kwargs): + super(MediaServiceUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.media_service_id = None + self.storage_accounts = kwargs.get('storage_accounts', None) + self.storage_authentication = kwargs.get('storage_authentication', None) + self.encryption = kwargs.get('encryption', None) + self.key_delivery = kwargs.get('key_delivery', None) + self.identity = kwargs.get('identity', None) + + class MetricDimension(Model): """A metric dimension. @@ -5166,6 +5260,15 @@ class MetricSpecification(Model): :type supported_aggregation_types: list[str] :ivar dimensions: The metric dimensions. :vartype dimensions: list[~azure.mgmt.media.models.MetricDimension] + :ivar enable_regional_mdm_account: Indicates whether regional MDM account + is enabled. + :vartype enable_regional_mdm_account: bool + :ivar source_mdm_account: The source MDM account. + :vartype source_mdm_account: str + :ivar source_mdm_namespace: The source MDM namespace. + :vartype source_mdm_namespace: str + :ivar supported_time_grain_types: The supported time grain types. + :vartype supported_time_grain_types: list[str] """ _validation = { @@ -5176,6 +5279,10 @@ class MetricSpecification(Model): 'aggregation_type': {'readonly': True}, 'lock_aggregation_type': {'readonly': True}, 'dimensions': {'readonly': True}, + 'enable_regional_mdm_account': {'readonly': True}, + 'source_mdm_account': {'readonly': True}, + 'source_mdm_namespace': {'readonly': True}, + 'supported_time_grain_types': {'readonly': True}, } _attribute_map = { @@ -5187,6 +5294,10 @@ class MetricSpecification(Model): 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -5199,6 +5310,10 @@ def __init__(self, **kwargs): self.lock_aggregation_type = None self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) self.dimensions = None + self.enable_regional_mdm_account = None + self.source_mdm_account = None + self.source_mdm_namespace = None + self.supported_time_grain_types = None class MultiBitrateFormat(Format): @@ -5355,6 +5470,11 @@ class Operation(Model): :type origin: str :param properties: Operation properties format. :type properties: ~azure.mgmt.media.models.Properties + :param is_data_action: Whether the operation applies to data-plane. + :type is_data_action: bool + :param action_type: Indicates the action type. Possible values include: + 'Internal' + :type action_type: str or ~azure.mgmt.media.models.ActionType """ _validation = { @@ -5366,6 +5486,8 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'Properties'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -5374,6 +5496,8 @@ def __init__(self, **kwargs): self.display = kwargs.get('display', None) self.origin = kwargs.get('origin', None) self.properties = kwargs.get('properties', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.action_type = kwargs.get('action_type', None) class OperationDisplay(Model): diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py index 14e6dbafe006..20d9e7ff377c 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/models/_models_py3.py @@ -195,6 +195,29 @@ def __init__(self, *, time, **kwargs) -> None: self.odatatype = '#Microsoft.Media.AbsoluteClipTime' +class AccessControl(Model): + """AccessControl. + + :param default_action: The behavior for IP access control in Key Delivery. + Possible values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.media.models.DefaultAction + :param ip_allow_list: The IP allow list for access control in Key + Delivery. If the default action is set to 'Allow', the IP allow list must + be empty. + :type ip_allow_list: list[str] + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_allow_list': {'key': 'ipAllowList', 'type': '[str]'}, + } + + def __init__(self, *, default_action=None, ip_allow_list=None, **kwargs) -> None: + super(AccessControl, self).__init__(**kwargs) + self.default_action = default_action + self.ip_allow_list = ip_allow_list + + class AccountEncryption(Model): """AccountEncryption. @@ -4255,6 +4278,22 @@ def __init__(self, *, width: str=None, height: str=None, label: str=None, qualit self.odatatype = '#Microsoft.Media.JpgLayer' +class KeyDelivery(Model): + """KeyDelivery. + + :param access_control: The access control properties for Key Delivery. + :type access_control: ~azure.mgmt.media.models.AccessControl + """ + + _attribute_map = { + 'access_control': {'key': 'accessControl', 'type': 'AccessControl'}, + } + + def __init__(self, *, access_control=None, **kwargs) -> None: + super(KeyDelivery, self).__init__(**kwargs) + self.access_control = access_control + + class KeyVaultProperties(Model): """KeyVaultProperties. @@ -5031,6 +5070,9 @@ class MediaService(TrackedResource): ~azure.mgmt.media.models.StorageAuthentication :param encryption: The account encryption properties. :type encryption: ~azure.mgmt.media.models.AccountEncryption + :param key_delivery: The Key Delivery properties for Media Services + account. + :type key_delivery: ~azure.mgmt.media.models.KeyDelivery :param identity: The Managed Identity for the Media Services account. :type identity: ~azure.mgmt.media.models.MediaServiceIdentity :ivar system_data: The system metadata relating to this resource. @@ -5056,16 +5098,18 @@ class MediaService(TrackedResource): 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, identity=None, **kwargs) -> None: super(MediaService, self).__init__(tags=tags, location=location, **kwargs) self.media_service_id = None self.storage_accounts = storage_accounts self.storage_authentication = storage_authentication self.encryption = encryption + self.key_delivery = key_delivery self.identity = identity self.system_data = None @@ -5106,6 +5150,56 @@ def __init__(self, *, type, **kwargs) -> None: self.tenant_id = None +class MediaServiceUpdate(Model): + """A Media Services account update. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: Resource tags. + :type tags: dict[str, str] + :ivar media_service_id: The Media Services account ID. + :vartype media_service_id: str + :param storage_accounts: The storage accounts for this resource. + :type storage_accounts: list[~azure.mgmt.media.models.StorageAccount] + :param storage_authentication: Possible values include: 'System', + 'ManagedIdentity' + :type storage_authentication: str or + ~azure.mgmt.media.models.StorageAuthentication + :param encryption: The account encryption properties. + :type encryption: ~azure.mgmt.media.models.AccountEncryption + :param key_delivery: The Key Delivery properties for Media Services + account. + :type key_delivery: ~azure.mgmt.media.models.KeyDelivery + :param identity: The Managed Identity for the Media Services account. + :type identity: ~azure.mgmt.media.models.MediaServiceIdentity + """ + + _validation = { + 'media_service_id': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'media_service_id': {'key': 'properties.mediaServiceId', 'type': 'str'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, + 'storage_authentication': {'key': 'properties.storageAuthentication', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'key_delivery': {'key': 'properties.keyDelivery', 'type': 'KeyDelivery'}, + 'identity': {'key': 'identity', 'type': 'MediaServiceIdentity'}, + } + + def __init__(self, *, tags=None, storage_accounts=None, storage_authentication=None, encryption=None, key_delivery=None, identity=None, **kwargs) -> None: + super(MediaServiceUpdate, self).__init__(**kwargs) + self.tags = tags + self.media_service_id = None + self.storage_accounts = storage_accounts + self.storage_authentication = storage_authentication + self.encryption = encryption + self.key_delivery = key_delivery + self.identity = identity + + class MetricDimension(Model): """A metric dimension. @@ -5166,6 +5260,15 @@ class MetricSpecification(Model): :type supported_aggregation_types: list[str] :ivar dimensions: The metric dimensions. :vartype dimensions: list[~azure.mgmt.media.models.MetricDimension] + :ivar enable_regional_mdm_account: Indicates whether regional MDM account + is enabled. + :vartype enable_regional_mdm_account: bool + :ivar source_mdm_account: The source MDM account. + :vartype source_mdm_account: str + :ivar source_mdm_namespace: The source MDM namespace. + :vartype source_mdm_namespace: str + :ivar supported_time_grain_types: The supported time grain types. + :vartype supported_time_grain_types: list[str] """ _validation = { @@ -5176,6 +5279,10 @@ class MetricSpecification(Model): 'aggregation_type': {'readonly': True}, 'lock_aggregation_type': {'readonly': True}, 'dimensions': {'readonly': True}, + 'enable_regional_mdm_account': {'readonly': True}, + 'source_mdm_account': {'readonly': True}, + 'source_mdm_namespace': {'readonly': True}, + 'supported_time_grain_types': {'readonly': True}, } _attribute_map = { @@ -5187,6 +5294,10 @@ class MetricSpecification(Model): 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, } def __init__(self, *, supported_aggregation_types=None, **kwargs) -> None: @@ -5199,6 +5310,10 @@ def __init__(self, *, supported_aggregation_types=None, **kwargs) -> None: self.lock_aggregation_type = None self.supported_aggregation_types = supported_aggregation_types self.dimensions = None + self.enable_regional_mdm_account = None + self.source_mdm_account = None + self.source_mdm_namespace = None + self.supported_time_grain_types = None class MultiBitrateFormat(Format): @@ -5355,6 +5470,11 @@ class Operation(Model): :type origin: str :param properties: Operation properties format. :type properties: ~azure.mgmt.media.models.Properties + :param is_data_action: Whether the operation applies to data-plane. + :type is_data_action: bool + :param action_type: Indicates the action type. Possible values include: + 'Internal' + :type action_type: str or ~azure.mgmt.media.models.ActionType """ _validation = { @@ -5366,14 +5486,18 @@ class Operation(Model): 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'Properties'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, } - def __init__(self, *, name: str, display=None, origin: str=None, properties=None, **kwargs) -> None: + def __init__(self, *, name: str, display=None, origin: str=None, properties=None, is_data_action: bool=None, action_type=None, **kwargs) -> None: super(Operation, self).__init__(**kwargs) self.name = name self.display = display self.origin = origin self.properties = properties + self.is_data_action = is_data_action + self.action_type = action_type class OperationDisplay(Model): diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py index 28a75741d8ad..9c57d5f8d823 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_locations_operations.py @@ -24,7 +24,7 @@ class LocationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-05-01" self.config = config diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py index 03e3ea940326..e81181498cf8 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_mediaservices_operations.py @@ -24,7 +24,7 @@ class MediaservicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-05-01" self.config = config @@ -310,7 +310,7 @@ def update( :param account_name: The Media Services account name. :type account_name: str :param parameters: The request parameters - :type parameters: ~azure.mgmt.media.models.MediaService + :type parameters: ~azure.mgmt.media.models.MediaServiceUpdate :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -347,7 +347,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'MediaService') + body_content = self._serialize.body(parameters, 'MediaServiceUpdate') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -570,62 +570,3 @@ def internal_paging(next_link=None): return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices'} - - def get_by_subscription( - self, account_name, custom_headers=None, raw=False, **operation_config): - """Get a Media Services account. - - Get the details of a Media Services account. - - :param account_name: The Media Services account name. - :type account_name: 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`. - :return: MediaService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.media.models.MediaService or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ApiErrorException` - """ - # Construct URL - url = self.get_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'accountName': self._serialize.url("account_name", account_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' - 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 and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ApiErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('MediaService', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/mediaservices/{accountName}'} diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py index 36822335dd47..f240bca04db6 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-05-01" self.config = config diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py index d6dc50ff2d7e..3bdd096a4da1 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_endpoint_connections_operations.py @@ -24,7 +24,7 @@ class PrivateEndpointConnectionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-05-01" self.config = config diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py index e37e1ff60548..71808c5c481e 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/operations/_private_link_resources_operations.py @@ -24,7 +24,7 @@ class PrivateLinkResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API to be used with the client request. Constant value: "2020-05-01". + :ivar api_version: The version of the API to be used with the client request. Constant value: "2021-05-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-05-01" + self.api_version = "2021-05-01" self.config = config diff --git a/sdk/media/azure-mgmt-media/azure/mgmt/media/version.py b/sdk/media/azure-mgmt-media/azure/mgmt/media/version.py index 9797f3dd0011..20cee28211d4 100644 --- a/sdk/media/azure-mgmt-media/azure/mgmt/media/version.py +++ b/sdk/media/azure-mgmt-media/azure/mgmt/media/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "4.0.0"