Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from .container_service_py3 import ContainerService
from .operation_value_py3 import OperationValue
from .tags_object_py3 import TagsObject
from .managed_cluster_service_principal_profile_py3 import ManagedClusterServicePrincipalProfile
from .managed_cluster_agent_pool_profile_py3 import ManagedClusterAgentPoolProfile
from .container_service_network_profile_py3 import ContainerServiceNetworkProfile
from .managed_cluster_addon_profile_py3 import ManagedClusterAddonProfile
Expand Down Expand Up @@ -54,6 +55,7 @@
from .container_service import ContainerService
from .operation_value import OperationValue
from .tags_object import TagsObject
from .managed_cluster_service_principal_profile import ManagedClusterServicePrincipalProfile
from .managed_cluster_agent_pool_profile import ManagedClusterAgentPoolProfile
from .container_service_network_profile import ContainerServiceNetworkProfile
from .managed_cluster_addon_profile import ManagedClusterAddonProfile
Expand Down Expand Up @@ -94,6 +96,7 @@
'ContainerService',
'OperationValue',
'TagsObject',
'ManagedClusterServicePrincipalProfile',
'ManagedClusterAgentPoolProfile',
'ContainerServiceNetworkProfile',
'ManagedClusterAddonProfile',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ class ManagedCluster(Resource):
:type linux_profile:
~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile
:param service_principal_profile: Information about a service principal
identity for the cluster to use for manipulating Azure APIs. Either secret
or keyVaultSecretRef must be specified.
identity for the cluster to use for manipulating Azure APIs.
:type service_principal_profile:
~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile
~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile
:param addon_profiles: Profile of managed cluster add-on.
:type addon_profiles: dict[str,
~azure.mgmt.containerservice.models.ManagedClusterAddonProfile]
Expand Down Expand Up @@ -91,7 +90,7 @@ class ManagedCluster(Resource):
'fqdn': {'key': 'properties.fqdn', 'type': 'str'},
'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'},
'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'},
'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'},
'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'},
'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,10 @@ class ManagedClusterAgentPoolProfile(Model):
size for every machine in this master/agent pool. If you specify 0, it
will apply the default osDisk size according to the vmSize specified.
:type os_disk_size_gb: int
:param dns_prefix: DNS prefix to be used to create the FQDN for the agent
pool.
:type dns_prefix: str
:ivar fqdn: FDQN for the agent pool.
:vartype fqdn: str
:param ports: Ports number array used to expose on this agent pool. The
default opened ports are different based on your choice of orchestrator.
:type ports: list[int]
:param storage_profile: Storage profile specifies what kind of storage
used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will
choose for you based on the orchestrator choice. Possible values include:
'StorageAccount', 'ManagedDisks'
:type storage_profile: str or
:ivar storage_profile: Storage profile specifies what kind of storage
used. Defaults to ManagedDisks. Possible values include: 'StorageAccount',
'ManagedDisks'
:vartype storage_profile: str or
~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes
:param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet
identifier.
Expand All @@ -113,17 +104,14 @@ class ManagedClusterAgentPoolProfile(Model):
'name': {'required': True},
'count': {'maximum': 100, 'minimum': 1},
'vm_size': {'required': True},
'fqdn': {'readonly': True},
'storage_profile': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'},
'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'},
'fqdn': {'key': 'fqdn', 'type': 'str'},
'ports': {'key': 'ports', 'type': '[int]'},
'storage_profile': {'key': 'storageProfile', 'type': 'str'},
'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'},
'max_pods': {'key': 'maxPods', 'type': 'int'},
Expand All @@ -136,10 +124,7 @@ def __init__(self, **kwargs):
self.count = kwargs.get('count', 1)
self.vm_size = kwargs.get('vm_size', None)
self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None)
self.dns_prefix = kwargs.get('dns_prefix', None)
self.fqdn = None
self.ports = kwargs.get('ports', None)
self.storage_profile = kwargs.get('storage_profile', None)
self.storage_profile = None
self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None)
self.max_pods = kwargs.get('max_pods', None)
self.os_type = kwargs.get('os_type', "Linux")
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,10 @@ class ManagedClusterAgentPoolProfile(Model):
size for every machine in this master/agent pool. If you specify 0, it
will apply the default osDisk size according to the vmSize specified.
:type os_disk_size_gb: int
:param dns_prefix: DNS prefix to be used to create the FQDN for the agent
pool.
:type dns_prefix: str
:ivar fqdn: FDQN for the agent pool.
:vartype fqdn: str
:param ports: Ports number array used to expose on this agent pool. The
default opened ports are different based on your choice of orchestrator.
:type ports: list[int]
:param storage_profile: Storage profile specifies what kind of storage
used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will
choose for you based on the orchestrator choice. Possible values include:
'StorageAccount', 'ManagedDisks'
:type storage_profile: str or
:ivar storage_profile: Storage profile specifies what kind of storage
used. Defaults to ManagedDisks. Possible values include: 'StorageAccount',
'ManagedDisks'
:vartype storage_profile: str or
~azure.mgmt.containerservice.models.ContainerServiceStorageProfileTypes
:param vnet_subnet_id: VNet SubnetID specifies the vnet's subnet
identifier.
Expand All @@ -113,33 +104,27 @@ class ManagedClusterAgentPoolProfile(Model):
'name': {'required': True},
'count': {'maximum': 100, 'minimum': 1},
'vm_size': {'required': True},
'fqdn': {'readonly': True},
'storage_profile': {'readonly': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'count': {'key': 'count', 'type': 'int'},
'vm_size': {'key': 'vmSize', 'type': 'str'},
'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'},
'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'},
'fqdn': {'key': 'fqdn', 'type': 'str'},
'ports': {'key': 'ports', 'type': '[int]'},
'storage_profile': {'key': 'storageProfile', 'type': 'str'},
'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'},
'max_pods': {'key': 'maxPods', 'type': 'int'},
'os_type': {'key': 'osType', 'type': 'str'},
}

def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, dns_prefix: str=None, ports=None, storage_profile=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None:
def __init__(self, *, name: str, vm_size, count: int=1, os_disk_size_gb: int=None, vnet_subnet_id: str=None, max_pods: int=None, os_type="Linux", **kwargs) -> None:
super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs)
self.name = name
self.count = count
self.vm_size = vm_size
self.os_disk_size_gb = os_disk_size_gb
self.dns_prefix = dns_prefix
self.fqdn = None
self.ports = ports
self.storage_profile = storage_profile
self.storage_profile = None
self.vnet_subnet_id = vnet_subnet_id
self.max_pods = max_pods
self.os_type = os_type
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ class ManagedCluster(Resource):
:type linux_profile:
~azure.mgmt.containerservice.models.ContainerServiceLinuxProfile
:param service_principal_profile: Information about a service principal
identity for the cluster to use for manipulating Azure APIs. Either secret
or keyVaultSecretRef must be specified.
identity for the cluster to use for manipulating Azure APIs.
:type service_principal_profile:
~azure.mgmt.containerservice.models.ContainerServiceServicePrincipalProfile
~azure.mgmt.containerservice.models.ManagedClusterServicePrincipalProfile
:param addon_profiles: Profile of managed cluster add-on.
:type addon_profiles: dict[str,
~azure.mgmt.containerservice.models.ManagedClusterAddonProfile]
Expand Down Expand Up @@ -91,7 +90,7 @@ class ManagedCluster(Resource):
'fqdn': {'key': 'properties.fqdn', 'type': 'str'},
'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'},
'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ContainerServiceServicePrincipalProfile'},
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'},
'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'},
'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'},
'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ManagedClusterServicePrincipalProfile(Model):
"""Information about a service principal identity for the cluster to use for
manipulating Azure APIs.

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

:param client_id: Required. The ID for the service principal.
:type client_id: str
:param secret: The secret password associated with the service principal
in plain text.
:type secret: str
"""

_validation = {
'client_id': {'required': True},
}

_attribute_map = {
'client_id': {'key': 'clientId', 'type': 'str'},
'secret': {'key': 'secret', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs)
self.client_id = kwargs.get('client_id', None)
self.secret = kwargs.get('secret', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class ManagedClusterServicePrincipalProfile(Model):
"""Information about a service principal identity for the cluster to use for
manipulating Azure APIs.

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

:param client_id: Required. The ID for the service principal.
:type client_id: str
:param secret: The secret password associated with the service principal
in plain text.
:type secret: str
"""

_validation = {
'client_id': {'required': True},
}

_attribute_map = {
'client_id': {'key': 'clientId', 'type': 'str'},
'secret': {'key': 'secret', 'type': 'str'},
}

def __init__(self, *, client_id: str, secret: str=None, **kwargs) -> None:
super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs)
self.client_id = client_id
self.secret = secret