Skip to content
Open
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 @@ -59,7 +59,7 @@ def __init__(
super(ServiceFabricManagementClient, 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-03-01'
self.api_version = '2019-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ._models_py3 import ApplicationTypeVersionResource
from ._models_py3 import ApplicationTypeVersionResourceList
from ._models_py3 import ApplicationUpgradePolicy
from ._models_py3 import ApplicationUserAssignedIdentity
from ._models_py3 import ArmApplicationHealthPolicy
from ._models_py3 import ArmRollingUpgradeMonitoringPolicy
from ._models_py3 import ArmServiceTypeHealthPolicy
Expand All @@ -42,6 +43,7 @@
from ._models_py3 import EndpointRangeDescription
from ._models_py3 import ErrorModel, ErrorModelException
from ._models_py3 import ErrorModelError
from ._models_py3 import ManagedIdentity
from ._models_py3 import NamedPartitionSchemeDescription
from ._models_py3 import NodeTypeDescription
from ._models_py3 import OperationResult
Expand Down Expand Up @@ -69,6 +71,7 @@
from ._models_py3 import StatelessServiceProperties
from ._models_py3 import StatelessServiceUpdateProperties
from ._models_py3 import UniformInt64RangePartitionSchemeDescription
from ._models_py3 import UserAssignedIdentity
except (SyntaxError, ImportError):
from ._models import ApplicationDeltaHealthPolicy
from ._models import ApplicationHealthPolicy
Expand All @@ -81,6 +84,7 @@
from ._models import ApplicationTypeVersionResource
from ._models import ApplicationTypeVersionResourceList
from ._models import ApplicationUpgradePolicy
from ._models import ApplicationUserAssignedIdentity
from ._models import ArmApplicationHealthPolicy
from ._models import ArmRollingUpgradeMonitoringPolicy
from ._models import ArmServiceTypeHealthPolicy
Expand All @@ -102,6 +106,7 @@
from ._models import EndpointRangeDescription
from ._models import ErrorModel, ErrorModelException
from ._models import ErrorModelError
from ._models import ManagedIdentity
from ._models import NamedPartitionSchemeDescription
from ._models import NodeTypeDescription
from ._models import OperationResult
Expand Down Expand Up @@ -129,9 +134,11 @@
from ._models import StatelessServiceProperties
from ._models import StatelessServiceUpdateProperties
from ._models import UniformInt64RangePartitionSchemeDescription
from ._models import UserAssignedIdentity
from ._paged_models import OperationResultPaged
from ._service_fabric_management_client_enums import (
ProvisioningState,
ManagedIdentityType,
ArmUpgradeFailureAction,
ServiceCorrelationScheme,
MoveCost,
Expand All @@ -154,6 +161,7 @@
'ApplicationTypeVersionResource',
'ApplicationTypeVersionResourceList',
'ApplicationUpgradePolicy',
'ApplicationUserAssignedIdentity',
'ArmApplicationHealthPolicy',
'ArmRollingUpgradeMonitoringPolicy',
'ArmServiceTypeHealthPolicy',
Expand All @@ -175,6 +183,7 @@
'EndpointRangeDescription',
'ErrorModel', 'ErrorModelException',
'ErrorModelError',
'ManagedIdentity',
'NamedPartitionSchemeDescription',
'NodeTypeDescription',
'OperationResult',
Expand Down Expand Up @@ -202,8 +211,10 @@
'StatelessServiceProperties',
'StatelessServiceUpdateProperties',
'UniformInt64RangePartitionSchemeDescription',
'UserAssignedIdentity',
'OperationResultPaged',
'ProvisioningState',
'ManagedIdentityType',
'ArmUpgradeFailureAction',
'ServiceCorrelationScheme',
'MoveCost',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ class ApplicationResource(ProxyResource):
:type tags: dict[str, str]
:ivar etag: Azure resource etag.
:vartype etag: str
:param identity: Describes the managed identities for an Azure resource.
:type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity
:param type_version: The version of the application type as defined in the
application manifest.
:type type_version: str
Expand Down Expand Up @@ -220,6 +222,10 @@ class ApplicationResource(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
:param managed_identities: List of user assigned identities for the
application, each mapped to a friendly name.
:type managed_identities:
list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
:ivar provisioning_state: The current deployment or provisioning state,
which only appears in the response
:vartype provisioning_state: str
Expand All @@ -245,26 +251,30 @@ class ApplicationResource(ProxyResource):
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'etag': {'key': 'etag', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'ManagedIdentity'},
'type_version': {'key': 'properties.typeVersion', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': '{str}'},
'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'},
'minimum_nodes': {'key': 'properties.minimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'type_name': {'key': 'properties.typeName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationResource, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.type_version = kwargs.get('type_version', None)
self.parameters = kwargs.get('parameters', None)
self.upgrade_policy = kwargs.get('upgrade_policy', None)
self.minimum_nodes = kwargs.get('minimum_nodes', None)
self.maximum_nodes = kwargs.get('maximum_nodes', 0)
self.remove_application_capacity = kwargs.get('remove_application_capacity', None)
self.metrics = kwargs.get('metrics', None)
self.managed_identities = kwargs.get('managed_identities', None)
self.provisioning_state = None
self.type_name = kwargs.get('type_name', None)

Expand Down Expand Up @@ -345,6 +355,10 @@ class ApplicationResourceUpdate(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
:param managed_identities: List of user assigned identities for the
application, each mapped to a friendly name.
:type managed_identities:
list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
"""

_validation = {
Expand All @@ -370,6 +384,7 @@ class ApplicationResourceUpdate(ProxyResource):
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
}

def __init__(self, **kwargs):
Expand All @@ -381,6 +396,7 @@ def __init__(self, **kwargs):
self.maximum_nodes = kwargs.get('maximum_nodes', 0)
self.remove_application_capacity = kwargs.get('remove_application_capacity', None)
self.metrics = kwargs.get('metrics', None)
self.managed_identities = kwargs.get('managed_identities', None)


class ApplicationTypeResource(ProxyResource):
Expand Down Expand Up @@ -589,6 +605,33 @@ def __init__(self, **kwargs):
self.application_health_policy = kwargs.get('application_health_policy', None)


class ApplicationUserAssignedIdentity(Model):
"""ApplicationUserAssignedIdentity.

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

:param name: Required. The friendly name of user assigned identity.
:type name: str
:param principal_id: Required. The principal id of user assigned identity.
:type principal_id: str
"""

_validation = {
'name': {'required': True},
'principal_id': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'principal_id': {'key': 'principalId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ApplicationUserAssignedIdentity, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.principal_id = kwargs.get('principal_id', None)


class ArmApplicationHealthPolicy(Model):
"""Defines a health policy used to evaluate the health of an application or
one of its children entities.
Expand Down Expand Up @@ -1053,7 +1096,7 @@ class Cluster(Resource):
~azure.mgmt.servicefabric.models.ProvisioningState
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
[ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
[ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
Expand Down Expand Up @@ -1345,7 +1388,7 @@ class ClusterUpdateParameters(Model):
list[~azure.mgmt.servicefabric.models.NodeTypeDescription]
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
[ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
[ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
Expand Down Expand Up @@ -1587,6 +1630,9 @@ class DiagnosticsStorageAccountConfig(Model):
:param protected_account_key_name: Required. The protected diagnostics
storage key name.
:type protected_account_key_name: str
:param protected_account_key_name2: The secondary protected diagnostics
storage key name.
:type protected_account_key_name2: str
:param blob_endpoint: Required. The blob endpoint of the azure storage
account.
:type blob_endpoint: str
Expand All @@ -1609,6 +1655,7 @@ class DiagnosticsStorageAccountConfig(Model):
_attribute_map = {
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'protected_account_key_name': {'key': 'protectedAccountKeyName', 'type': 'str'},
'protected_account_key_name2': {'key': 'protectedAccountKeyName2', 'type': 'str'},
'blob_endpoint': {'key': 'blobEndpoint', 'type': 'str'},
'queue_endpoint': {'key': 'queueEndpoint', 'type': 'str'},
'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'},
Expand All @@ -1618,6 +1665,7 @@ def __init__(self, **kwargs):
super(DiagnosticsStorageAccountConfig, self).__init__(**kwargs)
self.storage_account_name = kwargs.get('storage_account_name', None)
self.protected_account_key_name = kwargs.get('protected_account_key_name', None)
self.protected_account_key_name2 = kwargs.get('protected_account_key_name2', None)
self.blob_endpoint = kwargs.get('blob_endpoint', None)
self.queue_endpoint = kwargs.get('queue_endpoint', None)
self.table_endpoint = kwargs.get('table_endpoint', None)
Expand Down Expand Up @@ -1698,6 +1746,50 @@ def __init__(self, **kwargs):
self.message = kwargs.get('message', None)


class ManagedIdentity(Model):
"""Describes the managed identities for an Azure resource.

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

:ivar principal_id: The principal id of the managed identity. This
property will only be provided for a system assigned identity.
:vartype principal_id: str
:ivar tenant_id: The tenant id of the managed identity. This property will
only be provided for a system assigned identity.
:vartype tenant_id: str
:param type: The type of managed identity for the resource. Possible
values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,
UserAssigned', 'None'
:type type: str or ~azure.mgmt.servicefabric.models.ManagedIdentityType
:param user_assigned_identities: The list of user identities associated
with the resource. The user identity dictionary key references will be ARM
resource ids in the form:
'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
:type user_assigned_identities: dict[str,
~azure.mgmt.servicefabric.models.UserAssignedIdentity]
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
'type': {'key': 'type', 'type': 'ManagedIdentityType'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
}

def __init__(self, **kwargs):
super(ManagedIdentity, self).__init__(**kwargs)
self.principal_id = None
self.tenant_id = None
self.type = kwargs.get('type', None)
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)


class PartitionSchemeDescription(Model):
"""Describes how the service is partitioned.

Expand Down Expand Up @@ -1786,7 +1878,7 @@ class NodeTypeDescription(Model):
:type http_gateway_endpoint_port: int
:param durability_level: The durability level of the node type. Learn
about
[DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
[DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- Bronze - No privileges. This is the default.
- Silver - The infrastructure jobs can be paused for a duration of 10
minutes per UD.
Expand Down Expand Up @@ -2885,3 +2977,31 @@ def __init__(self, **kwargs):
self.low_key = kwargs.get('low_key', None)
self.high_key = kwargs.get('high_key', None)
self.partition_scheme = 'UniformInt64Range'


class UserAssignedIdentity(Model):
"""UserAssignedIdentity.

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

:ivar principal_id: The principal id of user assigned identity.
:vartype principal_id: str
:ivar client_id: The client id of user assigned identity.
:vartype client_id: str
"""

_validation = {
'principal_id': {'readonly': True},
'client_id': {'readonly': True},
}

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

def __init__(self, **kwargs):
super(UserAssignedIdentity, self).__init__(**kwargs)
self.principal_id = None
self.client_id = None
Loading