This commit is contained in:
jeffj6123 2021-04-06 09:13:50 -07:00
Родитель 163c501d47
Коммит 90ff704c16
1063 изменённых файлов: 61050 добавлений и 68587 удалений

Просмотреть файл

@ -1 +1 @@
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__)

Просмотреть файл

@ -9,11 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------
from ._configuration import ServiceFabricClientAPIsConfiguration
from ._service_fabric_client_ap_is import ServiceFabricClientAPIs
__all__ = ['ServiceFabricClientAPIs', 'ServiceFabricClientAPIsConfiguration']
from .service_fabric_client_ap_is import ServiceFabricClientAPIs
from .version import VERSION
__all__ = ['ServiceFabricClientAPIs']
__version__ = VERSION

Просмотреть файл

@ -1,43 +0,0 @@
# 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 msrestazure import AzureConfiguration
from .version import VERSION
class ServiceFabricClientAPIsConfiguration(AzureConfiguration):
"""Configuration for ServiceFabricClientAPIs
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""
def __init__(
self, credentials, base_url=None):
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if not base_url:
base_url = 'http://localhost:19080'
super(ServiceFabricClientAPIsConfiguration, self).__init__(base_url)
# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True
self.add_user_agent('azure-servicefabric/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')
self.credentials = credentials

Просмотреть файл

@ -1,88 +0,0 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer
from ._configuration import ServiceFabricClientAPIsConfiguration
from .operations import ServiceFabricClientAPIsOperationsMixin
from .operations import MeshSecretOperations
from .operations import MeshSecretValueOperations
from .operations import MeshVolumeOperations
from .operations import MeshNetworkOperations
from .operations import MeshApplicationOperations
from .operations import MeshServiceOperations
from .operations import MeshCodePackageOperations
from .operations import MeshServiceReplicaOperations
from .operations import MeshGatewayOperations
from . import models
class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin, SDKClient):
"""Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
:ivar config: Configuration for client.
:vartype config: ServiceFabricClientAPIsConfiguration
:ivar mesh_secret: MeshSecret operations
:vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations
:ivar mesh_secret_value: MeshSecretValue operations
:vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations
:ivar mesh_volume: MeshVolume operations
:vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations
:ivar mesh_network: MeshNetwork operations
:vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations
:ivar mesh_application: MeshApplication operations
:vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations
:ivar mesh_service: MeshService operations
:vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations
:ivar mesh_code_package: MeshCodePackage operations
:vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations
:ivar mesh_service_replica: MeshServiceReplica operations
:vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations
:ivar mesh_gateway: MeshGateway operations
:vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""
def __init__(
self, credentials, base_url=None):
self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url)
super(ServiceFabricClientAPIs, 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 = '8.0.0.46'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.mesh_secret = MeshSecretOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_secret_value = MeshSecretValueOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_volume = MeshVolumeOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_network = MeshNetworkOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_application = MeshApplicationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_service = MeshServiceOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_code_package = MeshCodePackageOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_service_replica = MeshServiceReplicaOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_gateway = MeshGatewayOperations(
self._client, self.config, self._serialize, self._deserialize)

Просмотреть файл

@ -1,88 +0,0 @@
# 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.async_client import SDKClientAsync
from msrest import Serializer, Deserializer
from .._configuration import ServiceFabricClientAPIsConfiguration
from .operations_async import ServiceFabricClientAPIsOperationsMixin
from .operations_async import MeshSecretOperations
from .operations_async import MeshSecretValueOperations
from .operations_async import MeshVolumeOperations
from .operations_async import MeshNetworkOperations
from .operations_async import MeshApplicationOperations
from .operations_async import MeshServiceOperations
from .operations_async import MeshCodePackageOperations
from .operations_async import MeshServiceReplicaOperations
from .operations_async import MeshGatewayOperations
from .. import models
class ServiceFabricClientAPIs(ServiceFabricClientAPIsOperationsMixin, SDKClientAsync):
"""Service Fabric REST Client APIs allows management of Service Fabric clusters, applications and services.
:ivar config: Configuration for client.
:vartype config: ServiceFabricClientAPIsConfiguration
:ivar mesh_secret: MeshSecret operations
:vartype mesh_secret: azure.servicefabric.operations.MeshSecretOperations
:ivar mesh_secret_value: MeshSecretValue operations
:vartype mesh_secret_value: azure.servicefabric.operations.MeshSecretValueOperations
:ivar mesh_volume: MeshVolume operations
:vartype mesh_volume: azure.servicefabric.operations.MeshVolumeOperations
:ivar mesh_network: MeshNetwork operations
:vartype mesh_network: azure.servicefabric.operations.MeshNetworkOperations
:ivar mesh_application: MeshApplication operations
:vartype mesh_application: azure.servicefabric.operations.MeshApplicationOperations
:ivar mesh_service: MeshService operations
:vartype mesh_service: azure.servicefabric.operations.MeshServiceOperations
:ivar mesh_code_package: MeshCodePackage operations
:vartype mesh_code_package: azure.servicefabric.operations.MeshCodePackageOperations
:ivar mesh_service_replica: MeshServiceReplica operations
:vartype mesh_service_replica: azure.servicefabric.operations.MeshServiceReplicaOperations
:ivar mesh_gateway: MeshGateway operations
:vartype mesh_gateway: azure.servicefabric.operations.MeshGatewayOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param str base_url: Service URL
"""
def __init__(
self, credentials, base_url=None):
self.config = ServiceFabricClientAPIsConfiguration(credentials, base_url)
super(ServiceFabricClientAPIs, self).__init__(self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '8.0.0.46'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self.mesh_secret = MeshSecretOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_secret_value = MeshSecretValueOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_volume = MeshVolumeOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_network = MeshNetworkOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_application = MeshApplicationOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_service = MeshServiceOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_code_package = MeshCodePackageOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_service_replica = MeshServiceReplicaOperations(
self._client, self.config, self._serialize, self._deserialize)
self.mesh_gateway = MeshGatewayOperations(
self._client, self.config, self._serialize, self._deserialize)

Просмотреть файл

@ -1,34 +0,0 @@
# 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 ._mesh_secret_operations_async import MeshSecretOperations
from ._mesh_secret_value_operations_async import MeshSecretValueOperations
from ._mesh_volume_operations_async import MeshVolumeOperations
from ._mesh_network_operations_async import MeshNetworkOperations
from ._mesh_application_operations_async import MeshApplicationOperations
from ._mesh_service_operations_async import MeshServiceOperations
from ._mesh_code_package_operations_async import MeshCodePackageOperations
from ._mesh_service_replica_operations_async import MeshServiceReplicaOperations
from ._mesh_gateway_operations_async import MeshGatewayOperations
from ._service_fabric_client_ap_is_operations_async import ServiceFabricClientAPIsOperationsMixin
__all__ = [
'MeshSecretOperations',
'MeshSecretValueOperations',
'MeshVolumeOperations',
'MeshNetworkOperations',
'MeshApplicationOperations',
'MeshServiceOperations',
'MeshCodePackageOperations',
'MeshServiceReplicaOperations',
'MeshGatewayOperations',
'ServiceFabricClientAPIsOperationsMixin',
]

Просмотреть файл

@ -1,348 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshApplicationOperations:
"""MeshApplicationOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.config = config
async def create_or_update(
self, application_resource_name, application_resource_description, *, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a Application resource.
Creates a Application resource with the specified name, description and
properties. If Application resource with the same name exists, then it
is updated with the specified description and properties.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param application_resource_description: Description for creating a
Application resource.
:type application_resource_description:
~azure.servicefabric.models.ApplicationResourceDescription
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ApplicationResourceDescription or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.ApplicationResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
api_version = "6.4-preview"
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(application_resource_description, 'ApplicationResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ApplicationResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('ApplicationResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
create_or_update.metadata = {'url': '/Resources/Applications/{applicationResourceName}'}
async def get(
self, application_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Application resource with the given name.
Gets the information about the Application resource with the given
name. The information include the description and other properties of
the Application.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ApplicationResourceDescription or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.ApplicationResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
api_version = "6.4-preview"
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ApplicationResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Applications/{applicationResourceName}'}
async def delete(
self, application_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the Application resource.
Deletes the Application resource identified by the name.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
api_version = "6.4-preview"
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Applications/{applicationResourceName}'}
async def list(
self, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the application resources.
Gets the information about all application resources in a given
resource group. The information include the description and other
properties of the Application.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedApplicationResourceDescriptionList or ClientRawResponse
if raw=true
:rtype:
~azure.servicefabric.models.PagedApplicationResourceDescriptionList or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
api_version = "6.4-preview"
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedApplicationResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Applications'}
async def get_upgrade_progress(
self, application_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the progress of the latest upgrade performed on this application
resource.
Gets the upgrade progress information about the Application resource
with the given name. The information include percentage of completion
and other upgrade state information of the Application resource.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ApplicationResourceUpgradeProgressInfo or ClientRawResponse
if raw=true
:rtype:
~azure.servicefabric.models.ApplicationResourceUpgradeProgressInfo or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
api_version = "7.0"
# Construct URL
url = self.get_upgrade_progress.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ApplicationResourceUpgradeProgressInfo', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get_upgrade_progress.metadata = {'url': '/Resources/Applications/{applicationResourceName}/$/GetUpgradeProgress'}

Просмотреть файл

@ -1,112 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshCodePackageOperations:
"""MeshCodePackageOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def get_container_logs(
self, application_resource_name, service_resource_name, replica_name, code_package_name, tail=None, *, custom_headers=None, raw=False, **operation_config):
"""Gets the logs from the container.
Gets the logs for the container of the specified code package of the
service replica.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param service_resource_name: The identity of the service.
:type service_resource_name: str
:param replica_name: Service Fabric replica name.
:type replica_name: str
:param code_package_name: The name of code package of the service.
:type code_package_name: str
:param tail: Number of lines to show from the end of the logs. Default
is 100. 'all' to show the complete logs.
:type tail: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ContainerLogs or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.ContainerLogs or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get_container_logs.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True),
'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True),
'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True),
'codePackageName': self._serialize.url("code_package_name", code_package_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if tail is not None:
query_parameters['Tail'] = self._serialize.query("tail", tail, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ContainerLogs', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get_container_logs.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}/CodePackages/{codePackageName}/Logs'}

Просмотреть файл

@ -1,276 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshGatewayOperations:
"""MeshGatewayOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def create_or_update(
self, gateway_resource_name, gateway_resource_description, *, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a Gateway resource.
Creates a Gateway resource with the specified name, description and
properties. If Gateway resource with the same name exists, then it is
updated with the specified description and properties. Use Gateway
resource to provide public connectivity to application services.
:param gateway_resource_name: The identity of the gateway.
:type gateway_resource_name: str
:param gateway_resource_description: Description for creating a
Gateway resource.
:type gateway_resource_description:
~azure.servicefabric.models.GatewayResourceDescription
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: GatewayResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.GatewayResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(gateway_resource_description, 'GatewayResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GatewayResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('GatewayResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
create_or_update.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'}
async def get(
self, gateway_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Gateway resource with the given name.
Gets the information about the Gateway resource with the given name.
The information include the description and other properties of the
Gateway.
:param gateway_resource_name: The identity of the gateway.
:type gateway_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: GatewayResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.GatewayResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('GatewayResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'}
async def delete(
self, gateway_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the Gateway resource.
Deletes the Gateway resource identified by the name.
:param gateway_resource_name: The identity of the gateway.
:type gateway_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'gatewayResourceName': self._serialize.url("gateway_resource_name", gateway_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Gateways/{gatewayResourceName}'}
async def list(
self, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the gateway resources.
Gets the information about all gateway resources in a given resource
group. The information include the description and other properties of
the Gateway.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedGatewayResourceDescriptionList or ClientRawResponse if
raw=true
:rtype:
~azure.servicefabric.models.PagedGatewayResourceDescriptionList or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedGatewayResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Gateways'}

Просмотреть файл

@ -1,279 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshNetworkOperations:
"""MeshNetworkOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def create_or_update(
self, network_resource_name, name, properties, *, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a Network resource.
Creates a Network resource with the specified name, description and
properties. If Network resource with the same name exists, then it is
updated with the specified description and properties. Network resource
provides connectivity between application services.
:param network_resource_name: The identity of the network.
:type network_resource_name: str
:param name: Name of the Network resource.
:type name: str
:param properties: Describes properties of a network resource.
:type properties:
~azure.servicefabric.models.NetworkResourceProperties
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: NetworkResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.NetworkResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
network_resource_description = models.NetworkResourceDescription(name=name, properties=properties)
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(network_resource_description, 'NetworkResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('NetworkResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('NetworkResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
create_or_update.metadata = {'url': '/Resources/Networks/{networkResourceName}'}
async def get(
self, network_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Network resource with the given name.
Gets the information about the Network resource with the given name.
The information include the description and other properties of the
Network.
:param network_resource_name: The identity of the network.
:type network_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: NetworkResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.NetworkResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('NetworkResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Networks/{networkResourceName}'}
async def delete(
self, network_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the Network resource.
Deletes the Network resource identified by the name.
:param network_resource_name: The identity of the network.
:type network_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'networkResourceName': self._serialize.url("network_resource_name", network_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Networks/{networkResourceName}'}
async def list(
self, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the network resources.
Gets the information about all network resources in a given resource
group. The information include the description and other properties of
the Network.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedNetworkResourceDescriptionList or ClientRawResponse if
raw=true
:rtype:
~azure.servicefabric.models.PagedNetworkResourceDescriptionList or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedNetworkResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Networks'}

Просмотреть файл

@ -1,276 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshSecretOperations:
"""MeshSecretOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def create_or_update(
self, secret_resource_name, properties, name, *, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a Secret resource.
Creates a Secret resource with the specified name, description and
properties. If Secret resource with the same name exists, then it is
updated with the specified description and properties. Once created,
the kind and contentType of a secret resource cannot be updated.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param properties: Describes the properties of a secret resource.
:type properties: ~azure.servicefabric.models.SecretResourceProperties
:param name: Name of the Secret resource.
:type name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SecretResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.SecretResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
secret_resource_description = models.SecretResourceDescription(properties=properties, name=name)
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(secret_resource_description, 'SecretResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SecretResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('SecretResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
create_or_update.metadata = {'url': '/Resources/Secrets/{secretResourceName}'}
async def get(
self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Secret resource with the given name.
Gets the information about the Secret resource with the given name. The
information include the description and other properties of the Secret.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SecretResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.SecretResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SecretResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Secrets/{secretResourceName}'}
async def delete(
self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the Secret resource.
Deletes the specified Secret resource and all of its named values.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}'}
async def list(
self, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the secret resources.
Gets the information about all secret resources in a given resource
group. The information include the description and other properties of
the Secret.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedSecretResourceDescriptionList or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.PagedSecretResourceDescriptionList
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedSecretResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Secrets'}

Просмотреть файл

@ -1,362 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshSecretValueOperations:
"""MeshSecretValueOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def add_value(
self, secret_resource_name, secret_value_resource_name, name, value=None, *, custom_headers=None, raw=False, **operation_config):
"""Adds the specified value as a new version of the specified secret
resource.
Creates a new value of the specified secret resource. The name of the
value is typically the version identifier. Once created the value
cannot be changed.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param secret_value_resource_name: The name of the secret resource
value which is typically the version identifier for the value.
:type secret_value_resource_name: str
:param name: Version identifier of the secret value.
:type name: str
:param value: The actual value of the secret.
:type value: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SecretValueResourceDescription or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.SecretValueResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
secret_value_resource_description = models.SecretValueResourceDescription(name=name, value=value)
# Construct URL
url = self.add_value.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True),
'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(secret_value_resource_description, 'SecretValueResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SecretValueResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('SecretValueResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
add_value.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'}
async def get(
self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the specified secret value resource.
Get the information about the specified named secret value resources.
The information does not include the actual value of the secret.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param secret_value_resource_name: The name of the secret resource
value which is typically the version identifier for the value.
:type secret_value_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SecretValueResourceDescription or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.SecretValueResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True),
'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SecretValueResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'}
async def delete(
self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the specified value of the named secret resource.
Deletes the secret value resource identified by the name. The name of
the resource is typically the version associated with that value.
Deletion will fail if the specified value is in use.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param secret_value_resource_name: The name of the secret resource
value which is typically the version identifier for the value.
:type secret_value_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True),
'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}'}
async def list(
self, secret_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""List names of all values of the specified secret resource.
Gets information about all secret value resources of the specified
secret resource. The information includes the names of the secret value
resources, but not the actual values.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedSecretValueResourceDescriptionList or ClientRawResponse
if raw=true
:rtype:
~azure.servicefabric.models.PagedSecretValueResourceDescriptionList or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedSecretValueResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values'}
async def show(
self, secret_resource_name, secret_value_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Lists the specified value of the secret resource.
Lists the decrypted value of the specified named value of the secret
resource. This is a privileged operation.
:param secret_resource_name: The name of the secret resource.
:type secret_resource_name: str
:param secret_value_resource_name: The name of the secret resource
value which is typically the version identifier for the value.
:type secret_value_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: SecretValue or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.SecretValue or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.show.metadata['url']
path_format_arguments = {
'secretResourceName': self._serialize.url("secret_resource_name", secret_resource_name, 'str', skip_quote=True),
'secretValueResourceName': self._serialize.url("secret_value_resource_name", secret_value_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('SecretValue', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
show.metadata = {'url': '/Resources/Secrets/{secretResourceName}/values/{secretValueResourceName}/list_value'}

Просмотреть файл

@ -1,164 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshServiceOperations:
"""MeshServiceOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def get(
self, application_resource_name, service_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Service resource with the given name.
Gets the information about the Service resource with the given name.
The information include the description and other properties of the
Service.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param service_resource_name: The identity of the service.
:type service_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ServiceResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.ServiceResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True),
'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ServiceResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}'}
async def list(
self, application_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the service resources.
Gets the information about all services of an application resource. The
information include the description and other properties of the
Service.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedServiceResourceDescriptionList or ClientRawResponse if
raw=true
:rtype:
~azure.servicefabric.models.PagedServiceResourceDescriptionList or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedServiceResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services'}

Просмотреть файл

@ -1,168 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshServiceReplicaOperations:
"""MeshServiceReplicaOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def get(
self, application_resource_name, service_resource_name, replica_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the given replica of the service of an application.
Gets the information about the service replica with the given name. The
information include the description and other properties of the service
replica.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param service_resource_name: The identity of the service.
:type service_resource_name: str
:param replica_name: Service Fabric replica name.
:type replica_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: ServiceReplicaDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.ServiceReplicaDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True),
'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True),
'replicaName': self._serialize.url("replica_name", replica_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ServiceReplicaDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas/{replicaName}'}
async def list(
self, application_resource_name, service_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the replicas of a service.
Gets the information about all replicas of a service. The information
include the description and other properties of the service replica.
:param application_resource_name: The identity of the application.
:type application_resource_name: str
:param service_resource_name: The identity of the service.
:type service_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedServiceReplicaDescriptionList or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.PagedServiceReplicaDescriptionList
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
path_format_arguments = {
'applicationResourceName': self._serialize.url("application_resource_name", application_resource_name, 'str', skip_quote=True),
'serviceResourceName': self._serialize.url("service_resource_name", service_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedServiceReplicaDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Applications/{applicationResourceName}/Services/{serviceResourceName}/Replicas'}

Просмотреть файл

@ -1,273 +0,0 @@
# 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.
# --------------------------------------------------------------------------
import uuid
from msrest.pipeline import ClientRawResponse
from ... import models
class MeshVolumeOperations:
"""MeshVolumeOperations async operations.
You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The version of the API. This parameter is required and its value must be '6.4-preview'. Constant value: "6.4-preview".
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "6.4-preview"
self.config = config
async def create_or_update(
self, volume_resource_name, volume_resource_description, *, custom_headers=None, raw=False, **operation_config):
"""Creates or updates a Volume resource.
Creates a Volume resource with the specified name, description and
properties. If Volume resource with the same name exists, then it is
updated with the specified description and properties.
:param volume_resource_name: The identity of the volume.
:type volume_resource_name: str
:param volume_resource_description: Description for creating a Volume
resource.
:type volume_resource_description:
~azure.servicefabric.models.VolumeResourceDescription
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: VolumeResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.VolumeResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.create_or_update.metadata['url']
path_format_arguments = {
'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct body
body_content = self._serialize.body(volume_resource_description, 'VolumeResourceDescription')
# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 201, 202]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('VolumeResourceDescription', response)
if response.status_code == 201:
deserialized = self._deserialize('VolumeResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
create_or_update.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'}
async def get(
self, volume_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Gets the Volume resource with the given name.
Gets the information about the Volume resource with the given name. The
information include the description and other properties of the Volume.
:param volume_resource_name: The identity of the volume.
:type volume_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: VolumeResourceDescription or ClientRawResponse if raw=true
:rtype: ~azure.servicefabric.models.VolumeResourceDescription or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.get.metadata['url']
path_format_arguments = {
'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('VolumeResourceDescription', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
get.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'}
async def delete(
self, volume_resource_name, *, custom_headers=None, raw=False, **operation_config):
"""Deletes the Volume resource.
Deletes the Volume resource identified by the name.
:param volume_resource_name: The identity of the volume.
:type volume_resource_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: None or ClientRawResponse if raw=true
:rtype: None or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.delete.metadata['url']
path_format_arguments = {
'volumeResourceName': self._serialize.url("volume_resource_name", volume_resource_name, 'str', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200, 202, 204]:
raise models.FabricErrorException(self._deserialize, response)
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
delete.metadata = {'url': '/Resources/Volumes/{volumeResourceName}'}
async def list(
self, *, custom_headers=None, raw=False, **operation_config):
"""Lists all the volume resources.
Gets the information about all volume resources in a given resource
group. The information include the description and other properties of
the Volume.
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: PagedVolumeResourceDescriptionList or ClientRawResponse if
raw=true
:rtype: ~azure.servicefabric.models.PagedVolumeResourceDescriptionList
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`
"""
# Construct URL
url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
response = await self._client.async_send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.FabricErrorException(self._deserialize, response)
deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('PagedVolumeResourceDescriptionList', response)
if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response
return deserialized
list.metadata = {'url': '/Resources/Volumes'}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,48 @@
# 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 AadMetadata(Model):
"""Azure Active Directory metadata used for secured connection to cluster.
:param authority: The AAD authority url.
:type authority: str
:param client: The AAD client application Id.
:type client: str
:param cluster: The AAD cluster application Id.
:type cluster: str
:param login: The AAD login url.
:type login: str
:param redirect: The client application redirect address.
:type redirect: str
:param tenant: The AAD tenant Id.
:type tenant: str
"""
_attribute_map = {
'authority': {'key': 'authority', 'type': 'str'},
'client': {'key': 'client', 'type': 'str'},
'cluster': {'key': 'cluster', 'type': 'str'},
'login': {'key': 'login', 'type': 'str'},
'redirect': {'key': 'redirect', 'type': 'str'},
'tenant': {'key': 'tenant', 'type': 'str'},
}
def __init__(self, **kwargs):
super(AadMetadata, self).__init__(**kwargs)
self.authority = kwargs.get('authority', None)
self.client = kwargs.get('client', None)
self.cluster = kwargs.get('cluster', None)
self.login = kwargs.get('login', None)
self.redirect = kwargs.get('redirect', None)
self.tenant = kwargs.get('tenant', None)

Просмотреть файл

@ -0,0 +1,34 @@
# 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 AadMetadataObject(Model):
"""Azure Active Directory metadata object used for secured connection to
cluster.
:param type: The client authentication method.
:type type: str
:param metadata: Azure Active Directory metadata used for secured
connection to cluster.
:type metadata: ~azure.servicefabric.models.AadMetadata
"""
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}
def __init__(self, **kwargs):
super(AadMetadataObject, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.metadata = kwargs.get('metadata', None)

Просмотреть файл

@ -0,0 +1,34 @@
# 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 AadMetadataObject(Model):
"""Azure Active Directory metadata object used for secured connection to
cluster.
:param type: The client authentication method.
:type type: str
:param metadata: Azure Active Directory metadata used for secured
connection to cluster.
:type metadata: ~azure.servicefabric.models.AadMetadata
"""
_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'AadMetadata'},
}
def __init__(self, *, type: str=None, metadata=None, **kwargs) -> None:
super(AadMetadataObject, self).__init__(**kwargs)
self.type = type
self.metadata = metadata

Просмотреть файл

@ -0,0 +1,48 @@
# 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 AadMetadata(Model):
"""Azure Active Directory metadata used for secured connection to cluster.
:param authority: The AAD authority url.
:type authority: str
:param client: The AAD client application Id.
:type client: str
:param cluster: The AAD cluster application Id.
:type cluster: str
:param login: The AAD login url.
:type login: str
:param redirect: The client application redirect address.
:type redirect: str
:param tenant: The AAD tenant Id.
:type tenant: str
"""
_attribute_map = {
'authority': {'key': 'authority', 'type': 'str'},
'client': {'key': 'client', 'type': 'str'},
'cluster': {'key': 'cluster', 'type': 'str'},
'login': {'key': 'login', 'type': 'str'},
'redirect': {'key': 'redirect', 'type': 'str'},
'tenant': {'key': 'tenant', 'type': 'str'},
}
def __init__(self, *, authority: str=None, client: str=None, cluster: str=None, login: str=None, redirect: str=None, tenant: str=None, **kwargs) -> None:
super(AadMetadata, self).__init__(**kwargs)
self.authority = authority
self.client = client
self.cluster = cluster
self.login = login
self.redirect = redirect
self.tenant = tenant

Просмотреть файл

@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description import ScalingMechanismDescription
class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""
_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}
_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}
def __init__(self, **kwargs):
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = kwargs.get('min_partition_count', None)
self.max_partition_count = kwargs.get('max_partition_count', None)
self.scale_increment = kwargs.get('scale_increment', None)
self.kind = 'AddRemoveIncrementalNamedPartition'

Просмотреть файл

@ -0,0 +1,53 @@
# 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 .scaling_mechanism_description_py3 import ScalingMechanismDescription
class AddRemoveIncrementalNamedPartitionScalingMechanism(ScalingMechanismDescription):
"""Represents a scaling mechanism for adding or removing named partitions of a
stateless service. Partition names are in the format '0','1''N-1'.
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param min_partition_count: Required. Minimum number of named partitions
of the service.
:type min_partition_count: int
:param max_partition_count: Required. Maximum number of named partitions
of the service.
:type max_partition_count: int
:param scale_increment: Required. The number of instances to add or remove
during a scaling operation.
:type scale_increment: int
"""
_validation = {
'kind': {'required': True},
'min_partition_count': {'required': True},
'max_partition_count': {'required': True},
'scale_increment': {'required': True},
}
_attribute_map = {
'kind': {'key': 'Kind', 'type': 'str'},
'min_partition_count': {'key': 'MinPartitionCount', 'type': 'int'},
'max_partition_count': {'key': 'MaxPartitionCount', 'type': 'int'},
'scale_increment': {'key': 'ScaleIncrement', 'type': 'int'},
}
def __init__(self, *, min_partition_count: int, max_partition_count: int, scale_increment: int, **kwargs) -> None:
super(AddRemoveIncrementalNamedPartitionScalingMechanism, self).__init__(**kwargs)
self.min_partition_count = min_partition_count
self.max_partition_count = max_partition_count
self.scale_increment = scale_increment
self.kind = 'AddRemoveIncrementalNamedPartition'

Просмотреть файл

@ -0,0 +1,53 @@
# 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 .auto_scaling_mechanism import AutoScalingMechanism
class AddRemoveReplicaScalingMechanism(AutoScalingMechanism):
"""Describes the horizontal auto scaling mechanism that adds or removes
replicas (containers or container groups).
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param min_count: Required. Minimum number of containers (scale down won't
be performed below this number).
:type min_count: int
:param max_count: Required. Maximum number of containers (scale up won't
be performed above this number).
:type max_count: int
:param scale_increment: Required. Each time auto scaling is performed,
this number of containers will be added or removed.
:type scale_increment: int
"""
_validation = {
'kind': {'required': True},
'min_count': {'required': True},
'max_count': {'required': True},
'scale_increment': {'required': True},
}
_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
'min_count': {'key': 'minCount', 'type': 'int'},
'max_count': {'key': 'maxCount', 'type': 'int'},
'scale_increment': {'key': 'scaleIncrement', 'type': 'int'},
}
def __init__(self, **kwargs):
super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs)
self.min_count = kwargs.get('min_count', None)
self.max_count = kwargs.get('max_count', None)
self.scale_increment = kwargs.get('scale_increment', None)
self.kind = 'AddRemoveReplica'

Просмотреть файл

@ -0,0 +1,53 @@
# 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 .auto_scaling_mechanism_py3 import AutoScalingMechanism
class AddRemoveReplicaScalingMechanism(AutoScalingMechanism):
"""Describes the horizontal auto scaling mechanism that adds or removes
replicas (containers or container groups).
All required parameters must be populated in order to send to Azure.
:param kind: Required. Constant filled by server.
:type kind: str
:param min_count: Required. Minimum number of containers (scale down won't
be performed below this number).
:type min_count: int
:param max_count: Required. Maximum number of containers (scale up won't
be performed above this number).
:type max_count: int
:param scale_increment: Required. Each time auto scaling is performed,
this number of containers will be added or removed.
:type scale_increment: int
"""
_validation = {
'kind': {'required': True},
'min_count': {'required': True},
'max_count': {'required': True},
'scale_increment': {'required': True},
}
_attribute_map = {
'kind': {'key': 'kind', 'type': 'str'},
'min_count': {'key': 'minCount', 'type': 'int'},
'max_count': {'key': 'maxCount', 'type': 'int'},
'scale_increment': {'key': 'scaleIncrement', 'type': 'int'},
}
def __init__(self, *, min_count: int, max_count: int, scale_increment: int, **kwargs) -> None:
super(AddRemoveReplicaScalingMechanism, self).__init__(**kwargs)
self.min_count = min_count
self.max_count = max_count
self.scale_increment = scale_increment
self.kind = 'AddRemoveReplica'

Просмотреть файл

@ -0,0 +1,32 @@
# 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 AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.
:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""
_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}
def __init__(self, **kwargs):
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = kwargs.get('delay', None)
self.duration = kwargs.get('duration', None)

Просмотреть файл

@ -0,0 +1,32 @@
# 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 AnalysisEventMetadata(Model):
"""Metadata about an Analysis Event.
:param delay: The analysis delay.
:type delay: timedelta
:param duration: The duration of analysis.
:type duration: timedelta
"""
_attribute_map = {
'delay': {'key': 'Delay', 'type': 'duration'},
'duration': {'key': 'Duration', 'type': 'duration'},
}
def __init__(self, *, delay=None, duration=None, **kwargs) -> None:
super(AnalysisEventMetadata, self).__init__(**kwargs)
self.delay = delay
self.duration = duration

Просмотреть файл

@ -0,0 +1,54 @@
# 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 .backup_configuration_info import BackupConfigurationInfo
class ApplicationBackupConfigurationInfo(BackupConfigurationInfo):
"""Backup configuration information for a specific Service Fabric application
specifying what backup policy is being applied and suspend description, if
any.
All required parameters must be populated in order to send to Azure.
:param policy_name: The name of the backup policy which is applicable to
this Service Fabric application or service or partition.
:type policy_name: str
:param policy_inherited_from: Specifies the scope at which the backup
policy is applied. Possible values include: 'Invalid', 'Partition',
'Service', 'Application'
:type policy_inherited_from: str or
~azure.servicefabric.models.BackupPolicyScope
:param suspension_info: Describes the backup suspension details.
:type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'policy_name': {'key': 'PolicyName', 'type': 'str'},
'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'},
'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationBackupConfigurationInfo, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.kind = 'Application'

Просмотреть файл

@ -0,0 +1,54 @@
# 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 .backup_configuration_info_py3 import BackupConfigurationInfo
class ApplicationBackupConfigurationInfo(BackupConfigurationInfo):
"""Backup configuration information for a specific Service Fabric application
specifying what backup policy is being applied and suspend description, if
any.
All required parameters must be populated in order to send to Azure.
:param policy_name: The name of the backup policy which is applicable to
this Service Fabric application or service or partition.
:type policy_name: str
:param policy_inherited_from: Specifies the scope at which the backup
policy is applied. Possible values include: 'Invalid', 'Partition',
'Service', 'Application'
:type policy_inherited_from: str or
~azure.servicefabric.models.BackupPolicyScope
:param suspension_info: Describes the backup suspension details.
:type suspension_info: ~azure.servicefabric.models.BackupSuspensionInfo
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'policy_name': {'key': 'PolicyName', 'type': 'str'},
'policy_inherited_from': {'key': 'PolicyInheritedFrom', 'type': 'str'},
'suspension_info': {'key': 'SuspensionInfo', 'type': 'BackupSuspensionInfo'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}
def __init__(self, *, policy_name: str=None, policy_inherited_from=None, suspension_info=None, application_name: str=None, **kwargs) -> None:
super(ApplicationBackupConfigurationInfo, self).__init__(policy_name=policy_name, policy_inherited_from=policy_inherited_from, suspension_info=suspension_info, **kwargs)
self.application_name = application_name
self.kind = 'Application'

Просмотреть файл

@ -0,0 +1,39 @@
# 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 .backup_entity import BackupEntity
class ApplicationBackupEntity(BackupEntity):
"""Identifies the Service Fabric application which is being backed up.
All required parameters must be populated in order to send to Azure.
:param entity_kind: Required. Constant filled by server.
:type entity_kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""
_validation = {
'entity_kind': {'required': True},
}
_attribute_map = {
'entity_kind': {'key': 'EntityKind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationBackupEntity, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.entity_kind = 'Application'

Просмотреть файл

@ -0,0 +1,39 @@
# 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 .backup_entity_py3 import BackupEntity
class ApplicationBackupEntity(BackupEntity):
"""Identifies the Service Fabric application which is being backed up.
All required parameters must be populated in order to send to Azure.
:param entity_kind: Required. Constant filled by server.
:type entity_kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
"""
_validation = {
'entity_kind': {'required': True},
}
_attribute_map = {
'entity_kind': {'key': 'EntityKind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
}
def __init__(self, *, application_name: str=None, **kwargs) -> None:
super(ApplicationBackupEntity, self).__init__(**kwargs)
self.application_name = application_name
self.entity_kind = 'Application'

Просмотреть файл

@ -0,0 +1,58 @@
# 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 ApplicationCapacityDescription(Model):
"""Describes capacity information for services of this application. This
description can be used for describing the following.
- Reserving the capacity for the services on the nodes
- Limiting the total number of nodes that services of this application can
run on
- Limiting the custom capacity metrics to limit the total consumption of
this metric by the services of this application.
:param minimum_nodes: The minimum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. If this property is set to zero, no capacity will be reserved. The
value of this property cannot be more than the value of the MaximumNodes
property.
:type minimum_nodes: long
:param maximum_nodes: The maximum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. By default, the value of this property is zero and it means that
the services can be placed on any node. Default value: 0 .
:type maximum_nodes: long
:param application_metrics: List of application capacity metric
description.
:type application_metrics:
list[~azure.servicefabric.models.ApplicationMetricDescription]
"""
_validation = {
'minimum_nodes': {'minimum': 0},
'maximum_nodes': {'minimum': 0},
}
_attribute_map = {
'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'},
'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'},
}
def __init__(self, **kwargs):
super(ApplicationCapacityDescription, self).__init__(**kwargs)
self.minimum_nodes = kwargs.get('minimum_nodes', None)
self.maximum_nodes = kwargs.get('maximum_nodes', 0)
self.application_metrics = kwargs.get('application_metrics', None)

Просмотреть файл

@ -0,0 +1,58 @@
# 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 ApplicationCapacityDescription(Model):
"""Describes capacity information for services of this application. This
description can be used for describing the following.
- Reserving the capacity for the services on the nodes
- Limiting the total number of nodes that services of this application can
run on
- Limiting the custom capacity metrics to limit the total consumption of
this metric by the services of this application.
:param minimum_nodes: The minimum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. If this property is set to zero, no capacity will be reserved. The
value of this property cannot be more than the value of the MaximumNodes
property.
:type minimum_nodes: long
:param maximum_nodes: The maximum number of nodes where Service Fabric
will reserve capacity for this application. Note that this does not mean
that the services of this application will be placed on all of those
nodes. By default, the value of this property is zero and it means that
the services can be placed on any node. Default value: 0 .
:type maximum_nodes: long
:param application_metrics: List of application capacity metric
description.
:type application_metrics:
list[~azure.servicefabric.models.ApplicationMetricDescription]
"""
_validation = {
'minimum_nodes': {'minimum': 0},
'maximum_nodes': {'minimum': 0},
}
_attribute_map = {
'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'},
'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'},
}
def __init__(self, *, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None:
super(ApplicationCapacityDescription, self).__init__(**kwargs)
self.minimum_nodes = minimum_nodes
self.maximum_nodes = maximum_nodes
self.application_metrics = application_metrics

Просмотреть файл

@ -0,0 +1,122 @@
# 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 .application_event import ApplicationEvent
class ApplicationContainerInstanceExitedEvent(ApplicationEvent):
"""Container Exited event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param service_name: Required. Name of Service.
:type service_name: str
:param service_package_name: Required. Name of Service package.
:type service_package_name: str
:param service_package_activation_id: Required. Activation Id of Service
package.
:type service_package_activation_id: str
:param is_exclusive: Required. Indicates IsExclusive flag.
:type is_exclusive: bool
:param code_package_name: Required. Name of Code package.
:type code_package_name: str
:param entry_point_type: Required. Type of EntryPoint.
:type entry_point_type: str
:param image_name: Required. Name of Container image.
:type image_name: str
:param container_name: Required. Name of Container.
:type container_name: str
:param host_id: Required. Host Id.
:type host_id: str
:param exit_code: Required. Exit code of process.
:type exit_code: long
:param unexpected_termination: Required. Indicates if termination is
unexpected.
:type unexpected_termination: bool
:param start_time: Required. Start time of process.
:type start_time: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'service_name': {'required': True},
'service_package_name': {'required': True},
'service_package_activation_id': {'required': True},
'is_exclusive': {'required': True},
'code_package_name': {'required': True},
'entry_point_type': {'required': True},
'image_name': {'required': True},
'container_name': {'required': True},
'host_id': {'required': True},
'exit_code': {'required': True},
'unexpected_termination': {'required': True},
'start_time': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'service_name': {'key': 'ServiceName', 'type': 'str'},
'service_package_name': {'key': 'ServicePackageName', 'type': 'str'},
'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'},
'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'},
'code_package_name': {'key': 'CodePackageName', 'type': 'str'},
'entry_point_type': {'key': 'EntryPointType', 'type': 'str'},
'image_name': {'key': 'ImageName', 'type': 'str'},
'container_name': {'key': 'ContainerName', 'type': 'str'},
'host_id': {'key': 'HostId', 'type': 'str'},
'exit_code': {'key': 'ExitCode', 'type': 'long'},
'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'},
'start_time': {'key': 'StartTime', 'type': 'iso-8601'},
}
def __init__(self, **kwargs):
super(ApplicationContainerInstanceExitedEvent, self).__init__(**kwargs)
self.service_name = kwargs.get('service_name', None)
self.service_package_name = kwargs.get('service_package_name', None)
self.service_package_activation_id = kwargs.get('service_package_activation_id', None)
self.is_exclusive = kwargs.get('is_exclusive', None)
self.code_package_name = kwargs.get('code_package_name', None)
self.entry_point_type = kwargs.get('entry_point_type', None)
self.image_name = kwargs.get('image_name', None)
self.container_name = kwargs.get('container_name', None)
self.host_id = kwargs.get('host_id', None)
self.exit_code = kwargs.get('exit_code', None)
self.unexpected_termination = kwargs.get('unexpected_termination', None)
self.start_time = kwargs.get('start_time', None)
self.kind = 'ApplicationContainerInstanceExited'

Просмотреть файл

@ -0,0 +1,122 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationContainerInstanceExitedEvent(ApplicationEvent):
"""Container Exited event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param service_name: Required. Name of Service.
:type service_name: str
:param service_package_name: Required. Name of Service package.
:type service_package_name: str
:param service_package_activation_id: Required. Activation Id of Service
package.
:type service_package_activation_id: str
:param is_exclusive: Required. Indicates IsExclusive flag.
:type is_exclusive: bool
:param code_package_name: Required. Name of Code package.
:type code_package_name: str
:param entry_point_type: Required. Type of EntryPoint.
:type entry_point_type: str
:param image_name: Required. Name of Container image.
:type image_name: str
:param container_name: Required. Name of Container.
:type container_name: str
:param host_id: Required. Host Id.
:type host_id: str
:param exit_code: Required. Exit code of process.
:type exit_code: long
:param unexpected_termination: Required. Indicates if termination is
unexpected.
:type unexpected_termination: bool
:param start_time: Required. Start time of process.
:type start_time: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'service_name': {'required': True},
'service_package_name': {'required': True},
'service_package_activation_id': {'required': True},
'is_exclusive': {'required': True},
'code_package_name': {'required': True},
'entry_point_type': {'required': True},
'image_name': {'required': True},
'container_name': {'required': True},
'host_id': {'required': True},
'exit_code': {'required': True},
'unexpected_termination': {'required': True},
'start_time': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'service_name': {'key': 'ServiceName', 'type': 'str'},
'service_package_name': {'key': 'ServicePackageName', 'type': 'str'},
'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'},
'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'},
'code_package_name': {'key': 'CodePackageName', 'type': 'str'},
'entry_point_type': {'key': 'EntryPointType', 'type': 'str'},
'image_name': {'key': 'ImageName', 'type': 'str'},
'container_name': {'key': 'ContainerName', 'type': 'str'},
'host_id': {'key': 'HostId', 'type': 'str'},
'exit_code': {'key': 'ExitCode', 'type': 'long'},
'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'},
'start_time': {'key': 'StartTime', 'type': 'iso-8601'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, image_name: str, container_name: str, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationContainerInstanceExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.service_name = service_name
self.service_package_name = service_package_name
self.service_package_activation_id = service_package_activation_id
self.is_exclusive = is_exclusive
self.code_package_name = code_package_name
self.entry_point_type = entry_point_type
self.image_name = image_name
self.container_name = container_name
self.host_id = host_id
self.exit_code = exit_code
self.unexpected_termination = unexpected_termination
self.start_time = start_time
self.kind = 'ApplicationContainerInstanceExited'

Просмотреть файл

@ -0,0 +1,75 @@
# 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 .application_event import ApplicationEvent
class ApplicationCreatedEvent(ApplicationEvent):
"""Application Created event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_type_name: Required. Application type name.
:type application_type_name: str
:param application_type_version: Required. Application type version.
:type application_type_version: str
:param application_definition_kind: Required. Application definition kind.
:type application_definition_kind: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_type_name': {'required': True},
'application_type_version': {'required': True},
'application_definition_kind': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'},
'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationCreatedEvent, self).__init__(**kwargs)
self.application_type_name = kwargs.get('application_type_name', None)
self.application_type_version = kwargs.get('application_type_version', None)
self.application_definition_kind = kwargs.get('application_definition_kind', None)
self.kind = 'ApplicationCreated'

Просмотреть файл

@ -0,0 +1,75 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationCreatedEvent(ApplicationEvent):
"""Application Created event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_type_name: Required. Application type name.
:type application_type_name: str
:param application_type_version: Required. Application type version.
:type application_type_version: str
:param application_definition_kind: Required. Application definition kind.
:type application_definition_kind: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_type_name': {'required': True},
'application_type_version': {'required': True},
'application_definition_kind': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'},
'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, application_definition_kind: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationCreatedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.application_type_name = application_type_name
self.application_type_version = application_type_version
self.application_definition_kind = application_definition_kind
self.kind = 'ApplicationCreated'

Просмотреть файл

@ -0,0 +1,70 @@
# 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 .application_event import ApplicationEvent
class ApplicationDeletedEvent(ApplicationEvent):
"""Application Deleted event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_type_name: Required. Application type name.
:type application_type_name: str
:param application_type_version: Required. Application type version.
:type application_type_version: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_type_name': {'required': True},
'application_type_version': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationDeletedEvent, self).__init__(**kwargs)
self.application_type_name = kwargs.get('application_type_name', None)
self.application_type_version = kwargs.get('application_type_version', None)
self.kind = 'ApplicationDeleted'

Просмотреть файл

@ -0,0 +1,70 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationDeletedEvent(ApplicationEvent):
"""Application Deleted event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_type_name: Required. Application type name.
:type application_type_name: str
:param application_type_version: Required. Application type version.
:type application_type_version: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_type_name': {'required': True},
'application_type_version': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'application_type_version': {'key': 'ApplicationTypeVersion', 'type': 'str'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_type_name: str, application_type_version: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationDeletedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.application_type_name = application_type_name
self.application_type_version = application_type_version
self.kind = 'ApplicationDeleted'

Просмотреть файл

@ -0,0 +1,71 @@
# 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 ApplicationDescription(Model):
"""Describes a Service Fabric application.
All required parameters must be populated in order to send to Azure.
:param name: Required. The name of the application, including the
'fabric:' URI scheme.
:type name: str
:param type_name: Required. The application type name as defined in the
application manifest.
:type type_name: str
:param type_version: Required. The version of the application type as
defined in the application manifest.
:type type_version: str
:param parameter_list: List of application parameters with overridden
values from their default values specified in the application manifest.
:type parameter_list:
list[~azure.servicefabric.models.ApplicationParameter]
:param application_capacity: Describes capacity information for services
of this application. This description can be used for describing the
following.
- Reserving the capacity for the services on the nodes
- Limiting the total number of nodes that services of this application can
run on
- Limiting the custom capacity metrics to limit the total consumption of
this metric by the services of this application
:type application_capacity:
~azure.servicefabric.models.ApplicationCapacityDescription
:param managed_application_identity: Managed application identity
description.
:type managed_application_identity:
~azure.servicefabric.models.ManagedApplicationIdentityDescription
"""
_validation = {
'name': {'required': True},
'type_name': {'required': True},
'type_version': {'required': True},
}
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'type_name': {'key': 'TypeName', 'type': 'str'},
'type_version': {'key': 'TypeVersion', 'type': 'str'},
'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'},
'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'},
'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'},
}
def __init__(self, **kwargs):
super(ApplicationDescription, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.type_name = kwargs.get('type_name', None)
self.type_version = kwargs.get('type_version', None)
self.parameter_list = kwargs.get('parameter_list', None)
self.application_capacity = kwargs.get('application_capacity', None)
self.managed_application_identity = kwargs.get('managed_application_identity', None)

Просмотреть файл

@ -0,0 +1,71 @@
# 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 ApplicationDescription(Model):
"""Describes a Service Fabric application.
All required parameters must be populated in order to send to Azure.
:param name: Required. The name of the application, including the
'fabric:' URI scheme.
:type name: str
:param type_name: Required. The application type name as defined in the
application manifest.
:type type_name: str
:param type_version: Required. The version of the application type as
defined in the application manifest.
:type type_version: str
:param parameter_list: List of application parameters with overridden
values from their default values specified in the application manifest.
:type parameter_list:
list[~azure.servicefabric.models.ApplicationParameter]
:param application_capacity: Describes capacity information for services
of this application. This description can be used for describing the
following.
- Reserving the capacity for the services on the nodes
- Limiting the total number of nodes that services of this application can
run on
- Limiting the custom capacity metrics to limit the total consumption of
this metric by the services of this application
:type application_capacity:
~azure.servicefabric.models.ApplicationCapacityDescription
:param managed_application_identity: Managed application identity
description.
:type managed_application_identity:
~azure.servicefabric.models.ManagedApplicationIdentityDescription
"""
_validation = {
'name': {'required': True},
'type_name': {'required': True},
'type_version': {'required': True},
}
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'type_name': {'key': 'TypeName', 'type': 'str'},
'type_version': {'key': 'TypeVersion', 'type': 'str'},
'parameter_list': {'key': 'ParameterList', 'type': '[ApplicationParameter]'},
'application_capacity': {'key': 'ApplicationCapacity', 'type': 'ApplicationCapacityDescription'},
'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'},
}
def __init__(self, *, name: str, type_name: str, type_version: str, parameter_list=None, application_capacity=None, managed_application_identity=None, **kwargs) -> None:
super(ApplicationDescription, self).__init__(**kwargs)
self.name = name
self.type_name = type_name
self.type_version = type_version
self.parameter_list = parameter_list
self.application_capacity = application_capacity
self.managed_application_identity = managed_application_identity

Просмотреть файл

@ -0,0 +1,78 @@
# 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 .fabric_event import FabricEvent
class ApplicationEvent(FabricEvent):
"""Represents the base for all Application Events.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent,
ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent,
ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent,
ApplicationUpgradeRollbackCompletedEvent,
ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent,
DeployedApplicationNewHealthReportEvent,
DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent,
ApplicationContainerInstanceExitedEvent,
DeployedServicePackageNewHealthReportEvent,
DeployedServicePackageHealthReportExpiredEvent,
ChaosCodePackageRestartScheduledEvent
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
}
_subtype_map = {
'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'}
}
def __init__(self, **kwargs):
super(ApplicationEvent, self).__init__(**kwargs)
self.application_id = kwargs.get('application_id', None)
self.kind = 'ApplicationEvent'

Просмотреть файл

@ -0,0 +1,78 @@
# 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 .fabric_event_py3 import FabricEvent
class ApplicationEvent(FabricEvent):
"""Represents the base for all Application Events.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ApplicationCreatedEvent, ApplicationDeletedEvent,
ApplicationNewHealthReportEvent, ApplicationHealthReportExpiredEvent,
ApplicationUpgradeCompletedEvent, ApplicationUpgradeDomainCompletedEvent,
ApplicationUpgradeRollbackCompletedEvent,
ApplicationUpgradeRollbackStartedEvent, ApplicationUpgradeStartedEvent,
DeployedApplicationNewHealthReportEvent,
DeployedApplicationHealthReportExpiredEvent, ApplicationProcessExitedEvent,
ApplicationContainerInstanceExitedEvent,
DeployedServicePackageNewHealthReportEvent,
DeployedServicePackageHealthReportExpiredEvent,
ChaosCodePackageRestartScheduledEvent
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
}
_subtype_map = {
'kind': {'ApplicationCreated': 'ApplicationCreatedEvent', 'ApplicationDeleted': 'ApplicationDeletedEvent', 'ApplicationNewHealthReport': 'ApplicationNewHealthReportEvent', 'ApplicationHealthReportExpired': 'ApplicationHealthReportExpiredEvent', 'ApplicationUpgradeCompleted': 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDomainCompleted': 'ApplicationUpgradeDomainCompletedEvent', 'ApplicationUpgradeRollbackCompleted': 'ApplicationUpgradeRollbackCompletedEvent', 'ApplicationUpgradeRollbackStarted': 'ApplicationUpgradeRollbackStartedEvent', 'ApplicationUpgradeStarted': 'ApplicationUpgradeStartedEvent', 'DeployedApplicationNewHealthReport': 'DeployedApplicationNewHealthReportEvent', 'DeployedApplicationHealthReportExpired': 'DeployedApplicationHealthReportExpiredEvent', 'ApplicationProcessExited': 'ApplicationProcessExitedEvent', 'ApplicationContainerInstanceExited': 'ApplicationContainerInstanceExitedEvent', 'DeployedServicePackageNewHealthReport': 'DeployedServicePackageNewHealthReportEvent', 'DeployedServicePackageHealthReportExpired': 'DeployedServicePackageHealthReportExpiredEvent', 'ChaosCodePackageRestartScheduled': 'ChaosCodePackageRestartScheduledEvent'}
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, **kwargs)
self.application_id = application_id
self.kind = 'ApplicationEvent'

Просмотреть файл

@ -0,0 +1,64 @@
# 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 .entity_health import EntityHealth
class ApplicationHealth(EntityHealth):
"""Represents the health of the application. Contains the application
aggregated health state and the service and deployed application health
states.
:param aggregated_health_state: The HealthState representing the
aggregated health state of the entity computed by Health Manager.
The health evaluation of the entity reflects all events reported on the
entity and its children (if any).
The aggregation is done by applying the desired health policy. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param health_events: The list of health events reported on the entity.
:type health_events: list[~azure.servicefabric.models.HealthEvent]
:param unhealthy_evaluations: The unhealthy evaluations that show why the
current aggregated health state was returned by Health Manager.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
:param health_statistics: Shows the health statistics for all children
types of the queried entity.
:type health_statistics: ~azure.servicefabric.models.HealthStatistics
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
:param service_health_states: Service health states as found in the health
store.
:type service_health_states:
list[~azure.servicefabric.models.ServiceHealthState]
:param deployed_application_health_states: Deployed application health
states as found in the health store.
:type deployed_application_health_states:
list[~azure.servicefabric.models.DeployedApplicationHealthState]
"""
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'},
'name': {'key': 'Name', 'type': 'str'},
'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'},
'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'},
}
def __init__(self, **kwargs):
super(ApplicationHealth, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.service_health_states = kwargs.get('service_health_states', None)
self.deployed_application_health_states = kwargs.get('deployed_application_health_states', None)

Просмотреть файл

@ -0,0 +1,60 @@
# 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 .health_evaluation import HealthEvaluation
class ApplicationHealthEvaluation(HealthEvaluation):
"""Represents health evaluation for an application, containing information
about the data and the algorithm used by the health store to evaluate
health.
All required parameters must be populated in order to send to Azure.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param description: Description of the health evaluation, which represents
a summary of the evaluation process.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
:param unhealthy_evaluations: List of unhealthy evaluations that led to
the current aggregated health state of the application. The types of the
unhealthy evaluations can be DeployedApplicationsHealthEvaluation,
ServicesHealthEvaluation or EventHealthEvaluation.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'description': {'key': 'Description', 'type': 'str'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthEvaluation, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None)
self.kind = 'Application'

Просмотреть файл

@ -0,0 +1,60 @@
# 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 .health_evaluation_py3 import HealthEvaluation
class ApplicationHealthEvaluation(HealthEvaluation):
"""Represents health evaluation for an application, containing information
about the data and the algorithm used by the health store to evaluate
health.
All required parameters must be populated in order to send to Azure.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param description: Description of the health evaluation, which represents
a summary of the evaluation process.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
:param unhealthy_evaluations: List of unhealthy evaluations that led to
the current aggregated health state of the application. The types of the
unhealthy evaluations can be DeployedApplicationsHealthEvaluation,
ServicesHealthEvaluation or EventHealthEvaluation.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'description': {'key': 'Description', 'type': 'str'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
}
def __init__(self, *, aggregated_health_state=None, description: str=None, application_name: str=None, unhealthy_evaluations=None, **kwargs) -> None:
super(ApplicationHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs)
self.application_name = application_name
self.unhealthy_evaluations = unhealthy_evaluations
self.kind = 'Application'

Просмотреть файл

@ -0,0 +1,32 @@
# 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 ApplicationHealthPolicies(Model):
"""Defines the application health policy map used to evaluate the health of an
application or one of its children entities.
:param application_health_policy_map: The wrapper that contains the map
with application health policies used to evaluate specific applications in
the cluster.
:type application_health_policy_map:
list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem]
"""
_attribute_map = {
'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthPolicies, self).__init__(**kwargs)
self.application_health_policy_map = kwargs.get('application_health_policy_map', None)

Просмотреть файл

@ -0,0 +1,32 @@
# 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 ApplicationHealthPolicies(Model):
"""Defines the application health policy map used to evaluate the health of an
application or one of its children entities.
:param application_health_policy_map: The wrapper that contains the map
with application health policies used to evaluate specific applications in
the cluster.
:type application_health_policy_map:
list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem]
"""
_attribute_map = {
'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'},
}
def __init__(self, *, application_health_policy_map=None, **kwargs) -> None:
super(ApplicationHealthPolicies, self).__init__(**kwargs)
self.application_health_policy_map = application_health_policy_map

Просмотреть файл

@ -0,0 +1,56 @@
# 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 ApplicationHealthPolicy(Model):
"""Defines a health policy used to evaluate the health of an application or
one of its children entities.
:param consider_warning_as_error: Indicates whether warnings are treated
with the same severity as errors. Default value: False .
:type consider_warning_as_error: bool
:param max_percent_unhealthy_deployed_applications: The maximum allowed
percentage of unhealthy deployed applications. Allowed values are Byte
values from zero to 100.
The percentage represents the maximum tolerated percentage of deployed
applications that can be unhealthy before the application is considered in
error.
This is calculated by dividing the number of unhealthy deployed
applications over the number of nodes where the application is currently
deployed on in the cluster.
The computation rounds up to tolerate one failure on small numbers of
nodes. Default percentage is zero. Default value: 0 .
:type max_percent_unhealthy_deployed_applications: int
:param default_service_type_health_policy: The health policy used by
default to evaluate the health of a service type.
:type default_service_type_health_policy:
~azure.servicefabric.models.ServiceTypeHealthPolicy
:param service_type_health_policy_map: The map with service type health
policy per service type name. The map is empty by default.
:type service_type_health_policy_map:
list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem]
"""
_attribute_map = {
'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'},
'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'},
'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'},
'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthPolicy, self).__init__(**kwargs)
self.consider_warning_as_error = kwargs.get('consider_warning_as_error', False)
self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', 0)
self.default_service_type_health_policy = kwargs.get('default_service_type_health_policy', None)
self.service_type_health_policy_map = kwargs.get('service_type_health_policy_map', None)

Просмотреть файл

@ -0,0 +1,41 @@
# 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 ApplicationHealthPolicyMapItem(Model):
"""Defines an item in ApplicationHealthPolicyMap.
All required parameters must be populated in order to send to Azure.
:param key: Required. The key of the application health policy map item.
This is the name of the application.
:type key: str
:param value: Required. The value of the application health policy map
item. This is the ApplicationHealthPolicy for this application.
:type value: ~azure.servicefabric.models.ApplicationHealthPolicy
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'},
}
def __init__(self, **kwargs):
super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)

Просмотреть файл

@ -0,0 +1,41 @@
# 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 ApplicationHealthPolicyMapItem(Model):
"""Defines an item in ApplicationHealthPolicyMap.
All required parameters must be populated in order to send to Azure.
:param key: Required. The key of the application health policy map item.
This is the name of the application.
:type key: str
:param value: Required. The value of the application health policy map
item. This is the ApplicationHealthPolicy for this application.
:type value: ~azure.servicefabric.models.ApplicationHealthPolicy
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'ApplicationHealthPolicy'},
}
def __init__(self, *, key: str, value, **kwargs) -> None:
super(ApplicationHealthPolicyMapItem, self).__init__(**kwargs)
self.key = key
self.value = value

Просмотреть файл

@ -0,0 +1,38 @@
# 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 ApplicationHealthPolicyMapObject(Model):
"""Represents the map of application health policies for a ServiceFabric
cluster upgrade.
:param application_health_policy_map: Defines a map that contains specific
application health policies for different applications.
Each entry specifies as key the application name and as value an
ApplicationHealthPolicy used to evaluate the application health.
If an application is not specified in the map, the application health
evaluation uses the ApplicationHealthPolicy found in its application
manifest or the default application health policy (if no health policy is
defined in the manifest).
The map is empty by default.
:type application_health_policy_map:
list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem]
"""
_attribute_map = {
'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs)
self.application_health_policy_map = kwargs.get('application_health_policy_map', None)

Просмотреть файл

@ -0,0 +1,38 @@
# 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 ApplicationHealthPolicyMapObject(Model):
"""Represents the map of application health policies for a ServiceFabric
cluster upgrade.
:param application_health_policy_map: Defines a map that contains specific
application health policies for different applications.
Each entry specifies as key the application name and as value an
ApplicationHealthPolicy used to evaluate the application health.
If an application is not specified in the map, the application health
evaluation uses the ApplicationHealthPolicy found in its application
manifest or the default application health policy (if no health policy is
defined in the manifest).
The map is empty by default.
:type application_health_policy_map:
list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem]
"""
_attribute_map = {
'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'},
}
def __init__(self, *, application_health_policy_map=None, **kwargs) -> None:
super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs)
self.application_health_policy_map = application_health_policy_map

Просмотреть файл

@ -0,0 +1,56 @@
# 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 ApplicationHealthPolicy(Model):
"""Defines a health policy used to evaluate the health of an application or
one of its children entities.
:param consider_warning_as_error: Indicates whether warnings are treated
with the same severity as errors. Default value: False .
:type consider_warning_as_error: bool
:param max_percent_unhealthy_deployed_applications: The maximum allowed
percentage of unhealthy deployed applications. Allowed values are Byte
values from zero to 100.
The percentage represents the maximum tolerated percentage of deployed
applications that can be unhealthy before the application is considered in
error.
This is calculated by dividing the number of unhealthy deployed
applications over the number of nodes where the application is currently
deployed on in the cluster.
The computation rounds up to tolerate one failure on small numbers of
nodes. Default percentage is zero. Default value: 0 .
:type max_percent_unhealthy_deployed_applications: int
:param default_service_type_health_policy: The health policy used by
default to evaluate the health of a service type.
:type default_service_type_health_policy:
~azure.servicefabric.models.ServiceTypeHealthPolicy
:param service_type_health_policy_map: The map with service type health
policy per service type name. The map is empty by default.
:type service_type_health_policy_map:
list[~azure.servicefabric.models.ServiceTypeHealthPolicyMapItem]
"""
_attribute_map = {
'consider_warning_as_error': {'key': 'ConsiderWarningAsError', 'type': 'bool'},
'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'},
'default_service_type_health_policy': {'key': 'DefaultServiceTypeHealthPolicy', 'type': 'ServiceTypeHealthPolicy'},
'service_type_health_policy_map': {'key': 'ServiceTypeHealthPolicyMap', 'type': '[ServiceTypeHealthPolicyMapItem]'},
}
def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_deployed_applications: int=0, default_service_type_health_policy=None, service_type_health_policy_map=None, **kwargs) -> None:
super(ApplicationHealthPolicy, self).__init__(**kwargs)
self.consider_warning_as_error = consider_warning_as_error
self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications
self.default_service_type_health_policy = default_service_type_health_policy
self.service_type_health_policy_map = service_type_health_policy_map

Просмотреть файл

@ -0,0 +1,64 @@
# 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 .entity_health_py3 import EntityHealth
class ApplicationHealth(EntityHealth):
"""Represents the health of the application. Contains the application
aggregated health state and the service and deployed application health
states.
:param aggregated_health_state: The HealthState representing the
aggregated health state of the entity computed by Health Manager.
The health evaluation of the entity reflects all events reported on the
entity and its children (if any).
The aggregation is done by applying the desired health policy. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param health_events: The list of health events reported on the entity.
:type health_events: list[~azure.servicefabric.models.HealthEvent]
:param unhealthy_evaluations: The unhealthy evaluations that show why the
current aggregated health state was returned by Health Manager.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
:param health_statistics: Shows the health statistics for all children
types of the queried entity.
:type health_statistics: ~azure.servicefabric.models.HealthStatistics
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
:param service_health_states: Service health states as found in the health
store.
:type service_health_states:
list[~azure.servicefabric.models.ServiceHealthState]
:param deployed_application_health_states: Deployed application health
states as found in the health store.
:type deployed_application_health_states:
list[~azure.servicefabric.models.DeployedApplicationHealthState]
"""
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'health_events': {'key': 'HealthEvents', 'type': '[HealthEvent]'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
'health_statistics': {'key': 'HealthStatistics', 'type': 'HealthStatistics'},
'name': {'key': 'Name', 'type': 'str'},
'service_health_states': {'key': 'ServiceHealthStates', 'type': '[ServiceHealthState]'},
'deployed_application_health_states': {'key': 'DeployedApplicationHealthStates', 'type': '[DeployedApplicationHealthState]'},
}
def __init__(self, *, aggregated_health_state=None, health_events=None, unhealthy_evaluations=None, health_statistics=None, name: str=None, service_health_states=None, deployed_application_health_states=None, **kwargs) -> None:
super(ApplicationHealth, self).__init__(aggregated_health_state=aggregated_health_state, health_events=health_events, unhealthy_evaluations=unhealthy_evaluations, health_statistics=health_statistics, **kwargs)
self.name = name
self.service_health_states = service_health_states
self.deployed_application_health_states = deployed_application_health_states

Просмотреть файл

@ -0,0 +1,106 @@
# 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 .application_event import ApplicationEvent
class ApplicationHealthReportExpiredEvent(ApplicationEvent):
"""Application Health Report Expired event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_instance_id: Required. Id of Application instance.
:type application_instance_id: long
:param source_id: Required. Id of report source.
:type source_id: str
:param property: Required. Describes the property.
:type property: str
:param health_state: Required. Describes the property health state.
:type health_state: str
:param time_to_live_ms: Required. Time to live in milli-seconds.
:type time_to_live_ms: long
:param sequence_number: Required. Sequence number of report.
:type sequence_number: long
:param description: Required. Description of report.
:type description: str
:param remove_when_expired: Required. Indicates the removal when it
expires.
:type remove_when_expired: bool
:param source_utc_timestamp: Required. Source time.
:type source_utc_timestamp: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_instance_id': {'required': True},
'source_id': {'required': True},
'property': {'required': True},
'health_state': {'required': True},
'time_to_live_ms': {'required': True},
'sequence_number': {'required': True},
'description': {'required': True},
'remove_when_expired': {'required': True},
'source_utc_timestamp': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'},
'source_id': {'key': 'SourceId', 'type': 'str'},
'property': {'key': 'Property', 'type': 'str'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'},
'sequence_number': {'key': 'SequenceNumber', 'type': 'long'},
'description': {'key': 'Description', 'type': 'str'},
'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'},
'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'},
}
def __init__(self, **kwargs):
super(ApplicationHealthReportExpiredEvent, self).__init__(**kwargs)
self.application_instance_id = kwargs.get('application_instance_id', None)
self.source_id = kwargs.get('source_id', None)
self.property = kwargs.get('property', None)
self.health_state = kwargs.get('health_state', None)
self.time_to_live_ms = kwargs.get('time_to_live_ms', None)
self.sequence_number = kwargs.get('sequence_number', None)
self.description = kwargs.get('description', None)
self.remove_when_expired = kwargs.get('remove_when_expired', None)
self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None)
self.kind = 'ApplicationHealthReportExpired'

Просмотреть файл

@ -0,0 +1,106 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationHealthReportExpiredEvent(ApplicationEvent):
"""Application Health Report Expired event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_instance_id: Required. Id of Application instance.
:type application_instance_id: long
:param source_id: Required. Id of report source.
:type source_id: str
:param property: Required. Describes the property.
:type property: str
:param health_state: Required. Describes the property health state.
:type health_state: str
:param time_to_live_ms: Required. Time to live in milli-seconds.
:type time_to_live_ms: long
:param sequence_number: Required. Sequence number of report.
:type sequence_number: long
:param description: Required. Description of report.
:type description: str
:param remove_when_expired: Required. Indicates the removal when it
expires.
:type remove_when_expired: bool
:param source_utc_timestamp: Required. Source time.
:type source_utc_timestamp: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_instance_id': {'required': True},
'source_id': {'required': True},
'property': {'required': True},
'health_state': {'required': True},
'time_to_live_ms': {'required': True},
'sequence_number': {'required': True},
'description': {'required': True},
'remove_when_expired': {'required': True},
'source_utc_timestamp': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'},
'source_id': {'key': 'SourceId', 'type': 'str'},
'property': {'key': 'Property', 'type': 'str'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'},
'sequence_number': {'key': 'SequenceNumber', 'type': 'long'},
'description': {'key': 'Description', 'type': 'str'},
'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'},
'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationHealthReportExpiredEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.application_instance_id = application_instance_id
self.source_id = source_id
self.property = property
self.health_state = health_state
self.time_to_live_ms = time_to_live_ms
self.sequence_number = sequence_number
self.description = description
self.remove_when_expired = remove_when_expired
self.source_utc_timestamp = source_utc_timestamp
self.kind = 'ApplicationHealthReportExpired'

Просмотреть файл

@ -0,0 +1,37 @@
# 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 .entity_health_state import EntityHealthState
class ApplicationHealthState(EntityHealthState):
"""Represents the health state of an application, which contains the
application identifier and the aggregated health state.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
"""
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationHealthState, self).__init__(**kwargs)
self.name = kwargs.get('name', None)

Просмотреть файл

@ -0,0 +1,56 @@
# 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 .entity_health_state_chunk import EntityHealthStateChunk
class ApplicationHealthStateChunk(EntityHealthStateChunk):
"""Represents the health state chunk of a application.
The application health state chunk contains the application name, its
aggregated health state and any children services and deployed applications
that respect the filters in cluster health chunk query description.
:param health_state: The health state of a Service Fabric entity such as
Cluster, Node, Application, Service, Partition, Replica etc. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type health_state: str or ~azure.servicefabric.models.HealthState
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
:param application_type_name: The application type name as defined in the
application manifest.
:type application_type_name: str
:param service_health_state_chunks: The list of service health state
chunks in the cluster that respect the filters in the cluster health chunk
query description.
:type service_health_state_chunks:
~azure.servicefabric.models.ServiceHealthStateChunkList
:param deployed_application_health_state_chunks: The list of deployed
application health state chunks in the cluster that respect the filters in
the cluster health chunk query description.
:type deployed_application_health_state_chunks:
~azure.servicefabric.models.DeployedApplicationHealthStateChunkList
"""
_attribute_map = {
'health_state': {'key': 'HealthState', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'},
'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'},
}
def __init__(self, **kwargs):
super(ApplicationHealthStateChunk, self).__init__(**kwargs)
self.application_name = kwargs.get('application_name', None)
self.application_type_name = kwargs.get('application_type_name', None)
self.service_health_state_chunks = kwargs.get('service_health_state_chunks', None)
self.deployed_application_health_state_chunks = kwargs.get('deployed_application_health_state_chunks', None)

Просмотреть файл

@ -0,0 +1,35 @@
# 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 .entity_health_state_chunk_list import EntityHealthStateChunkList
class ApplicationHealthStateChunkList(EntityHealthStateChunkList):
"""The list of application health state chunks in the cluster that respect the
input filters in the chunk query. Returned by get cluster health state
chunks query.
:param total_count: Total number of entity health state objects that match
the specified filters from the cluster health chunk query description.
:type total_count: long
:param items: The list of application health state chunks that respect the
input filters in the chunk query.
:type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk]
"""
_attribute_map = {
'total_count': {'key': 'TotalCount', 'type': 'long'},
'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthStateChunkList, self).__init__(**kwargs)
self.items = kwargs.get('items', None)

Просмотреть файл

@ -0,0 +1,35 @@
# 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 .entity_health_state_chunk_list_py3 import EntityHealthStateChunkList
class ApplicationHealthStateChunkList(EntityHealthStateChunkList):
"""The list of application health state chunks in the cluster that respect the
input filters in the chunk query. Returned by get cluster health state
chunks query.
:param total_count: Total number of entity health state objects that match
the specified filters from the cluster health chunk query description.
:type total_count: long
:param items: The list of application health state chunks that respect the
input filters in the chunk query.
:type items: list[~azure.servicefabric.models.ApplicationHealthStateChunk]
"""
_attribute_map = {
'total_count': {'key': 'TotalCount', 'type': 'long'},
'items': {'key': 'Items', 'type': '[ApplicationHealthStateChunk]'},
}
def __init__(self, *, total_count: int=None, items=None, **kwargs) -> None:
super(ApplicationHealthStateChunkList, self).__init__(total_count=total_count, **kwargs)
self.items = items

Просмотреть файл

@ -0,0 +1,56 @@
# 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 .entity_health_state_chunk_py3 import EntityHealthStateChunk
class ApplicationHealthStateChunk(EntityHealthStateChunk):
"""Represents the health state chunk of a application.
The application health state chunk contains the application name, its
aggregated health state and any children services and deployed applications
that respect the filters in cluster health chunk query description.
:param health_state: The health state of a Service Fabric entity such as
Cluster, Node, Application, Service, Partition, Replica etc. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type health_state: str or ~azure.servicefabric.models.HealthState
:param application_name: The name of the application, including the
'fabric:' URI scheme.
:type application_name: str
:param application_type_name: The application type name as defined in the
application manifest.
:type application_type_name: str
:param service_health_state_chunks: The list of service health state
chunks in the cluster that respect the filters in the cluster health chunk
query description.
:type service_health_state_chunks:
~azure.servicefabric.models.ServiceHealthStateChunkList
:param deployed_application_health_state_chunks: The list of deployed
application health state chunks in the cluster that respect the filters in
the cluster health chunk query description.
:type deployed_application_health_state_chunks:
~azure.servicefabric.models.DeployedApplicationHealthStateChunkList
"""
_attribute_map = {
'health_state': {'key': 'HealthState', 'type': 'str'},
'application_name': {'key': 'ApplicationName', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'service_health_state_chunks': {'key': 'ServiceHealthStateChunks', 'type': 'ServiceHealthStateChunkList'},
'deployed_application_health_state_chunks': {'key': 'DeployedApplicationHealthStateChunks', 'type': 'DeployedApplicationHealthStateChunkList'},
}
def __init__(self, *, health_state=None, application_name: str=None, application_type_name: str=None, service_health_state_chunks=None, deployed_application_health_state_chunks=None, **kwargs) -> None:
super(ApplicationHealthStateChunk, self).__init__(health_state=health_state, **kwargs)
self.application_name = application_name
self.application_type_name = application_type_name
self.service_health_state_chunks = service_health_state_chunks
self.deployed_application_health_state_chunks = deployed_application_health_state_chunks

Просмотреть файл

@ -0,0 +1,109 @@
# 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 ApplicationHealthStateFilter(Model):
"""Defines matching criteria to determine whether a application should be
included in the cluster health chunk.
One filter can match zero, one or multiple applications, depending on its
properties.
:param application_name_filter: The name of the application that matches
the filter, as a fabric uri. The filter is applied only to the specified
application, if it exists.
If the application doesn't exist, no application is returned in the
cluster health chunk based on this filter.
If the application exists, it is included in the cluster health chunk if
it respects the other filter properties.
If not specified, all applications are matched against the other filter
members, like health state filter.
:type application_name_filter: str
:param application_type_name_filter: The name of the application type that
matches the filter.
If specified, the filter is applied only to applications of the selected
application type, if any exists.
If no applications of the specified application type exists, no
application is returned in the cluster health chunk based on this filter.
Each application of the specified application type is included in the
cluster health chunk if it respects the other filter properties.
If not specified, all applications are matched against the other filter
members, like health state filter.
:type application_type_name_filter: str
:param health_state_filter: The filter for the health state of the
applications. It allows selecting applications if they match the desired
health states.
The possible values are integer value of one of the following health
states. Only applications that match the filter are returned. All
applications are used to evaluate the cluster aggregated health state.
If not specified, default value is None, unless the application name or
the application type name are specified. If the filter has default value
and application name is specified, the matching application is returned.
The state values are flag-based enumeration, so the value could be a
combination of these values obtained using bitwise 'OR' operator.
For example, if the provided value is 6, it matches applications with
HealthState value of OK (2) and Warning (4).
- Default - Default value. Matches any HealthState. The value is zero.
- None - Filter that doesn't match any HealthState value. Used in order to
return no results on a given collection of states. The value is 1.
- Ok - Filter that matches input with HealthState value Ok. The value is
2.
- Warning - Filter that matches input with HealthState value Warning. The
value is 4.
- Error - Filter that matches input with HealthState value Error. The
value is 8.
- All - Filter that matches input with any HealthState value. The value is
65535. Default value: 0 .
:type health_state_filter: int
:param service_filters: Defines a list of filters that specify which
services to be included in the returned cluster health chunk as children
of the application. The services are returned only if the parent
application matches a filter.
If the list is empty, no services are returned. All the services are used
to evaluate the parent application aggregated health state, regardless of
the input filters.
The application filter may specify multiple service filters.
For example, it can specify a filter to return all services with health
state Error and another filter to always include a service identified by
its service name.
:type service_filters:
list[~azure.servicefabric.models.ServiceHealthStateFilter]
:param deployed_application_filters: Defines a list of filters that
specify which deployed applications to be included in the returned cluster
health chunk as children of the application. The deployed applications are
returned only if the parent application matches a filter.
If the list is empty, no deployed applications are returned. All the
deployed applications are used to evaluate the parent application
aggregated health state, regardless of the input filters.
The application filter may specify multiple deployed application filters.
For example, it can specify a filter to return all deployed applications
with health state Error and another filter to always include a deployed
application on a specified node.
:type deployed_application_filters:
list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter]
"""
_attribute_map = {
'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'},
'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'},
'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'},
'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'},
'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'},
}
def __init__(self, **kwargs):
super(ApplicationHealthStateFilter, self).__init__(**kwargs)
self.application_name_filter = kwargs.get('application_name_filter', None)
self.application_type_name_filter = kwargs.get('application_type_name_filter', None)
self.health_state_filter = kwargs.get('health_state_filter', 0)
self.service_filters = kwargs.get('service_filters', None)
self.deployed_application_filters = kwargs.get('deployed_application_filters', None)

Просмотреть файл

@ -0,0 +1,109 @@
# 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 ApplicationHealthStateFilter(Model):
"""Defines matching criteria to determine whether a application should be
included in the cluster health chunk.
One filter can match zero, one or multiple applications, depending on its
properties.
:param application_name_filter: The name of the application that matches
the filter, as a fabric uri. The filter is applied only to the specified
application, if it exists.
If the application doesn't exist, no application is returned in the
cluster health chunk based on this filter.
If the application exists, it is included in the cluster health chunk if
it respects the other filter properties.
If not specified, all applications are matched against the other filter
members, like health state filter.
:type application_name_filter: str
:param application_type_name_filter: The name of the application type that
matches the filter.
If specified, the filter is applied only to applications of the selected
application type, if any exists.
If no applications of the specified application type exists, no
application is returned in the cluster health chunk based on this filter.
Each application of the specified application type is included in the
cluster health chunk if it respects the other filter properties.
If not specified, all applications are matched against the other filter
members, like health state filter.
:type application_type_name_filter: str
:param health_state_filter: The filter for the health state of the
applications. It allows selecting applications if they match the desired
health states.
The possible values are integer value of one of the following health
states. Only applications that match the filter are returned. All
applications are used to evaluate the cluster aggregated health state.
If not specified, default value is None, unless the application name or
the application type name are specified. If the filter has default value
and application name is specified, the matching application is returned.
The state values are flag-based enumeration, so the value could be a
combination of these values obtained using bitwise 'OR' operator.
For example, if the provided value is 6, it matches applications with
HealthState value of OK (2) and Warning (4).
- Default - Default value. Matches any HealthState. The value is zero.
- None - Filter that doesn't match any HealthState value. Used in order to
return no results on a given collection of states. The value is 1.
- Ok - Filter that matches input with HealthState value Ok. The value is
2.
- Warning - Filter that matches input with HealthState value Warning. The
value is 4.
- Error - Filter that matches input with HealthState value Error. The
value is 8.
- All - Filter that matches input with any HealthState value. The value is
65535. Default value: 0 .
:type health_state_filter: int
:param service_filters: Defines a list of filters that specify which
services to be included in the returned cluster health chunk as children
of the application. The services are returned only if the parent
application matches a filter.
If the list is empty, no services are returned. All the services are used
to evaluate the parent application aggregated health state, regardless of
the input filters.
The application filter may specify multiple service filters.
For example, it can specify a filter to return all services with health
state Error and another filter to always include a service identified by
its service name.
:type service_filters:
list[~azure.servicefabric.models.ServiceHealthStateFilter]
:param deployed_application_filters: Defines a list of filters that
specify which deployed applications to be included in the returned cluster
health chunk as children of the application. The deployed applications are
returned only if the parent application matches a filter.
If the list is empty, no deployed applications are returned. All the
deployed applications are used to evaluate the parent application
aggregated health state, regardless of the input filters.
The application filter may specify multiple deployed application filters.
For example, it can specify a filter to return all deployed applications
with health state Error and another filter to always include a deployed
application on a specified node.
:type deployed_application_filters:
list[~azure.servicefabric.models.DeployedApplicationHealthStateFilter]
"""
_attribute_map = {
'application_name_filter': {'key': 'ApplicationNameFilter', 'type': 'str'},
'application_type_name_filter': {'key': 'ApplicationTypeNameFilter', 'type': 'str'},
'health_state_filter': {'key': 'HealthStateFilter', 'type': 'int'},
'service_filters': {'key': 'ServiceFilters', 'type': '[ServiceHealthStateFilter]'},
'deployed_application_filters': {'key': 'DeployedApplicationFilters', 'type': '[DeployedApplicationHealthStateFilter]'},
}
def __init__(self, *, application_name_filter: str=None, application_type_name_filter: str=None, health_state_filter: int=0, service_filters=None, deployed_application_filters=None, **kwargs) -> None:
super(ApplicationHealthStateFilter, self).__init__(**kwargs)
self.application_name_filter = application_name_filter
self.application_type_name_filter = application_type_name_filter
self.health_state_filter = health_state_filter
self.service_filters = service_filters
self.deployed_application_filters = deployed_application_filters

Просмотреть файл

@ -0,0 +1,37 @@
# 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 .entity_health_state_py3 import EntityHealthState
class ApplicationHealthState(EntityHealthState):
"""Represents the health state of an application, which contains the
application identifier and the aggregated health state.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
"""
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
}
def __init__(self, *, aggregated_health_state=None, name: str=None, **kwargs) -> None:
super(ApplicationHealthState, self).__init__(aggregated_health_state=aggregated_health_state, **kwargs)
self.name = name

Просмотреть файл

@ -0,0 +1,78 @@
# 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 ApplicationInfo(Model):
"""Information about a Service Fabric application.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
:param type_name: The application type name as defined in the application
manifest.
:type type_name: str
:param type_version: The version of the application type as defined in the
application manifest.
:type type_version: str
:param status: The status of the application. Possible values include:
'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
:type status: str or ~azure.servicefabric.models.ApplicationStatus
:param parameters: List of application parameters with overridden values
from their default values specified in the application manifest.
:type parameters: list[~azure.servicefabric.models.ApplicationParameter]
:param health_state: The health state of a Service Fabric entity such as
Cluster, Node, Application, Service, Partition, Replica etc. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type health_state: str or ~azure.servicefabric.models.HealthState
:param application_definition_kind: The mechanism used to define a Service
Fabric application. Possible values include: 'Invalid',
'ServiceFabricApplicationDescription', 'Compose'
:type application_definition_kind: str or
~azure.servicefabric.models.ApplicationDefinitionKind
:param managed_application_identity: Managed application identity
description.
:type managed_application_identity:
~azure.servicefabric.models.ManagedApplicationIdentityDescription
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
'type_name': {'key': 'TypeName', 'type': 'str'},
'type_version': {'key': 'TypeVersion', 'type': 'str'},
'status': {'key': 'Status', 'type': 'str'},
'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'},
'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'},
}
def __init__(self, **kwargs):
super(ApplicationInfo, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)
self.type_name = kwargs.get('type_name', None)
self.type_version = kwargs.get('type_version', None)
self.status = kwargs.get('status', None)
self.parameters = kwargs.get('parameters', None)
self.health_state = kwargs.get('health_state', None)
self.application_definition_kind = kwargs.get('application_definition_kind', None)
self.managed_application_identity = kwargs.get('managed_application_identity', None)

Просмотреть файл

@ -0,0 +1,78 @@
# 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 ApplicationInfo(Model):
"""Information about a Service Fabric application.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
:param type_name: The application type name as defined in the application
manifest.
:type type_name: str
:param type_version: The version of the application type as defined in the
application manifest.
:type type_version: str
:param status: The status of the application. Possible values include:
'Invalid', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
:type status: str or ~azure.servicefabric.models.ApplicationStatus
:param parameters: List of application parameters with overridden values
from their default values specified in the application manifest.
:type parameters: list[~azure.servicefabric.models.ApplicationParameter]
:param health_state: The health state of a Service Fabric entity such as
Cluster, Node, Application, Service, Partition, Replica etc. Possible
values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:type health_state: str or ~azure.servicefabric.models.HealthState
:param application_definition_kind: The mechanism used to define a Service
Fabric application. Possible values include: 'Invalid',
'ServiceFabricApplicationDescription', 'Compose'
:type application_definition_kind: str or
~azure.servicefabric.models.ApplicationDefinitionKind
:param managed_application_identity: Managed application identity
description.
:type managed_application_identity:
~azure.servicefabric.models.ManagedApplicationIdentityDescription
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
'type_name': {'key': 'TypeName', 'type': 'str'},
'type_version': {'key': 'TypeVersion', 'type': 'str'},
'status': {'key': 'Status', 'type': 'str'},
'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'},
'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'},
}
def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None:
super(ApplicationInfo, self).__init__(**kwargs)
self.id = id
self.name = name
self.type_name = type_name
self.type_version = type_version
self.status = status
self.parameters = parameters
self.health_state = health_state
self.application_definition_kind = application_definition_kind
self.managed_application_identity = managed_application_identity

Просмотреть файл

@ -0,0 +1,64 @@
# 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 ApplicationLoadInfo(Model):
"""Load Information about a Service Fabric application.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param minimum_nodes: The minimum number of nodes for this application.
It is the number of nodes where Service Fabric will reserve Capacity in
the cluster which equals to ReservedLoad * MinimumNodes for this
Application instance.
For applications that do not have application capacity defined this value
will be zero.
:type minimum_nodes: long
:param maximum_nodes: The maximum number of nodes where this application
can be instantiated.
It is the number of nodes this application is allowed to span.
For applications that do not have application capacity defined this value
will be zero.
:type maximum_nodes: long
:param node_count: The number of nodes on which this application is
instantiated.
For applications that do not have application capacity defined this value
will be zero.
:type node_count: long
:param application_load_metric_information: List of application load
metric information.
:type application_load_metric_information:
list[~azure.servicefabric.models.ApplicationLoadMetricInformation]
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'},
'node_count': {'key': 'NodeCount', 'type': 'long'},
'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'},
}
def __init__(self, **kwargs):
super(ApplicationLoadInfo, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.minimum_nodes = kwargs.get('minimum_nodes', None)
self.maximum_nodes = kwargs.get('maximum_nodes', None)
self.node_count = kwargs.get('node_count', None)
self.application_load_metric_information = kwargs.get('application_load_metric_information', None)

Просмотреть файл

@ -0,0 +1,64 @@
# 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 ApplicationLoadInfo(Model):
"""Load Information about a Service Fabric application.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param minimum_nodes: The minimum number of nodes for this application.
It is the number of nodes where Service Fabric will reserve Capacity in
the cluster which equals to ReservedLoad * MinimumNodes for this
Application instance.
For applications that do not have application capacity defined this value
will be zero.
:type minimum_nodes: long
:param maximum_nodes: The maximum number of nodes where this application
can be instantiated.
It is the number of nodes this application is allowed to span.
For applications that do not have application capacity defined this value
will be zero.
:type maximum_nodes: long
:param node_count: The number of nodes on which this application is
instantiated.
For applications that do not have application capacity defined this value
will be zero.
:type node_count: long
:param application_load_metric_information: List of application load
metric information.
:type application_load_metric_information:
list[~azure.servicefabric.models.ApplicationLoadMetricInformation]
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'},
'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'},
'node_count': {'key': 'NodeCount', 'type': 'long'},
'application_load_metric_information': {'key': 'ApplicationLoadMetricInformation', 'type': '[ApplicationLoadMetricInformation]'},
}
def __init__(self, *, id: str=None, minimum_nodes: int=None, maximum_nodes: int=None, node_count: int=None, application_load_metric_information=None, **kwargs) -> None:
super(ApplicationLoadInfo, self).__init__(**kwargs)
self.id = id
self.minimum_nodes = minimum_nodes
self.maximum_nodes = maximum_nodes
self.node_count = node_count
self.application_load_metric_information = application_load_metric_information

Просмотреть файл

@ -0,0 +1,50 @@
# 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 ApplicationLoadMetricInformation(Model):
"""Describes load information for a custom resource balancing metric. This can
be used to limit the total consumption of this metric by the services of
this application.
:param name: The name of the metric.
:type name: str
:param reservation_capacity: This is the capacity reserved in the cluster
for the application.
It's the product of NodeReservationCapacity and MinimumNodes.
If set to zero, no capacity is reserved for this metric.
When setting application capacity or when updating application capacity
this value must be smaller than or equal to MaximumCapacity for each
metric.
:type reservation_capacity: long
:param application_capacity: Total capacity for this metric in this
application instance.
:type application_capacity: long
:param application_load: Current load for this metric in this application
instance.
:type application_load: long
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'},
'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'},
'application_load': {'key': 'ApplicationLoad', 'type': 'long'},
}
def __init__(self, **kwargs):
super(ApplicationLoadMetricInformation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.reservation_capacity = kwargs.get('reservation_capacity', None)
self.application_capacity = kwargs.get('application_capacity', None)
self.application_load = kwargs.get('application_load', None)

Просмотреть файл

@ -0,0 +1,50 @@
# 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 ApplicationLoadMetricInformation(Model):
"""Describes load information for a custom resource balancing metric. This can
be used to limit the total consumption of this metric by the services of
this application.
:param name: The name of the metric.
:type name: str
:param reservation_capacity: This is the capacity reserved in the cluster
for the application.
It's the product of NodeReservationCapacity and MinimumNodes.
If set to zero, no capacity is reserved for this metric.
When setting application capacity or when updating application capacity
this value must be smaller than or equal to MaximumCapacity for each
metric.
:type reservation_capacity: long
:param application_capacity: Total capacity for this metric in this
application instance.
:type application_capacity: long
:param application_load: Current load for this metric in this application
instance.
:type application_load: long
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'},
'application_capacity': {'key': 'ApplicationCapacity', 'type': 'long'},
'application_load': {'key': 'ApplicationLoad', 'type': 'long'},
}
def __init__(self, *, name: str=None, reservation_capacity: int=None, application_capacity: int=None, application_load: int=None, **kwargs) -> None:
super(ApplicationLoadMetricInformation, self).__init__(**kwargs)
self.name = name
self.reservation_capacity = reservation_capacity
self.application_capacity = application_capacity
self.application_load = application_load

Просмотреть файл

@ -0,0 +1,70 @@
# 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 ApplicationMetricDescription(Model):
"""Describes capacity information for a custom resource balancing metric. This
can be used to limit the total consumption of this metric by the services
of this application.
:param name: The name of the metric.
:type name: str
:param maximum_capacity: The maximum node capacity for Service Fabric
application.
This is the maximum Load for an instance of this application on a single
node. Even if the capacity of node is greater than this value, Service
Fabric will limit the total load of services within the application on
each node to this value.
If set to zero, capacity for this metric is unlimited on each node.
When creating a new application with application capacity defined, the
product of MaximumNodes and this value must always be smaller than or
equal to TotalApplicationCapacity.
When updating existing application with application capacity, the product
of MaximumNodes and this value must always be smaller than or equal to
TotalApplicationCapacity.
:type maximum_capacity: long
:param reservation_capacity: The node reservation capacity for Service
Fabric application.
This is the amount of load which is reserved on nodes which have instances
of this application.
If MinimumNodes is specified, then the product of these values will be the
capacity reserved in the cluster for the application.
If set to zero, no capacity is reserved for this metric.
When setting application capacity or when updating application capacity;
this value must be smaller than or equal to MaximumCapacity for each
metric.
:type reservation_capacity: long
:param total_application_capacity: The total metric capacity for Service
Fabric application.
This is the total metric capacity for this application in the cluster.
Service Fabric will try to limit the sum of loads of services within the
application to this value.
When creating a new application with application capacity defined, the
product of MaximumNodes and MaximumCapacity must always be smaller than or
equal to this value.
:type total_application_capacity: long
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'},
'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'},
'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'},
}
def __init__(self, **kwargs):
super(ApplicationMetricDescription, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.maximum_capacity = kwargs.get('maximum_capacity', None)
self.reservation_capacity = kwargs.get('reservation_capacity', None)
self.total_application_capacity = kwargs.get('total_application_capacity', None)

Просмотреть файл

@ -0,0 +1,70 @@
# 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 ApplicationMetricDescription(Model):
"""Describes capacity information for a custom resource balancing metric. This
can be used to limit the total consumption of this metric by the services
of this application.
:param name: The name of the metric.
:type name: str
:param maximum_capacity: The maximum node capacity for Service Fabric
application.
This is the maximum Load for an instance of this application on a single
node. Even if the capacity of node is greater than this value, Service
Fabric will limit the total load of services within the application on
each node to this value.
If set to zero, capacity for this metric is unlimited on each node.
When creating a new application with application capacity defined, the
product of MaximumNodes and this value must always be smaller than or
equal to TotalApplicationCapacity.
When updating existing application with application capacity, the product
of MaximumNodes and this value must always be smaller than or equal to
TotalApplicationCapacity.
:type maximum_capacity: long
:param reservation_capacity: The node reservation capacity for Service
Fabric application.
This is the amount of load which is reserved on nodes which have instances
of this application.
If MinimumNodes is specified, then the product of these values will be the
capacity reserved in the cluster for the application.
If set to zero, no capacity is reserved for this metric.
When setting application capacity or when updating application capacity;
this value must be smaller than or equal to MaximumCapacity for each
metric.
:type reservation_capacity: long
:param total_application_capacity: The total metric capacity for Service
Fabric application.
This is the total metric capacity for this application in the cluster.
Service Fabric will try to limit the sum of loads of services within the
application to this value.
When creating a new application with application capacity defined, the
product of MaximumNodes and MaximumCapacity must always be smaller than or
equal to this value.
:type total_application_capacity: long
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'maximum_capacity': {'key': 'MaximumCapacity', 'type': 'long'},
'reservation_capacity': {'key': 'ReservationCapacity', 'type': 'long'},
'total_application_capacity': {'key': 'TotalApplicationCapacity', 'type': 'long'},
}
def __init__(self, *, name: str=None, maximum_capacity: int=None, reservation_capacity: int=None, total_application_capacity: int=None, **kwargs) -> None:
super(ApplicationMetricDescription, self).__init__(**kwargs)
self.name = name
self.maximum_capacity = maximum_capacity
self.reservation_capacity = reservation_capacity
self.total_application_capacity = total_application_capacity

Просмотреть файл

@ -0,0 +1,39 @@
# 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 ApplicationNameInfo(Model):
"""Information about the application name.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationNameInfo, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)

Просмотреть файл

@ -0,0 +1,39 @@
# 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 ApplicationNameInfo(Model):
"""Information about the application name.
:param id: The identity of the application. This is an encoded
representation of the application name. This is used in the REST APIs to
identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type id: str
:param name: The name of the application, including the 'fabric:' URI
scheme.
:type name: str
"""
_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'name': {'key': 'Name', 'type': 'str'},
}
def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None:
super(ApplicationNameInfo, self).__init__(**kwargs)
self.id = id
self.name = name

Просмотреть файл

@ -0,0 +1,106 @@
# 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 .application_event import ApplicationEvent
class ApplicationNewHealthReportEvent(ApplicationEvent):
"""Application Health Report Created event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_instance_id: Required. Id of Application instance.
:type application_instance_id: long
:param source_id: Required. Id of report source.
:type source_id: str
:param property: Required. Describes the property.
:type property: str
:param health_state: Required. Describes the property health state.
:type health_state: str
:param time_to_live_ms: Required. Time to live in milli-seconds.
:type time_to_live_ms: long
:param sequence_number: Required. Sequence number of report.
:type sequence_number: long
:param description: Required. Description of report.
:type description: str
:param remove_when_expired: Required. Indicates the removal when it
expires.
:type remove_when_expired: bool
:param source_utc_timestamp: Required. Source time.
:type source_utc_timestamp: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_instance_id': {'required': True},
'source_id': {'required': True},
'property': {'required': True},
'health_state': {'required': True},
'time_to_live_ms': {'required': True},
'sequence_number': {'required': True},
'description': {'required': True},
'remove_when_expired': {'required': True},
'source_utc_timestamp': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'},
'source_id': {'key': 'SourceId', 'type': 'str'},
'property': {'key': 'Property', 'type': 'str'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'},
'sequence_number': {'key': 'SequenceNumber', 'type': 'long'},
'description': {'key': 'Description', 'type': 'str'},
'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'},
'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'},
}
def __init__(self, **kwargs):
super(ApplicationNewHealthReportEvent, self).__init__(**kwargs)
self.application_instance_id = kwargs.get('application_instance_id', None)
self.source_id = kwargs.get('source_id', None)
self.property = kwargs.get('property', None)
self.health_state = kwargs.get('health_state', None)
self.time_to_live_ms = kwargs.get('time_to_live_ms', None)
self.sequence_number = kwargs.get('sequence_number', None)
self.description = kwargs.get('description', None)
self.remove_when_expired = kwargs.get('remove_when_expired', None)
self.source_utc_timestamp = kwargs.get('source_utc_timestamp', None)
self.kind = 'ApplicationNewHealthReport'

Просмотреть файл

@ -0,0 +1,106 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationNewHealthReportEvent(ApplicationEvent):
"""Application Health Report Created event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param application_instance_id: Required. Id of Application instance.
:type application_instance_id: long
:param source_id: Required. Id of report source.
:type source_id: str
:param property: Required. Describes the property.
:type property: str
:param health_state: Required. Describes the property health state.
:type health_state: str
:param time_to_live_ms: Required. Time to live in milli-seconds.
:type time_to_live_ms: long
:param sequence_number: Required. Sequence number of report.
:type sequence_number: long
:param description: Required. Description of report.
:type description: str
:param remove_when_expired: Required. Indicates the removal when it
expires.
:type remove_when_expired: bool
:param source_utc_timestamp: Required. Source time.
:type source_utc_timestamp: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'application_instance_id': {'required': True},
'source_id': {'required': True},
'property': {'required': True},
'health_state': {'required': True},
'time_to_live_ms': {'required': True},
'sequence_number': {'required': True},
'description': {'required': True},
'remove_when_expired': {'required': True},
'source_utc_timestamp': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'application_instance_id': {'key': 'ApplicationInstanceId', 'type': 'long'},
'source_id': {'key': 'SourceId', 'type': 'str'},
'property': {'key': 'Property', 'type': 'str'},
'health_state': {'key': 'HealthState', 'type': 'str'},
'time_to_live_ms': {'key': 'TimeToLiveMs', 'type': 'long'},
'sequence_number': {'key': 'SequenceNumber', 'type': 'long'},
'description': {'key': 'Description', 'type': 'str'},
'remove_when_expired': {'key': 'RemoveWhenExpired', 'type': 'bool'},
'source_utc_timestamp': {'key': 'SourceUtcTimestamp', 'type': 'iso-8601'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, application_instance_id: int, source_id: str, property: str, health_state: str, time_to_live_ms: int, sequence_number: int, description: str, remove_when_expired: bool, source_utc_timestamp, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationNewHealthReportEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.application_instance_id = application_instance_id
self.source_id = source_id
self.property = property
self.health_state = health_state
self.time_to_live_ms = time_to_live_ms
self.sequence_number = sequence_number
self.description = description
self.remove_when_expired = remove_when_expired
self.source_utc_timestamp = source_utc_timestamp
self.kind = 'ApplicationNewHealthReport'

Просмотреть файл

@ -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 ApplicationParameter(Model):
"""Describes an application parameter override to be applied when creating or
upgrading an application.
All required parameters must be populated in order to send to Azure.
:param key: Required. The name of the parameter.
:type key: str
:param value: Required. The value of the parameter.
:type value: str
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationParameter, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)

Просмотреть файл

@ -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 ApplicationParameter(Model):
"""Describes an application parameter override to be applied when creating or
upgrading an application.
All required parameters must be populated in order to send to Azure.
:param key: Required. The name of the parameter.
:type key: str
:param value: Required. The value of the parameter.
:type value: str
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'str'},
}
def __init__(self, *, key: str, value: str, **kwargs) -> None:
super(ApplicationParameter, self).__init__(**kwargs)
self.key = key
self.value = value

Просмотреть файл

@ -0,0 +1,122 @@
# 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 .application_event import ApplicationEvent
class ApplicationProcessExitedEvent(ApplicationEvent):
"""Process Exited event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param service_name: Required. Name of Service.
:type service_name: str
:param service_package_name: Required. Name of Service package.
:type service_package_name: str
:param service_package_activation_id: Required. Activation Id of Service
package.
:type service_package_activation_id: str
:param is_exclusive: Required. Indicates IsExclusive flag.
:type is_exclusive: bool
:param code_package_name: Required. Name of Code package.
:type code_package_name: str
:param entry_point_type: Required. Type of EntryPoint.
:type entry_point_type: str
:param exe_name: Required. Name of executable.
:type exe_name: str
:param process_id: Required. Process Id.
:type process_id: long
:param host_id: Required. Host Id.
:type host_id: str
:param exit_code: Required. Exit code of process.
:type exit_code: long
:param unexpected_termination: Required. Indicates if termination is
unexpected.
:type unexpected_termination: bool
:param start_time: Required. Start time of process.
:type start_time: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'service_name': {'required': True},
'service_package_name': {'required': True},
'service_package_activation_id': {'required': True},
'is_exclusive': {'required': True},
'code_package_name': {'required': True},
'entry_point_type': {'required': True},
'exe_name': {'required': True},
'process_id': {'required': True},
'host_id': {'required': True},
'exit_code': {'required': True},
'unexpected_termination': {'required': True},
'start_time': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'service_name': {'key': 'ServiceName', 'type': 'str'},
'service_package_name': {'key': 'ServicePackageName', 'type': 'str'},
'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'},
'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'},
'code_package_name': {'key': 'CodePackageName', 'type': 'str'},
'entry_point_type': {'key': 'EntryPointType', 'type': 'str'},
'exe_name': {'key': 'ExeName', 'type': 'str'},
'process_id': {'key': 'ProcessId', 'type': 'long'},
'host_id': {'key': 'HostId', 'type': 'str'},
'exit_code': {'key': 'ExitCode', 'type': 'long'},
'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'},
'start_time': {'key': 'StartTime', 'type': 'iso-8601'},
}
def __init__(self, **kwargs):
super(ApplicationProcessExitedEvent, self).__init__(**kwargs)
self.service_name = kwargs.get('service_name', None)
self.service_package_name = kwargs.get('service_package_name', None)
self.service_package_activation_id = kwargs.get('service_package_activation_id', None)
self.is_exclusive = kwargs.get('is_exclusive', None)
self.code_package_name = kwargs.get('code_package_name', None)
self.entry_point_type = kwargs.get('entry_point_type', None)
self.exe_name = kwargs.get('exe_name', None)
self.process_id = kwargs.get('process_id', None)
self.host_id = kwargs.get('host_id', None)
self.exit_code = kwargs.get('exit_code', None)
self.unexpected_termination = kwargs.get('unexpected_termination', None)
self.start_time = kwargs.get('start_time', None)
self.kind = 'ApplicationProcessExited'

Просмотреть файл

@ -0,0 +1,122 @@
# 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 .application_event_py3 import ApplicationEvent
class ApplicationProcessExitedEvent(ApplicationEvent):
"""Process Exited event.
All required parameters must be populated in order to send to Azure.
:param event_instance_id: Required. The identifier for the FabricEvent
instance.
:type event_instance_id: str
:param category: The category of event.
:type category: str
:param time_stamp: Required. The time event was logged.
:type time_stamp: datetime
:param has_correlated_events: Shows there is existing related events
available.
:type has_correlated_events: bool
:param kind: Required. Constant filled by server.
:type kind: str
:param application_id: Required. The identity of the application. This is
an encoded representation of the application name. This is used in the
REST APIs to identify the application resource.
Starting in version 6.0, hierarchical names are delimited with the "\\~"
character. For example, if the application name is "fabric:/myapp/app1",
the application identity would be "myapp\\~app1" in 6.0+ and "myapp/app1"
in previous versions.
:type application_id: str
:param service_name: Required. Name of Service.
:type service_name: str
:param service_package_name: Required. Name of Service package.
:type service_package_name: str
:param service_package_activation_id: Required. Activation Id of Service
package.
:type service_package_activation_id: str
:param is_exclusive: Required. Indicates IsExclusive flag.
:type is_exclusive: bool
:param code_package_name: Required. Name of Code package.
:type code_package_name: str
:param entry_point_type: Required. Type of EntryPoint.
:type entry_point_type: str
:param exe_name: Required. Name of executable.
:type exe_name: str
:param process_id: Required. Process Id.
:type process_id: long
:param host_id: Required. Host Id.
:type host_id: str
:param exit_code: Required. Exit code of process.
:type exit_code: long
:param unexpected_termination: Required. Indicates if termination is
unexpected.
:type unexpected_termination: bool
:param start_time: Required. Start time of process.
:type start_time: datetime
"""
_validation = {
'event_instance_id': {'required': True},
'time_stamp': {'required': True},
'kind': {'required': True},
'application_id': {'required': True},
'service_name': {'required': True},
'service_package_name': {'required': True},
'service_package_activation_id': {'required': True},
'is_exclusive': {'required': True},
'code_package_name': {'required': True},
'entry_point_type': {'required': True},
'exe_name': {'required': True},
'process_id': {'required': True},
'host_id': {'required': True},
'exit_code': {'required': True},
'unexpected_termination': {'required': True},
'start_time': {'required': True},
}
_attribute_map = {
'event_instance_id': {'key': 'EventInstanceId', 'type': 'str'},
'category': {'key': 'Category', 'type': 'str'},
'time_stamp': {'key': 'TimeStamp', 'type': 'iso-8601'},
'has_correlated_events': {'key': 'HasCorrelatedEvents', 'type': 'bool'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_id': {'key': 'ApplicationId', 'type': 'str'},
'service_name': {'key': 'ServiceName', 'type': 'str'},
'service_package_name': {'key': 'ServicePackageName', 'type': 'str'},
'service_package_activation_id': {'key': 'ServicePackageActivationId', 'type': 'str'},
'is_exclusive': {'key': 'IsExclusive', 'type': 'bool'},
'code_package_name': {'key': 'CodePackageName', 'type': 'str'},
'entry_point_type': {'key': 'EntryPointType', 'type': 'str'},
'exe_name': {'key': 'ExeName', 'type': 'str'},
'process_id': {'key': 'ProcessId', 'type': 'long'},
'host_id': {'key': 'HostId', 'type': 'str'},
'exit_code': {'key': 'ExitCode', 'type': 'long'},
'unexpected_termination': {'key': 'UnexpectedTermination', 'type': 'bool'},
'start_time': {'key': 'StartTime', 'type': 'iso-8601'},
}
def __init__(self, *, event_instance_id: str, time_stamp, application_id: str, service_name: str, service_package_name: str, service_package_activation_id: str, is_exclusive: bool, code_package_name: str, entry_point_type: str, exe_name: str, process_id: int, host_id: str, exit_code: int, unexpected_termination: bool, start_time, category: str=None, has_correlated_events: bool=None, **kwargs) -> None:
super(ApplicationProcessExitedEvent, self).__init__(event_instance_id=event_instance_id, category=category, time_stamp=time_stamp, has_correlated_events=has_correlated_events, application_id=application_id, **kwargs)
self.service_name = service_name
self.service_package_name = service_package_name
self.service_package_activation_id = service_package_activation_id
self.is_exclusive = is_exclusive
self.code_package_name = code_package_name
self.entry_point_type = entry_point_type
self.exe_name = exe_name
self.process_id = process_id
self.host_id = host_id
self.exit_code = exit_code
self.unexpected_termination = unexpected_termination
self.start_time = start_time
self.kind = 'ApplicationProcessExited'

Просмотреть файл

@ -0,0 +1,93 @@
# 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 ApplicationResourceDescription(Model):
"""This type describes a application resource.
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.
:param name: Required. Name of the Application resource.
:type name: str
:param description: User readable description of the application.
:type description: str
:param services: Describes the services in the application. This property
is used to create or modify services of the application. On get only the
name of the service is returned. The service description can be obtained
by querying for the service resource.
:type services:
list[~azure.servicefabric.models.ServiceResourceDescription]
:param diagnostics: Describes the diagnostics definition and usage for an
application resource.
:type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription
:param debug_params: Internal - used by Visual Studio to setup the
debugging session on the local development environment.
:type debug_params: str
:ivar service_names: Names of the services in the application.
:vartype service_names: list[str]
:ivar status: Status of the application. Possible values include:
'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
:vartype status: str or ~azure.servicefabric.models.ResourceStatus
:ivar status_details: Gives additional information about the current
status of the application.
:vartype status_details: str
:ivar health_state: Describes the health state of an application resource.
Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:vartype health_state: str or ~azure.servicefabric.models.HealthState
:ivar unhealthy_evaluation: When the application's health state is not
'Ok', this additional details from service fabric Health Manager for the
user to know why the application is marked unhealthy.
:vartype unhealthy_evaluation: str
:param identity: Describes the identity of the application.
:type identity: ~azure.servicefabric.models.IdentityDescription
"""
_validation = {
'name': {'required': True},
'service_names': {'readonly': True},
'status': {'readonly': True},
'status_details': {'readonly': True},
'health_state': {'readonly': True},
'unhealthy_evaluation': {'readonly': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'},
'debug_params': {'key': 'properties.debugParams', 'type': 'str'},
'service_names': {'key': 'properties.serviceNames', 'type': '[str]'},
'status': {'key': 'properties.status', 'type': 'str'},
'status_details': {'key': 'properties.statusDetails', 'type': 'str'},
'health_state': {'key': 'properties.healthState', 'type': 'str'},
'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'IdentityDescription'},
}
def __init__(self, **kwargs):
super(ApplicationResourceDescription, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.description = kwargs.get('description', None)
self.services = kwargs.get('services', None)
self.diagnostics = kwargs.get('diagnostics', None)
self.debug_params = kwargs.get('debug_params', None)
self.service_names = None
self.status = None
self.status_details = None
self.health_state = None
self.unhealthy_evaluation = None
self.identity = kwargs.get('identity', None)

Просмотреть файл

@ -0,0 +1,93 @@
# 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 ApplicationResourceDescription(Model):
"""This type describes a application resource.
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.
:param name: Required. Name of the Application resource.
:type name: str
:param description: User readable description of the application.
:type description: str
:param services: Describes the services in the application. This property
is used to create or modify services of the application. On get only the
name of the service is returned. The service description can be obtained
by querying for the service resource.
:type services:
list[~azure.servicefabric.models.ServiceResourceDescription]
:param diagnostics: Describes the diagnostics definition and usage for an
application resource.
:type diagnostics: ~azure.servicefabric.models.DiagnosticsDescription
:param debug_params: Internal - used by Visual Studio to setup the
debugging session on the local development environment.
:type debug_params: str
:ivar service_names: Names of the services in the application.
:vartype service_names: list[str]
:ivar status: Status of the application. Possible values include:
'Unknown', 'Ready', 'Upgrading', 'Creating', 'Deleting', 'Failed'
:vartype status: str or ~azure.servicefabric.models.ResourceStatus
:ivar status_details: Gives additional information about the current
status of the application.
:vartype status_details: str
:ivar health_state: Describes the health state of an application resource.
Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
:vartype health_state: str or ~azure.servicefabric.models.HealthState
:ivar unhealthy_evaluation: When the application's health state is not
'Ok', this additional details from service fabric Health Manager for the
user to know why the application is marked unhealthy.
:vartype unhealthy_evaluation: str
:param identity: Describes the identity of the application.
:type identity: ~azure.servicefabric.models.IdentityDescription
"""
_validation = {
'name': {'required': True},
'service_names': {'readonly': True},
'status': {'readonly': True},
'status_details': {'readonly': True},
'health_state': {'readonly': True},
'unhealthy_evaluation': {'readonly': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'services': {'key': 'properties.services', 'type': '[ServiceResourceDescription]'},
'diagnostics': {'key': 'properties.diagnostics', 'type': 'DiagnosticsDescription'},
'debug_params': {'key': 'properties.debugParams', 'type': 'str'},
'service_names': {'key': 'properties.serviceNames', 'type': '[str]'},
'status': {'key': 'properties.status', 'type': 'str'},
'status_details': {'key': 'properties.statusDetails', 'type': 'str'},
'health_state': {'key': 'properties.healthState', 'type': 'str'},
'unhealthy_evaluation': {'key': 'properties.unhealthyEvaluation', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'IdentityDescription'},
}
def __init__(self, *, name: str, description: str=None, services=None, diagnostics=None, debug_params: str=None, identity=None, **kwargs) -> None:
super(ApplicationResourceDescription, self).__init__(**kwargs)
self.name = name
self.description = description
self.services = services
self.diagnostics = diagnostics
self.debug_params = debug_params
self.service_names = None
self.status = None
self.status_details = None
self.health_state = None
self.unhealthy_evaluation = None
self.identity = identity

Просмотреть файл

@ -0,0 +1,91 @@
# 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 ApplicationResourceUpgradeProgressInfo(Model):
"""This type describes an application resource upgrade.
:param name: Name of the Application resource.
:type name: str
:param target_application_type_version: The target application version for
the application upgrade.
:type target_application_type_version: str
:param start_timestamp_utc: The estimated UTC datetime when the upgrade
started.
:type start_timestamp_utc: str
:param upgrade_state: The state of the application resource upgrade.
Possible values include: 'Invalid', 'ProvisioningTarget',
'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward',
'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed'
:type upgrade_state: str or
~azure.servicefabric.models.ApplicationResourceUpgradeState
:param percent_completed: The estimated percent of replicas are completed
in the upgrade.
:type percent_completed: str
:param service_upgrade_progress: List of service upgrade progresses.
:type service_upgrade_progress:
list[~azure.servicefabric.models.ServiceUpgradeProgress]
:param rolling_upgrade_mode: The mode used to monitor health during a
rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and
Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto',
'UnmonitoredManual', 'Monitored'. Default value: "Monitored" .
:type rolling_upgrade_mode: str or
~azure.servicefabric.models.RollingUpgradeMode
:param upgrade_duration: The estimated amount of time that the overall
upgrade elapsed. It is first interpreted as a string representing an ISO
8601 duration. If that fails, then it is interpreted as a number
representing the total number of milliseconds. Default value: "PT0H2M0S" .
:type upgrade_duration: str
:param application_upgrade_status_details: Additional detailed information
about the status of the pending upgrade.
:type application_upgrade_status_details: str
:param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of
time to block processing of an upgrade domain and prevent loss of
availability when there are unexpected issues. When this timeout expires,
processing of the upgrade domain will proceed regardless of availability
loss issues. The timeout is reset at the start of each upgrade domain.
Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit
integer). Default value: 42949672925 .
:type upgrade_replica_set_check_timeout_in_seconds: long
:param failure_timestamp_utc: The estimated UTC datetime when the upgrade
failed and FailureAction was executed.
:type failure_timestamp_utc: str
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'},
'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'},
'upgrade_state': {'key': 'UpgradeState', 'type': 'str'},
'percent_completed': {'key': 'PercentCompleted', 'type': 'str'},
'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'},
'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'},
'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'},
'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'},
'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'},
'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.target_application_type_version = kwargs.get('target_application_type_version', None)
self.start_timestamp_utc = kwargs.get('start_timestamp_utc', None)
self.upgrade_state = kwargs.get('upgrade_state', None)
self.percent_completed = kwargs.get('percent_completed', None)
self.service_upgrade_progress = kwargs.get('service_upgrade_progress', None)
self.rolling_upgrade_mode = kwargs.get('rolling_upgrade_mode', "Monitored")
self.upgrade_duration = kwargs.get('upgrade_duration', "PT0H2M0S")
self.application_upgrade_status_details = kwargs.get('application_upgrade_status_details', None)
self.upgrade_replica_set_check_timeout_in_seconds = kwargs.get('upgrade_replica_set_check_timeout_in_seconds', 42949672925)
self.failure_timestamp_utc = kwargs.get('failure_timestamp_utc', None)

Просмотреть файл

@ -0,0 +1,91 @@
# 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 ApplicationResourceUpgradeProgressInfo(Model):
"""This type describes an application resource upgrade.
:param name: Name of the Application resource.
:type name: str
:param target_application_type_version: The target application version for
the application upgrade.
:type target_application_type_version: str
:param start_timestamp_utc: The estimated UTC datetime when the upgrade
started.
:type start_timestamp_utc: str
:param upgrade_state: The state of the application resource upgrade.
Possible values include: 'Invalid', 'ProvisioningTarget',
'RollingForward', 'UnprovisioningCurrent', 'CompletedRollforward',
'RollingBack', 'UnprovisioningTarget', 'CompletedRollback', 'Failed'
:type upgrade_state: str or
~azure.servicefabric.models.ApplicationResourceUpgradeState
:param percent_completed: The estimated percent of replicas are completed
in the upgrade.
:type percent_completed: str
:param service_upgrade_progress: List of service upgrade progresses.
:type service_upgrade_progress:
list[~azure.servicefabric.models.ServiceUpgradeProgress]
:param rolling_upgrade_mode: The mode used to monitor health during a
rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and
Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto',
'UnmonitoredManual', 'Monitored'. Default value: "Monitored" .
:type rolling_upgrade_mode: str or
~azure.servicefabric.models.RollingUpgradeMode
:param upgrade_duration: The estimated amount of time that the overall
upgrade elapsed. It is first interpreted as a string representing an ISO
8601 duration. If that fails, then it is interpreted as a number
representing the total number of milliseconds. Default value: "PT0H2M0S" .
:type upgrade_duration: str
:param application_upgrade_status_details: Additional detailed information
about the status of the pending upgrade.
:type application_upgrade_status_details: str
:param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of
time to block processing of an upgrade domain and prevent loss of
availability when there are unexpected issues. When this timeout expires,
processing of the upgrade domain will proceed regardless of availability
loss issues. The timeout is reset at the start of each upgrade domain.
Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit
integer). Default value: 42949672925 .
:type upgrade_replica_set_check_timeout_in_seconds: long
:param failure_timestamp_utc: The estimated UTC datetime when the upgrade
failed and FailureAction was executed.
:type failure_timestamp_utc: str
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'},
'start_timestamp_utc': {'key': 'StartTimestampUtc', 'type': 'str'},
'upgrade_state': {'key': 'UpgradeState', 'type': 'str'},
'percent_completed': {'key': 'PercentCompleted', 'type': 'str'},
'service_upgrade_progress': {'key': 'ServiceUpgradeProgress', 'type': '[ServiceUpgradeProgress]'},
'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'},
'upgrade_duration': {'key': 'UpgradeDuration', 'type': 'str'},
'application_upgrade_status_details': {'key': 'ApplicationUpgradeStatusDetails', 'type': 'str'},
'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'},
'failure_timestamp_utc': {'key': 'FailureTimestampUtc', 'type': 'str'},
}
def __init__(self, *, name: str=None, target_application_type_version: str=None, start_timestamp_utc: str=None, upgrade_state=None, percent_completed: str=None, service_upgrade_progress=None, rolling_upgrade_mode="Monitored", upgrade_duration: str="PT0H2M0S", application_upgrade_status_details: str=None, upgrade_replica_set_check_timeout_in_seconds: int=42949672925, failure_timestamp_utc: str=None, **kwargs) -> None:
super(ApplicationResourceUpgradeProgressInfo, self).__init__(**kwargs)
self.name = name
self.target_application_type_version = target_application_type_version
self.start_timestamp_utc = start_timestamp_utc
self.upgrade_state = upgrade_state
self.percent_completed = percent_completed
self.service_upgrade_progress = service_upgrade_progress
self.rolling_upgrade_mode = rolling_upgrade_mode
self.upgrade_duration = upgrade_duration
self.application_upgrade_status_details = application_upgrade_status_details
self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds
self.failure_timestamp_utc = failure_timestamp_utc

Просмотреть файл

@ -0,0 +1,49 @@
# 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 .volume_reference import VolumeReference
class ApplicationScopedVolume(VolumeReference):
"""Describes a volume whose lifetime is scoped to the application's lifetime.
All required parameters must be populated in order to send to Azure.
:param name: Required. Name of the volume being referenced.
:type name: str
:param read_only: The flag indicating whether the volume is read only.
Default is 'false'.
:type read_only: bool
:param destination_path: Required. The path within the container at which
the volume should be mounted. Only valid path characters are allowed.
:type destination_path: str
:param creation_parameters: Required. Describes parameters for creating
application-scoped volumes.
:type creation_parameters:
~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters
"""
_validation = {
'name': {'required': True},
'destination_path': {'required': True},
'creation_parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
'destination_path': {'key': 'destinationPath', 'type': 'str'},
'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'},
}
def __init__(self, **kwargs):
super(ApplicationScopedVolume, self).__init__(**kwargs)
self.creation_parameters = kwargs.get('creation_parameters', None)

Просмотреть файл

@ -0,0 +1,46 @@
# 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 ApplicationScopedVolumeCreationParameters(Model):
"""Describes parameters for creating application-scoped volumes.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are:
ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk
All required parameters must be populated in order to send to Azure.
:param description: User readable description of the volume.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}
_subtype_map = {
'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'}
}
def __init__(self, **kwargs):
super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs)
self.description = kwargs.get('description', None)
self.kind = None

Просмотреть файл

@ -0,0 +1,46 @@
# 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 ApplicationScopedVolumeCreationParameters(Model):
"""Describes parameters for creating application-scoped volumes.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are:
ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk
All required parameters must be populated in order to send to Azure.
:param description: User readable description of the volume.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
}
_subtype_map = {
'kind': {'ServiceFabricVolumeDisk': 'ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk'}
}
def __init__(self, *, description: str=None, **kwargs) -> None:
super(ApplicationScopedVolumeCreationParameters, self).__init__(**kwargs)
self.description = description
self.kind = None

Просмотреть файл

@ -0,0 +1,44 @@
# 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 .application_scoped_volume_creation_parameters import ApplicationScopedVolumeCreationParameters
class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters):
"""Describes parameters for creating application-scoped volumes provided by
Service Fabric Volume Disks.
All required parameters must be populated in order to send to Azure.
:param description: User readable description of the volume.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param size_disk: Required. Volume size. Possible values include: 'Small',
'Medium', 'Large'
:type size_disk: str or ~azure.servicefabric.models.SizeTypes
"""
_validation = {
'kind': {'required': True},
'size_disk': {'required': True},
}
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'size_disk': {'key': 'sizeDisk', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(**kwargs)
self.size_disk = kwargs.get('size_disk', None)
self.kind = 'ServiceFabricVolumeDisk'

Просмотреть файл

@ -0,0 +1,44 @@
# 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 .application_scoped_volume_creation_parameters_py3 import ApplicationScopedVolumeCreationParameters
class ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk(ApplicationScopedVolumeCreationParameters):
"""Describes parameters for creating application-scoped volumes provided by
Service Fabric Volume Disks.
All required parameters must be populated in order to send to Azure.
:param description: User readable description of the volume.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param size_disk: Required. Volume size. Possible values include: 'Small',
'Medium', 'Large'
:type size_disk: str or ~azure.servicefabric.models.SizeTypes
"""
_validation = {
'kind': {'required': True},
'size_disk': {'required': True},
}
_attribute_map = {
'description': {'key': 'description', 'type': 'str'},
'kind': {'key': 'kind', 'type': 'str'},
'size_disk': {'key': 'sizeDisk', 'type': 'str'},
}
def __init__(self, *, size_disk, description: str=None, **kwargs) -> None:
super(ApplicationScopedVolumeCreationParametersServiceFabricVolumeDisk, self).__init__(description=description, **kwargs)
self.size_disk = size_disk
self.kind = 'ServiceFabricVolumeDisk'

Просмотреть файл

@ -0,0 +1,49 @@
# 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 .volume_reference_py3 import VolumeReference
class ApplicationScopedVolume(VolumeReference):
"""Describes a volume whose lifetime is scoped to the application's lifetime.
All required parameters must be populated in order to send to Azure.
:param name: Required. Name of the volume being referenced.
:type name: str
:param read_only: The flag indicating whether the volume is read only.
Default is 'false'.
:type read_only: bool
:param destination_path: Required. The path within the container at which
the volume should be mounted. Only valid path characters are allowed.
:type destination_path: str
:param creation_parameters: Required. Describes parameters for creating
application-scoped volumes.
:type creation_parameters:
~azure.servicefabric.models.ApplicationScopedVolumeCreationParameters
"""
_validation = {
'name': {'required': True},
'destination_path': {'required': True},
'creation_parameters': {'required': True},
}
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'read_only': {'key': 'readOnly', 'type': 'bool'},
'destination_path': {'key': 'destinationPath', 'type': 'str'},
'creation_parameters': {'key': 'creationParameters', 'type': 'ApplicationScopedVolumeCreationParameters'},
}
def __init__(self, *, name: str, destination_path: str, creation_parameters, read_only: bool=None, **kwargs) -> None:
super(ApplicationScopedVolume, self).__init__(name=name, read_only=read_only, destination_path=destination_path, **kwargs)
self.creation_parameters = creation_parameters

Просмотреть файл

@ -0,0 +1,74 @@
# 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 .health_evaluation import HealthEvaluation
class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation):
"""Represents health evaluation for applications of a particular application
type. The application type applications evaluation can be returned when
cluster health evaluation returns unhealthy aggregated health state, either
Error or Warning. It contains health evaluations for each unhealthy
application of the included application type that impacted current
aggregated health state.
All required parameters must be populated in order to send to Azure.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param description: Description of the health evaluation, which represents
a summary of the evaluation process.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param application_type_name: The application type name as defined in the
application manifest.
:type application_type_name: str
:param max_percent_unhealthy_applications: Maximum allowed percentage of
unhealthy applications for the application type, specified as an entry in
ApplicationTypeHealthPolicyMap.
:type max_percent_unhealthy_applications: int
:param total_count: Total number of applications of the application type
found in the health store.
:type total_count: long
:param unhealthy_evaluations: List of unhealthy evaluations that led to
the aggregated health state. Includes all the unhealthy
ApplicationHealthEvaluation of this application type that impacted the
aggregated health.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'description': {'key': 'Description', 'type': 'str'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'},
'total_count': {'key': 'TotalCount', 'type': 'long'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
}
def __init__(self, **kwargs):
super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(**kwargs)
self.application_type_name = kwargs.get('application_type_name', None)
self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', None)
self.total_count = kwargs.get('total_count', None)
self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None)
self.kind = 'ApplicationTypeApplications'

Просмотреть файл

@ -0,0 +1,74 @@
# 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 .health_evaluation_py3 import HealthEvaluation
class ApplicationTypeApplicationsHealthEvaluation(HealthEvaluation):
"""Represents health evaluation for applications of a particular application
type. The application type applications evaluation can be returned when
cluster health evaluation returns unhealthy aggregated health state, either
Error or Warning. It contains health evaluations for each unhealthy
application of the included application type that impacted current
aggregated health state.
All required parameters must be populated in order to send to Azure.
:param aggregated_health_state: The health state of a Service Fabric
entity such as Cluster, Node, Application, Service, Partition, Replica
etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error',
'Unknown'
:type aggregated_health_state: str or
~azure.servicefabric.models.HealthState
:param description: Description of the health evaluation, which represents
a summary of the evaluation process.
:type description: str
:param kind: Required. Constant filled by server.
:type kind: str
:param application_type_name: The application type name as defined in the
application manifest.
:type application_type_name: str
:param max_percent_unhealthy_applications: Maximum allowed percentage of
unhealthy applications for the application type, specified as an entry in
ApplicationTypeHealthPolicyMap.
:type max_percent_unhealthy_applications: int
:param total_count: Total number of applications of the application type
found in the health store.
:type total_count: long
:param unhealthy_evaluations: List of unhealthy evaluations that led to
the aggregated health state. Includes all the unhealthy
ApplicationHealthEvaluation of this application type that impacted the
aggregated health.
:type unhealthy_evaluations:
list[~azure.servicefabric.models.HealthEvaluationWrapper]
"""
_validation = {
'kind': {'required': True},
}
_attribute_map = {
'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'},
'description': {'key': 'Description', 'type': 'str'},
'kind': {'key': 'Kind', 'type': 'str'},
'application_type_name': {'key': 'ApplicationTypeName', 'type': 'str'},
'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'},
'total_count': {'key': 'TotalCount', 'type': 'long'},
'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'},
}
def __init__(self, *, aggregated_health_state=None, description: str=None, application_type_name: str=None, max_percent_unhealthy_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None:
super(ApplicationTypeApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs)
self.application_type_name = application_type_name
self.max_percent_unhealthy_applications = max_percent_unhealthy_applications
self.total_count = total_count
self.unhealthy_evaluations = unhealthy_evaluations
self.kind = 'ApplicationTypeApplications'

Просмотреть файл

@ -0,0 +1,43 @@
# 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 ApplicationTypeHealthPolicyMapItem(Model):
"""Defines an item in ApplicationTypeHealthPolicyMap.
All required parameters must be populated in order to send to Azure.
:param key: Required. The key of the application type health policy map
item. This is the name of the application type.
:type key: str
:param value: Required. The value of the application type health policy
map item.
The max percent unhealthy applications allowed for the application type.
Must be between zero and 100.
:type value: int
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'int'},
}
def __init__(self, **kwargs):
super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)

Просмотреть файл

@ -0,0 +1,43 @@
# 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 ApplicationTypeHealthPolicyMapItem(Model):
"""Defines an item in ApplicationTypeHealthPolicyMap.
All required parameters must be populated in order to send to Azure.
:param key: Required. The key of the application type health policy map
item. This is the name of the application type.
:type key: str
:param value: Required. The value of the application type health policy
map item.
The max percent unhealthy applications allowed for the application type.
Must be between zero and 100.
:type value: int
"""
_validation = {
'key': {'required': True},
'value': {'required': True},
}
_attribute_map = {
'key': {'key': 'Key', 'type': 'str'},
'value': {'key': 'Value', 'type': 'int'},
}
def __init__(self, *, key: str, value: int, **kwargs) -> None:
super(ApplicationTypeHealthPolicyMapItem, self).__init__(**kwargs)
self.key = key
self.value = value

Просмотреть файл

@ -0,0 +1,36 @@
# 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 ApplicationTypeImageStorePath(Model):
"""Path description for the application package in the image store specified
during the prior copy operation.
All required parameters must be populated in order to send to Azure.
:param application_type_build_path: Required. The relative image store
path to the application package.
:type application_type_build_path: str
"""
_validation = {
'application_type_build_path': {'required': True},
}
_attribute_map = {
'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationTypeImageStorePath, self).__init__(**kwargs)
self.application_type_build_path = kwargs.get('application_type_build_path', None)

Просмотреть файл

@ -0,0 +1,36 @@
# 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 ApplicationTypeImageStorePath(Model):
"""Path description for the application package in the image store specified
during the prior copy operation.
All required parameters must be populated in order to send to Azure.
:param application_type_build_path: Required. The relative image store
path to the application package.
:type application_type_build_path: str
"""
_validation = {
'application_type_build_path': {'required': True},
}
_attribute_map = {
'application_type_build_path': {'key': 'ApplicationTypeBuildPath', 'type': 'str'},
}
def __init__(self, *, application_type_build_path: str, **kwargs) -> None:
super(ApplicationTypeImageStorePath, self).__init__(**kwargs)
self.application_type_build_path = application_type_build_path

Просмотреть файл

@ -0,0 +1,58 @@
# 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 ApplicationTypeInfo(Model):
"""Information about an application type.
:param name: The application type name as defined in the application
manifest.
:type name: str
:param version: The version of the application type as defined in the
application manifest.
:type version: str
:param default_parameter_list: List of application type parameters that
can be overridden when creating or updating the application.
:type default_parameter_list:
list[~azure.servicefabric.models.ApplicationParameter]
:param status: The status of the application type. Possible values
include: 'Invalid', 'Provisioning', 'Available', 'Unprovisioning',
'Failed'
:type status: str or ~azure.servicefabric.models.ApplicationTypeStatus
:param status_details: Additional detailed information about the status of
the application type.
:type status_details: str
:param application_type_definition_kind: The mechanism used to define a
Service Fabric application type. Possible values include: 'Invalid',
'ServiceFabricApplicationPackage', 'Compose'
:type application_type_definition_kind: str or
~azure.servicefabric.models.ApplicationTypeDefinitionKind
"""
_attribute_map = {
'name': {'key': 'Name', 'type': 'str'},
'version': {'key': 'Version', 'type': 'str'},
'default_parameter_list': {'key': 'DefaultParameterList', 'type': '[ApplicationParameter]'},
'status': {'key': 'Status', 'type': 'str'},
'status_details': {'key': 'StatusDetails', 'type': 'str'},
'application_type_definition_kind': {'key': 'ApplicationTypeDefinitionKind', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationTypeInfo, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.version = kwargs.get('version', None)
self.default_parameter_list = kwargs.get('default_parameter_list', None)
self.status = kwargs.get('status', None)
self.status_details = kwargs.get('status_details', None)
self.application_type_definition_kind = kwargs.get('application_type_definition_kind', None)

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше