From e4eaf452ea426a6a6321611bec4203aee4b9b6af Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 3 Nov 2020 03:26:51 +0000 Subject: [PATCH] Generated from 497fff42e0ca7711c20a3195cfe0aed958496b7b --- .../README.md | 7 + .../_source_control_configuration_client.py | 2 +- .../models/__init__.py | 21 +-- .../kubernetesconfiguration/models/_models.py | 132 ++++++++++++---- .../models/_models_py3.py | 144 ++++++++++++++---- ...urce_control_configuration_client_enums.py | 14 +- .../operations/_operations.py | 4 +- ...ource_control_configurations_operations.py | 4 +- 8 files changed, 245 insertions(+), 83 deletions(-) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/README.md index 74605e9bbd6f..1c8afdacfd0d 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/README.md @@ -4,6 +4,13 @@ This is the Microsoft Azure Kubernetes Configuration Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + +# Usage + +For code examples, see [Kubernetes Configuration Management](https://docs.microsoft.com/python/api/overview/azure/kubernetesconfiguration) +on docs.microsoft.com. + + # Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py index 004f8988387b..ced2c182d5f3 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/_source_control_configuration_client.py @@ -45,7 +45,7 @@ def __init__( super(SourceControlConfigurationClient, 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 = '2019-11-01-preview' + self.api_version = '2020-10-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py index 3288aba428da..d6832f3254ff 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/__init__.py @@ -20,6 +20,7 @@ from ._models_py3 import ResourceProviderOperationDisplay from ._models_py3 import Result from ._models_py3 import SourceControlConfiguration + from ._models_py3 import SystemData except (SyntaxError, ImportError): from ._models import ComplianceStatus from ._models import ErrorDefinition @@ -31,15 +32,15 @@ from ._models import ResourceProviderOperationDisplay from ._models import Result from ._models import SourceControlConfiguration + from ._models import SystemData from ._paged_models import ResourceProviderOperationPaged from ._paged_models import SourceControlConfigurationPaged from ._source_control_configuration_client_enums import ( - ComplianceState, - MessageLevel, + ComplianceStateType, + MessageLevelType, OperatorType, - OperatorScope, - EnableHelmOperator, - ProvisioningState, + OperatorScopeType, + ProvisioningStateType, ) __all__ = [ @@ -53,12 +54,12 @@ 'ResourceProviderOperationDisplay', 'Result', 'SourceControlConfiguration', + 'SystemData', 'SourceControlConfigurationPaged', 'ResourceProviderOperationPaged', - 'ComplianceState', - 'MessageLevel', + 'ComplianceStateType', + 'MessageLevelType', 'OperatorType', - 'OperatorScope', - 'EnableHelmOperator', - 'ProvisioningState', + 'OperatorScopeType', + 'ProvisioningStateType', ] diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py index 390ef2458747..9c1221aaf778 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models.py @@ -31,7 +31,7 @@ class ComplianceStatus(Model): Possible values include: 'Pending', 'Compliant', 'Noncompliant', 'Installed', 'Failed' :vartype compliance_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ComplianceState + ~azure.mgmt.kubernetesconfiguration.models.ComplianceStateType :param last_config_applied: Datetime the configuration was last applied. :type last_config_applied: datetime :param message: Message from when the configuration was applied. @@ -39,7 +39,7 @@ class ComplianceStatus(Model): :param message_level: Level of the message. Possible values include: 'Error', 'Warning', 'Information' :type message_level: str or - ~azure.mgmt.kubernetesconfiguration.models.MessageLevel + ~azure.mgmt.kubernetesconfiguration.models.MessageLevelType """ _validation = { @@ -64,36 +64,29 @@ def __init__(self, **kwargs): class ErrorDefinition(Model): """Error definition. - 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 code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: - list[~azure.mgmt.kubernetesconfiguration.models.ErrorDefinition] + :param code: Required. Service specific error code which serves as the + substatus for the HTTP error code. + :type code: str + :param message: Required. Description of the error. + :type message: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, } def __init__(self, **kwargs): super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) class ErrorResponse(Model): @@ -156,6 +149,9 @@ class Resource(Model): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -168,6 +164,7 @@ class Resource(Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -175,6 +172,7 @@ def __init__(self, **kwargs): self.id = None self.name = None self.type = None + self.system_data = kwargs.get('system_data', None) class ProxyResource(Resource): @@ -189,6 +187,9 @@ class ProxyResource(Resource): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -201,6 +202,7 @@ class ProxyResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -210,23 +212,35 @@ def __init__(self, **kwargs): class ResourceProviderOperation(Model): """Supported operation of this resource provider. + Variables are only populated by the server, and will be ignored when + sending a request. + :param name: Operation name, in format of {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. :type display: ~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationDisplay + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool """ + _validation = { + 'is_data_action': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } def __init__(self, **kwargs): super(ResourceProviderOperation, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.display = kwargs.get('display', None) + self.is_data_action = None class ResourceProviderOperationDisplay(Model): @@ -274,7 +288,7 @@ def __init__(self, **kwargs): class SourceControlConfiguration(ProxyResource): - """The SourceControl Configuration object. + """The SourceControl Configuration object returned in Get & Put response. Variables are only populated by the server, and will be ignored when sending a request. @@ -285,6 +299,9 @@ class SourceControlConfiguration(ProxyResource): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData :param repository_url: Url of the SourceControl Repository. :type repository_url: str :param operator_namespace: The namespace to which this operator is @@ -301,19 +318,24 @@ class SourceControlConfiguration(ProxyResource): :param operator_params: Any Parameters for the Operator instance in string format. :type operator_params: str + :param configuration_protected_settings: Name-value pairs of protected + configuration settings for the configuration + :type configuration_protected_settings: dict[str, str] :param operator_scope: Scope at which the operator will be installed. Possible values include: 'cluster', 'namespace'. Default value: "cluster" . :type operator_scope: str or - ~azure.mgmt.kubernetesconfiguration.models.OperatorScope + ~azure.mgmt.kubernetesconfiguration.models.OperatorScopeType :ivar repository_public_key: Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). :vartype repository_public_key: str + :param ssh_known_hosts_contents: Base64-encoded known_hosts contents + containing public SSH keys required to access private Git instances + :type ssh_known_hosts_contents: str :param enable_helm_operator: Option to enable Helm Operator for this git - configuration. Possible values include: 'true', 'false' - :type enable_helm_operator: str or - ~azure.mgmt.kubernetesconfiguration.models.EnableHelmOperator + configuration. + :type enable_helm_operator: bool :param helm_operator_properties: Properties for Helm operator. :type helm_operator_properties: ~azure.mgmt.kubernetesconfiguration.models.HelmOperatorProperties @@ -321,7 +343,7 @@ class SourceControlConfiguration(ProxyResource): Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' :vartype provisioning_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ProvisioningState + ~azure.mgmt.kubernetesconfiguration.models.ProvisioningStateType :ivar compliance_status: Compliance Status of the Configuration :vartype compliance_status: ~azure.mgmt.kubernetesconfiguration.models.ComplianceStatus @@ -340,14 +362,17 @@ class SourceControlConfiguration(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, 'operator_namespace': {'key': 'properties.operatorNamespace', 'type': 'str'}, 'operator_instance_name': {'key': 'properties.operatorInstanceName', 'type': 'str'}, 'operator_type': {'key': 'properties.operatorType', 'type': 'str'}, 'operator_params': {'key': 'properties.operatorParams', 'type': 'str'}, + 'configuration_protected_settings': {'key': 'properties.configurationProtectedSettings', 'type': '{str}'}, 'operator_scope': {'key': 'properties.operatorScope', 'type': 'str'}, 'repository_public_key': {'key': 'properties.repositoryPublicKey', 'type': 'str'}, - 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'str'}, + 'ssh_known_hosts_contents': {'key': 'properties.sshKnownHostsContents', 'type': 'str'}, + 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'bool'}, 'helm_operator_properties': {'key': 'properties.helmOperatorProperties', 'type': 'HelmOperatorProperties'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'compliance_status': {'key': 'properties.complianceStatus', 'type': 'ComplianceStatus'}, @@ -360,9 +385,64 @@ def __init__(self, **kwargs): self.operator_instance_name = kwargs.get('operator_instance_name', None) self.operator_type = kwargs.get('operator_type', None) self.operator_params = kwargs.get('operator_params', None) + self.configuration_protected_settings = kwargs.get('configuration_protected_settings', None) self.operator_scope = kwargs.get('operator_scope', "cluster") self.repository_public_key = None + self.ssh_known_hosts_contents = kwargs.get('ssh_known_hosts_contents', None) self.enable_helm_operator = kwargs.get('enable_helm_operator', None) self.helm_operator_properties = kwargs.get('helm_operator_properties', None) self.provisioning_state = None self.compliance_status = None + + +class SystemData(Model): + """Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar created_by: A string identifier for the identity that created the + resource + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: + user, application, managedIdentity, key + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC) + :vartype created_at: datetime + :ivar last_modified_by: A string identifier for the identity that last + modified the resource + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the + resource: user, application, managedIdentity, key + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC) + :vartype last_modified_at: datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _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 = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py index 67d46fffa370..70c41177c250 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_models_py3.py @@ -31,7 +31,7 @@ class ComplianceStatus(Model): Possible values include: 'Pending', 'Compliant', 'Noncompliant', 'Installed', 'Failed' :vartype compliance_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ComplianceState + ~azure.mgmt.kubernetesconfiguration.models.ComplianceStateType :param last_config_applied: Datetime the configuration was last applied. :type last_config_applied: datetime :param message: Message from when the configuration was applied. @@ -39,7 +39,7 @@ class ComplianceStatus(Model): :param message_level: Level of the message. Possible values include: 'Error', 'Warning', 'Information' :type message_level: str or - ~azure.mgmt.kubernetesconfiguration.models.MessageLevel + ~azure.mgmt.kubernetesconfiguration.models.MessageLevelType """ _validation = { @@ -64,36 +64,29 @@ def __init__(self, *, last_config_applied=None, message: str=None, message_level class ErrorDefinition(Model): """Error definition. - 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 code: Service specific error code which serves as the substatus for - the HTTP error code. - :vartype code: str - :ivar message: Description of the error. - :vartype message: str - :ivar details: Internal error details. - :vartype details: - list[~azure.mgmt.kubernetesconfiguration.models.ErrorDefinition] + :param code: Required. Service specific error code which serves as the + substatus for the HTTP error code. + :type code: str + :param message: Required. Description of the error. + :type message: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, + 'code': {'required': True}, + 'message': {'required': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDefinition]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, code: str, message: str, **kwargs) -> None: super(ErrorDefinition, self).__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code = code + self.message = message class ErrorResponse(Model): @@ -156,6 +149,9 @@ class Resource(Model): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -168,13 +164,15 @@ class Resource(Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, system_data=None, **kwargs) -> None: super(Resource, self).__init__(**kwargs) self.id = None self.name = None self.type = None + self.system_data = system_data class ProxyResource(Resource): @@ -189,6 +187,9 @@ class ProxyResource(Resource): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData """ _validation = { @@ -201,32 +202,45 @@ class ProxyResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) + def __init__(self, *, system_data=None, **kwargs) -> None: + super(ProxyResource, self).__init__(system_data=system_data, **kwargs) class ResourceProviderOperation(Model): """Supported operation of this resource provider. + Variables are only populated by the server, and will be ignored when + sending a request. + :param name: Operation name, in format of {provider}/{resource}/{operation} :type name: str :param display: Display metadata associated with the operation. :type display: ~azure.mgmt.kubernetesconfiguration.models.ResourceProviderOperationDisplay + :ivar is_data_action: The flag that indicates whether the operation + applies to data plane. + :vartype is_data_action: bool """ + _validation = { + 'is_data_action': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, } def __init__(self, *, name: str=None, display=None, **kwargs) -> None: super(ResourceProviderOperation, self).__init__(**kwargs) self.name = name self.display = display + self.is_data_action = None class ResourceProviderOperationDisplay(Model): @@ -274,7 +288,7 @@ def __init__(self, *, sample_property: str=None, **kwargs) -> None: class SourceControlConfiguration(ProxyResource): - """The SourceControl Configuration object. + """The SourceControl Configuration object returned in Get & Put response. Variables are only populated by the server, and will be ignored when sending a request. @@ -285,6 +299,9 @@ class SourceControlConfiguration(ProxyResource): :vartype name: str :ivar type: Resource type :vartype type: str + :param system_data: Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + :type system_data: ~azure.mgmt.kubernetesconfiguration.models.SystemData :param repository_url: Url of the SourceControl Repository. :type repository_url: str :param operator_namespace: The namespace to which this operator is @@ -301,19 +318,24 @@ class SourceControlConfiguration(ProxyResource): :param operator_params: Any Parameters for the Operator instance in string format. :type operator_params: str + :param configuration_protected_settings: Name-value pairs of protected + configuration settings for the configuration + :type configuration_protected_settings: dict[str, str] :param operator_scope: Scope at which the operator will be installed. Possible values include: 'cluster', 'namespace'. Default value: "cluster" . :type operator_scope: str or - ~azure.mgmt.kubernetesconfiguration.models.OperatorScope + ~azure.mgmt.kubernetesconfiguration.models.OperatorScopeType :ivar repository_public_key: Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). :vartype repository_public_key: str + :param ssh_known_hosts_contents: Base64-encoded known_hosts contents + containing public SSH keys required to access private Git instances + :type ssh_known_hosts_contents: str :param enable_helm_operator: Option to enable Helm Operator for this git - configuration. Possible values include: 'true', 'false' - :type enable_helm_operator: str or - ~azure.mgmt.kubernetesconfiguration.models.EnableHelmOperator + configuration. + :type enable_helm_operator: bool :param helm_operator_properties: Properties for Helm operator. :type helm_operator_properties: ~azure.mgmt.kubernetesconfiguration.models.HelmOperatorProperties @@ -321,7 +343,7 @@ class SourceControlConfiguration(ProxyResource): Possible values include: 'Accepted', 'Deleting', 'Running', 'Succeeded', 'Failed' :vartype provisioning_state: str or - ~azure.mgmt.kubernetesconfiguration.models.ProvisioningState + ~azure.mgmt.kubernetesconfiguration.models.ProvisioningStateType :ivar compliance_status: Compliance Status of the Configuration :vartype compliance_status: ~azure.mgmt.kubernetesconfiguration.models.ComplianceStatus @@ -340,29 +362,87 @@ class SourceControlConfiguration(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'repository_url': {'key': 'properties.repositoryUrl', 'type': 'str'}, 'operator_namespace': {'key': 'properties.operatorNamespace', 'type': 'str'}, 'operator_instance_name': {'key': 'properties.operatorInstanceName', 'type': 'str'}, 'operator_type': {'key': 'properties.operatorType', 'type': 'str'}, 'operator_params': {'key': 'properties.operatorParams', 'type': 'str'}, + 'configuration_protected_settings': {'key': 'properties.configurationProtectedSettings', 'type': '{str}'}, 'operator_scope': {'key': 'properties.operatorScope', 'type': 'str'}, 'repository_public_key': {'key': 'properties.repositoryPublicKey', 'type': 'str'}, - 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'str'}, + 'ssh_known_hosts_contents': {'key': 'properties.sshKnownHostsContents', 'type': 'str'}, + 'enable_helm_operator': {'key': 'properties.enableHelmOperator', 'type': 'bool'}, 'helm_operator_properties': {'key': 'properties.helmOperatorProperties', 'type': 'HelmOperatorProperties'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'compliance_status': {'key': 'properties.complianceStatus', 'type': 'ComplianceStatus'}, } - def __init__(self, *, repository_url: str=None, operator_namespace: str="default", operator_instance_name: str=None, operator_type=None, operator_params: str=None, operator_scope="cluster", enable_helm_operator=None, helm_operator_properties=None, **kwargs) -> None: - super(SourceControlConfiguration, self).__init__(**kwargs) + def __init__(self, *, system_data=None, repository_url: str=None, operator_namespace: str="default", operator_instance_name: str=None, operator_type=None, operator_params: str=None, configuration_protected_settings=None, operator_scope="cluster", ssh_known_hosts_contents: str=None, enable_helm_operator: bool=None, helm_operator_properties=None, **kwargs) -> None: + super(SourceControlConfiguration, self).__init__(system_data=system_data, **kwargs) self.repository_url = repository_url self.operator_namespace = operator_namespace self.operator_instance_name = operator_instance_name self.operator_type = operator_type self.operator_params = operator_params + self.configuration_protected_settings = configuration_protected_settings self.operator_scope = operator_scope self.repository_public_key = None + self.ssh_known_hosts_contents = ssh_known_hosts_contents self.enable_helm_operator = enable_helm_operator self.helm_operator_properties = helm_operator_properties self.provisioning_state = None self.compliance_status = None + + +class SystemData(Model): + """Top level metadata + https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar created_by: A string identifier for the identity that created the + resource + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource: + user, application, managedIdentity, key + :vartype created_by_type: str + :ivar created_at: The timestamp of resource creation (UTC) + :vartype created_at: datetime + :ivar last_modified_by: A string identifier for the identity that last + modified the resource + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the + resource: user, application, managedIdentity, key + :vartype last_modified_by_type: str + :ivar last_modified_at: The timestamp of resource last modification (UTC) + :vartype last_modified_at: datetime + """ + + _validation = { + 'created_by': {'readonly': True}, + 'created_by_type': {'readonly': True}, + 'created_at': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'last_modified_by_type': {'readonly': True}, + 'last_modified_at': {'readonly': True}, + } + + _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) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = None + self.created_by_type = None + self.created_at = None + self.last_modified_by = None + self.last_modified_by_type = None + self.last_modified_at = None diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py index 17114fbca711..a6cd232b0607 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/models/_source_control_configuration_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class ComplianceState(str, Enum): +class ComplianceStateType(str, Enum): pending = "Pending" compliant = "Compliant" @@ -21,7 +21,7 @@ class ComplianceState(str, Enum): failed = "Failed" -class MessageLevel(str, Enum): +class MessageLevelType(str, Enum): error = "Error" warning = "Warning" @@ -33,19 +33,13 @@ class OperatorType(str, Enum): flux = "Flux" -class OperatorScope(str, Enum): +class OperatorScopeType(str, Enum): cluster = "cluster" namespace = "namespace" -class EnableHelmOperator(str, Enum): - - true = "true" - false = "false" - - -class ProvisioningState(str, Enum): +class ProvisioningStateType(str, Enum): accepted = "Accepted" deleting = "Deleting" diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py index a1ef22cadd8f..2425ae511265 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_operations.py @@ -25,7 +25,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 be used with the HTTP request. Constant value: "2019-11-01-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-10-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-11-01-preview" + self.api_version = "2020-10-01-preview" self.config = config diff --git a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py index 290dba8e4ace..492dc0d75f4b 100644 --- a/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py +++ b/sdk/kubernetesconfiguration/azure-mgmt-kubernetesconfiguration/azure/mgmt/kubernetesconfiguration/operations/_source_control_configurations_operations.py @@ -26,7 +26,7 @@ class SourceControlConfigurationsOperations(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 be used with the HTTP request. Constant value: "2019-11-01-preview". + :ivar api_version: The API version to be used with the HTTP request. Constant value: "2020-10-01-preview". """ 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 = "2019-11-01-preview" + self.api_version = "2020-10-01-preview" self.config = config