diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/MANIFEST.in b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/MANIFEST.in +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json new file mode 100644 index 0000000000000..de871eca37767 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "5a1b7262be0a4f6a9004d35403b854429475cdf4", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/redhatopenshift/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/redhatopenshift/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/__init__.py new file mode 100644 index 0000000000000..69e3be50dac40 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/__init__.py new file mode 100644 index 0000000000000..69e3be50dac40 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/__init__.py new file mode 100644 index 0000000000000..69e3be50dac40 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/__init__.py new file mode 100644 index 0000000000000..b438e25c8c07a --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._configuration import AzureRedHatOpenShiftClientConfiguration +from ._azure_red_hat_open_shift_client import AzureRedHatOpenShiftClient +__all__ = ['AzureRedHatOpenShiftClient', 'AzureRedHatOpenShiftClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_azure_red_hat_open_shift_client.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_azure_red_hat_open_shift_client.py new file mode 100644 index 0000000000000..00b11895ac7b3 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_azure_red_hat_open_shift_client.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 AzureRedHatOpenShiftClientConfiguration +from .operations import Operations +from .operations import OpenShiftClustersOperations +from . import models + + +class AzureRedHatOpenShiftClient(SDKClient): + """Rest API for Azure Red Hat OpenShift 4 + + :ivar config: Configuration for client. + :vartype config: AzureRedHatOpenShiftClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.Operations + :ivar open_shift_clusters: OpenShiftClusters operations + :vartype open_shift_clusters: azure.mgmt.redhatopenshift.v2021_09_01_preview.operations.OpenShiftClustersOperations + + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, subscription_id, base_url=None): + + self.config = AzureRedHatOpenShiftClientConfiguration(subscription_id, base_url) + super(AzureRedHatOpenShiftClient, self).__init__(None, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2021-09-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.open_shift_clusters = OpenShiftClustersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_configuration.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_configuration.py new file mode 100644 index 0000000000000..2cbc2f9a0e06c --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/_configuration.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest import Configuration + +from .version import VERSION + + +class AzureRedHatOpenShiftClientConfiguration(Configuration): + """Configuration for AzureRedHatOpenShiftClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, subscription_id, base_url=None): + + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(AzureRedHatOpenShiftClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azureredhatopenshiftclient/{}'.format(VERSION)) + + self.subscription_id = subscription_id diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/__init__.py new file mode 100644 index 0000000000000..c108f20fe38c2 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/__init__.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import APIServerProfile + from ._models_py3 import AzureEntityResource + from ._models_py3 import CloudError, CloudErrorException + from ._models_py3 import CloudErrorBody + from ._models_py3 import ClusterProfile + from ._models_py3 import ConsoleProfile + from ._models_py3 import Display + from ._models_py3 import IngressProfile + from ._models_py3 import MasterProfile + from ._models_py3 import NetworkProfile + from ._models_py3 import OpenShiftCluster + from ._models_py3 import OpenShiftClusterAdminKubeconfig + from ._models_py3 import OpenShiftClusterCredentials + from ._models_py3 import OpenShiftClusterList + from ._models_py3 import OpenShiftClusterUpdate + from ._models_py3 import Operation + from ._models_py3 import OperationList + from ._models_py3 import ProxyResource + from ._models_py3 import Resource + from ._models_py3 import ServicePrincipalProfile + from ._models_py3 import SystemData + from ._models_py3 import TrackedResource + from ._models_py3 import WorkerProfile +except (SyntaxError, ImportError): + from ._models import APIServerProfile + from ._models import AzureEntityResource + from ._models import CloudError, CloudErrorException + from ._models import CloudErrorBody + from ._models import ClusterProfile + from ._models import ConsoleProfile + from ._models import Display + from ._models import IngressProfile + from ._models import MasterProfile + from ._models import NetworkProfile + from ._models import OpenShiftCluster + from ._models import OpenShiftClusterAdminKubeconfig + from ._models import OpenShiftClusterCredentials + from ._models import OpenShiftClusterList + from ._models import OpenShiftClusterUpdate + from ._models import Operation + from ._models import OperationList + from ._models import ProxyResource + from ._models import Resource + from ._models import ServicePrincipalProfile + from ._models import SystemData + from ._models import TrackedResource + from ._models import WorkerProfile +from ._azure_red_hat_open_shift_client_enums import ( + CreatedByType, + EncryptionAtHost, + SoftwareDefinedNetwork, + Visibility, + VMSize, +) + +__all__ = [ + 'APIServerProfile', + 'AzureEntityResource', + 'CloudError', 'CloudErrorException', + 'CloudErrorBody', + 'ClusterProfile', + 'ConsoleProfile', + 'Display', + 'IngressProfile', + 'MasterProfile', + 'NetworkProfile', + 'OpenShiftCluster', + 'OpenShiftClusterAdminKubeconfig', + 'OpenShiftClusterCredentials', + 'OpenShiftClusterList', + 'OpenShiftClusterUpdate', + 'Operation', + 'OperationList', + 'ProxyResource', + 'Resource', + 'ServicePrincipalProfile', + 'SystemData', + 'TrackedResource', + 'WorkerProfile', + 'Visibility', + 'EncryptionAtHost', + 'VMSize', + 'SoftwareDefinedNetwork', + 'CreatedByType', +] diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_azure_red_hat_open_shift_client_enums.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_azure_red_hat_open_shift_client_enums.py new file mode 100644 index 0000000000000..ff7375ca1635d --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_azure_red_hat_open_shift_client_enums.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class Visibility(str, Enum): + + private = "Private" + public = "Public" + + +class EncryptionAtHost(str, Enum): + + disabled = "Disabled" + enabled = "Enabled" + + +class VMSize(str, Enum): + + standard_d16as_v4 = "Standard_D16as_v4" + standard_d16s_v3 = "Standard_D16s_v3" + standard_d2s_v3 = "Standard_D2s_v3" + standard_d32as_v4 = "Standard_D32as_v4" + standard_d32s_v3 = "Standard_D32s_v3" + standard_d4as_v4 = "Standard_D4as_v4" + standard_d4s_v3 = "Standard_D4s_v3" + standard_d8as_v4 = "Standard_D8as_v4" + standard_d8s_v3 = "Standard_D8s_v3" + standard_e16s_v3 = "Standard_E16s_v3" + standard_e32s_v3 = "Standard_E32s_v3" + standard_e4s_v3 = "Standard_E4s_v3" + standard_e64i_v3 = "Standard_E64i_v3" + standard_e64is_v3 = "Standard_E64is_v3" + standard_e8s_v3 = "Standard_E8s_v3" + standard_f16s_v2 = "Standard_F16s_v2" + standard_f32s_v2 = "Standard_F32s_v2" + standard_f4s_v2 = "Standard_F4s_v2" + standard_f72s_v2 = "Standard_F72s_v2" + standard_f8s_v2 = "Standard_F8s_v2" + standard_g5 = "Standard_G5" + standard_gs5 = "Standard_GS5" + standard_m128ms = "Standard_M128ms" + + +class SoftwareDefinedNetwork(str, Enum): + + ovn_kubernetes = "OVNKubernetes" + open_shift_sdn = "OpenShiftSDN" + + +class CreatedByType(str, Enum): + + user = "User" + application = "Application" + managed_identity = "ManagedIdentity" + key = "Key" diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models.py new file mode 100644 index 0000000000000..bf4ee6b508a34 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models.py @@ -0,0 +1,808 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 +from msrest.exceptions import HttpOperationError + + +class APIServerProfile(Model): + """APIServerProfile represents an API server profile. + + :param visibility: API server visibility. Possible values include: + 'Private', 'Public' + :type visibility: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Visibility + :param url: The URL to access the cluster API server. + :type url: str + :param ip: The IP of the cluster API server. + :type ip: str + """ + + _attribute_map = { + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(APIServerProfile, self).__init__(**kwargs) + self.visibility = kwargs.get('visibility', None) + self.url = kwargs.get('url', None) + self.ip = kwargs.get('ip', None) + + +class Resource(Model): + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError represents a cloud error. + + :param error: An error response from the service. + :type error: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """CloudErrorBody represents the body of a cloud error. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ClusterProfile(Model): + """ClusterProfile represents a cluster profile. + + :param pull_secret: The pull secret for the cluster. + :type pull_secret: str + :param domain: The domain for the cluster. + :type domain: str + :param version: The version of the cluster. + :type version: str + :param resource_group_id: The ID of the cluster resource group. + :type resource_group_id: str + """ + + _attribute_map = { + 'pull_secret': {'key': 'pullSecret', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterProfile, self).__init__(**kwargs) + self.pull_secret = kwargs.get('pull_secret', None) + self.domain = kwargs.get('domain', None) + self.version = kwargs.get('version', None) + self.resource_group_id = kwargs.get('resource_group_id', None) + + +class ConsoleProfile(Model): + """ConsoleProfile represents a console profile. + + :param url: The URL to access the cluster console. + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConsoleProfile, self).__init__(**kwargs) + self.url = kwargs.get('url', None) + + +class Display(Model): + """Display represents the display details of an operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Display, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class IngressProfile(Model): + """IngressProfile represents an ingress profile. + + :param name: The ingress profile name. + :type name: str + :param visibility: Ingress visibility. Possible values include: 'Private', + 'Public' + :type visibility: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Visibility + :param ip: The IP of the ingress. + :type ip: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IngressProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.visibility = kwargs.get('visibility', None) + self.ip = kwargs.get('ip', None) + + +class MasterProfile(Model): + """MasterProfile represents a master profile. + + :param vm_size: The size of the master VMs. Possible values include: + 'Standard_D16as_v4', 'Standard_D16s_v3', 'Standard_D2s_v3', + 'Standard_D32as_v4', 'Standard_D32s_v3', 'Standard_D4as_v4', + 'Standard_D4s_v3', 'Standard_D8as_v4', 'Standard_D8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E4s_v3', + 'Standard_E64i_v3', 'Standard_E64is_v3', 'Standard_E8s_v3', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F4s_v2', + 'Standard_F72s_v2', 'Standard_F8s_v2', 'Standard_G5', 'Standard_GS5', + 'Standard_M128ms' + :type vm_size: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.VMSize + :param subnet_id: The Azure resource ID of the master subnet. + :type subnet_id: str + :param encryption_at_host: Whether master virtual machines are encrypted + at host. Possible values include: 'Disabled', 'Enabled' + :type encryption_at_host: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.EncryptionAtHost + :param disk_encryption_set_id: The resource ID of an associated + DiskEncryptionSet, if applicable. + :type disk_encryption_set_id: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'str'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MasterProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.encryption_at_host = kwargs.get('encryption_at_host', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + + +class NetworkProfile(Model): + """NetworkProfile represents a network profile. + + :param software_defined_network: The software defined network (SDN) to use + when installing the cluster. Possible values include: 'OVNKubernetes', + 'OpenShiftSDN' + :type software_defined_network: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SoftwareDefinedNetwork + :param pod_cidr: The CIDR used for OpenShift/Kubernetes Pods. + :type pod_cidr: str + :param service_cidr: The CIDR used for OpenShift/Kubernetes Services. + :type service_cidr: str + """ + + _attribute_map = { + 'software_defined_network': {'key': 'softwareDefinedNetwork', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkProfile, self).__init__(**kwargs) + self.software_defined_network = kwargs.get('software_defined_network', None) + self.pod_cidr = kwargs.get('pod_cidr', None) + self.service_cidr = kwargs.get('service_cidr', None) + + +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class OpenShiftCluster(TrackedResource): + """OpenShiftCluster represents an Azure Red Hat OpenShift cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: The cluster provisioning state. Possible values + include: 'AdminUpdating', 'Creating', 'Deleting', 'Failed', 'Succeeded', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.enum + :param cluster_profile: The cluster profile. + :type cluster_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ClusterProfile + :param console_profile: The console profile. + :type console_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ConsoleProfile + :param service_principal_profile: The cluster service principal profile. + :type service_principal_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ServicePrincipalProfile + :param network_profile: The cluster network profile. + :type network_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.NetworkProfile + :param master_profile: The cluster master profile. + :type master_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.MasterProfile + :param worker_profiles: The cluster worker profiles. + :type worker_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.WorkerProfile] + :param apiserver_profile: The cluster API server profile. + :type apiserver_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.APIServerProfile + :param ingress_profiles: The cluster ingress profiles. + :type ingress_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.IngressProfile] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'}, + 'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'MasterProfile'}, + 'worker_profiles': {'key': 'properties.workerProfiles', 'type': '[WorkerProfile]'}, + 'apiserver_profile': {'key': 'properties.apiserverProfile', 'type': 'APIServerProfile'}, + 'ingress_profiles': {'key': 'properties.ingressProfiles', 'type': '[IngressProfile]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(OpenShiftCluster, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.cluster_profile = kwargs.get('cluster_profile', None) + self.console_profile = kwargs.get('console_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.master_profile = kwargs.get('master_profile', None) + self.worker_profiles = kwargs.get('worker_profiles', None) + self.apiserver_profile = kwargs.get('apiserver_profile', None) + self.ingress_profiles = kwargs.get('ingress_profiles', None) + self.system_data = None + + +class OpenShiftClusterAdminKubeconfig(Model): + """OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin + kubeconfig. + + :param kubeconfig: The base64-encoded kubeconfig file. + :type kubeconfig: str + """ + + _attribute_map = { + 'kubeconfig': {'key': 'kubeconfig', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftClusterAdminKubeconfig, self).__init__(**kwargs) + self.kubeconfig = kwargs.get('kubeconfig', None) + + +class OpenShiftClusterCredentials(Model): + """OpenShiftClusterCredentials represents an OpenShift cluster's credentials. + + :param kubeadmin_username: The username for the kubeadmin user. + :type kubeadmin_username: str + :param kubeadmin_password: The password for the kubeadmin user. + :type kubeadmin_password: str + """ + + _attribute_map = { + 'kubeadmin_username': {'key': 'kubeadminUsername', 'type': 'str'}, + 'kubeadmin_password': {'key': 'kubeadminPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftClusterCredentials, self).__init__(**kwargs) + self.kubeadmin_username = kwargs.get('kubeadmin_username', None) + self.kubeadmin_password = kwargs.get('kubeadmin_password', None) + + +class OpenShiftClusterList(Model): + """OpenShiftClusterList represents a list of OpenShift clusters. + + :param value: The list of OpenShift clusters. + :type value: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster] + :param next_link: The link used to get the next page of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OpenShiftClusterList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class OpenShiftClusterUpdate(Model): + """OpenShiftCluster represents an Azure Red Hat OpenShift cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: The resource tags. + :type tags: dict[str, str] + :param provisioning_state: The cluster provisioning state. Possible values + include: 'AdminUpdating', 'Creating', 'Deleting', 'Failed', 'Succeeded', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.enum + :param cluster_profile: The cluster profile. + :type cluster_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ClusterProfile + :param console_profile: The console profile. + :type console_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ConsoleProfile + :param service_principal_profile: The cluster service principal profile. + :type service_principal_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ServicePrincipalProfile + :param network_profile: The cluster network profile. + :type network_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.NetworkProfile + :param master_profile: The cluster master profile. + :type master_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.MasterProfile + :param worker_profiles: The cluster worker profiles. + :type worker_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.WorkerProfile] + :param apiserver_profile: The cluster API server profile. + :type apiserver_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.APIServerProfile + :param ingress_profiles: The cluster ingress profiles. + :type ingress_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.IngressProfile] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'}, + 'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'MasterProfile'}, + 'worker_profiles': {'key': 'properties.workerProfiles', 'type': '[WorkerProfile]'}, + 'apiserver_profile': {'key': 'properties.apiserverProfile', 'type': 'APIServerProfile'}, + 'ingress_profiles': {'key': 'properties.ingressProfiles', 'type': '[IngressProfile]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, **kwargs): + super(OpenShiftClusterUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.cluster_profile = kwargs.get('cluster_profile', None) + self.console_profile = kwargs.get('console_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.network_profile = kwargs.get('network_profile', None) + self.master_profile = kwargs.get('master_profile', None) + self.worker_profiles = kwargs.get('worker_profiles', None) + self.apiserver_profile = kwargs.get('apiserver_profile', None) + self.ingress_profiles = kwargs.get('ingress_profiles', None) + self.system_data = None + + +class Operation(Model): + """Operation represents an RP operation. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The object that describes the operation. + :type display: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Display + :param origin: Sources of requests to this operation. Comma separated + list with valid values user or system, e.g. "user,system". + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + + +class OperationList(Model): + """OperationList represents an RP operation list. + + :param value: List of operations supported by the resource provider. + :type value: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Operation] + :param next_link: The link used to get the next page of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class ServicePrincipalProfile(Model): + """ServicePrincipalProfile represents a service principal profile. + + :param client_id: The client ID used for the cluster. + :type client_id: str + :param client_secret: The client secret used for the cluster. + :type client_secret: str + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + +class WorkerProfile(Model): + """WorkerProfile represents a worker profile. + + :param name: The worker profile name. + :type name: str + :param vm_size: The size of the worker VMs. Possible values include: + 'Standard_D16as_v4', 'Standard_D16s_v3', 'Standard_D2s_v3', + 'Standard_D32as_v4', 'Standard_D32s_v3', 'Standard_D4as_v4', + 'Standard_D4s_v3', 'Standard_D8as_v4', 'Standard_D8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E4s_v3', + 'Standard_E64i_v3', 'Standard_E64is_v3', 'Standard_E8s_v3', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F4s_v2', + 'Standard_F72s_v2', 'Standard_F8s_v2', 'Standard_G5', 'Standard_GS5', + 'Standard_M128ms' + :type vm_size: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.VMSize + :param disk_size_gb: The disk size of the worker VMs. + :type disk_size_gb: int + :param subnet_id: The Azure resource ID of the worker subnet. + :type subnet_id: str + :param count: The number of worker VMs. + :type count: int + :param encryption_at_host: Whether master virtual machines are encrypted + at host. Possible values include: 'Disabled', 'Enabled' + :type encryption_at_host: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.EncryptionAtHost + :param disk_encryption_set_id: The resource ID of an associated + DiskEncryptionSet, if applicable. + :type disk_encryption_set_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'str'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkerProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.vm_size = kwargs.get('vm_size', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.count = kwargs.get('count', None) + self.encryption_at_host = kwargs.get('encryption_at_host', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models_py3.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models_py3.py new file mode 100644 index 0000000000000..d41cfc57676a1 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/models/_models_py3.py @@ -0,0 +1,808 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 +from msrest.exceptions import HttpOperationError + + +class APIServerProfile(Model): + """APIServerProfile represents an API server profile. + + :param visibility: API server visibility. Possible values include: + 'Private', 'Public' + :type visibility: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Visibility + :param url: The URL to access the cluster API server. + :type url: str + :param ip: The IP of the cluster API server. + :type ip: str + """ + + _attribute_map = { + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + } + + def __init__(self, *, visibility=None, url: str=None, ip: str=None, **kwargs) -> None: + super(APIServerProfile, self).__init__(**kwargs) + self.visibility = visibility + self.url = url + self.ip = ip + + +class Resource(Model): + """Resource. + + Common fields that are returned in the response for all Azure Resource + Manager resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CloudError(Model): + """CloudError represents a cloud error. + + :param error: An error response from the service. + :type error: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """CloudErrorBody represents the body of a cloud error. + + :param code: An identifier for the error. Codes are invariant and are + intended to be consumed programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable + for display in a user interface. + :type message: str + :param target: The target of the particular error. For example, the name + of the property in error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ClusterProfile(Model): + """ClusterProfile represents a cluster profile. + + :param pull_secret: The pull secret for the cluster. + :type pull_secret: str + :param domain: The domain for the cluster. + :type domain: str + :param version: The version of the cluster. + :type version: str + :param resource_group_id: The ID of the cluster resource group. + :type resource_group_id: str + """ + + _attribute_map = { + 'pull_secret': {'key': 'pullSecret', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__(self, *, pull_secret: str=None, domain: str=None, version: str=None, resource_group_id: str=None, **kwargs) -> None: + super(ClusterProfile, self).__init__(**kwargs) + self.pull_secret = pull_secret + self.domain = domain + self.version = version + self.resource_group_id = resource_group_id + + +class ConsoleProfile(Model): + """ConsoleProfile represents a console profile. + + :param url: The URL to access the cluster console. + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, *, url: str=None, **kwargs) -> None: + super(ConsoleProfile, self).__init__(**kwargs) + self.url = url + + +class Display(Model): + """Display represents the display details of an operation. + + :param provider: Friendly name of the resource provider. + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param description: Friendly name of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(Display, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class IngressProfile(Model): + """IngressProfile represents an ingress profile. + + :param name: The ingress profile name. + :type name: str + :param visibility: Ingress visibility. Possible values include: 'Private', + 'Public' + :type visibility: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Visibility + :param ip: The IP of the ingress. + :type ip: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'visibility': {'key': 'visibility', 'type': 'str'}, + 'ip': {'key': 'ip', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, visibility=None, ip: str=None, **kwargs) -> None: + super(IngressProfile, self).__init__(**kwargs) + self.name = name + self.visibility = visibility + self.ip = ip + + +class MasterProfile(Model): + """MasterProfile represents a master profile. + + :param vm_size: The size of the master VMs. Possible values include: + 'Standard_D16as_v4', 'Standard_D16s_v3', 'Standard_D2s_v3', + 'Standard_D32as_v4', 'Standard_D32s_v3', 'Standard_D4as_v4', + 'Standard_D4s_v3', 'Standard_D8as_v4', 'Standard_D8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E4s_v3', + 'Standard_E64i_v3', 'Standard_E64is_v3', 'Standard_E8s_v3', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F4s_v2', + 'Standard_F72s_v2', 'Standard_F8s_v2', 'Standard_G5', 'Standard_GS5', + 'Standard_M128ms' + :type vm_size: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.VMSize + :param subnet_id: The Azure resource ID of the master subnet. + :type subnet_id: str + :param encryption_at_host: Whether master virtual machines are encrypted + at host. Possible values include: 'Disabled', 'Enabled' + :type encryption_at_host: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.EncryptionAtHost + :param disk_encryption_set_id: The resource ID of an associated + DiskEncryptionSet, if applicable. + :type disk_encryption_set_id: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'str'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + } + + def __init__(self, *, vm_size=None, subnet_id: str=None, encryption_at_host=None, disk_encryption_set_id: str=None, **kwargs) -> None: + super(MasterProfile, self).__init__(**kwargs) + self.vm_size = vm_size + self.subnet_id = subnet_id + self.encryption_at_host = encryption_at_host + self.disk_encryption_set_id = disk_encryption_set_id + + +class NetworkProfile(Model): + """NetworkProfile represents a network profile. + + :param software_defined_network: The software defined network (SDN) to use + when installing the cluster. Possible values include: 'OVNKubernetes', + 'OpenShiftSDN' + :type software_defined_network: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SoftwareDefinedNetwork + :param pod_cidr: The CIDR used for OpenShift/Kubernetes Pods. + :type pod_cidr: str + :param service_cidr: The CIDR used for OpenShift/Kubernetes Services. + :type service_cidr: str + """ + + _attribute_map = { + 'software_defined_network': {'key': 'softwareDefinedNetwork', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + } + + def __init__(self, *, software_defined_network=None, pod_cidr: str=None, service_cidr: str=None, **kwargs) -> None: + super(NetworkProfile, self).__init__(**kwargs) + self.software_defined_network = software_defined_network + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + + +class TrackedResource(Resource): + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class OpenShiftCluster(TrackedResource): + """OpenShiftCluster represents an Azure Red Hat OpenShift cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param provisioning_state: The cluster provisioning state. Possible values + include: 'AdminUpdating', 'Creating', 'Deleting', 'Failed', 'Succeeded', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.enum + :param cluster_profile: The cluster profile. + :type cluster_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ClusterProfile + :param console_profile: The console profile. + :type console_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ConsoleProfile + :param service_principal_profile: The cluster service principal profile. + :type service_principal_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ServicePrincipalProfile + :param network_profile: The cluster network profile. + :type network_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.NetworkProfile + :param master_profile: The cluster master profile. + :type master_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.MasterProfile + :param worker_profiles: The cluster worker profiles. + :type worker_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.WorkerProfile] + :param apiserver_profile: The cluster API server profile. + :type apiserver_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.APIServerProfile + :param ingress_profiles: The cluster ingress profiles. + :type ingress_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.IngressProfile] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'}, + 'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'MasterProfile'}, + 'worker_profiles': {'key': 'properties.workerProfiles', 'type': '[WorkerProfile]'}, + 'apiserver_profile': {'key': 'properties.apiserverProfile', 'type': 'APIServerProfile'}, + 'ingress_profiles': {'key': 'properties.ingressProfiles', 'type': '[IngressProfile]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, location: str, tags=None, provisioning_state=None, cluster_profile=None, console_profile=None, service_principal_profile=None, network_profile=None, master_profile=None, worker_profiles=None, apiserver_profile=None, ingress_profiles=None, **kwargs) -> None: + super(OpenShiftCluster, self).__init__(tags=tags, location=location, **kwargs) + self.provisioning_state = provisioning_state + self.cluster_profile = cluster_profile + self.console_profile = console_profile + self.service_principal_profile = service_principal_profile + self.network_profile = network_profile + self.master_profile = master_profile + self.worker_profiles = worker_profiles + self.apiserver_profile = apiserver_profile + self.ingress_profiles = ingress_profiles + self.system_data = None + + +class OpenShiftClusterAdminKubeconfig(Model): + """OpenShiftClusterAdminKubeconfig represents an OpenShift cluster's admin + kubeconfig. + + :param kubeconfig: The base64-encoded kubeconfig file. + :type kubeconfig: str + """ + + _attribute_map = { + 'kubeconfig': {'key': 'kubeconfig', 'type': 'str'}, + } + + def __init__(self, *, kubeconfig: str=None, **kwargs) -> None: + super(OpenShiftClusterAdminKubeconfig, self).__init__(**kwargs) + self.kubeconfig = kubeconfig + + +class OpenShiftClusterCredentials(Model): + """OpenShiftClusterCredentials represents an OpenShift cluster's credentials. + + :param kubeadmin_username: The username for the kubeadmin user. + :type kubeadmin_username: str + :param kubeadmin_password: The password for the kubeadmin user. + :type kubeadmin_password: str + """ + + _attribute_map = { + 'kubeadmin_username': {'key': 'kubeadminUsername', 'type': 'str'}, + 'kubeadmin_password': {'key': 'kubeadminPassword', 'type': 'str'}, + } + + def __init__(self, *, kubeadmin_username: str=None, kubeadmin_password: str=None, **kwargs) -> None: + super(OpenShiftClusterCredentials, self).__init__(**kwargs) + self.kubeadmin_username = kubeadmin_username + self.kubeadmin_password = kubeadmin_password + + +class OpenShiftClusterList(Model): + """OpenShiftClusterList represents a list of OpenShift clusters. + + :param value: The list of OpenShift clusters. + :type value: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster] + :param next_link: The link used to get the next page of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OpenShiftCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(OpenShiftClusterList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OpenShiftClusterUpdate(Model): + """OpenShiftCluster represents an Azure Red Hat OpenShift cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param tags: The resource tags. + :type tags: dict[str, str] + :param provisioning_state: The cluster provisioning state. Possible values + include: 'AdminUpdating', 'Creating', 'Deleting', 'Failed', 'Succeeded', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.enum + :param cluster_profile: The cluster profile. + :type cluster_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ClusterProfile + :param console_profile: The console profile. + :type console_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ConsoleProfile + :param service_principal_profile: The cluster service principal profile. + :type service_principal_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.ServicePrincipalProfile + :param network_profile: The cluster network profile. + :type network_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.NetworkProfile + :param master_profile: The cluster master profile. + :type master_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.MasterProfile + :param worker_profiles: The cluster worker profiles. + :type worker_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.WorkerProfile] + :param apiserver_profile: The cluster API server profile. + :type apiserver_profile: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.APIServerProfile + :param ingress_profiles: The cluster ingress profiles. + :type ingress_profiles: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.IngressProfile] + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'cluster_profile': {'key': 'properties.clusterProfile', 'type': 'ClusterProfile'}, + 'console_profile': {'key': 'properties.consoleProfile', 'type': 'ConsoleProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'}, + 'master_profile': {'key': 'properties.masterProfile', 'type': 'MasterProfile'}, + 'worker_profiles': {'key': 'properties.workerProfiles', 'type': '[WorkerProfile]'}, + 'apiserver_profile': {'key': 'properties.apiserverProfile', 'type': 'APIServerProfile'}, + 'ingress_profiles': {'key': 'properties.ingressProfiles', 'type': '[IngressProfile]'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__(self, *, tags=None, provisioning_state=None, cluster_profile=None, console_profile=None, service_principal_profile=None, network_profile=None, master_profile=None, worker_profiles=None, apiserver_profile=None, ingress_profiles=None, **kwargs) -> None: + super(OpenShiftClusterUpdate, self).__init__(**kwargs) + self.tags = tags + self.provisioning_state = provisioning_state + self.cluster_profile = cluster_profile + self.console_profile = console_profile + self.service_principal_profile = service_principal_profile + self.network_profile = network_profile + self.master_profile = master_profile + self.worker_profiles = worker_profiles + self.apiserver_profile = apiserver_profile + self.ingress_profiles = ingress_profiles + self.system_data = None + + +class Operation(Model): + """Operation represents an RP operation. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The object that describes the operation. + :type display: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Display + :param origin: Sources of requests to this operation. Comma separated + list with valid values user or system, e.g. "user,system". + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'Display'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + + +class OperationList(Model): + """OperationList represents an RP operation list. + + :param value: List of operations supported by the resource provider. + :type value: + list[~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.Operation] + :param next_link: The link used to get the next page of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, next_link: str=None, **kwargs) -> None: + super(OperationList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ProxyResource(Resource): + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class ServicePrincipalProfile(Model): + """ServicePrincipalProfile represents a service principal profile. + + :param client_id: The client ID used for the cluster. + :type client_id: str + :param client_secret: The client secret used for the cluster. + :type client_secret: str + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str=None, client_secret: str=None, **kwargs) -> None: + super(ServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + + +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + :type created_by_type: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'User', 'Application', + 'ManagedIdentity', 'Key' + :type last_modified_by_type: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +class WorkerProfile(Model): + """WorkerProfile represents a worker profile. + + :param name: The worker profile name. + :type name: str + :param vm_size: The size of the worker VMs. Possible values include: + 'Standard_D16as_v4', 'Standard_D16s_v3', 'Standard_D2s_v3', + 'Standard_D32as_v4', 'Standard_D32s_v3', 'Standard_D4as_v4', + 'Standard_D4s_v3', 'Standard_D8as_v4', 'Standard_D8s_v3', + 'Standard_E16s_v3', 'Standard_E32s_v3', 'Standard_E4s_v3', + 'Standard_E64i_v3', 'Standard_E64is_v3', 'Standard_E8s_v3', + 'Standard_F16s_v2', 'Standard_F32s_v2', 'Standard_F4s_v2', + 'Standard_F72s_v2', 'Standard_F8s_v2', 'Standard_G5', 'Standard_GS5', + 'Standard_M128ms' + :type vm_size: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.VMSize + :param disk_size_gb: The disk size of the worker VMs. + :type disk_size_gb: int + :param subnet_id: The Azure resource ID of the worker subnet. + :type subnet_id: str + :param count: The number of worker VMs. + :type count: int + :param encryption_at_host: Whether master virtual machines are encrypted + at host. Possible values include: 'Disabled', 'Enabled' + :type encryption_at_host: str or + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.EncryptionAtHost + :param disk_encryption_set_id: The resource ID of an associated + DiskEncryptionSet, if applicable. + :type disk_encryption_set_id: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'encryption_at_host': {'key': 'encryptionAtHost', 'type': 'str'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, vm_size=None, disk_size_gb: int=None, subnet_id: str=None, count: int=None, encryption_at_host=None, disk_encryption_set_id: str=None, **kwargs) -> None: + super(WorkerProfile, self).__init__(**kwargs) + self.name = name + self.vm_size = vm_size + self.disk_size_gb = disk_size_gb + self.subnet_id = subnet_id + self.count = count + self.encryption_at_host = encryption_at_host + self.disk_encryption_set_id = disk_encryption_set_id diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/__init__.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/__init__.py new file mode 100644 index 0000000000000..699dc8944773a --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/__init__.py @@ -0,0 +1,14 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._open_shift_clusters_operations import OpenShiftClustersOperations + +__all__ = [ + 'Operations', + 'OpenShiftClustersOperations', +] diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_open_shift_clusters_operations.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_open_shift_clusters_operations.py new file mode 100644 index 0000000000000..b47094729f8b4 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_open_shift_clusters_operations.py @@ -0,0 +1,521 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class OpenShiftClustersOperations(object): + """OpenShiftClustersOperations 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 API version to use for this operation. Constant value: "2021-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + self.api_version = "2021-09-01-preview" + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists OpenShift clusters in the specified subscription. + + The operation returns properties of each OpenShift cluster. + + :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`. + :return: OpenShiftClusterList or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftClusterList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + 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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftClusterList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/openShiftClusters'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists OpenShift clusters in the specified subscription and resource + group. + + The operation returns properties of each OpenShift cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_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`. + :return: OpenShiftClusterList or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftClusterList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1) + } + 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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftClusterList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters'} + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a OpenShift cluster with the specified subscription, resource + group and resource name. + + The operation returns properties of a OpenShift cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type 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`. + :return: OpenShiftCluster or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'} + + def create_or_update( + self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a OpenShift cluster with the specified subscription, + resource group and resource name. + + The operation returns properties of a OpenShift cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type resource_name: str + :param parameters: The OpenShift cluster resource. + :type parameters: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster + :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`. + :return: OpenShiftCluster or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(parameters, 'OpenShiftCluster') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftCluster', response) + if response.status_code == 201: + deserialized = self._deserialize('OpenShiftCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'} + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Deletes a OpenShift cluster with the specified subscription, resource + group and resource name. + + The operation returns nothing. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type 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`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.CloudErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'} + + def update( + self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config): + """Creates or updates a OpenShift cluster with the specified subscription, + resource group and resource name. + + The operation returns properties of a OpenShift cluster. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type resource_name: str + :param parameters: The OpenShift cluster resource. + :type parameters: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftClusterUpdate + :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`. + :return: OpenShiftCluster or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftCluster + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(parameters, 'OpenShiftClusterUpdate') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftCluster', response) + if response.status_code == 201: + deserialized = self._deserialize('OpenShiftCluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'} + + def list_admin_credentials( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Lists admin kubeconfig of an OpenShift cluster with the specified + subscription, resource group and resource name. + + The operation returns the admin kubeconfig. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type 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`. + :return: OpenShiftClusterAdminKubeconfig or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftClusterAdminKubeconfig + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.list_admin_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftClusterAdminKubeconfig', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}/listAdminCredentials'} + + def list_credentials( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Lists credentials of an OpenShift cluster with the specified + subscription, resource group and resource name. + + The operation returns the credentials. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the OpenShift cluster resource. + :type 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`. + :return: OpenShiftClusterCredentials or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OpenShiftClusterCredentials + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # Construct URL + url = self.list_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OpenShiftClusterCredentials', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}/listCredentials'} diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_operations.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_operations.py new file mode 100644 index 0000000000000..80b47f7579885 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/operations/_operations.py @@ -0,0 +1,83 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations 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 API version to use for this operation. Constant value: "2021-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + + self.config = config + self.api_version = "2021-09-01-preview" + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available RP operations. + + The operation returns the RP operations. + + :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`. + :return: OperationList or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.redhatopenshift.v2021_09_01_preview.models.OperationList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`CloudErrorException` + """ + # 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', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.CloudErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.RedHatOpenShift/operations'} diff --git a/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/version.py b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/version.py new file mode 100644 index 0000000000000..e32dfd9974535 --- /dev/null +++ b/sdk/redhatopenshift/azure-mgmt-redhatopenshift/azure/mgmt/redhatopenshift/v2021_09_01_preview/azure/mgmt/redhatopenshift/v2021_09_01_preview/version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "2021-09-01-preview" +