From 57d2c68e5555b893eac75936ec36ad78e7a67b65 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 10 Nov 2021 03:33:45 +0000 Subject: [PATCH] CodeGen from PR 16355 in Azure/azure-rest-api-specs attestation: fixing the segment `attestationProvider` to be `attestationProvider` which matches the API (#16355) Using the API Version in the Portal (2020-10-01): Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ``` --- Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ``` --- .../mgmt/2018-09-01/attestation/CHANGELOG.md | 2 +- .../mgmt/2018-09-01/attestation/_meta.json | 2 +- .../mgmt/2018-09-01/attestation/providers.go | 15 +- .../mgmt/2020-10-01/attestation/CHANGELOG.md | 55 ++- .../mgmt/2020-10-01/attestation/_meta.json | 2 +- .../attestation/attestationapi/interfaces.go | 10 + .../mgmt/2020-10-01/attestation/client.go | 3 +- .../mgmt/2020-10-01/attestation/enums.go | 37 ++ .../mgmt/2020-10-01/attestation/models.go | 150 ++++++- .../mgmt/2020-10-01/attestation/operations.go | 2 +- .../attestation/privateendpointconnections.go | 396 ++++++++++++++++++ .../mgmt/2020-10-01/attestation/providers.go | 25 +- 12 files changed, 657 insertions(+), 42 deletions(-) create mode 100644 services/attestation/mgmt/2020-10-01/attestation/privateendpointconnections.go diff --git a/services/attestation/mgmt/2018-09-01/attestation/CHANGELOG.md b/services/attestation/mgmt/2018-09-01/attestation/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/attestation/mgmt/2018-09-01/attestation/CHANGELOG.md +++ b/services/attestation/mgmt/2018-09-01/attestation/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/attestation/mgmt/2018-09-01/attestation/_meta.json b/services/attestation/mgmt/2018-09-01/attestation/_meta.json index d5b048e6ae62..db37a3a66600 100644 --- a/services/attestation/mgmt/2018-09-01/attestation/_meta.json +++ b/services/attestation/mgmt/2018-09-01/attestation/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "9903ac0d18bab43964f5c216b7638bd2964eaac5", "readme": "/_/azure-rest-api-specs/specification/attestation/resource-manager/readme.md", "tag": "package-2018-09-01", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/attestation/mgmt/2018-09-01/attestation/providers.go b/services/attestation/mgmt/2018-09-01/attestation/providers.go index d3f1cc9eaf05..b1af195eef5e 100644 --- a/services/attestation/mgmt/2018-09-01/attestation/providers.go +++ b/services/attestation/mgmt/2018-09-01/attestation/providers.go @@ -53,8 +53,7 @@ func (client ProvidersClient) Create(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: creationParams, Constraints: []validation.Constraint{{Target: "creationParams.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "creationParams.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -144,8 +143,7 @@ func (client ProvidersClient) Delete(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Delete", err.Error()) } @@ -229,8 +227,7 @@ func (client ProvidersClient) Get(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Get", err.Error()) } @@ -471,8 +468,7 @@ func (client ProvidersClient) ListByResourceGroup(ctx context.Context, resourceG if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "ListByResourceGroup", err.Error()) @@ -636,8 +632,7 @@ func (client ProvidersClient) Update(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Update", err.Error()) } diff --git a/services/attestation/mgmt/2020-10-01/attestation/CHANGELOG.md b/services/attestation/mgmt/2020-10-01/attestation/CHANGELOG.md index 52911e4cc5e4..07eb8ae3e93a 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/CHANGELOG.md +++ b/services/attestation/mgmt/2020-10-01/attestation/CHANGELOG.md @@ -1,2 +1,55 @@ -# Change History +# Unreleased +## Additive Changes + +### New Constants + +1. PrivateEndpointConnectionProvisioningState.Creating +1. PrivateEndpointConnectionProvisioningState.Deleting +1. PrivateEndpointConnectionProvisioningState.Failed +1. PrivateEndpointConnectionProvisioningState.Succeeded +1. PrivateEndpointServiceConnectionStatus.Approved +1. PrivateEndpointServiceConnectionStatus.Pending +1. PrivateEndpointServiceConnectionStatus.Rejected + +### New Funcs + +1. *PrivateEndpointConnection.UnmarshalJSON([]byte) error +1. NewPrivateEndpointConnectionsClient(string) PrivateEndpointConnectionsClient +1. NewPrivateEndpointConnectionsClientWithBaseURI(string, string) PrivateEndpointConnectionsClient +1. PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState +1. PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus +1. PrivateEndpoint.MarshalJSON() ([]byte, error) +1. PrivateEndpointConnection.MarshalJSON() ([]byte, error) +1. PrivateEndpointConnectionsClient.Create(context.Context, string, string, string, PrivateEndpointConnection) (PrivateEndpointConnection, error) +1. PrivateEndpointConnectionsClient.CreatePreparer(context.Context, string, string, string, PrivateEndpointConnection) (*http.Request, error) +1. PrivateEndpointConnectionsClient.CreateResponder(*http.Response) (PrivateEndpointConnection, error) +1. PrivateEndpointConnectionsClient.CreateSender(*http.Request) (*http.Response, error) +1. PrivateEndpointConnectionsClient.Delete(context.Context, string, string, string) (autorest.Response, error) +1. PrivateEndpointConnectionsClient.DeletePreparer(context.Context, string, string, string) (*http.Request, error) +1. PrivateEndpointConnectionsClient.DeleteResponder(*http.Response) (autorest.Response, error) +1. PrivateEndpointConnectionsClient.DeleteSender(*http.Request) (*http.Response, error) +1. PrivateEndpointConnectionsClient.Get(context.Context, string, string, string) (PrivateEndpointConnection, error) +1. PrivateEndpointConnectionsClient.GetPreparer(context.Context, string, string, string) (*http.Request, error) +1. PrivateEndpointConnectionsClient.GetResponder(*http.Response) (PrivateEndpointConnection, error) +1. PrivateEndpointConnectionsClient.GetSender(*http.Request) (*http.Response, error) +1. PrivateEndpointConnectionsClient.List(context.Context, string, string) (PrivateEndpointConnectionListResult, error) +1. PrivateEndpointConnectionsClient.ListPreparer(context.Context, string, string) (*http.Request, error) +1. PrivateEndpointConnectionsClient.ListResponder(*http.Response) (PrivateEndpointConnectionListResult, error) +1. PrivateEndpointConnectionsClient.ListSender(*http.Request) (*http.Response, error) +1. StatusResult.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. PrivateEndpoint +1. PrivateEndpointConnection +1. PrivateEndpointConnectionListResult +1. PrivateEndpointConnectionProperties +1. PrivateEndpointConnectionsClient +1. PrivateLinkServiceConnectionState + +#### New Struct Fields + +1. StatusResult.PrivateEndpointConnections diff --git a/services/attestation/mgmt/2020-10-01/attestation/_meta.json b/services/attestation/mgmt/2020-10-01/attestation/_meta.json index 741c446cf09c..9a8b03a79b61 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/_meta.json +++ b/services/attestation/mgmt/2020-10-01/attestation/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "9903ac0d18bab43964f5c216b7638bd2964eaac5", "readme": "/_/azure-rest-api-specs/specification/attestation/resource-manager/readme.md", "tag": "package-2020-10-01", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/attestation/mgmt/2020-10-01/attestation/attestationapi/interfaces.go b/services/attestation/mgmt/2020-10-01/attestation/attestationapi/interfaces.go index 460c22211841..caec11238c01 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/attestationapi/interfaces.go +++ b/services/attestation/mgmt/2020-10-01/attestation/attestationapi/interfaces.go @@ -32,3 +32,13 @@ type ProvidersClientAPI interface { } var _ ProvidersClientAPI = (*attestation.ProvidersClient)(nil) + +// PrivateEndpointConnectionsClientAPI contains the set of methods on the PrivateEndpointConnectionsClient type. +type PrivateEndpointConnectionsClientAPI interface { + Create(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string, properties attestation.PrivateEndpointConnection) (result attestation.PrivateEndpointConnection, err error) + Delete(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (result autorest.Response, err error) + Get(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (result attestation.PrivateEndpointConnection, err error) + List(ctx context.Context, resourceGroupName string, providerName string) (result attestation.PrivateEndpointConnectionListResult, err error) +} + +var _ PrivateEndpointConnectionsClientAPI = (*attestation.PrivateEndpointConnectionsClient)(nil) diff --git a/services/attestation/mgmt/2020-10-01/attestation/client.go b/services/attestation/mgmt/2020-10-01/attestation/client.go index 3cce4199cad2..5e2c7e3f1b36 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/client.go +++ b/services/attestation/mgmt/2020-10-01/attestation/client.go @@ -1,7 +1,6 @@ // Package attestation implements the Azure ARM Attestation service API version 2020-10-01. // -// 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. package attestation // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/services/attestation/mgmt/2020-10-01/attestation/enums.go b/services/attestation/mgmt/2020-10-01/attestation/enums.go index 0bbb9296e2e0..69ca684e9a59 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/enums.go +++ b/services/attestation/mgmt/2020-10-01/attestation/enums.go @@ -25,6 +25,43 @@ func PossibleCreatedByTypeValues() []CreatedByType { return []CreatedByType{Application, Key, ManagedIdentity, User} } +// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection +// provisioning state. +type PrivateEndpointConnectionProvisioningState string + +const ( + // Creating ... + Creating PrivateEndpointConnectionProvisioningState = "Creating" + // Deleting ... + Deleting PrivateEndpointConnectionProvisioningState = "Deleting" + // Failed ... + Failed PrivateEndpointConnectionProvisioningState = "Failed" + // Succeeded ... + Succeeded PrivateEndpointConnectionProvisioningState = "Succeeded" +) + +// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type. +func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState { + return []PrivateEndpointConnectionProvisioningState{Creating, Deleting, Failed, Succeeded} +} + +// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status. +type PrivateEndpointServiceConnectionStatus string + +const ( + // Approved ... + Approved PrivateEndpointServiceConnectionStatus = "Approved" + // Pending ... + Pending PrivateEndpointServiceConnectionStatus = "Pending" + // Rejected ... + Rejected PrivateEndpointServiceConnectionStatus = "Rejected" +) + +// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type. +func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus { + return []PrivateEndpointServiceConnectionStatus{Approved, Pending, Rejected} +} + // ServiceStatus enumerates the values for service status. type ServiceStatus string diff --git a/services/attestation/mgmt/2020-10-01/attestation/models.go b/services/attestation/mgmt/2020-10-01/attestation/models.go index 3a7547da2129..ec4209c63d67 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/models.go +++ b/services/attestation/mgmt/2020-10-01/attestation/models.go @@ -157,6 +157,120 @@ type OperationsDisplayDefinition struct { Description *string `json:"description,omitempty"` } +// PrivateEndpoint the Private Endpoint resource. +type PrivateEndpoint struct { + // ID - READ-ONLY; The ARM identifier for Private Endpoint + ID *string `json:"id,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpoint. +func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + return json.Marshal(objectMap) +} + +// PrivateEndpointConnection the Private Endpoint Connection resource. +type PrivateEndpointConnection struct { + autorest.Response `json:"-"` + // PrivateEndpointConnectionProperties - Resource properties. + *PrivateEndpointConnectionProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PrivateEndpointConnection. +func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pec.PrivateEndpointConnectionProperties != nil { + objectMap["properties"] = pec.PrivateEndpointConnectionProperties + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct. +func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + var privateEndpointConnectionProperties PrivateEndpointConnectionProperties + err = json.Unmarshal(*v, &privateEndpointConnectionProperties) + if err != nil { + return err + } + pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + pec.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + pec.Name = &name + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + pec.Type = &typeVar + } + } + } + + return nil +} + +// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified +// storage account +type PrivateEndpointConnectionListResult struct { + autorest.Response `json:"-"` + // Value - Array of private endpoint connections + Value *[]PrivateEndpointConnection `json:"value,omitempty"` +} + +// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties. +type PrivateEndpointConnectionProperties struct { + // PrivateEndpoint - The resource of private end point. + PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"` + // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider. + PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"` + // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"` +} + +// PrivateLinkServiceConnectionState a collection of information about the state of the connection between +// service consumer and provider. +type PrivateLinkServiceConnectionState struct { + // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected' + Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"` + // Description - The reason for approval/rejection of the connection. + Description *string `json:"description,omitempty"` + // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer. + ActionsRequired *string `json:"actionsRequired,omitempty"` +} + // Provider attestation service response message. type Provider struct { autorest.Response `json:"-"` @@ -320,13 +434,13 @@ func (r Resource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ServiceCreationParams parameters for creating an attestation service instance +// ServiceCreationParams parameters for creating an attestation provider type ServiceCreationParams struct { - // Location - The supported Azure location where the attestation service instance should be created. + // Location - The supported Azure location where the attestation provider should be created. Location *string `json:"location,omitempty"` - // Tags - The tags that will be assigned to the attestation service instance. + // Tags - The tags that will be assigned to the attestation provider. Tags map[string]*string `json:"tags"` - // Properties - Properties of the attestation service instance + // Properties - Properties of the attestation provider Properties *ServiceCreationSpecificParams `json:"properties,omitempty"` } @@ -345,16 +459,15 @@ func (scp ServiceCreationParams) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// ServiceCreationSpecificParams client supplied parameters used to create a new attestation service -// instance. +// ServiceCreationSpecificParams client supplied parameters used to create a new attestation provider. type ServiceCreationSpecificParams struct { // PolicySigningCertificates - JSON Web Key Set defining a set of X.509 Certificates that will represent the parent certificate for the signing certificate used for policy operations PolicySigningCertificates *JSONWebKeySet `json:"policySigningCertificates,omitempty"` } -// ServicePatchParams parameters for patching an attestation service instance +// ServicePatchParams parameters for patching an attestation provider type ServicePatchParams struct { - // Tags - The tags that will be assigned to the attestation service instance. + // Tags - The tags that will be assigned to the attestation provider. Tags map[string]*string `json:"tags"` } @@ -369,12 +482,29 @@ func (spp ServicePatchParams) MarshalJSON() ([]byte, error) { // StatusResult status of attestation service. type StatusResult struct { - // TrustModel - Trust model for the attestation service instance. + // TrustModel - Trust model for the attestation provider. TrustModel *string `json:"trustModel,omitempty"` // Status - Status of attestation service. Possible values include: 'Ready', 'NotReady', 'Error' Status ServiceStatus `json:"status,omitempty"` // AttestURI - Gets the uri of attestation service AttestURI *string `json:"attestUri,omitempty"` + // PrivateEndpointConnections - READ-ONLY; List of private endpoint connections associated with the attestation provider. + PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"` +} + +// MarshalJSON is the custom marshaler for StatusResult. +func (sr StatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sr.TrustModel != nil { + objectMap["trustModel"] = sr.TrustModel + } + if sr.Status != "" { + objectMap["status"] = sr.Status + } + if sr.AttestURI != nil { + objectMap["attestUri"] = sr.AttestURI + } + return json.Marshal(objectMap) } // SystemData metadata pertaining to creation and last modification of the resource. @@ -389,7 +519,7 @@ type SystemData struct { LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` - // LastModifiedAt - The type of identity that last modified the resource. + // LastModifiedAt - The timestamp of resource last modification (UTC) LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` } diff --git a/services/attestation/mgmt/2020-10-01/attestation/operations.go b/services/attestation/mgmt/2020-10-01/attestation/operations.go index 3a905a57f5c2..5e6ffb09bb39 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/operations.go +++ b/services/attestation/mgmt/2020-10-01/attestation/operations.go @@ -15,7 +15,7 @@ import ( ) // OperationsClient is the various APIs for managing resources in attestation service. This primarily encompasses -// per-tenant instance management. +// per-provider management. type OperationsClient struct { BaseClient } diff --git a/services/attestation/mgmt/2020-10-01/attestation/privateendpointconnections.go b/services/attestation/mgmt/2020-10-01/attestation/privateendpointconnections.go new file mode 100644 index 000000000000..c747ef99158e --- /dev/null +++ b/services/attestation/mgmt/2020-10-01/attestation/privateendpointconnections.go @@ -0,0 +1,396 @@ +package attestation + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// PrivateEndpointConnectionsClient is the various APIs for managing resources in attestation service. This primarily +// encompasses per-provider management. +type PrivateEndpointConnectionsClient struct { + BaseClient +} + +// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client. +func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient { + return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). +func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient { + return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create update the state of specified private endpoint connection associated with the attestation provider. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// providerName - the name of the attestation provider. +// privateEndpointConnectionName - name of the private endpoint connection associated with the attestation +// providers. +// properties - the private endpoint connection properties. +func (client PrivateEndpointConnectionsClient) Create(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: providerName, + Constraints: []validation.Constraint{{Target: "providerName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: properties, + Constraints: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "properties.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("attestation.PrivateEndpointConnectionsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, providerName, privateEndpointConnectionName, properties) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Create", resp, "Failure responding to request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client PrivateEndpointConnectionsClient) CreatePreparer(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string, properties PrivateEndpointConnection) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) CreateSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) CreateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified private endpoint connection associated with the attestation provider. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// providerName - the name of the attestation provider. +// privateEndpointConnectionName - name of the private endpoint connection associated with the attestation +// providers. +func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: providerName, + Constraints: []validation.Constraint{{Target: "providerName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("attestation.PrivateEndpointConnectionsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, providerName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Delete", resp, "Failure responding to request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified private endpoint connection associated with the attestation provider. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// providerName - the name of the attestation provider. +// privateEndpointConnectionName - name of the private endpoint connection associated with the attestation +// providers. +func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: providerName, + Constraints: []validation.Constraint{{Target: "providerName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("attestation.PrivateEndpointConnectionsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, providerName, privateEndpointConnectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request") + return + } + + return +} + +// GetPreparer prepares the Get request. +func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, providerName string, privateEndpointConnectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName), + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all the private endpoint connections associated with the attestation provider. +// Parameters: +// resourceGroupName - the name of the resource group. The name is case insensitive. +// providerName - the name of the attestation provider. +func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, providerName string) (result PrivateEndpointConnectionListResult, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: providerName, + Constraints: []validation.Constraint{{Target: "providerName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}, + {TargetValue: client.SubscriptionID, + Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewError("attestation.PrivateEndpointConnectionsClient", "List", err.Error()) + } + + req, err := client.ListPreparer(ctx, resourceGroupName, providerName) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "attestation.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request") + return + } + + return +} + +// ListPreparer prepares the List request. +func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, providerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "providerName": autorest.Encode("path", providerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2020-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) { + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) { + err = autorest.Respond( + resp, + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/services/attestation/mgmt/2020-10-01/attestation/providers.go b/services/attestation/mgmt/2020-10-01/attestation/providers.go index a45eaa32819a..7e389538da1b 100644 --- a/services/attestation/mgmt/2020-10-01/attestation/providers.go +++ b/services/attestation/mgmt/2020-10-01/attestation/providers.go @@ -16,7 +16,7 @@ import ( ) // ProvidersClient is the various APIs for managing resources in attestation service. This primarily encompasses -// per-tenant instance management. +// per-provider management. type ProvidersClient struct { BaseClient } @@ -32,10 +32,10 @@ func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) Provid return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new Attestation Provider instance. +// Create creates a new Attestation Provider. // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. -// providerName - name of the attestation service instance. +// providerName - name of the attestation provider. // creationParams - client supplied parameters. func (client ProvidersClient) Create(ctx context.Context, resourceGroupName string, providerName string, creationParams ServiceCreationParams) (result Provider, err error) { if tracing.IsEnabled() { @@ -53,8 +53,7 @@ func (client ProvidersClient) Create(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: creationParams, Constraints: []validation.Constraint{{Target: "creationParams.Location", Name: validation.Null, Rule: true, Chain: nil}, {Target: "creationParams.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { @@ -144,8 +143,7 @@ func (client ProvidersClient) Delete(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Delete", err.Error()) } @@ -212,7 +210,7 @@ func (client ProvidersClient) DeleteResponder(resp *http.Response) (result autor // Get get the status of Attestation Provider. // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. -// providerName - name of the attestation service instance +// providerName - name of the attestation provider. func (client ProvidersClient) Get(ctx context.Context, resourceGroupName string, providerName string) (result Provider, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/ProvidersClient.Get") @@ -229,8 +227,7 @@ func (client ProvidersClient) Get(ctx context.Context, resourceGroupName string, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Get", err.Error()) } @@ -471,8 +468,7 @@ func (client ProvidersClient) ListByResourceGroup(ctx context.Context, resourceG if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: client.SubscriptionID, Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "ListByResourceGroup", err.Error()) @@ -618,7 +614,7 @@ func (client ProvidersClient) ListDefaultResponder(resp *http.Response) (result // Update updates the Attestation Provider. // Parameters: // resourceGroupName - the name of the resource group. The name is case insensitive. -// providerName - name of the attestation service instance. +// providerName - name of the attestation provider. // updateParams - client supplied parameters. func (client ProvidersClient) Update(ctx context.Context, resourceGroupName string, providerName string, updateParams ServicePatchParams) (result Provider, err error) { if tracing.IsEnabled() { @@ -636,8 +632,7 @@ func (client ProvidersClient) Update(ctx context.Context, resourceGroupName stri Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewError("attestation.ProvidersClient", "Update", err.Error()) }