-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{Attestation}
az attestation signer/policy
: Bump API version from 2…
…022-10-01 to 2022-08-01 (#7059) * update * update * update * update * update * update * update * update * Update azext_metadata.json * update * update * Update custom.py * update * update * update * update * update * Update src/attestation/azext_attestation/aaz/latest/__init__.py * update * update --------- Co-authored-by: kai ru <69238381+kairu-ms@users.noreply.github.com>
- Loading branch information
Showing
82 changed files
with
6,892 additions
and
6,327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# | ||
# Code generated by aaz-dev-tools | ||
# -------------------------------------------------------------------------------------------- |
16 changes: 7 additions & 9 deletions
16
...endored_sdks/azure_attestation/version.py → .../azext_attestation/aaz/latest/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
# Code generated by aaz-dev-tools | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
VERSION = "0.1.0" | ||
# pylint: skip-file | ||
# flake8: noqa | ||
|
||
from ._clients import * |
248 changes: 248 additions & 0 deletions
248
src/attestation/azext_attestation/aaz/latest/_clients.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# | ||
# Code generated by aaz-dev-tools | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
# pylint: skip-file | ||
# flake8: noqa | ||
|
||
from azure.cli.core.aaz import * | ||
|
||
|
||
@register_client("AAZMicrosoftAttestationDataPlaneClient_attestation") | ||
class AAZMicrosoftAttestationDataPlaneClient(AAZBaseClient): | ||
|
||
_AAD_CREDENTIAL_SCOPES = [ | ||
"https://attest.azure.net/.default", | ||
] | ||
|
||
@classmethod | ||
def _build_base_url(cls, ctx, **kwargs): | ||
cls._fetch_endpoint(ctx, **kwargs) | ||
host = ctx.selectors.endpoint.required().to_serialized_data() | ||
if not isinstance(host, str): | ||
raise ValueError(f"Invalid host value: '{host}'") | ||
return host | ||
|
||
@classmethod | ||
def _build_configuration(cls, ctx, credential, **kwargs): | ||
return AAZClientConfiguration( | ||
credential=credential, | ||
credential_scopes=cls._AAD_CREDENTIAL_SCOPES, | ||
**kwargs | ||
) | ||
|
||
@classmethod | ||
def _fetch_endpoint(cls, ctx, **kwargs): | ||
cls.EndpointSelector(ctx=ctx, name="endpoint") | ||
cls.AttestationProvidersGet(ctx=ctx)() | ||
|
||
class EndpointSelector(AAZJsonSelector): | ||
|
||
def _get(self): | ||
result = self.ctx.vars.endpoint_instance | ||
return result.properties.attestUri | ||
|
||
def _set(self, value): | ||
result = self.ctx.vars.endpoint_instance | ||
result.properties.attestUri = value | ||
return | ||
|
||
class AttestationProvidersGet(AAZHttpOperation): | ||
CLIENT_TYPE = "MgmtClient" | ||
|
||
def __call__(self, *args, **kwargs): | ||
request = self.make_request() | ||
session = self.client.send_request(request=request, stream=False, **kwargs) | ||
if session.http_response.status_code in [200]: | ||
return self.on_200(session) | ||
|
||
return self.on_error(session.http_response) | ||
|
||
@property | ||
def url(self): | ||
return self.client.format_url( | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}", | ||
**self.url_parameters | ||
) | ||
|
||
@property | ||
def method(self): | ||
return "GET" | ||
|
||
@property | ||
def error_format(self): | ||
return "ODataV4Format" | ||
|
||
@property | ||
def url_parameters(self): | ||
parameters = { | ||
**self.serialize_url_param( | ||
"providerName", self.ctx.args.provider_name, | ||
required=True, | ||
), | ||
**self.serialize_url_param( | ||
"resourceGroupName", self.ctx.args.resource_group, | ||
required=True, | ||
), | ||
**self.serialize_url_param( | ||
"subscriptionId", self.ctx.subscription_id, | ||
required=True, | ||
), | ||
} | ||
return parameters | ||
|
||
@property | ||
def query_parameters(self): | ||
parameters = { | ||
**self.serialize_query_param( | ||
"api-version", "2021-06-01", | ||
required=True, | ||
), | ||
} | ||
return parameters | ||
|
||
@property | ||
def header_parameters(self): | ||
parameters = { | ||
**self.serialize_header_param( | ||
"Accept", "application/json", | ||
), | ||
} | ||
return parameters | ||
|
||
def on_200(self, session): | ||
data = self.deserialize_http_content(session) | ||
self.ctx.set_var( | ||
"endpoint_instance", | ||
data, | ||
schema_builder=self._build_schema_on_200 | ||
) | ||
|
||
_schema_on_200 = None | ||
|
||
@classmethod | ||
def _build_schema_on_200(cls): | ||
if cls._schema_on_200 is not None: | ||
return cls._schema_on_200 | ||
|
||
cls._schema_on_200 = AAZObjectType() | ||
|
||
_schema_on_200 = cls._schema_on_200 | ||
_schema_on_200.id = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
_schema_on_200.location = AAZStrType( | ||
flags={"required": True}, | ||
) | ||
_schema_on_200.name = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
_schema_on_200.properties = AAZObjectType( | ||
flags={"client_flatten": True}, | ||
) | ||
_schema_on_200.system_data = AAZObjectType( | ||
serialized_name="systemData", | ||
flags={"read_only": True}, | ||
) | ||
_schema_on_200.tags = AAZDictType() | ||
_schema_on_200.type = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
|
||
properties = cls._schema_on_200.properties | ||
properties.attest_uri = AAZStrType( | ||
serialized_name="attestUri", | ||
) | ||
properties.private_endpoint_connections = AAZListType( | ||
serialized_name="privateEndpointConnections", | ||
flags={"read_only": True}, | ||
) | ||
properties.public_network_access = AAZStrType( | ||
serialized_name="publicNetworkAccess", | ||
) | ||
properties.status = AAZStrType() | ||
properties.tpm_attestation_authentication = AAZStrType( | ||
serialized_name="tpmAttestationAuthentication", | ||
) | ||
properties.trust_model = AAZStrType( | ||
serialized_name="trustModel", | ||
) | ||
|
||
private_endpoint_connections = cls._schema_on_200.properties.private_endpoint_connections | ||
private_endpoint_connections.Element = AAZObjectType() | ||
|
||
_element = cls._schema_on_200.properties.private_endpoint_connections.Element | ||
_element.id = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
_element.name = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
_element.properties = AAZObjectType( | ||
flags={"client_flatten": True}, | ||
) | ||
_element.type = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
|
||
properties = cls._schema_on_200.properties.private_endpoint_connections.Element.properties | ||
properties.private_endpoint = AAZObjectType( | ||
serialized_name="privateEndpoint", | ||
) | ||
properties.private_link_service_connection_state = AAZObjectType( | ||
serialized_name="privateLinkServiceConnectionState", | ||
flags={"required": True}, | ||
) | ||
properties.provisioning_state = AAZStrType( | ||
serialized_name="provisioningState", | ||
flags={"read_only": True}, | ||
) | ||
|
||
private_endpoint = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_endpoint | ||
private_endpoint.id = AAZStrType( | ||
flags={"read_only": True}, | ||
) | ||
|
||
private_link_service_connection_state = cls._schema_on_200.properties.private_endpoint_connections.Element.properties.private_link_service_connection_state | ||
private_link_service_connection_state.actions_required = AAZStrType( | ||
serialized_name="actionsRequired", | ||
) | ||
private_link_service_connection_state.description = AAZStrType() | ||
private_link_service_connection_state.status = AAZStrType() | ||
|
||
system_data = cls._schema_on_200.system_data | ||
system_data.created_at = AAZStrType( | ||
serialized_name="createdAt", | ||
) | ||
system_data.created_by = AAZStrType( | ||
serialized_name="createdBy", | ||
) | ||
system_data.created_by_type = AAZStrType( | ||
serialized_name="createdByType", | ||
) | ||
system_data.last_modified_at = AAZStrType( | ||
serialized_name="lastModifiedAt", | ||
) | ||
system_data.last_modified_by = AAZStrType( | ||
serialized_name="lastModifiedBy", | ||
) | ||
system_data.last_modified_by_type = AAZStrType( | ||
serialized_name="lastModifiedByType", | ||
) | ||
|
||
tags = cls._schema_on_200.tags | ||
tags.Element = AAZStrType() | ||
|
||
return cls._schema_on_200 | ||
|
||
|
||
class _AAZMicrosoftAttestationDataPlaneClientHelper: | ||
"""Helper class for AAZMicrosoftAttestationDataPlaneClient""" | ||
|
||
|
||
__all__ = [ | ||
"AAZMicrosoftAttestationDataPlaneClient", | ||
] |
23 changes: 23 additions & 0 deletions
23
src/attestation/azext_attestation/aaz/latest/attestation/__cmd_group.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# | ||
# Code generated by aaz-dev-tools | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
# pylint: skip-file | ||
# flake8: noqa | ||
|
||
from azure.cli.core.aaz import * | ||
|
||
|
||
@register_command_group( | ||
"attestation", | ||
) | ||
class __CMDGroup(AAZCommandGroup): | ||
"""Manage Microsoft Azure Attestation (MAA). | ||
""" | ||
pass | ||
|
||
|
||
__all__ = ["__CMDGroup"] |
18 changes: 18 additions & 0 deletions
18
src/attestation/azext_attestation/aaz/latest/attestation/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# | ||
# Code generated by aaz-dev-tools | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
# pylint: skip-file | ||
# flake8: noqa | ||
|
||
from .__cmd_group import * | ||
from ._create import * | ||
from ._delete import * | ||
from ._get_default_by_location import * | ||
from ._list import * | ||
from ._list_default import * | ||
from ._show import * | ||
from ._update import * |
Oops, something went wrong.