Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-containerinstance] [Hub Generated] Review request for Microsoft.ContainerInstance to add version stable/2021-03-01 #4077

Draft
wants to merge 1 commit into
base: release/v3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-12-01'
self.api_version = '2021-03-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from ._models_py3 import Capabilities
from ._models_py3 import CapabilitiesCapabilities
from ._models_py3 import Container
from ._models_py3 import ContainerAttachResponse
from ._models_py3 import ContainerExec
from ._models_py3 import ContainerExecRequest
from ._models_py3 import ContainerExecRequestTerminalSize
Expand All @@ -36,6 +37,7 @@
from ._models_py3 import Event
from ._models_py3 import GitRepoVolume
from ._models_py3 import GpuResource
from ._models_py3 import HttpHeaders
from ._models_py3 import ImageRegistryCredential
from ._models_py3 import InitContainerDefinition
from ._models_py3 import InitContainerPropertiesDefinitionInstanceView
Expand All @@ -59,6 +61,7 @@
from ._models import Capabilities
from ._models import CapabilitiesCapabilities
from ._models import Container
from ._models import ContainerAttachResponse
from ._models import ContainerExec
from ._models import ContainerExecRequest
from ._models import ContainerExecRequestTerminalSize
Expand All @@ -80,6 +83,7 @@
from ._models import Event
from ._models import GitRepoVolume
from ._models import GpuResource
from ._models import HttpHeaders
from ._models import ImageRegistryCredential
from ._models import InitContainerDefinition
from ._models import InitContainerPropertiesDefinitionInstanceView
Expand Down Expand Up @@ -122,6 +126,7 @@
'Capabilities',
'CapabilitiesCapabilities',
'Container',
'ContainerAttachResponse',
'ContainerExec',
'ContainerExecRequest',
'ContainerExecRequestTerminalSize',
Expand All @@ -143,6 +148,7 @@
'Event',
'GitRepoVolume',
'GpuResource',
'HttpHeaders',
'ImageRegistryCredential',
'InitContainerDefinition',
'InitContainerPropertiesDefinitionInstanceView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,27 @@ def __init__(self, **kwargs):
self.readiness_probe = kwargs.get('readiness_probe', None)


class ContainerAttachResponse(Model):
"""The information for the output stream from container attach.

:param web_socket_uri: The uri for the output stream from the attach.
:type web_socket_uri: str
:param password: The password to the output stream from the attach. Send
as an Authorization header value when connecting to the websocketUri.
:type password: str
"""

_attribute_map = {
'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'},
'password': {'key': 'password', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ContainerAttachResponse, self).__init__(**kwargs)
self.web_socket_uri = kwargs.get('web_socket_uri', None)
self.password = kwargs.get('password', None)


class ContainerExec(Model):
"""The container execution command, for liveness or readiness probe.

Expand Down Expand Up @@ -689,6 +710,8 @@ class ContainerHttpGet(Model):
:type port: int
:param scheme: The scheme. Possible values include: 'http', 'https'
:type scheme: str or ~azure.mgmt.containerinstance.models.Scheme
:param http_headers: The HTTP headers.
:type http_headers: ~azure.mgmt.containerinstance.models.HttpHeaders
"""

_validation = {
Expand All @@ -699,13 +722,15 @@ class ContainerHttpGet(Model):
'path': {'key': 'path', 'type': 'str'},
'port': {'key': 'port', 'type': 'int'},
'scheme': {'key': 'scheme', 'type': 'str'},
'http_headers': {'key': 'httpHeaders', 'type': 'HttpHeaders'},
}

def __init__(self, **kwargs):
super(ContainerHttpGet, self).__init__(**kwargs)
self.path = kwargs.get('path', None)
self.port = kwargs.get('port', None)
self.scheme = kwargs.get('scheme', None)
self.http_headers = kwargs.get('http_headers', None)


class ContainerPort(Model):
Expand Down Expand Up @@ -1066,6 +1091,26 @@ def __init__(self, **kwargs):
self.sku = kwargs.get('sku', None)


class HttpHeaders(Model):
"""The HTTP headers.

:param name: The header name.
:type name: str
:param value: The header value.
:type value: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

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


class ImageRegistryCredential(Model):
"""Image registry credential.

Expand Down Expand Up @@ -1251,6 +1296,8 @@ class LogAnalytics(Model):
~azure.mgmt.containerinstance.models.LogAnalyticsLogType
:param metadata: Metadata for log analytics.
:type metadata: dict[str, str]
:param workspace_resource_id: The workspace resource id for log analytics
:type workspace_resource_id: dict[str, str]
"""

_validation = {
Expand All @@ -1263,6 +1310,7 @@ class LogAnalytics(Model):
'workspace_key': {'key': 'workspaceKey', 'type': 'str'},
'log_type': {'key': 'logType', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
'workspace_resource_id': {'key': 'workspaceResourceId', 'type': '{str}'},
}

def __init__(self, **kwargs):
Expand All @@ -1271,6 +1319,7 @@ def __init__(self, **kwargs):
self.workspace_key = kwargs.get('workspace_key', None)
self.log_type = kwargs.get('log_type', None)
self.metadata = kwargs.get('metadata', None)
self.workspace_resource_id = kwargs.get('workspace_resource_id', None)


class Logs(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,27 @@ def __init__(self, *, name: str, image: str, resources, command=None, ports=None
self.readiness_probe = readiness_probe


class ContainerAttachResponse(Model):
"""The information for the output stream from container attach.

:param web_socket_uri: The uri for the output stream from the attach.
:type web_socket_uri: str
:param password: The password to the output stream from the attach. Send
as an Authorization header value when connecting to the websocketUri.
:type password: str
"""

_attribute_map = {
'web_socket_uri': {'key': 'webSocketUri', 'type': 'str'},
'password': {'key': 'password', 'type': 'str'},
}

def __init__(self, *, web_socket_uri: str=None, password: str=None, **kwargs) -> None:
super(ContainerAttachResponse, self).__init__(**kwargs)
self.web_socket_uri = web_socket_uri
self.password = password


class ContainerExec(Model):
"""The container execution command, for liveness or readiness probe.

Expand Down Expand Up @@ -689,6 +710,8 @@ class ContainerHttpGet(Model):
:type port: int
:param scheme: The scheme. Possible values include: 'http', 'https'
:type scheme: str or ~azure.mgmt.containerinstance.models.Scheme
:param http_headers: The HTTP headers.
:type http_headers: ~azure.mgmt.containerinstance.models.HttpHeaders
"""

_validation = {
Expand All @@ -699,13 +722,15 @@ class ContainerHttpGet(Model):
'path': {'key': 'path', 'type': 'str'},
'port': {'key': 'port', 'type': 'int'},
'scheme': {'key': 'scheme', 'type': 'str'},
'http_headers': {'key': 'httpHeaders', 'type': 'HttpHeaders'},
}

def __init__(self, *, port: int, path: str=None, scheme=None, **kwargs) -> None:
def __init__(self, *, port: int, path: str=None, scheme=None, http_headers=None, **kwargs) -> None:
super(ContainerHttpGet, self).__init__(**kwargs)
self.path = path
self.port = port
self.scheme = scheme
self.http_headers = http_headers


class ContainerPort(Model):
Expand Down Expand Up @@ -1066,6 +1091,26 @@ def __init__(self, *, count: int, sku, **kwargs) -> None:
self.sku = sku


class HttpHeaders(Model):
"""The HTTP headers.

:param name: The header name.
:type name: str
:param value: The header value.
:type value: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None:
super(HttpHeaders, self).__init__(**kwargs)
self.name = name
self.value = value


class ImageRegistryCredential(Model):
"""Image registry credential.

Expand Down Expand Up @@ -1251,6 +1296,8 @@ class LogAnalytics(Model):
~azure.mgmt.containerinstance.models.LogAnalyticsLogType
:param metadata: Metadata for log analytics.
:type metadata: dict[str, str]
:param workspace_resource_id: The workspace resource id for log analytics
:type workspace_resource_id: dict[str, str]
"""

_validation = {
Expand All @@ -1263,14 +1310,16 @@ class LogAnalytics(Model):
'workspace_key': {'key': 'workspaceKey', 'type': 'str'},
'log_type': {'key': 'logType', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
'workspace_resource_id': {'key': 'workspaceResourceId', 'type': '{str}'},
}

def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, **kwargs) -> None:
def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, workspace_resource_id=None, **kwargs) -> None:
super(LogAnalytics, self).__init__(**kwargs)
self.workspace_id = workspace_id
self.workspace_key = workspace_key
self.log_type = log_type
self.metadata = metadata
self.workspace_resource_id = workspace_resource_id


class Logs(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ContainerGroupsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API version. Constant value: "2019-12-01".
:ivar api_version: Client API version. Constant value: "2021-03-01".
"""

models = models
Expand All @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-12-01"
self.api_version = "2021-03-01"

self.config = config

Expand Down Expand Up @@ -697,7 +697,7 @@ def _start_initial(
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [204]:
if response.status_code not in [202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
Expand Down
Loading