diff --git a/services/mysql/mgmt/2020-01-01/mysql/enums.go b/services/mysql/mgmt/2020-01-01/mysql/enums.go index fa6cadb77355..b2839d870308 100644 --- a/services/mysql/mgmt/2020-01-01/mysql/enums.go +++ b/services/mysql/mgmt/2020-01-01/mysql/enums.go @@ -17,25 +17,6 @@ package mysql // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -// CreatedByType enumerates the values for created by type. -type CreatedByType string - -const ( - // Application ... - Application CreatedByType = "Application" - // Key ... - Key CreatedByType = "Key" - // ManagedIdentity ... - ManagedIdentity CreatedByType = "ManagedIdentity" - // User ... - User CreatedByType = "User" -) - -// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. -func PossibleCreatedByTypeValues() []CreatedByType { - return []CreatedByType{Application, Key, ManagedIdentity, User} -} - // CreateMode enumerates the values for create mode. type CreateMode string @@ -123,17 +104,17 @@ func PossibleMinimalTLSVersionEnumValues() []MinimalTLSVersionEnum { type OperationOrigin string const ( - // OperationOriginNotSpecified ... - OperationOriginNotSpecified OperationOrigin = "NotSpecified" - // OperationOriginSystem ... - OperationOriginSystem OperationOrigin = "system" - // OperationOriginUser ... - OperationOriginUser OperationOrigin = "user" + // NotSpecified ... + NotSpecified OperationOrigin = "NotSpecified" + // System ... + System OperationOrigin = "system" + // User ... + User OperationOrigin = "user" ) // PossibleOperationOriginValues returns an array of possible values for the OperationOrigin const type. func PossibleOperationOriginValues() []OperationOrigin { - return []OperationOrigin{OperationOriginNotSpecified, OperationOriginSystem, OperationOriginUser} + return []OperationOrigin{NotSpecified, System, User} } // PrivateEndpointProvisioningState enumerates the values for private endpoint provisioning state. diff --git a/services/mysql/mgmt/2020-01-01/mysql/models.go b/services/mysql/mgmt/2020-01-01/mysql/models.go index 5bd25953d8a8..ba8d2aa1451a 100644 --- a/services/mysql/mgmt/2020-01-01/mysql/models.go +++ b/services/mysql/mgmt/2020-01-01/mysql/models.go @@ -797,163 +797,6 @@ func (lfp LogFileProperties) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// LogicalServerSecurityAlertPolicyListResult a list of the server's security alert policies. -type LogicalServerSecurityAlertPolicyListResult struct { - autorest.Response `json:"-"` - // Value - READ-ONLY; Array of results. - Value *[]ServerSecurityAlertPolicy `json:"value,omitempty"` - // NextLink - READ-ONLY; Link to retrieve next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// LogicalServerSecurityAlertPolicyListResultIterator provides access to a complete listing of -// ServerSecurityAlertPolicy values. -type LogicalServerSecurityAlertPolicyListResultIterator struct { - i int - page LogicalServerSecurityAlertPolicyListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *LogicalServerSecurityAlertPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogicalServerSecurityAlertPolicyListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *LogicalServerSecurityAlertPolicyListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) Response() LogicalServerSecurityAlertPolicyListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter LogicalServerSecurityAlertPolicyListResultIterator) Value() ServerSecurityAlertPolicy { - if !iter.page.NotDone() { - return ServerSecurityAlertPolicy{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the LogicalServerSecurityAlertPolicyListResultIterator type. -func NewLogicalServerSecurityAlertPolicyListResultIterator(page LogicalServerSecurityAlertPolicyListResultPage) LogicalServerSecurityAlertPolicyListResultIterator { - return LogicalServerSecurityAlertPolicyListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) IsEmpty() bool { - return lssaplr.Value == nil || len(*lssaplr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) hasNextLink() bool { - return lssaplr.NextLink != nil && len(*lssaplr.NextLink) != 0 -} - -// logicalServerSecurityAlertPolicyListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (lssaplr LogicalServerSecurityAlertPolicyListResult) logicalServerSecurityAlertPolicyListResultPreparer(ctx context.Context) (*http.Request, error) { - if !lssaplr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(lssaplr.NextLink))) -} - -// LogicalServerSecurityAlertPolicyListResultPage contains a page of ServerSecurityAlertPolicy values. -type LogicalServerSecurityAlertPolicyListResultPage struct { - fn func(context.Context, LogicalServerSecurityAlertPolicyListResult) (LogicalServerSecurityAlertPolicyListResult, error) - lssaplr LogicalServerSecurityAlertPolicyListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *LogicalServerSecurityAlertPolicyListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/LogicalServerSecurityAlertPolicyListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.lssaplr) - if err != nil { - return err - } - page.lssaplr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *LogicalServerSecurityAlertPolicyListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page LogicalServerSecurityAlertPolicyListResultPage) NotDone() bool { - return !page.lssaplr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page LogicalServerSecurityAlertPolicyListResultPage) Response() LogicalServerSecurityAlertPolicyListResult { - return page.lssaplr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page LogicalServerSecurityAlertPolicyListResultPage) Values() []ServerSecurityAlertPolicy { - if page.lssaplr.IsEmpty() { - return nil - } - return *page.lssaplr.Value -} - -// Creates a new instance of the LogicalServerSecurityAlertPolicyListResultPage type. -func NewLogicalServerSecurityAlertPolicyListResultPage(getNextPage func(context.Context, LogicalServerSecurityAlertPolicyListResult) (LogicalServerSecurityAlertPolicyListResult, error)) LogicalServerSecurityAlertPolicyListResultPage { - return LogicalServerSecurityAlertPolicyListResultPage{fn: getNextPage} -} - // NameAvailability represents a resource name availability. type NameAvailability struct { autorest.Response `json:"-"` @@ -979,7 +822,7 @@ type Operation struct { Name *string `json:"name,omitempty"` // Display - READ-ONLY; The localized display information for this particular operation or action. Display *OperationDisplay `json:"display,omitempty"` - // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'OperationOriginNotSpecified', 'OperationOriginUser', 'OperationOriginSystem' + // Origin - READ-ONLY; The intended executor of the operation. Possible values include: 'NotSpecified', 'User', 'System' Origin OperationOrigin `json:"origin,omitempty"` // Properties - READ-ONLY; Additional descriptions for the operation. Properties map[string]interface{} `json:"properties"` @@ -2248,10 +2091,22 @@ func (ri ResourceIdentity) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// SecurityAlertsPolicyProperties properties of a security alert policy. -type SecurityAlertsPolicyProperties struct { +// SecurityAlertPolicyProperties properties of a security alert policy. +type SecurityAlertPolicyProperties struct { // State - Specifies the state of the policy, whether it is enabled or disabled. Possible values include: 'ServerSecurityAlertPolicyStateEnabled', 'ServerSecurityAlertPolicyStateDisabled' State ServerSecurityAlertPolicyState `json:"state,omitempty"` + // DisabledAlerts - Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly + DisabledAlerts *[]string `json:"disabledAlerts,omitempty"` + // EmailAddresses - Specifies an array of e-mail addresses to which the alert is sent. + EmailAddresses *[]string `json:"emailAddresses,omitempty"` + // EmailAccountAdmins - Specifies that the alert is sent to the account administrators. + EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty"` + // StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. + StorageEndpoint *string `json:"storageEndpoint,omitempty"` + // StorageAccountAccessKey - Specifies the identifier key of the Threat Detection audit storage account. + StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` + // RetentionDays - Specifies the number of days to keep in the Threat Detection audit logs. + RetentionDays *int32 `json:"retentionDays,omitempty"` } // Server represents a server. @@ -3621,10 +3476,8 @@ func (future *ServerSecurityAlertPoliciesCreateOrUpdateFuture) Result(client Ser // ServerSecurityAlertPolicy a server security alert policy. type ServerSecurityAlertPolicy struct { autorest.Response `json:"-"` - // SecurityAlertsPolicyProperties - Resource properties. - *SecurityAlertsPolicyProperties `json:"properties,omitempty"` - // SystemData - READ-ONLY - SystemData *SystemData `json:"systemData,omitempty"` + // SecurityAlertPolicyProperties - Resource properties. + *SecurityAlertPolicyProperties `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 @@ -3636,8 +3489,8 @@ type ServerSecurityAlertPolicy struct { // MarshalJSON is the custom marshaler for ServerSecurityAlertPolicy. func (ssap ServerSecurityAlertPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if ssap.SecurityAlertsPolicyProperties != nil { - objectMap["properties"] = ssap.SecurityAlertsPolicyProperties + if ssap.SecurityAlertPolicyProperties != nil { + objectMap["properties"] = ssap.SecurityAlertPolicyProperties } return json.Marshal(objectMap) } @@ -3653,21 +3506,12 @@ func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error { switch k { case "properties": if v != nil { - var securityAlertsPolicyProperties SecurityAlertsPolicyProperties - err = json.Unmarshal(*v, &securityAlertsPolicyProperties) + var securityAlertPolicyProperties SecurityAlertPolicyProperties + err = json.Unmarshal(*v, &securityAlertPolicyProperties) if err != nil { return err } - ssap.SecurityAlertsPolicyProperties = &securityAlertsPolicyProperties - } - case "systemData": - if v != nil { - var systemData SystemData - err = json.Unmarshal(*v, &systemData) - if err != nil { - return err - } - ssap.SystemData = &systemData + ssap.SecurityAlertPolicyProperties = &securityAlertPolicyProperties } case "id": if v != nil { @@ -3921,22 +3765,6 @@ type StorageProfile struct { StorageAutogrow StorageAutogrow `json:"storageAutogrow,omitempty"` } -// SystemData metadata pertaining to creation and last modification of the resource. -type SystemData struct { - // CreatedBy - The identity that created the resource. - CreatedBy *string `json:"createdBy,omitempty"` - // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' - CreatedByType CreatedByType `json:"createdByType,omitempty"` - // CreatedAt - The timestamp of resource creation (UTC). - CreatedAt *date.Time `json:"createdAt,omitempty"` - // LastModifiedBy - The identity that last modified the resource. - 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 *date.Time `json:"lastModifiedAt,omitempty"` -} - // TagsObject tags object for patch operations. type TagsObject struct { // Tags - Resource tags. diff --git a/services/mysql/mgmt/2020-01-01/mysql/mysqlapi/interfaces.go b/services/mysql/mgmt/2020-01-01/mysql/mysqlapi/interfaces.go index 67bb2f7e2047..21b6ea2a26e2 100644 --- a/services/mysql/mgmt/2020-01-01/mysql/mysqlapi/interfaces.go +++ b/services/mysql/mgmt/2020-01-01/mysql/mysqlapi/interfaces.go @@ -129,6 +129,14 @@ type OperationsClientAPI interface { var _ OperationsClientAPI = (*mysql.OperationsClient)(nil) +// ServerSecurityAlertPoliciesClientAPI contains the set of methods on the ServerSecurityAlertPoliciesClient type. +type ServerSecurityAlertPoliciesClientAPI interface { + CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters mysql.ServerSecurityAlertPolicy) (result mysql.ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) + Get(ctx context.Context, resourceGroupName string, serverName string) (result mysql.ServerSecurityAlertPolicy, err error) +} + +var _ ServerSecurityAlertPoliciesClientAPI = (*mysql.ServerSecurityAlertPoliciesClient)(nil) + // QueryTextsClientAPI contains the set of methods on the QueryTextsClient type. type QueryTextsClientAPI interface { Get(ctx context.Context, resourceGroupName string, serverName string, queryID string) (result mysql.QueryText, err error) @@ -220,13 +228,3 @@ type ServerKeysClientAPI interface { } var _ ServerKeysClientAPI = (*mysql.ServerKeysClient)(nil) - -// ServerSecurityAlertPoliciesClientAPI contains the set of methods on the ServerSecurityAlertPoliciesClient type. -type ServerSecurityAlertPoliciesClientAPI interface { - CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters mysql.ServerSecurityAlertPolicy) (result mysql.ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) - Get(ctx context.Context, resourceGroupName string, serverName string) (result mysql.ServerSecurityAlertPolicy, err error) - ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result mysql.LogicalServerSecurityAlertPolicyListResultPage, err error) - ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result mysql.LogicalServerSecurityAlertPolicyListResultIterator, err error) -} - -var _ ServerSecurityAlertPoliciesClientAPI = (*mysql.ServerSecurityAlertPoliciesClient)(nil) diff --git a/services/mysql/mgmt/2020-01-01/mysql/serversecurityalertpolicies.go b/services/mysql/mgmt/2020-01-01/mysql/serversecurityalertpolicies.go index b77364c23573..ec333890820a 100644 --- a/services/mysql/mgmt/2020-01-01/mysql/serversecurityalertpolicies.go +++ b/services/mysql/mgmt/2020-01-01/mysql/serversecurityalertpolicies.go @@ -95,12 +95,11 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdatePreparer(ctx conte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2017-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } - parameters.SystemData = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), @@ -190,7 +189,7 @@ func (client ServerSecurityAlertPoliciesClient) GetPreparer(ctx context.Context, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2020-01-01" + const APIVersion = "2017-12-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -220,129 +219,3 @@ func (client ServerSecurityAlertPoliciesClient) GetResponder(resp *http.Response result.Response = autorest.Response{Response: resp} return } - -// ListByServer get the server's threat detection policies. -// Parameters: -// resourceGroupName - the name of the resource group. The name is case insensitive. -// serverName - the name of the server. -func (client ServerSecurityAlertPoliciesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogicalServerSecurityAlertPolicyListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.lssaplr.Response.Response != nil { - sc = result.lssaplr.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}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, - {TargetValue: client.SubscriptionID, - Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewError("mysql.ServerSecurityAlertPoliciesClient", "ListByServer", err.Error()) - } - - result.fn = client.listByServerNextResults - req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "ListByServer", nil, "Failure preparing request") - return - } - - resp, err := client.ListByServerSender(req) - if err != nil { - result.lssaplr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "ListByServer", resp, "Failure sending request") - return - } - - result.lssaplr, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "ListByServer", resp, "Failure responding to request") - } - if result.lssaplr.hasNextLink() && result.lssaplr.IsEmpty() { - err = result.NextWithContext(ctx) - } - - return -} - -// ListByServerPreparer prepares the ListByServer request. -func (client ServerSecurityAlertPoliciesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-01-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.DBforMySQL/servers/{serverName}/securityAlertPolicies", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByServerSender sends the ListByServer request. The method will close the -// http.Response Body if it receives an error. -func (client ServerSecurityAlertPoliciesClient) ListByServerSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByServerResponder handles the response to the ListByServer request. The method always -// closes the http.Response Body. -func (client ServerSecurityAlertPoliciesClient) ListByServerResponder(resp *http.Response) (result LogicalServerSecurityAlertPolicyListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByServerNextResults retrieves the next set of results, if any. -func (client ServerSecurityAlertPoliciesClient) listByServerNextResults(ctx context.Context, lastResults LogicalServerSecurityAlertPolicyListResult) (result LogicalServerSecurityAlertPolicyListResult, err error) { - req, err := lastResults.logicalServerSecurityAlertPolicyListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByServerSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByServerResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "listByServerNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByServerComplete enumerates all values, automatically crossing page boundaries as required. -func (client ServerSecurityAlertPoliciesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result LogicalServerSecurityAlertPolicyListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.ListByServer") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByServer(ctx, resourceGroupName, serverName) - return -}