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

T1 attestation 2021 01 28 #16396

Merged
merged 2 commits into from
Jan 29, 2021
Merged
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
7 changes: 7 additions & 0 deletions sdk/attestation/azure-mgmt-attestation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 0.3.0 (2021-01-28)

**Features**

- Model AttestationProvider has a new parameter private_endpoint_connections
- Added operation group PrivateEndpointConnectionsOperations

## 0.2.0 (2020-11-17)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
from ._configuration import AttestationManagementClientConfiguration
from .operations import Operations
from .operations import AttestationProvidersOperations
from .operations import PrivateEndpointConnectionsOperations
from . import models


class AttestationManagementClient(SDKClient):
"""Various APIs for managing resources in attestation service. This primarily encompasses per-tenant instance management.
"""Various APIs for managing resources in attestation service. This primarily encompasses per-provider management.

:ivar config: Configuration for client.
:vartype config: AttestationManagementClientConfiguration
Expand All @@ -28,6 +29,8 @@ class AttestationManagementClient(SDKClient):
:vartype operations: azure.mgmt.attestation.operations.Operations
:ivar attestation_providers: AttestationProviders operations
:vartype attestation_providers: azure.mgmt.attestation.operations.AttestationProvidersOperations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.attestation.operations.PrivateEndpointConnectionsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -52,3 +55,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.attestation_providers = AttestationProvidersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from ._models_py3 import OperationList
from ._models_py3 import OperationsDefinition
from ._models_py3 import OperationsDisplayDefinition
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import ProxyResource
from ._models_py3 import Resource
from ._models_py3 import SystemData
Expand All @@ -37,13 +38,16 @@
from ._models import OperationList
from ._models import OperationsDefinition
from ._models import OperationsDisplayDefinition
from ._models import PrivateEndpointConnection
from ._models import ProxyResource
from ._models import Resource
from ._models import SystemData
from ._models import TrackedResource
from ._paged_models import PrivateEndpointConnectionPaged
from ._attestation_management_client_enums import (
CreatedByType,
AttestationServiceStatus,
PrivateEndpointConnectionProvisioningState,
)

__all__ = [
Expand All @@ -58,10 +62,13 @@
'OperationList',
'OperationsDefinition',
'OperationsDisplayDefinition',
'PrivateEndpointConnection',
'ProxyResource',
'Resource',
'SystemData',
'TrackedResource',
'PrivateEndpointConnectionPaged',
'CreatedByType',
'AttestationServiceStatus',
'PrivateEndpointConnectionProvisioningState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ class AttestationServiceStatus(str, Enum):
ready = "Ready"
not_ready = "NotReady"
error = "Error"


class PrivateEndpointConnectionProvisioningState(str, Enum):

succeeded = "Succeeded"
creating = "Creating"
deleting = "Deleting"
failed = "Failed"
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,18 @@ class AttestationProvider(TrackedResource):
:type location: str
:ivar system_data: The system metadata relating to this resource
:vartype system_data: ~azure.mgmt.attestation.models.SystemData
:param trust_model: Trust model for the attestation service instance.
:param trust_model: Trust model for the attestation provider.
:type trust_model: str
:param status: Status of attestation service. Possible values include:
'Ready', 'NotReady', 'Error'
:type status: str or
~azure.mgmt.attestation.models.AttestationServiceStatus
:param attest_uri: Gets the uri of attestation service
:type attest_uri: str
:ivar private_endpoint_connections: List of private endpoint connections
associated with the attestation provider.
:vartype private_endpoint_connections:
list[~azure.mgmt.attestation.models.PrivateEndpointConnection]
"""

_validation = {
Expand All @@ -135,6 +139,7 @@ class AttestationProvider(TrackedResource):
'type': {'readonly': True},
'location': {'required': True},
'system_data': {'readonly': True},
'private_endpoint_connections': {'readonly': True},
}

_attribute_map = {
Expand All @@ -147,6 +152,7 @@ class AttestationProvider(TrackedResource):
'trust_model': {'key': 'properties.trustModel', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'attest_uri': {'key': 'properties.attestUri', 'type': 'str'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
}

def __init__(self, **kwargs):
Expand All @@ -155,6 +161,7 @@ def __init__(self, **kwargs):
self.trust_model = kwargs.get('trust_model', None)
self.status = kwargs.get('status', None)
self.attest_uri = kwargs.get('attest_uri', None)
self.private_endpoint_connections = None


class AttestationProviderListResult(Model):
Expand Down Expand Up @@ -185,18 +192,16 @@ def __init__(self, **kwargs):


class AttestationServiceCreationParams(Model):
"""Parameters for creating an attestation service instance.
"""Parameters for creating an attestation provider.

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

:param location: Required. The supported Azure location where the
attestation service instance should be created.
attestation provider should be created.
:type location: str
:param tags: The tags that will be assigned to the attestation service
instance.
:param tags: The tags that will be assigned to the attestation provider.
:type tags: dict[str, str]
:param properties: Required. Properties of the attestation service
instance
:param properties: Required. Properties of the attestation provider
:type properties:
~azure.mgmt.attestation.models.AttestationServiceCreationSpecificParams
"""
Expand All @@ -220,8 +225,7 @@ def __init__(self, **kwargs):


class AttestationServiceCreationSpecificParams(Model):
"""Client supplied parameters used to create a new attestation service
instance.
"""Client supplied parameters used to create a new attestation provider.

:param policy_signing_certificates: JSON Web Key Set defining a set of
X.509 Certificates that will represent the parent certificate for the
Expand All @@ -240,10 +244,9 @@ def __init__(self, **kwargs):


class AttestationServicePatchParams(Model):
"""Parameters for patching an attestation service instance.
"""Parameters for patching an attestation provider.

:param tags: The tags that will be assigned to the attestation service
instance.
:param tags: The tags that will be assigned to the attestation provider.
:type tags: dict[str, str]
"""

Expand Down Expand Up @@ -351,8 +354,8 @@ class JSONWebKey(Model):

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

:param alg: Required. The "alg" (algorithm) parameter identifies the
algorithm intended for
:param alg: The "alg" (algorithm) parameter identifies the algorithm
intended for
use with the key. The values used should either be registered in the
IANA "JSON Web Signature and Encryption Algorithms" registry
established by [JWA] or be a value that contains a Collision-
Expand All @@ -370,8 +373,8 @@ class JSONWebKey(Model):
:type e: str
:param k: Symmetric key
:type k: str
:param kid: Required. The "kid" (key ID) parameter is used to match a
specific key. This
:param kid: The "kid" (key ID) parameter is used to match a specific key.
This
is used, for instance, to choose among a set of keys within a JWK Set
during key rollover. The structure of the "kid" value is
unspecified. When "kid" values are used within a JWK Set, different
Expand All @@ -396,8 +399,7 @@ class JSONWebKey(Model):
:type q: str
:param qi: RSA Private Key Parameter
:type qi: str
:param use: Required. Use ("public key use") identifies the intended use
of
:param use: Use ("public key use") identifies the intended use of
the public key. The "use" parameter is employed to indicate whether
a public key is used for encrypting data or verifying the signature
on data. Values are commonly "sig" (signature) or "enc" (encryption).
Expand All @@ -418,10 +420,7 @@ class JSONWebKey(Model):
"""

_validation = {
'alg': {'required': True},
'kid': {'required': True},
'kty': {'required': True},
'use': {'required': True},
}

_attribute_map = {
Expand Down Expand Up @@ -561,6 +560,45 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class PrivateEndpointConnection(Resource):
"""The Private Endpoint Connection resource.

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
:param provisioning_state: Provisioning state of the private endpoint
connection. Possible values include: 'Succeeded', 'Creating', 'Deleting',
'Failed'
:type provisioning_state: str or
~azure.mgmt.attestation.models.PrivateEndpointConnectionProvisioningState
"""

_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'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PrivateEndpointConnection, self).__init__(**kwargs)
self.provisioning_state = kwargs.get('provisioning_state', None)


class ProxyResource(Resource):
"""Proxy Resource.

Expand Down
Loading