From 52b3e22bea5feb90b559996ce28618720d013ad3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 12 Nov 2020 02:45:54 +0000 Subject: [PATCH] CodeGen from PR 11639 in Azure/azure-rest-api-specs Merge b4b64803111a6a3c3e13503104b6c7b35b6f9ec7 into 7c8fd7f0705552f77bf442c567c854af01ab4805 --- .../mgmt/hybridkubernetes/models/__init__.py | 15 +- .../mgmt/hybridkubernetes/models/_models.py | 164 ++++++++++++++---- .../hybridkubernetes/models/_models_py3.py | 164 ++++++++++++++---- .../_connected_cluster_operations.py | 18 +- 4 files changed, 292 insertions(+), 69 deletions(-) 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..512e27a00106 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 @@ -10,6 +10,8 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AuthenticationDetails + from ._models_py3 import AuthenticationDetailsValue from ._models_py3 import AzureEntityResource from ._models_py3 import ConnectedCluster from ._models_py3 import ConnectedClusterAADProfile @@ -17,7 +19,8 @@ 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 @@ -25,6 +28,8 @@ from ._models_py3 import Resource from ._models_py3 import TrackedResource except (SyntaxError, ImportError): + from ._models import AuthenticationDetails + from ._models import AuthenticationDetailsValue from ._models import AzureEntityResource from ._models import ConnectedCluster from ._models import ConnectedClusterAADProfile @@ -32,7 +37,8 @@ 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 @@ -47,6 +53,8 @@ ) __all__ = [ + 'AuthenticationDetails', + 'AuthenticationDetailsValue', 'AzureEntityResource', 'ConnectedCluster', 'ConnectedClusterAADProfile', @@ -54,7 +62,8 @@ 'ConnectedClusterPatch', 'CredentialResult', 'CredentialResults', - 'ErrorDetails', + 'ErrorAdditionalInfo', + 'ErrorDetail', 'ErrorResponse', 'ErrorResponseException', 'Operation', 'OperationDisplay', 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..edd9ad2511fd 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 @@ -13,19 +13,69 @@ from msrest.exceptions import HttpOperationError +class AuthenticationDetails(Model): + """Authentication details of the user. + + 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 authentication_method: Required. The mode of client authentication. + Default value: "Token" . + :vartype authentication_method: str + :param value: Required. Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.models.AuthenticationDetailsValue + """ + + _validation = { + 'authentication_method': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'AuthenticationDetailsValue'}, + } + + authentication_method = "Token" + + def __init__(self, **kwargs): + super(AuthenticationDetails, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AuthenticationDetailsValue(Model): + """Authentication token value. + + :param token: Authentication token. + :type token: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AuthenticationDetailsValue, self).__init__(**kwargs) + self.token = kwargs.get('token', None) + + 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 +99,19 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """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 +145,21 @@ class CloudError(Model): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top + level resource. 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 +196,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,7 +215,7 @@ 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. + :param aad_profile: Required. AAD profile of the connected cluster. :type aad_profile: ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster @@ -176,8 +227,9 @@ class ConnectedCluster(TrackedResource): :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 """ @@ -222,7 +274,7 @@ def __init__(self, **kwargs): class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. + """AAD profile of the connected cluster. All required parameters must be populated in order to send to Azure. @@ -370,8 +422,36 @@ def __init__(self, **kwargs): self.kubeconfigs = None -class ErrorDetails(Model): - """The error response details containing error code and error message. +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 type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -380,33 +460,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 +584,19 @@ 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. + """The resource model definition for an Azure Resource Manager proxy resource. + It will have everything other than required location and tags. 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 """ 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..cd51aaa406f3 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 @@ -13,19 +13,69 @@ from msrest.exceptions import HttpOperationError +class AuthenticationDetails(Model): + """Authentication details of the user. + + 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 authentication_method: Required. The mode of client authentication. + Default value: "Token" . + :vartype authentication_method: str + :param value: Required. Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.models.AuthenticationDetailsValue + """ + + _validation = { + 'authentication_method': {'required': True, 'constant': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'AuthenticationDetailsValue'}, + } + + authentication_method = "Token" + + def __init__(self, *, value, **kwargs) -> None: + super(AuthenticationDetails, self).__init__(**kwargs) + self.value = value + + +class AuthenticationDetailsValue(Model): + """Authentication token value. + + :param token: Authentication token. + :type token: str + """ + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__(self, *, token: str=None, **kwargs) -> None: + super(AuthenticationDetailsValue, self).__init__(**kwargs) + self.token = token + + 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 +99,19 @@ def __init__(self, **kwargs) -> None: class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """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 +145,21 @@ class CloudError(Model): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top + level resource. 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 +196,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,7 +215,7 @@ 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. + :param aad_profile: Required. AAD profile of the connected cluster. :type aad_profile: ~azure.mgmt.hybridkubernetes.models.ConnectedClusterAADProfile :ivar kubernetes_version: The Kubernetes version of the connected cluster @@ -176,8 +227,9 @@ class ConnectedCluster(TrackedResource): :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 """ @@ -222,7 +274,7 @@ def __init__(self, *, location: str, identity, agent_public_key_certificate: str class ConnectedClusterAADProfile(Model): - """ConnectedClusterAADProfile. + """AAD profile of the connected cluster. All required parameters must be populated in order to send to Azure. @@ -370,8 +422,36 @@ def __init__(self, **kwargs) -> None: self.kubeconfigs = None -class ErrorDetails(Model): - """The error response details containing error code and error message. +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 type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: object + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -380,33 +460,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. + + 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, *, error=None, **kwargs) -> None: @@ -484,19 +584,19 @@ 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. + """The resource model definition for an Azure Resource Manager proxy resource. + It will have everything other than required location and tags. 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 """ 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..796dc7da51e6 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 @@ -373,7 +373,7 @@ def get_long_running_output(response): 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): + self, resource_group_name, cluster_name, value, 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 @@ -385,6 +385,9 @@ def list_cluster_user_credentials( :param cluster_name: The name of the Kubernetes cluster on which get is called. :type cluster_name: str + :param value: Authentication token value. + :type value: + ~azure.mgmt.hybridkubernetes.models.AuthenticationDetailsValue :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -396,6 +399,10 @@ def list_cluster_user_credentials( :raises: :class:`ErrorResponseException` """ + client_authentication_details = None + if value is not None: + client_authentication_details = models.AuthenticationDetails(value=value) + # Construct URL url = self.list_cluster_user_credentials.metadata['url'] path_format_arguments = { @@ -412,6 +419,7 @@ def list_cluster_user_credentials( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -419,8 +427,14 @@ def list_cluster_user_credentials( 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 body + if client_authentication_details is not None: + body_content = self._serialize.body(client_authentication_details, 'AuthenticationDetails') + else: + body_content = None + # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: