From b848434e9c0a27f7f693590ffdf66fe3fc9203b0 Mon Sep 17 00:00:00 2001 From: "Kaihui (Kerwin) Sun" Date: Mon, 1 Mar 2021 13:41:49 +0800 Subject: [PATCH] T1 hybridkubernetes 2021 03 01 (#16985) * CodeGen from PR 13138 in Azure/azure-rest-api-specs Added private link scope id property (#13138) * added private link scope id property * fixed update example Co-authored-by: Akash Keshari * test,version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Akash Keshari --- .../azure-mgmt-hybridkubernetes/CHANGELOG.md | 20 ++ .../_connected_kubernetes_client.py | 2 +- .../mgmt/hybridkubernetes/models/__init__.py | 27 +- .../_connected_kubernetes_client_enums.py | 24 ++ .../mgmt/hybridkubernetes/models/_models.py | 283 ++++++++++------- .../hybridkubernetes/models/_models_py3.py | 287 +++++++++++------- .../_connected_cluster_operations.py | 80 +---- .../operations/_operations.py | 4 +- .../azure/mgmt/hybridkubernetes/version.py | 2 +- 9 files changed, 410 insertions(+), 319 deletions(-) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md index c846f41c86ad..4089a4f7cb9a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md @@ -1,5 +1,25 @@ # Release History +## 0.2.0 (2021-03-01) + +**Features** + + - Model ConnectedCluster has a new parameter system_data + - Model ConnectedCluster has a new parameter infrastructure + - Model ConnectedCluster has a new parameter offering + - Model ConnectedCluster has a new parameter distribution + - Model ConnectedCluster has a new parameter managed_identity_certificate_expiration_time + - Model ConnectedCluster has a new parameter last_connectivity_time + - Model ConnectedCluster has a new parameter total_core_count + - Model ConnectedCluster has a new parameter connectivity_status + +**Breaking changes** + + - Operation ConnectedClusterOperations.update has a new signature + - Model ConnectedCluster no longer has parameter aad_profile + - Model ConnectedClusterPatch has a new signature + - Removed operation ConnectedClusterOperations.list_cluster_user_credentials + ## 0.1.0 (2020-05-18) * Initial Release diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_connected_kubernetes_client.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_connected_kubernetes_client.py index 886bab977087..c5835c283736 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_connected_kubernetes_client.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_connected_kubernetes_client.py @@ -44,7 +44,7 @@ def __init__( super(ConnectedKubernetesClient, 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-01-01-preview' + self.api_version = '2021-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py index b6b8458a7602..38b32a062363 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py @@ -12,57 +12,60 @@ try: from ._models_py3 import AzureEntityResource from ._models_py3 import ConnectedCluster - from ._models_py3 import ConnectedClusterAADProfile from ._models_py3 import ConnectedClusterIdentity from ._models_py3 import ConnectedClusterPatch - from ._models_py3 import CredentialResult - from ._models_py3 import CredentialResults - from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import ProxyResource from ._models_py3 import Resource + from ._models_py3 import SystemData from ._models_py3 import TrackedResource except (SyntaxError, ImportError): from ._models import AzureEntityResource from ._models import ConnectedCluster - from ._models import ConnectedClusterAADProfile from ._models import ConnectedClusterIdentity from ._models import ConnectedClusterPatch - from ._models import CredentialResult - from ._models import CredentialResults - from ._models import ErrorDetails + from ._models import ErrorAdditionalInfo + from ._models import ErrorDetail from ._models import ErrorResponse, ErrorResponseException from ._models import Operation from ._models import OperationDisplay from ._models import ProxyResource from ._models import Resource + from ._models import SystemData from ._models import TrackedResource from ._paged_models import ConnectedClusterPaged from ._paged_models import OperationPaged from ._connected_kubernetes_client_enums import ( ResourceIdentityType, ProvisioningState, + ConnectivityStatus, + CreatedByType, + LastModifiedByType, ) __all__ = [ 'AzureEntityResource', 'ConnectedCluster', - 'ConnectedClusterAADProfile', 'ConnectedClusterIdentity', 'ConnectedClusterPatch', - 'CredentialResult', - 'CredentialResults', - 'ErrorDetails', + 'ErrorAdditionalInfo', + 'ErrorDetail', 'ErrorResponse', 'ErrorResponseException', 'Operation', 'OperationDisplay', 'ProxyResource', 'Resource', + 'SystemData', 'TrackedResource', 'ConnectedClusterPaged', 'OperationPaged', 'ResourceIdentityType', 'ProvisioningState', + 'ConnectivityStatus', + 'CreatedByType', + 'LastModifiedByType', ] diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py index 0f8d53fe2bb1..ec9a12306e5e 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py @@ -27,3 +27,27 @@ class ProvisioningState(str, Enum): updating = "Updating" deleting = "Deleting" accepted = "Accepted" + + +class ConnectivityStatus(str, Enum): + + connecting = "Connecting" + connected = "Connected" + offline = "Offline" + expired = "Expired" + + +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" + + +class LastModifiedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py index 492f353d8bcc..463ce5965771 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -95,20 +100,23 @@ class CloudError(Model): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. 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 id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -145,13 +153,13 @@ class ConnectedCluster(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -164,22 +172,45 @@ class ConnectedCluster(TrackedResource): certificate used by the agent to do the initial handshake to the backend services in Azure. :type agent_public_key_certificate: str - :param aad_profile: Required. - :type aad_profile: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster resource :vartype kubernetes_version: str :ivar total_node_count: Number of nodes present in the connected cluster resource :vartype total_node_count: int + :ivar total_core_count: Number of CPU cores present in the connected + cluster resource + :vartype total_core_count: int :ivar agent_version: Version of the agent running on the connected cluster resource :vartype agent_version: str - :param provisioning_state: Possible values include: 'Succeeded', 'Failed', - 'Canceled', 'Provisioning', 'Updating', 'Deleting', 'Accepted' + :param provisioning_state: Provisioning state of the connected cluster + resource. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Provisioning', 'Updating', 'Deleting', 'Accepted' :type provisioning_state: str or ~azure.mgmt.hybridkubernetes.models.ProvisioningState + :param distribution: The Kubernetes distribution running on this connected + cluster. + :type distribution: str + :param infrastructure: The infrastructure on which the Kubernetes cluster + represented by this connected cluster is running on. + :type infrastructure: str + :ivar offering: Connected cluster offering + :vartype offering: str + :ivar managed_identity_certificate_expiration_time: Expiration time of the + managed identity certificate + :vartype managed_identity_certificate_expiration_time: datetime + :ivar last_connectivity_time: Time representing the last instance when + heart beat was received from the cluster + :vartype last_connectivity_time: datetime + :ivar connectivity_status: Represents the connectivity status of the + connected cluster. Possible values include: 'Connecting', 'Connected', + 'Offline', 'Expired' + :vartype connectivity_status: str or + ~azure.mgmt.hybridkubernetes.models.ConnectivityStatus + :ivar system_data: Metadata pertaining to creation and last modification + of the resource + :vartype system_data: ~azure.mgmt.hybridkubernetes.models.SystemData """ _validation = { @@ -189,10 +220,15 @@ class ConnectedCluster(TrackedResource): 'location': {'required': True}, 'identity': {'required': True}, 'agent_public_key_certificate': {'required': True}, - 'aad_profile': {'required': True}, 'kubernetes_version': {'readonly': True}, 'total_node_count': {'readonly': True}, + 'total_core_count': {'readonly': True}, 'agent_version': {'readonly': True}, + 'offering': {'readonly': True}, + 'managed_identity_certificate_expiration_time': {'readonly': True}, + 'last_connectivity_time': {'readonly': True}, + 'connectivity_status': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -203,56 +239,36 @@ class ConnectedCluster(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ConnectedClusterIdentity'}, 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'total_core_count': {'key': 'properties.totalCoreCount', 'type': 'int'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'distribution': {'key': 'properties.distribution', 'type': 'str'}, + 'infrastructure': {'key': 'properties.infrastructure', 'type': 'str'}, + 'offering': {'key': 'properties.offering', 'type': 'str'}, + 'managed_identity_certificate_expiration_time': {'key': 'properties.managedIdentityCertificateExpirationTime', 'type': 'iso-8601'}, + 'last_connectivity_time': {'key': 'properties.lastConnectivityTime', 'type': 'iso-8601'}, + 'connectivity_status': {'key': 'properties.connectivityStatus', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): super(ConnectedCluster, self).__init__(**kwargs) self.identity = kwargs.get('identity', None) self.agent_public_key_certificate = kwargs.get('agent_public_key_certificate', None) - self.aad_profile = kwargs.get('aad_profile', None) self.kubernetes_version = None self.total_node_count = None + self.total_core_count = None self.agent_version = None self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The aad tenant id which is configured on - target K8s cluster - :type tenant_id: str - :param client_app_id: Required. The client app id configured on target K8 - cluster - :type client_app_id: str - :param server_app_id: Required. The server app id to access AD server - :type server_app_id: str - """ - - _validation = { - 'tenant_id': {'required': True}, - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_app_id': {'key': 'clientAppId', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ConnectedClusterAADProfile, self).__init__(**kwargs) - self.tenant_id = kwargs.get('tenant_id', None) - self.client_app_id = kwargs.get('client_app_id', None) - self.server_app_id = kwargs.get('server_app_id', None) + self.distribution = kwargs.get('distribution', None) + self.infrastructure = kwargs.get('infrastructure', None) + self.offering = None + self.managed_identity_certificate_expiration_time = None + self.last_connectivity_time = None + self.connectivity_status = None + self.system_data = None class ConnectedClusterIdentity(Model): @@ -272,7 +288,8 @@ class ConnectedClusterIdentity(Model): :param type: Required. The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. - Possible values include: 'None', 'SystemAssigned' + Possible values include: 'None', 'SystemAssigned'. Default value: + "SystemAssigned" . :type type: str or ~azure.mgmt.hybridkubernetes.models.ResourceIdentityType """ @@ -293,7 +310,7 @@ def __init__(self, **kwargs): super(ConnectedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None - self.type = kwargs.get('type', None) + self.type = kwargs.get('type', "SystemAssigned") class ConnectedClusterPatch(Model): @@ -301,77 +318,52 @@ class ConnectedClusterPatch(Model): :param tags: Resource tags. :type tags: dict[str, str] - :param agent_public_key_certificate: Base64 encoded public certificate - used by the agent to do the initial handshake to the backend services in - Azure. - :type agent_public_key_certificate: str + :param properties: Describes the connected cluster resource properties + that can be updated during PATCH operation. + :type properties: object """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__(self, **kwargs): super(ConnectedClusterPatch, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) - self.agent_public_key_certificate = kwargs.get('agent_public_key_certificate', None) - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs): - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None + self.properties = kwargs.get('properties', None) -class CredentialResults(Model): - """The list of credential result response. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ _validation = { - 'kubeconfigs': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__(self, **kwargs): - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class ErrorDetails(Model): - """The error response details containing error code and error message. +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -380,33 +372,53 @@ class ErrorDetails(Model): :vartype code: str :ivar message: The error message. :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.hybridkubernetes.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.hybridkubernetes.models.ErrorAdditionalInfo] """ _validation = { 'code': {'readonly': True}, 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None + self.target = None + self.details = None + self.additional_info = None class ErrorResponse(Model): - """The error response that indicates why an operation has failed. + """Error response. + + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). - :param error: - :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + :param error: The error object. + :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetail """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__(self, **kwargs): @@ -484,19 +496,21 @@ def __init__(self, **kwargs): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -514,3 +528,44 @@ class ProxyResource(Resource): def __init__(self, **kwargs): super(ProxyResource, self).__init__(**kwargs) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.hybridkubernetes.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.hybridkubernetes.models.LastModifiedByType + :param last_modified_at: The timestamp of resource modification (UTC). + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py index e31f6f78bae0..bf112d32cf5a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs) -> None: class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -95,20 +100,23 @@ class CloudError(Model): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. 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 id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -145,13 +153,13 @@ class ConnectedCluster(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] @@ -164,22 +172,45 @@ class ConnectedCluster(TrackedResource): certificate used by the agent to do the initial handshake to the backend services in Azure. :type agent_public_key_certificate: str - :param aad_profile: Required. - :type aad_profile: - ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster resource :vartype kubernetes_version: str :ivar total_node_count: Number of nodes present in the connected cluster resource :vartype total_node_count: int + :ivar total_core_count: Number of CPU cores present in the connected + cluster resource + :vartype total_core_count: int :ivar agent_version: Version of the agent running on the connected cluster resource :vartype agent_version: str - :param provisioning_state: Possible values include: 'Succeeded', 'Failed', - 'Canceled', 'Provisioning', 'Updating', 'Deleting', 'Accepted' + :param provisioning_state: Provisioning state of the connected cluster + resource. Possible values include: 'Succeeded', 'Failed', 'Canceled', + 'Provisioning', 'Updating', 'Deleting', 'Accepted' :type provisioning_state: str or ~azure.mgmt.hybridkubernetes.models.ProvisioningState + :param distribution: The Kubernetes distribution running on this connected + cluster. + :type distribution: str + :param infrastructure: The infrastructure on which the Kubernetes cluster + represented by this connected cluster is running on. + :type infrastructure: str + :ivar offering: Connected cluster offering + :vartype offering: str + :ivar managed_identity_certificate_expiration_time: Expiration time of the + managed identity certificate + :vartype managed_identity_certificate_expiration_time: datetime + :ivar last_connectivity_time: Time representing the last instance when + heart beat was received from the cluster + :vartype last_connectivity_time: datetime + :ivar connectivity_status: Represents the connectivity status of the + connected cluster. Possible values include: 'Connecting', 'Connected', + 'Offline', 'Expired' + :vartype connectivity_status: str or + ~azure.mgmt.hybridkubernetes.models.ConnectivityStatus + :ivar system_data: Metadata pertaining to creation and last modification + of the resource + :vartype system_data: ~azure.mgmt.hybridkubernetes.models.SystemData """ _validation = { @@ -189,10 +220,15 @@ class ConnectedCluster(TrackedResource): 'location': {'required': True}, 'identity': {'required': True}, 'agent_public_key_certificate': {'required': True}, - 'aad_profile': {'required': True}, 'kubernetes_version': {'readonly': True}, 'total_node_count': {'readonly': True}, + 'total_core_count': {'readonly': True}, 'agent_version': {'readonly': True}, + 'offering': {'readonly': True}, + 'managed_identity_certificate_expiration_time': {'readonly': True}, + 'last_connectivity_time': {'readonly': True}, + 'connectivity_status': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { @@ -203,56 +239,36 @@ class ConnectedCluster(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'identity': {'key': 'identity', 'type': 'ConnectedClusterIdentity'}, 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, - 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ConnectedClusterAADProfile'}, 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, 'total_node_count': {'key': 'properties.totalNodeCount', 'type': 'int'}, + 'total_core_count': {'key': 'properties.totalCoreCount', 'type': 'int'}, 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'distribution': {'key': 'properties.distribution', 'type': 'str'}, + 'infrastructure': {'key': 'properties.infrastructure', 'type': 'str'}, + 'offering': {'key': 'properties.offering', 'type': 'str'}, + 'managed_identity_certificate_expiration_time': {'key': 'properties.managedIdentityCertificateExpirationTime', 'type': 'iso-8601'}, + 'last_connectivity_time': {'key': 'properties.lastConnectivityTime', 'type': 'iso-8601'}, + 'connectivity_status': {'key': 'properties.connectivityStatus', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str, identity, agent_public_key_certificate: str, aad_profile, tags=None, provisioning_state=None, **kwargs) -> None: + def __init__(self, *, location: str, identity, agent_public_key_certificate: str, tags=None, provisioning_state=None, distribution: str=None, infrastructure: str=None, **kwargs) -> None: super(ConnectedCluster, self).__init__(tags=tags, location=location, **kwargs) self.identity = identity self.agent_public_key_certificate = agent_public_key_certificate - self.aad_profile = aad_profile self.kubernetes_version = None self.total_node_count = None + self.total_core_count = None self.agent_version = None self.provisioning_state = provisioning_state - - -class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. - - All required parameters must be populated in order to send to Azure. - - :param tenant_id: Required. The aad tenant id which is configured on - target K8s cluster - :type tenant_id: str - :param client_app_id: Required. The client app id configured on target K8 - cluster - :type client_app_id: str - :param server_app_id: Required. The server app id to access AD server - :type server_app_id: str - """ - - _validation = { - 'tenant_id': {'required': True}, - 'client_app_id': {'required': True}, - 'server_app_id': {'required': True}, - } - - _attribute_map = { - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'client_app_id': {'key': 'clientAppId', 'type': 'str'}, - 'server_app_id': {'key': 'serverAppId', 'type': 'str'}, - } - - def __init__(self, *, tenant_id: str, client_app_id: str, server_app_id: str, **kwargs) -> None: - super(ConnectedClusterAADProfile, self).__init__(**kwargs) - self.tenant_id = tenant_id - self.client_app_id = client_app_id - self.server_app_id = server_app_id + self.distribution = distribution + self.infrastructure = infrastructure + self.offering = None + self.managed_identity_certificate_expiration_time = None + self.last_connectivity_time = None + self.connectivity_status = None + self.system_data = None class ConnectedClusterIdentity(Model): @@ -272,7 +288,8 @@ class ConnectedClusterIdentity(Model): :param type: Required. The type of identity used for the connected cluster. The type 'SystemAssigned, includes a system created identity. The type 'None' means no identity is assigned to the connected cluster. - Possible values include: 'None', 'SystemAssigned' + Possible values include: 'None', 'SystemAssigned'. Default value: + "SystemAssigned" . :type type: str or ~azure.mgmt.hybridkubernetes.models.ResourceIdentityType """ @@ -289,7 +306,7 @@ class ConnectedClusterIdentity(Model): 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, } - def __init__(self, *, type, **kwargs) -> None: + def __init__(self, *, type="SystemAssigned", **kwargs) -> None: super(ConnectedClusterIdentity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None @@ -301,77 +318,52 @@ class ConnectedClusterPatch(Model): :param tags: Resource tags. :type tags: dict[str, str] - :param agent_public_key_certificate: Base64 encoded public certificate - used by the agent to do the initial handshake to the backend services in - Azure. - :type agent_public_key_certificate: str + :param properties: Describes the connected cluster resource properties + that can be updated during PATCH operation. + :type properties: object """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'agent_public_key_certificate': {'key': 'properties.agentPublicKeyCertificate', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, *, tags=None, agent_public_key_certificate: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, properties=None, **kwargs) -> None: super(ConnectedClusterPatch, self).__init__(**kwargs) self.tags = tags - self.agent_public_key_certificate = agent_public_key_certificate - - -class CredentialResult(Model): - """The credential result response. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the credential. - :vartype name: str - :ivar value: Base64-encoded Kubernetes configuration file. - :vartype value: bytearray - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'bytearray'}, - } - - def __init__(self, **kwargs) -> None: - super(CredentialResult, self).__init__(**kwargs) - self.name = None - self.value = None + self.properties = properties -class CredentialResults(Model): - """The list of credential result response. +class ErrorAdditionalInfo(Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. - :vartype kubeconfigs: - list[~azure.mgmt.hybridkubernetes.models.CredentialResult] + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object """ _validation = { - 'kubeconfigs': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__(self, **kwargs) -> None: - super(CredentialResults, self).__init__(**kwargs) - self.kubeconfigs = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class ErrorDetails(Model): - """The error response details containing error code and error message. +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -380,33 +372,53 @@ class ErrorDetails(Model): :vartype code: str :ivar message: The error message. :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.hybridkubernetes.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~azure.mgmt.hybridkubernetes.models.ErrorAdditionalInfo] """ _validation = { 'code': {'readonly': True}, 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None + self.target = None + self.details = None + self.additional_info = None class ErrorResponse(Model): - """The error response that indicates why an operation has failed. + """Error response. - :param error: - :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetails + Common error response for all Azure Resource Manager APIs to return error + details for failed operations. (This also follows the OData error response + format.). + + :param error: The error object. + :type error: ~azure.mgmt.hybridkubernetes.models.ErrorDetail """ _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__(self, *, error=None, **kwargs) -> None: @@ -484,19 +496,21 @@ def __init__(self, *, provider: str=None, resource: str=None, operation: str=Non class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -514,3 +528,44 @@ class ProxyResource(Resource): def __init__(self, **kwargs) -> None: super(ProxyResource, self).__init__(**kwargs) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.hybridkubernetes.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.hybridkubernetes.models.LastModifiedByType + :param last_modified_at: The timestamp of resource modification (UTC). + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py index 5629cc7b43ea..e59c54041d45 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py @@ -26,7 +26,7 @@ class ConnectedClusterOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for this operation. Constant value: "2020-01-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-01". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-01-01-preview" + self.api_version = "2021-03-01" self.config = config @@ -149,7 +149,7 @@ def get_long_running_output(response): create.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} def update( - self, resource_group_name, cluster_name, tags=None, agent_public_key_certificate=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, tags=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a connected cluster. API to update certain properties of the connected cluster resource. @@ -162,10 +162,9 @@ def update( :type cluster_name: str :param tags: Resource tags. :type tags: dict[str, str] - :param agent_public_key_certificate: Base64 encoded public certificate - used by the agent to do the initial handshake to the backend services - in Azure. - :type agent_public_key_certificate: str + :param properties: Describes the connected cluster resource properties + that can be updated during PATCH operation. + :type properties: object :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -177,7 +176,7 @@ def update( :raises: :class:`ErrorResponseException` """ - connected_cluster_patch = models.ConnectedClusterPatch(tags=tags, agent_public_key_certificate=agent_public_key_certificate) + connected_cluster_patch = models.ConnectedClusterPatch(tags=tags, properties=properties) # Construct URL url = self.update.metadata['url'] @@ -372,71 +371,6 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} - def list_cluster_user_credentials( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets cluster user credentials of a connected cluster. - - Gets cluster user credentials of the connected cluster with a specified - resource group and name. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: The name of the Kubernetes cluster on which get - is called. - :type cluster_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: CredentialResults or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.hybridkubernetes.models.CredentialResults or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.list_cluster_user_credentials.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'clusterName': self._serialize.url("cluster_name", cluster_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', min_length=1) - - # 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.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('CredentialResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredentials'} - def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Lists all connected clusters. diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py index 9c3239ad4ccb..8c822f91566d 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/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 API version to use for this operation. Constant value: "2020-01-01-preview". + :ivar api_version: The API version to use for this operation. Constant value: "2021-03-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-01-01-preview" + self.api_version = "2021-03-01" self.config = config diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/version.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/version.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0"