diff --git a/sdk/iothub/azure-mgmt-iotcentral/_meta.json b/sdk/iothub/azure-mgmt-iotcentral/_meta.json index b36b0cb959aa..fd4aec1b8f43 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/_meta.json +++ b/sdk/iothub/azure-mgmt-iotcentral/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.4.2", - "use": "@autorest/python@5.6.6", - "commit": "15d7abacf7b4f7317ef96f7e8300a7b51e315e7b", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "d08a6bf945578219340525de0f2bfeabd96a6988", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/iotcentral/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.4.2", + "autorest_command": "autorest specification/iotcentral/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/iotcentral/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py index cfc92edae559..dd3335b8abfc 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-iotcentral/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json index 4beed9e62cf3..8972ad1fd857 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2018-09-01", - "total_api_version_list": ["2018-09-01"], + "chosen_version": "2021-06-01", + "total_api_version_list": ["2021-06-01"], "client": { "name": "IotCentralClient", "filename": "_iot_central_client", diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py index 6dddc002d43d..e5754a47ce68 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py index 1c9e1d05b287..ee49edae2e28 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-iotcentral/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py index 900072f121b1..3e2f0a5fa6ae 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py @@ -47,7 +47,7 @@ async def get( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.App": """Get the metadata of an IoT Central application. @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -107,14 +107,14 @@ async def _create_or_update_initial( resource_group_name: str, resource_name: str, app: "_models.App", - **kwargs + **kwargs: Any ) -> Optional["_models.App"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.App"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -165,7 +165,7 @@ async def begin_create_or_update( resource_group_name: str, resource_name: str, app: "_models.App", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.App"]: """Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then @@ -180,8 +180,8 @@ async def begin_create_or_update( :type app: ~azure.mgmt.iotcentral.models.App :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either App or the result of cls(response) @@ -239,14 +239,14 @@ async def _update_initial( resource_group_name: str, resource_name: str, app_patch: "_models.AppPatch", - **kwargs + **kwargs: Any ) -> Optional["_models.App"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.App"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -294,7 +294,7 @@ async def begin_update( resource_group_name: str, resource_name: str, app_patch: "_models.AppPatch", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.App"]: """Update the metadata of an IoT Central application. @@ -307,8 +307,8 @@ async def begin_update( :type app_patch: ~azure.mgmt.iotcentral.models.AppPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either App or the result of cls(response) @@ -365,14 +365,14 @@ async def _delete_initial( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -409,7 +409,7 @@ async def begin_delete( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete an IoT Central application. @@ -420,8 +420,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -472,7 +472,7 @@ def get_long_running_output(pipeline_response): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppListResult"]: """Get all IoT Central Applications in a subscription. @@ -486,7 +486,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -539,7 +539,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppListResult"]: """Get all the IoT Central Applications in a resource group. @@ -556,7 +556,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -610,7 +610,7 @@ async def get_next(next_link=None): async def check_name_availability( self, operation_inputs: "_models.OperationInputs", - **kwargs + **kwargs: Any ) -> "_models.AppAvailabilityInfo": """Check if an IoT Central application name is available. @@ -627,7 +627,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -669,7 +669,7 @@ async def check_name_availability( async def check_subdomain_availability( self, operation_inputs: "_models.OperationInputs", - **kwargs + **kwargs: Any ) -> "_models.AppAvailabilityInfo": """Check if an IoT Central application subdomain is available. @@ -686,7 +686,7 @@ async def check_subdomain_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -727,7 +727,7 @@ async def check_subdomain_availability( def list_templates( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppTemplatesResult"]: """Get all available application templates. @@ -741,7 +741,7 @@ def list_templates( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py index cb72d188d89c..aa485130a560 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py @@ -43,9 +43,9 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: - """Lists all of the available IoT Central application REST API operations. + """Lists all of the available IoT Central Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index 46894127691b..0d60d7db2991 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -21,6 +21,7 @@ from ._models_py3 import OperationInputs from ._models_py3 import OperationListResult from ._models_py3 import Resource + from ._models_py3 import SystemAssignedServiceIdentity except (SyntaxError, ImportError): from ._models import App # type: ignore from ._models import AppAvailabilityInfo # type: ignore @@ -36,9 +37,12 @@ from ._models import OperationInputs # type: ignore from ._models import OperationListResult # type: ignore from ._models import Resource # type: ignore + from ._models import SystemAssignedServiceIdentity # type: ignore from ._iot_central_client_enums import ( AppSku, + AppState, + SystemAssignedServiceIdentityType, ) __all__ = [ @@ -56,5 +60,8 @@ 'OperationInputs', 'OperationListResult', 'Resource', + 'SystemAssignedServiceIdentity', 'AppSku', + 'AppState', + 'SystemAssignedServiceIdentityType', ] diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py index 6a99e3a1cbb1..52a44bdf673b 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py @@ -30,8 +30,20 @@ class AppSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The name of the SKU. """ - F1 = "F1" - S1 = "S1" ST0 = "ST0" ST1 = "ST1" ST2 = "ST2" + +class AppState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the application. + """ + + CREATED = "created" + SUSPENDED = "suspended" + +class SystemAssignedServiceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity (either system assigned, or none). + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py index d1ca34ecab30..3e86ca4524fa 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py @@ -74,6 +74,8 @@ class App(Resource): :type tags: dict[str, str] :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -84,6 +86,9 @@ class App(Resource): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -93,6 +98,7 @@ class App(Resource): 'location': {'required': True}, 'sku': {'required': True}, 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { @@ -102,10 +108,12 @@ class App(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -114,10 +122,12 @@ def __init__( ): super(App, self).__init__(**kwargs) self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) self.application_id = None self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = None class AppAvailabilityInfo(msrest.serialization.Model): @@ -187,6 +197,8 @@ class AppPatch(msrest.serialization.Model): :type tags: dict[str, str] :param sku: A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -197,19 +209,25 @@ class AppPatch(msrest.serialization.Model): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -219,10 +237,12 @@ def __init__( super(AppPatch, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) self.application_id = None self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = None class AppSkuInfo(msrest.serialization.Model): @@ -230,8 +250,7 @@ class AppSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. Possible values include: "F1", "S1", "ST0", "ST1", - "ST2". + :param name: Required. The name of the SKU. Possible values include: "ST0", "ST1", "ST2". :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ @@ -421,7 +440,7 @@ class Operation(msrest.serialization.Model): :ivar origin: The intended executor of the operation. :vartype origin: str :ivar properties: Additional descriptions for the operation. - :vartype properties: str + :vartype properties: any """ _validation = { @@ -434,7 +453,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -544,3 +563,43 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) self.value = None + + +class SystemAssignedServiceIdentity(msrest.serialization.Model): + """Managed service identity (either system assigned, or none). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (either system assigned, or none). + Possible values include: "None", "SystemAssigned". + :type type: str or ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemAssignedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs['type'] diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py index cb80f7e3165e..ad84a466d054 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py @@ -81,6 +81,8 @@ class App(Resource): :type tags: dict[str, str] :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -91,6 +93,9 @@ class App(Resource): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -100,6 +105,7 @@ class App(Resource): 'location': {'required': True}, 'sku': {'required': True}, 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { @@ -109,10 +115,12 @@ class App(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -121,6 +129,7 @@ def __init__( location: str, sku: "AppSkuInfo", tags: Optional[Dict[str, str]] = None, + identity: Optional["SystemAssignedServiceIdentity"] = None, display_name: Optional[str] = None, subdomain: Optional[str] = None, template: Optional[str] = None, @@ -128,10 +137,12 @@ def __init__( ): super(App, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku + self.identity = identity self.application_id = None self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = None class AppAvailabilityInfo(msrest.serialization.Model): @@ -204,6 +215,8 @@ class AppPatch(msrest.serialization.Model): :type tags: dict[str, str] :param sku: A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -214,19 +227,25 @@ class AppPatch(msrest.serialization.Model): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -234,6 +253,7 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, sku: Optional["AppSkuInfo"] = None, + identity: Optional["SystemAssignedServiceIdentity"] = None, display_name: Optional[str] = None, subdomain: Optional[str] = None, template: Optional[str] = None, @@ -242,10 +262,12 @@ def __init__( super(AppPatch, self).__init__(**kwargs) self.tags = tags self.sku = sku + self.identity = identity self.application_id = None self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = None class AppSkuInfo(msrest.serialization.Model): @@ -253,8 +275,7 @@ class AppSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. Possible values include: "F1", "S1", "ST0", "ST1", - "ST2". + :param name: Required. The name of the SKU. Possible values include: "ST0", "ST1", "ST2". :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ @@ -450,7 +471,7 @@ class Operation(msrest.serialization.Model): :ivar origin: The intended executor of the operation. :vartype origin: str :ivar properties: Additional descriptions for the operation. - :vartype properties: str + :vartype properties: any """ _validation = { @@ -463,7 +484,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -580,3 +601,45 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.next_link = next_link self.value = None + + +class SystemAssignedServiceIdentity(msrest.serialization.Model): + """Managed service identity (either system assigned, or none). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (either system assigned, or none). + Possible values include: "None", "SystemAssigned". + :type type: str or ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Union[str, "SystemAssignedServiceIdentityType"], + **kwargs + ): + super(SystemAssignedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py index e3f18876efff..c0702db0dad1 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py @@ -71,7 +71,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -120,7 +120,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -187,8 +187,8 @@ def begin_create_or_update( :type app: ~azure.mgmt.iotcentral.models.App :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either App or the result of cls(response) @@ -254,7 +254,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -316,8 +316,8 @@ def begin_update( :type app_patch: ~azure.mgmt.iotcentral.models.AppPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either App or the result of cls(response) @@ -382,7 +382,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -431,8 +431,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -498,7 +498,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -569,7 +569,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -641,7 +641,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -701,7 +701,7 @@ def check_subdomain_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -757,7 +757,7 @@ def list_templates( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py index 6645b716bef2..70ce9049c4c0 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py @@ -50,7 +50,7 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.OperationListResult"] - """Lists all of the available IoT Central application REST API operations. + """Lists all of the available IoT Central Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None):