async def update(self, resource_group_name: str, container_group_name: str, resource: '_models.Resource', **kwargs: Any) -> '_models.ContainerGroup':
    'Update container groups.\n\n        Updates container group tags with specified values.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param container_group_name: The name of the container group.\n        :type container_group_name: str\n        :param resource: The container group resource with just the tags to be updated.\n        :type resource: ~azure.mgmt.containerinstance.models.Resource\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: ContainerGroup, or the result of cls(response)\n        :rtype: ~azure.mgmt.containerinstance.models.ContainerGroup\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2021-03-01'
    content_type = kwargs.pop('content_type', 'application/json')
    accept = 'application/json'
    url = self.update.metadata['url']
    path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'containerGroupName': self._serialize.url('container_group_name', container_group_name, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    header_parameters['Content-Type'] = self._serialize.header('content_type', content_type, 'str')
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    body_content_kwargs = {}
    body_content = self._serialize.body(resource, 'Resource')
    body_content_kwargs['content'] = body_content
    request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    deserialized = self._deserialize('ContainerGroup', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized
Update container groups.

Updates container group tags with specified values.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param container_group_name: The name of the container group.
:type container_group_name: str
:param resource: The container group resource with just the tags to be updated.
:type resource: ~azure.mgmt.containerinstance.models.Resource
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ContainerGroup, or the result of cls(response)
:rtype: ~azure.mgmt.containerinstance.models.ContainerGroup
:raises: ~azure.core.exceptions.HttpResponseError
async def update(self, resource_group_name: str, container_group_name: str, resource: '_models.Resource', **kwargs: Any) -> '_models.ContainerGroup':
    'Update container groups.\n\n        Updates container group tags with specified values.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param container_group_name: The name of the container group.\n        :type container_group_name: str\n        :param resource: The container group resource with just the tags to be updated.\n        :type resource: ~azure.mgmt.containerinstance.models.Resource\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: ContainerGroup, or the result of cls(response)\n        :rtype: ~azure.mgmt.containerinstance.models.ContainerGroup\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2021-03-01'
    content_type = kwargs.pop('content_type', 'application/json')
    accept = 'application/json'
    url = self.update.metadata['url']
    path_format_arguments = {'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'containerGroupName': self._serialize.url('container_group_name', container_group_name, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    header_parameters['Content-Type'] = self._serialize.header('content_type', content_type, 'str')
    header_parameters['Accept'] = self._serialize.header('accept', accept, 'str')
    body_content_kwargs = {}
    body_content = self._serialize.body(resource, 'Resource')
    body_content_kwargs['content'] = body_content
    request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [200]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    deserialized = self._deserialize('ContainerGroup', pipeline_response)
    if cls:
        return cls(pipeline_response, deserialized, {})
    return deserialized