Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-hybridkubernetes] Updating default api version with 2021-04-01-preview version #6164

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1",
"autorest": "3.4.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "9c505209eb10a840fd73c56f72ac335e79816dca",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/hybridkubernetes/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.3.0",
"autorest_command": "autorest specification/hybridkubernetes/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.1 --use=@autorest/[email protected] --version=3.4.2",
"readme": "specification/hybridkubernetes/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-03-01",
"total_api_version_list": ["2021-03-01"],
"chosen_version": "2021-04-01-preview",
"total_api_version_list": ["2021-04-01-preview"],
"client": {
"name": "ConnectedKubernetesClient",
"filename": "_connected_kubernetes_client",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def get(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.OperationList"]:
"""Lists all of the available API operations for Connected Cluster resource.

Expand All @@ -57,7 +57,7 @@ def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2021-03-01"
api_version = "2021-04-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@
from ._models_py3 import ConnectedClusterIdentity
from ._models_py3 import ConnectedClusterList
from ._models_py3 import ConnectedClusterPatch
from ._models_py3 import CredentialResult
from ._models_py3 import CredentialResults
from ._models_py3 import ErrorAdditionalInfo
from ._models_py3 import ErrorDetail
from ._models_py3 import ErrorResponse
from ._models_py3 import HybridConnectionConfig
from ._models_py3 import ListClusterUserCredentialsProperties
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationList
Expand All @@ -25,9 +29,13 @@
from ._models import ConnectedClusterIdentity # type: ignore
from ._models import ConnectedClusterList # type: ignore
from ._models import ConnectedClusterPatch # type: ignore
from ._models import CredentialResult # type: ignore
from ._models import CredentialResults # type: ignore
from ._models import ErrorAdditionalInfo # type: ignore
from ._models import ErrorDetail # type: ignore
from ._models import ErrorResponse # type: ignore
from ._models import HybridConnectionConfig # type: ignore
from ._models import ListClusterUserCredentialsProperties # type: ignore
from ._models import Operation # type: ignore
from ._models import OperationDisplay # type: ignore
from ._models import OperationList # type: ignore
Expand All @@ -36,9 +44,11 @@
from ._models import TrackedResource # type: ignore

from ._connected_kubernetes_client_enums import (
AuthenticationMethod,
ConnectivityStatus,
CreatedByType,
LastModifiedByType,
PrivateLinkState,
ProvisioningState,
ResourceIdentityType,
)
Expand All @@ -48,18 +58,24 @@
'ConnectedClusterIdentity',
'ConnectedClusterList',
'ConnectedClusterPatch',
'CredentialResult',
'CredentialResults',
'ErrorAdditionalInfo',
'ErrorDetail',
'ErrorResponse',
'HybridConnectionConfig',
'ListClusterUserCredentialsProperties',
'Operation',
'OperationDisplay',
'OperationList',
'Resource',
'SystemData',
'TrackedResource',
'AuthenticationMethod',
'ConnectivityStatus',
'CreatedByType',
'LastModifiedByType',
'PrivateLinkState',
'ProvisioningState',
'ResourceIdentityType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ def __getattr__(cls, name):
raise AttributeError(name)


class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The mode of client authentication.
"""

TOKEN = "Token"
AAD = "AAD"

class ConnectivityStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Represents the connectivity status of the connected cluster.
"""
Expand Down Expand Up @@ -53,6 +60,13 @@ class LastModifiedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
MANAGED_IDENTITY = "ManagedIdentity"
KEY = "Key"

class PrivateLinkState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""Property which describes the state of private link on a connected cluster resource.
"""

ENABLED = "Enabled"
DISABLED = "Disabled"

class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The current deployment state of connectedClusters.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ class ConnectedCluster(TrackedResource):
:ivar connectivity_status: Represents the connectivity status of the connected cluster.
Possible values include: "Connecting", "Connected", "Offline", "Expired".
:vartype connectivity_status: str or ~connected_kubernetes_client.models.ConnectivityStatus
:param private_link_state: Property which describes the state of private link on a connected
cluster resource. Possible values include: "Enabled", "Disabled".
:type private_link_state: str or ~connected_kubernetes_client.models.PrivateLinkState
:param private_link_scope_resource_id: The resource id of the private link scope this connected
cluster is assigned to, if any.
:type private_link_scope_resource_id: str
"""

_validation = {
Expand Down Expand Up @@ -186,6 +192,8 @@ class ConnectedCluster(TrackedResource):
'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'},
'private_link_state': {'key': 'properties.privateLinkState', 'type': 'str'},
'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'},
}

def __init__(
Expand All @@ -207,6 +215,8 @@ def __init__(
self.managed_identity_certificate_expiration_time = None
self.last_connectivity_time = None
self.connectivity_status = None
self.private_link_state = kwargs.get('private_link_state', None)
self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None)


class ConnectedClusterIdentity(msrest.serialization.Model):
Expand Down Expand Up @@ -279,14 +289,18 @@ class ConnectedClusterPatch(msrest.serialization.Model):

:param tags: A set of tags. Resource tags.
:type tags: dict[str, str]
:param properties: Describes the connected cluster resource properties that can be updated
during PATCH operation.
:type properties: str
:param private_link_state: Property which describes the state of private link on a connected
cluster resource. Possible values include: "Enabled", "Disabled".
:type private_link_state: str or ~connected_kubernetes_client.models.PrivateLinkState
:param private_link_scope_resource_id: The resource id of the private link scope this connected
cluster is assigned to, if any.
:type private_link_scope_resource_id: str
"""

_attribute_map = {
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'str'},
'private_link_state': {'key': 'properties.privateLinkState', 'type': 'str'},
'private_link_scope_resource_id': {'key': 'properties.privateLinkScopeResourceId', 'type': 'str'},
}

def __init__(
Expand All @@ -295,7 +309,69 @@ def __init__(
):
super(ConnectedClusterPatch, self).__init__(**kwargs)
self.tags = kwargs.get('tags', None)
self.properties = kwargs.get('properties', None)
self.private_link_state = kwargs.get('private_link_state', None)
self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None)


class CredentialResult(msrest.serialization.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


class CredentialResults(msrest.serialization.Model):
"""The list of credential result response.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access
token.
:vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig
:ivar kubeconfigs: Base64-encoded Kubernetes configuration file.
:vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult]
"""

_validation = {
'hybrid_connection_config': {'readonly': True},
'kubeconfigs': {'readonly': True},
}

_attribute_map = {
'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'},
'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'},
}

def __init__(
self,
**kwargs
):
super(CredentialResults, self).__init__(**kwargs)
self.hybrid_connection_config = None
self.kubeconfigs = None


class ErrorAdditionalInfo(msrest.serialization.Model):
Expand All @@ -306,7 +382,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):
:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: str
:vartype info: any
"""

_validation = {
Expand All @@ -316,7 +392,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model):

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'info': {'key': 'info', 'type': 'str'},
'info': {'key': 'info', 'type': 'object'},
}

def __init__(
Expand Down Expand Up @@ -392,6 +468,78 @@ def __init__(
self.error = kwargs.get('error', None)


class HybridConnectionConfig(msrest.serialization.Model):
"""Contains the REP (rendezvous endpoint) and “Sender” access token.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar expiration_time: Timestamp when this token will be expired.
:vartype expiration_time: long
:ivar hybrid_connection_name: Name of the connection.
:vartype hybrid_connection_name: str
:ivar relay: Name of the relay.
:vartype relay: str
:ivar token: Sender access token.
:vartype token: str
"""

_validation = {
'expiration_time': {'readonly': True},
'hybrid_connection_name': {'readonly': True},
'relay': {'readonly': True},
'token': {'readonly': True},
}

_attribute_map = {
'expiration_time': {'key': 'expirationTime', 'type': 'long'},
'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'},
'relay': {'key': 'relay', 'type': 'str'},
'token': {'key': 'token', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(HybridConnectionConfig, self).__init__(**kwargs)
self.expiration_time = None
self.hybrid_connection_name = None
self.relay = None
self.token = None


class ListClusterUserCredentialsProperties(msrest.serialization.Model):
"""ListClusterUserCredentialsProperties.

All required parameters must be populated in order to send to Azure.

:param authentication_method: Required. The mode of client authentication. Possible values
include: "Token", "AAD".
:type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod
:param client_proxy: Required. Boolean value to indicate whether the request is for client side
proxy or not.
:type client_proxy: bool
"""

_validation = {
'authentication_method': {'required': True},
'client_proxy': {'required': True},
}

_attribute_map = {
'authentication_method': {'key': 'authenticationMethod', 'type': 'str'},
'client_proxy': {'key': 'clientProxy', 'type': 'bool'},
}

def __init__(
self,
**kwargs
):
super(ListClusterUserCredentialsProperties, self).__init__(**kwargs)
self.authentication_method = kwargs['authentication_method']
self.client_proxy = kwargs['client_proxy']


class Operation(msrest.serialization.Model):
"""The Connected cluster API operation.

Expand Down
Loading