diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in +++ b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json new file mode 100644 index 000000000000..8c1246d06b01 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "11a0ddcb1ad5114d65b28ca715dafc4d080d8d22", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/apimanagement/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/apimanagement/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py index 9e47cec024bb..c84e50896056 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -6097,14 +6097,20 @@ def __init__(self, **kwargs): self.policies = kwargs.get('policies', None) -class OperationResultContract(Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param operation_result_contract_id: Operation result identifier. + :type operation_result_contract_id: str :param status: Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed' :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -6129,22 +6135,28 @@ class OperationResultContract(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } def __init__(self, **kwargs): super(OperationResultContract, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.operation_result_contract_id = kwargs.get('operation_result_contract_id', None) self.status = kwargs.get('status', None) self.started = kwargs.get('started', None) self.updated = kwargs.get('updated', None) @@ -8451,7 +8463,7 @@ def __init__(self, **kwargs): class TenantConfigurationSyncStateContract(Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -8474,16 +8486,20 @@ class TenantConfigurationSyncStateContract(Model): change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type configuration_change_date: datetime + :param last_operation_id: Most recent tenant configuration operation + identifier + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -8495,6 +8511,7 @@ def __init__(self, **kwargs): self.is_git_enabled = kwargs.get('is_git_enabled', None) self.sync_date = kwargs.get('sync_date', None) self.configuration_change_date = kwargs.get('configuration_change_date', None) + self.last_operation_id = kwargs.get('last_operation_id', None) class TenantSettingsContract(Resource): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py index 8b3fd08f4490..4b67b5d1a473 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py @@ -6097,14 +6097,20 @@ def __init__(self, *, template_parameters=None, description: str=None, request=N self.policies = policies -class OperationResultContract(Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param operation_result_contract_id: Operation result identifier. + :type operation_result_contract_id: str :param status: Status of an async operation. Possible values include: 'Started', 'InProgress', 'Succeeded', 'Failed' :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -6129,22 +6135,28 @@ class OperationResultContract(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'AsyncOperationStatus'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } - def __init__(self, *, id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None: + def __init__(self, *, operation_result_contract_id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None: super(OperationResultContract, self).__init__(**kwargs) - self.id = id + self.operation_result_contract_id = operation_result_contract_id self.status = status self.started = started self.updated = updated @@ -8451,7 +8463,7 @@ def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None: class TenantConfigurationSyncStateContract(Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -8474,19 +8486,23 @@ class TenantConfigurationSyncStateContract(Model): change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. :type configuration_change_date: datetime + :param last_operation_id: Most recent tenant configuration operation + identifier + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } - def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, **kwargs) -> None: + def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, last_operation_id: str=None, **kwargs) -> None: super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) self.branch = branch self.commit_id = commit_id @@ -8495,6 +8511,7 @@ def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=Non self.is_git_enabled = is_git_enabled self.sync_date = sync_date self.configuration_change_date = configuration_change_date + self.last_operation_id = last_operation_id class TenantSettingsContract(Resource): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py index 3602938c5479..154af6898b47 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): def list_by_service( self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config): - """Returns list of content items. + """Lists developer portal's content items specified by the provided + content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -114,7 +115,8 @@ def internal_paging(next_link=None): def get_entity_tag( self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config): - """Returns content item metadata. + """Returns the entity state (ETag) version of the developer portal's + content item specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -175,7 +177,8 @@ def get_entity_tag( def get( self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config): - """Returns content item details. + """Returns the developer portal's content item specified by its + identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -246,7 +249,8 @@ def get( def create_or_update( self, resource_group_name, service_name, content_type_id, content_item_id, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates new content item. + """Creates a new developer portal's content item specified by the provided + content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -327,7 +331,7 @@ def create_or_update( def delete( self, resource_group_name, service_name, content_type_id, content_item_id, if_match, custom_headers=None, raw=False, **operation_config): - """Removes specified content item. + """Removes the specified developer portal's content item. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py index ded5b9d7f41e..f70773955080 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer): def list_by_service( self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config): - """Returns list of content types. + """Lists the developer portal's content types. Content types describe + content items' properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -111,7 +112,8 @@ def internal_paging(next_link=None): def get( self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config): - """Gets API Management content type details. + """Gets the details of the developer portal's content type. Content types + describe content items' properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -179,7 +181,10 @@ def get( def create_or_update( self, resource_group_name, service_name, content_type_id, if_match=None, custom_headers=None, raw=False, **operation_config): - """Creates or updates an Content Type. + """Creates or updates the developer portal's content type. Content types + describe content items' properties, validation rules, and constraints. + Custom content types' identifiers need to start with the `c-` prefix. + Built-in content types can't be modified. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -257,7 +262,10 @@ def create_or_update( def delete( self, resource_group_name, service_name, content_type_id, if_match, custom_headers=None, raw=False, **operation_config): - """Removes specified content type. + """Removes the specified developer portal's content type. Content types + describe content items' properties, validation rules, and constraints. + Built-in content types (with identifiers starting with the `c-` prefix) + can't be removed. :param resource_group_name: The name of the resource group. :type resource_group_name: str diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py index 624b3d82ed02..8328a75204d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer): def list_by_service( self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config): - """Lists a collection of developer portal revision entities. + """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -132,7 +132,7 @@ def internal_paging(next_link=None): def get_entity_tag( self, resource_group_name, service_name, portal_revision_id, custom_headers=None, raw=False, **operation_config): - """Gets developer portal revision specified by its identifier. + """Gets the developer portal revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -191,7 +191,7 @@ def get_entity_tag( def get( self, resource_group_name, service_name, portal_revision_id, custom_headers=None, raw=False, **operation_config): - """Gets developer portal revision specified by its identifier. + """Gets the developer portal's revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -316,7 +316,9 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, service_name, portal_revision_id, description=None, is_current=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates a new developer portal revision. + """Creates a new developer portal's revision by running the portal's + publishing. The `isCurrent` property indicates if the revision is + publicly accessible. :param resource_group_name: The name of the resource group. :type resource_group_name: str