Skip to content

Commit

Permalink
Generated from 0d8c9dfa424aaea0b1919d7eb4e33bcd3e34e4d1
Browse files Browse the repository at this point in the history
Support encryption in transit feature: Add a property when creating a cluster
  • Loading branch information
SDK Automation committed Jul 1, 2020
1 parent 22c5319 commit 31cd117
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from ._models_py3 import DataDisksGroups
from ._models_py3 import DiskBillingMeters
from ._models_py3 import DiskEncryptionProperties
from ._models_py3 import EncryptionInTransitProperties
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import Errors
from ._models_py3 import ExecuteScriptActionParameters
Expand All @@ -54,6 +55,7 @@
from ._models_py3 import KafkaRestProperties
from ._models_py3 import LinuxOperatingSystemProfile
from ._models_py3 import LocalizedName
from ._models_py3 import NetworkSettings
from ._models_py3 import Operation
from ._models_py3 import OperationDisplay
from ._models_py3 import OperationResource
Expand Down Expand Up @@ -120,6 +122,7 @@
from ._models import DataDisksGroups
from ._models import DiskBillingMeters
from ._models import DiskEncryptionProperties
from ._models import EncryptionInTransitProperties
from ._models import ErrorResponse, ErrorResponseException
from ._models import Errors
from ._models import ExecuteScriptActionParameters
Expand All @@ -130,6 +133,7 @@
from ._models import KafkaRestProperties
from ._models import LinuxOperatingSystemProfile
from ._models import LocalizedName
from ._models import NetworkSettings
from ._models import Operation
from ._models import OperationDisplay
from ._models import OperationResource
Expand Down Expand Up @@ -168,6 +172,8 @@
from ._hd_insight_management_client_enums import (
DirectoryType,
DaysOfWeek,
PublicNetworkAccess,
OutboundOnlyPublicNetworkAccessType,
OSType,
Tier,
JsonWebKeyEncryptionAlgorithm,
Expand Down Expand Up @@ -212,6 +218,7 @@
'DataDisksGroups',
'DiskBillingMeters',
'DiskEncryptionProperties',
'EncryptionInTransitProperties',
'ErrorResponse', 'ErrorResponseException',
'Errors',
'ExecuteScriptActionParameters',
Expand All @@ -222,6 +229,7 @@
'KafkaRestProperties',
'LinuxOperatingSystemProfile',
'LocalizedName',
'NetworkSettings',
'Operation',
'OperationDisplay',
'OperationResource',
Expand Down Expand Up @@ -259,6 +267,8 @@
'OperationPaged',
'DirectoryType',
'DaysOfWeek',
'PublicNetworkAccess',
'OutboundOnlyPublicNetworkAccessType',
'OSType',
'Tier',
'JsonWebKeyEncryptionAlgorithm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ class DaysOfWeek(str, Enum):
sunday = "Sunday"


class PublicNetworkAccess(str, Enum):

inbound_and_outbound = "InboundAndOutbound"
outbound_only = "OutboundOnly"


class OutboundOnlyPublicNetworkAccessType(str, Enum):

public_load_balancer = "PublicLoadBalancer"
udr = "UDR"


class OSType(str, Enum):

windows = "Windows"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,14 @@ class ClusterCreateProperties(Model):
:param disk_encryption_properties: The disk encryption properties.
:type disk_encryption_properties:
~azure.mgmt.hdinsight.models.DiskEncryptionProperties
:param encryption_in_transit_properties: The encryption-in-transit
properties.
:type encryption_in_transit_properties:
~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
:param min_supported_tls_version: The minimal supported tls version.
:type min_supported_tls_version: str
:param network_settings: The network settings.
:type network_settings: ~azure.mgmt.hdinsight.models.NetworkSettings
"""

_attribute_map = {
Expand All @@ -671,7 +677,9 @@ class ClusterCreateProperties(Model):
'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'},
'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'},
'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
'network_settings': {'key': 'networkSettings', 'type': 'NetworkSettings'},
}

def __init__(self, **kwargs):
Expand All @@ -685,7 +693,9 @@ def __init__(self, **kwargs):
self.compute_profile = kwargs.get('compute_profile', None)
self.storage_profile = kwargs.get('storage_profile', None)
self.disk_encryption_properties = kwargs.get('disk_encryption_properties', None)
self.encryption_in_transit_properties = kwargs.get('encryption_in_transit_properties', None)
self.min_supported_tls_version = kwargs.get('min_supported_tls_version', None)
self.network_settings = kwargs.get('network_settings', None)


class ClusterDefinition(Model):
Expand Down Expand Up @@ -784,8 +794,14 @@ class ClusterGetProperties(Model):
:param disk_encryption_properties: The disk encryption properties.
:type disk_encryption_properties:
~azure.mgmt.hdinsight.models.DiskEncryptionProperties
:param encryption_in_transit_properties: The encryption-in-transit
properties.
:type encryption_in_transit_properties:
~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
:param min_supported_tls_version: The minimal supported tls version.
:type min_supported_tls_version: str
:param network_settings: The network settings.
:type network_settings: ~azure.mgmt.hdinsight.models.NetworkSettings
"""

_validation = {
Expand All @@ -807,7 +823,9 @@ class ClusterGetProperties(Model):
'errors': {'key': 'errors', 'type': '[Errors]'},
'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': '[ConnectivityEndpoint]'},
'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
'network_settings': {'key': 'networkSettings', 'type': 'NetworkSettings'},
}

def __init__(self, **kwargs):
Expand All @@ -826,7 +844,9 @@ def __init__(self, **kwargs):
self.errors = kwargs.get('errors', None)
self.connectivity_endpoints = kwargs.get('connectivity_endpoints', None)
self.disk_encryption_properties = kwargs.get('disk_encryption_properties', None)
self.encryption_in_transit_properties = kwargs.get('encryption_in_transit_properties', None)
self.min_supported_tls_version = kwargs.get('min_supported_tls_version', None)
self.network_settings = kwargs.get('network_settings', None)


class ClusterIdentity(Model):
Expand Down Expand Up @@ -1152,6 +1172,9 @@ class DiskEncryptionProperties(Model):
:param msi_resource_id: Resource ID of Managed Identity that is used to
access the key vault.
:type msi_resource_id: str
:param encryption_at_host: Indicates whether or not resource disk
encryption is enabled. Default value: False .
:type encryption_at_host: bool
"""

_attribute_map = {
Expand All @@ -1160,6 +1183,7 @@ class DiskEncryptionProperties(Model):
'key_version': {'key': 'keyVersion', 'type': 'str'},
'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'},
'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'},
'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -1169,6 +1193,24 @@ def __init__(self, **kwargs):
self.key_version = kwargs.get('key_version', None)
self.encryption_algorithm = kwargs.get('encryption_algorithm', None)
self.msi_resource_id = kwargs.get('msi_resource_id', None)
self.encryption_at_host = kwargs.get('encryption_at_host', False)


class EncryptionInTransitProperties(Model):
"""The encryption-in-transit properties.
:param is_encryption_in_transit_enabled: Indicates whether or not inter
cluster node communication is encrypted in transit. Default value: False .
:type is_encryption_in_transit_enabled: bool
"""

_attribute_map = {
'is_encryption_in_transit_enabled': {'key': 'isEncryptionInTransitEnabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(EncryptionInTransitProperties, self).__init__(**kwargs)
self.is_encryption_in_transit_enabled = kwargs.get('is_encryption_in_transit_enabled', False)


class ErrorResponse(Model):
Expand Down Expand Up @@ -1399,6 +1441,32 @@ def __init__(self, **kwargs):
self.localized_value = kwargs.get('localized_value', None)


class NetworkSettings(Model):
"""The network settings.
:param public_network_access: Specifies whether public network access is
enabled for inbound and outbound, or outbound only. Possible values
include: 'InboundAndOutbound', 'OutboundOnly'
:type public_network_access: str or
~azure.mgmt.hdinsight.models.PublicNetworkAccess
:param outbound_only_public_network_access_type: The mechanism through
which the cluster will have outbound access to the public network.
Possible values include: 'PublicLoadBalancer', 'UDR'
:type outbound_only_public_network_access_type: str or
~azure.mgmt.hdinsight.models.OutboundOnlyPublicNetworkAccessType
"""

_attribute_map = {
'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'},
'outbound_only_public_network_access_type': {'key': 'outboundOnlyPublicNetworkAccessType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(NetworkSettings, self).__init__(**kwargs)
self.public_network_access = kwargs.get('public_network_access', None)
self.outbound_only_public_network_access_type = kwargs.get('outbound_only_public_network_access_type', None)


class Operation(Model):
"""The HDInsight REST API operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,14 @@ class ClusterCreateProperties(Model):
:param disk_encryption_properties: The disk encryption properties.
:type disk_encryption_properties:
~azure.mgmt.hdinsight.models.DiskEncryptionProperties
:param encryption_in_transit_properties: The encryption-in-transit
properties.
:type encryption_in_transit_properties:
~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
:param min_supported_tls_version: The minimal supported tls version.
:type min_supported_tls_version: str
:param network_settings: The network settings.
:type network_settings: ~azure.mgmt.hdinsight.models.NetworkSettings
"""

_attribute_map = {
Expand All @@ -671,10 +677,12 @@ class ClusterCreateProperties(Model):
'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'},
'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'},
'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
'network_settings': {'key': 'networkSettings', 'type': 'NetworkSettings'},
}

def __init__(self, *, cluster_version: str=None, os_type=None, tier=None, cluster_definition=None, kafka_rest_properties=None, security_profile=None, compute_profile=None, storage_profile=None, disk_encryption_properties=None, min_supported_tls_version: str=None, **kwargs) -> None:
def __init__(self, *, cluster_version: str=None, os_type=None, tier=None, cluster_definition=None, kafka_rest_properties=None, security_profile=None, compute_profile=None, storage_profile=None, disk_encryption_properties=None, encryption_in_transit_properties=None, min_supported_tls_version: str=None, network_settings=None, **kwargs) -> None:
super(ClusterCreateProperties, self).__init__(**kwargs)
self.cluster_version = cluster_version
self.os_type = os_type
Expand All @@ -685,7 +693,9 @@ def __init__(self, *, cluster_version: str=None, os_type=None, tier=None, cluste
self.compute_profile = compute_profile
self.storage_profile = storage_profile
self.disk_encryption_properties = disk_encryption_properties
self.encryption_in_transit_properties = encryption_in_transit_properties
self.min_supported_tls_version = min_supported_tls_version
self.network_settings = network_settings


class ClusterDefinition(Model):
Expand Down Expand Up @@ -784,8 +794,14 @@ class ClusterGetProperties(Model):
:param disk_encryption_properties: The disk encryption properties.
:type disk_encryption_properties:
~azure.mgmt.hdinsight.models.DiskEncryptionProperties
:param encryption_in_transit_properties: The encryption-in-transit
properties.
:type encryption_in_transit_properties:
~azure.mgmt.hdinsight.models.EncryptionInTransitProperties
:param min_supported_tls_version: The minimal supported tls version.
:type min_supported_tls_version: str
:param network_settings: The network settings.
:type network_settings: ~azure.mgmt.hdinsight.models.NetworkSettings
"""

_validation = {
Expand All @@ -807,10 +823,12 @@ class ClusterGetProperties(Model):
'errors': {'key': 'errors', 'type': '[Errors]'},
'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': '[ConnectivityEndpoint]'},
'disk_encryption_properties': {'key': 'diskEncryptionProperties', 'type': 'DiskEncryptionProperties'},
'encryption_in_transit_properties': {'key': 'encryptionInTransitProperties', 'type': 'EncryptionInTransitProperties'},
'min_supported_tls_version': {'key': 'minSupportedTlsVersion', 'type': 'str'},
'network_settings': {'key': 'networkSettings', 'type': 'NetworkSettings'},
}

def __init__(self, *, cluster_definition, cluster_version: str=None, os_type=None, tier=None, kafka_rest_properties=None, security_profile=None, compute_profile=None, provisioning_state=None, created_date: str=None, cluster_state: str=None, quota_info=None, errors=None, connectivity_endpoints=None, disk_encryption_properties=None, min_supported_tls_version: str=None, **kwargs) -> None:
def __init__(self, *, cluster_definition, cluster_version: str=None, os_type=None, tier=None, kafka_rest_properties=None, security_profile=None, compute_profile=None, provisioning_state=None, created_date: str=None, cluster_state: str=None, quota_info=None, errors=None, connectivity_endpoints=None, disk_encryption_properties=None, encryption_in_transit_properties=None, min_supported_tls_version: str=None, network_settings=None, **kwargs) -> None:
super(ClusterGetProperties, self).__init__(**kwargs)
self.cluster_version = cluster_version
self.os_type = os_type
Expand All @@ -826,7 +844,9 @@ def __init__(self, *, cluster_definition, cluster_version: str=None, os_type=Non
self.errors = errors
self.connectivity_endpoints = connectivity_endpoints
self.disk_encryption_properties = disk_encryption_properties
self.encryption_in_transit_properties = encryption_in_transit_properties
self.min_supported_tls_version = min_supported_tls_version
self.network_settings = network_settings


class ClusterIdentity(Model):
Expand Down Expand Up @@ -1152,6 +1172,9 @@ class DiskEncryptionProperties(Model):
:param msi_resource_id: Resource ID of Managed Identity that is used to
access the key vault.
:type msi_resource_id: str
:param encryption_at_host: Indicates whether or not resource disk
encryption is enabled. Default value: False .
:type encryption_at_host: bool
"""

_attribute_map = {
Expand All @@ -1160,15 +1183,34 @@ class DiskEncryptionProperties(Model):
'key_version': {'key': 'keyVersion', 'type': 'str'},
'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'},
'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'},
'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'bool'},
}

def __init__(self, *, vault_uri: str=None, key_name: str=None, key_version: str=None, encryption_algorithm=None, msi_resource_id: str=None, **kwargs) -> None:
def __init__(self, *, vault_uri: str=None, key_name: str=None, key_version: str=None, encryption_algorithm=None, msi_resource_id: str=None, encryption_at_host: bool=False, **kwargs) -> None:
super(DiskEncryptionProperties, self).__init__(**kwargs)
self.vault_uri = vault_uri
self.key_name = key_name
self.key_version = key_version
self.encryption_algorithm = encryption_algorithm
self.msi_resource_id = msi_resource_id
self.encryption_at_host = encryption_at_host


class EncryptionInTransitProperties(Model):
"""The encryption-in-transit properties.
:param is_encryption_in_transit_enabled: Indicates whether or not inter
cluster node communication is encrypted in transit. Default value: False .
:type is_encryption_in_transit_enabled: bool
"""

_attribute_map = {
'is_encryption_in_transit_enabled': {'key': 'isEncryptionInTransitEnabled', 'type': 'bool'},
}

def __init__(self, *, is_encryption_in_transit_enabled: bool=False, **kwargs) -> None:
super(EncryptionInTransitProperties, self).__init__(**kwargs)
self.is_encryption_in_transit_enabled = is_encryption_in_transit_enabled


class ErrorResponse(Model):
Expand Down Expand Up @@ -1399,6 +1441,32 @@ def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> N
self.localized_value = localized_value


class NetworkSettings(Model):
"""The network settings.
:param public_network_access: Specifies whether public network access is
enabled for inbound and outbound, or outbound only. Possible values
include: 'InboundAndOutbound', 'OutboundOnly'
:type public_network_access: str or
~azure.mgmt.hdinsight.models.PublicNetworkAccess
:param outbound_only_public_network_access_type: The mechanism through
which the cluster will have outbound access to the public network.
Possible values include: 'PublicLoadBalancer', 'UDR'
:type outbound_only_public_network_access_type: str or
~azure.mgmt.hdinsight.models.OutboundOnlyPublicNetworkAccessType
"""

_attribute_map = {
'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'},
'outbound_only_public_network_access_type': {'key': 'outboundOnlyPublicNetworkAccessType', 'type': 'str'},
}

def __init__(self, *, public_network_access=None, outbound_only_public_network_access_type=None, **kwargs) -> None:
super(NetworkSettings, self).__init__(**kwargs)
self.public_network_access = public_network_access
self.outbound_only_public_network_access_type = outbound_only_public_network_access_type


class Operation(Model):
"""The HDInsight REST API operation.
Expand Down

0 comments on commit 31cd117

Please sign in to comment.