From af6712b0a3ce55379c0286479369177fe2a09563 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 6 Aug 2018 09:18:42 -0700 Subject: [PATCH] Generated from b3ca48ca58ec98acb66b2c6760819c0b609cd5d1 (#2391) (#2392) Make state of AzureStorageInfoValue readonly --- profiles/preview/web/mgmt/web/models.go | 23 ++ services/web/mgmt/2018-02-01/web/apps.go | 312 +++++++++++++++++++++ services/web/mgmt/2018-02-01/web/models.go | 252 ++++++++++++++++- 3 files changed, 585 insertions(+), 2 deletions(-) diff --git a/profiles/preview/web/mgmt/web/models.go b/profiles/preview/web/mgmt/web/models.go index 61db598f247f..921deac8b1e6 100644 --- a/profiles/preview/web/mgmt/web/models.go +++ b/profiles/preview/web/mgmt/web/models.go @@ -70,6 +70,21 @@ const ( Website AzureResourceType = original.Website ) +type AzureStorageState = original.AzureStorageState + +const ( + InvalidCredentials AzureStorageState = original.InvalidCredentials + InvalidShare AzureStorageState = original.InvalidShare + Ok AzureStorageState = original.Ok +) + +type AzureStorageType = original.AzureStorageType + +const ( + AzureBlob AzureStorageType = original.AzureBlob + AzureFiles AzureStorageType = original.AzureFiles +) + type BackupItemStatus = original.BackupItemStatus const ( @@ -708,6 +723,8 @@ type AutoHealRules = original.AutoHealRules type AutoHealTriggers = original.AutoHealTriggers type AzureBlobStorageApplicationLogsConfig = original.AzureBlobStorageApplicationLogsConfig type AzureBlobStorageHTTPLogsConfig = original.AzureBlobStorageHTTPLogsConfig +type AzureStorageInfoValue = original.AzureStorageInfoValue +type AzureStoragePropertyDictionaryResource = original.AzureStoragePropertyDictionaryResource type AzureTableStorageApplicationLogsConfig = original.AzureTableStorageApplicationLogsConfig type BackupItem = original.BackupItem type BackupItemCollection = original.BackupItemCollection @@ -1209,6 +1226,12 @@ func PossibleAutoHealActionTypeValues() []AutoHealActionType { func PossibleAzureResourceTypeValues() []AzureResourceType { return original.PossibleAzureResourceTypeValues() } +func PossibleAzureStorageStateValues() []AzureStorageState { + return original.PossibleAzureStorageStateValues() +} +func PossibleAzureStorageTypeValues() []AzureStorageType { + return original.PossibleAzureStorageTypeValues() +} func PossibleBackupItemStatusValues() []BackupItemStatus { return original.PossibleBackupItemStatusValues() } diff --git a/services/web/mgmt/2018-02-01/web/apps.go b/services/web/mgmt/2018-02-01/web/apps.go index 0198b26e5015..2ad304399919 100644 --- a/services/web/mgmt/2018-02-01/web/apps.go +++ b/services/web/mgmt/2018-02-01/web/apps.go @@ -13665,6 +13665,159 @@ func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Respons return } +// ListAzureStorageAccounts gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +func (client AppsClient) ListAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string) (result AzureStoragePropertyDictionaryResource, err error) { + 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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListAzureStorageAccounts", err.Error()) + } + + req, err := client.ListAzureStorageAccountsPreparer(ctx, resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", nil, "Failure preparing request") + return + } + + resp, err := client.ListAzureStorageAccountsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure sending request") + return + } + + result, err = client.ListAzureStorageAccountsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccounts", resp, "Failure responding to request") + } + + return +} + +// ListAzureStorageAccountsPreparer prepares the ListAzureStorageAccounts request. +func (client AppsClient) ListAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSender sends the ListAzureStorageAccounts request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListAzureStorageAccountsResponder handles the response to the ListAzureStorageAccounts request. The method always +// closes the http.Response Body. +func (client AppsClient) ListAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAzureStorageAccountsSlot gets the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage +// account configurations for the production slot. +func (client AppsClient) ListAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, slot string) (result AzureStoragePropertyDictionaryResource, err error) { + 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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "ListAzureStorageAccountsSlot", err.Error()) + } + + req, err := client.ListAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListAzureStorageAccountsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListAzureStorageAccountsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListAzureStorageAccountsSlot", resp, "Failure responding to request") + } + + return +} + +// ListAzureStorageAccountsSlotPreparer prepares the ListAzureStorageAccountsSlot request. +func (client AppsClient) ListAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-02-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListAzureStorageAccountsSlotSender sends the ListAzureStorageAccountsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// ListAzureStorageAccountsSlotResponder handles the response to the ListAzureStorageAccountsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListBackups gets existing backups of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. @@ -25305,6 +25458,165 @@ func (client AppsClient) UpdateAuthSettingsSlotResponder(resp *http.Response) (r return } +// UpdateAzureStorageAccounts updates the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// azureStorageAccounts - azure storage accounts of the app. +func (client AppsClient) UpdateAzureStorageAccounts(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (result AzureStoragePropertyDictionaryResource, err error) { + 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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccounts", err.Error()) + } + + req, err := client.UpdateAzureStorageAccountsPreparer(ctx, resourceGroupName, name, azureStorageAccounts) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAzureStorageAccountsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure sending request") + return + } + + result, err = client.UpdateAzureStorageAccountsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccounts", resp, "Failure responding to request") + } + + return +} + +// UpdateAzureStorageAccountsPreparer prepares the UpdateAzureStorageAccounts request. +func (client AppsClient) UpdateAzureStorageAccountsPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-02-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.Web/sites/{name}/config/azurestorageaccounts", pathParameters), + autorest.WithJSON(azureStorageAccounts), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAzureStorageAccountsSender sends the UpdateAzureStorageAccounts request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) UpdateAzureStorageAccountsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateAzureStorageAccountsResponder handles the response to the UpdateAzureStorageAccounts request. The method always +// closes the http.Response Body. +func (client AppsClient) UpdateAzureStorageAccountsResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateAzureStorageAccountsSlot updates the Azure storage account configurations of an app. +// Parameters: +// resourceGroupName - name of the resource group to which the resource belongs. +// name - name of the app. +// azureStorageAccounts - azure storage accounts of the app. +// slot - name of the deployment slot. If a slot is not specified, the API will update the Azure storage +// account configurations for the production slot. +func (client AppsClient) UpdateAzureStorageAccountsSlot(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (result AzureStoragePropertyDictionaryResource, err error) { + 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}}}}); err != nil { + return result, validation.NewError("web.AppsClient", "UpdateAzureStorageAccountsSlot", err.Error()) + } + + req, err := client.UpdateAzureStorageAccountsSlotPreparer(ctx, resourceGroupName, name, azureStorageAccounts, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateAzureStorageAccountsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure sending request") + return + } + + result, err = client.UpdateAzureStorageAccountsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "UpdateAzureStorageAccountsSlot", resp, "Failure responding to request") + } + + return +} + +// UpdateAzureStorageAccountsSlotPreparer prepares the UpdateAzureStorageAccountsSlot request. +func (client AppsClient) UpdateAzureStorageAccountsSlotPreparer(ctx context.Context, resourceGroupName string, name string, azureStorageAccounts AzureStoragePropertyDictionaryResource, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-02-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.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts", pathParameters), + autorest.WithJSON(azureStorageAccounts), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateAzureStorageAccountsSlotSender sends the UpdateAzureStorageAccountsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) UpdateAzureStorageAccountsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req, + azure.DoRetryWithRegistration(client.Client)) +} + +// UpdateAzureStorageAccountsSlotResponder handles the response to the UpdateAzureStorageAccountsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) UpdateAzureStorageAccountsSlotResponder(resp *http.Response) (result AzureStoragePropertyDictionaryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // UpdateBackupConfiguration updates the backup configuration of an app. // Parameters: // resourceGroupName - name of the resource group to which the resource belongs. diff --git a/services/web/mgmt/2018-02-01/web/models.go b/services/web/mgmt/2018-02-01/web/models.go index 2e2c3018a1c9..fffdf32a91a2 100644 --- a/services/web/mgmt/2018-02-01/web/models.go +++ b/services/web/mgmt/2018-02-01/web/models.go @@ -98,6 +98,38 @@ func PossibleAzureResourceTypeValues() []AzureResourceType { return []AzureResourceType{TrafficManager, Website} } +// AzureStorageState enumerates the values for azure storage state. +type AzureStorageState string + +const ( + // InvalidCredentials ... + InvalidCredentials AzureStorageState = "InvalidCredentials" + // InvalidShare ... + InvalidShare AzureStorageState = "InvalidShare" + // Ok ... + Ok AzureStorageState = "Ok" +) + +// PossibleAzureStorageStateValues returns an array of possible values for the AzureStorageState const type. +func PossibleAzureStorageStateValues() []AzureStorageState { + return []AzureStorageState{InvalidCredentials, InvalidShare, Ok} +} + +// AzureStorageType enumerates the values for azure storage type. +type AzureStorageType string + +const ( + // AzureBlob ... + AzureBlob AzureStorageType = "AzureBlob" + // AzureFiles ... + AzureFiles AzureStorageType = "AzureFiles" +) + +// PossibleAzureStorageTypeValues returns an array of possible values for the AzureStorageType const type. +func PossibleAzureStorageTypeValues() []AzureStorageType { + return []AzureStorageType{AzureBlob, AzureFiles} +} + // BackupItemStatus enumerates the values for backup item status. type BackupItemStatus string @@ -4555,6 +4587,58 @@ type AzureBlobStorageHTTPLogsConfig struct { Enabled *bool `json:"enabled,omitempty"` } +// AzureStorageInfoValue azure Files or Blob Storage access information value for dictionary storage. +type AzureStorageInfoValue struct { + // Type - Type of storage. Possible values include: 'AzureFiles', 'AzureBlob' + Type AzureStorageType `json:"type,omitempty"` + // AccountName - Name of the storage account. + AccountName *string `json:"accountName,omitempty"` + // ShareName - Name of the file share (container name, for Blob storage). + ShareName *string `json:"shareName,omitempty"` + // AccessKey - Access key for the storage account. + AccessKey *string `json:"accessKey,omitempty"` + // MountPath - Path to mount the storage within the site's runtime environment. + MountPath *string `json:"mountPath,omitempty"` + // State - State of the storage account. Possible values include: 'Ok', 'InvalidCredentials', 'InvalidShare' + State AzureStorageState `json:"state,omitempty"` +} + +// AzureStoragePropertyDictionaryResource azureStorageInfo dictionary resource. +type AzureStoragePropertyDictionaryResource struct { + autorest.Response `json:"-"` + // Properties - Azure storage accounts. + Properties map[string]*AzureStorageInfoValue `json:"properties"` + // ID - Resource Id. + ID *string `json:"id,omitempty"` + // Name - Resource Name. + Name *string `json:"name,omitempty"` + // Kind - Kind of resource. + Kind *string `json:"kind,omitempty"` + // Type - Resource type. + Type *string `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureStoragePropertyDictionaryResource. +func (aspdr AzureStoragePropertyDictionaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if aspdr.Properties != nil { + objectMap["properties"] = aspdr.Properties + } + if aspdr.ID != nil { + objectMap["id"] = aspdr.ID + } + if aspdr.Name != nil { + objectMap["name"] = aspdr.Name + } + if aspdr.Kind != nil { + objectMap["kind"] = aspdr.Kind + } + if aspdr.Type != nil { + objectMap["type"] = aspdr.Type + } + return json.Marshal(objectMap) +} + // AzureTableStorageApplicationLogsConfig application logs to Azure table storage configuration. type AzureTableStorageApplicationLogsConfig struct { // Level - Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error' @@ -15399,6 +15483,8 @@ type SiteConfig struct { PublishingUsername *string `json:"publishingUsername,omitempty"` // AppSettings - Application settings. AppSettings *[]NameValuePair `json:"appSettings,omitempty"` + // AzureStorageAccounts - User-provided Azure storage accounts. + AzureStorageAccounts map[string]*AzureStorageInfoValue `json:"azureStorageAccounts"` // ConnectionStrings - Connection strings. ConnectionStrings *[]ConnStringInfo `json:"connectionStrings,omitempty"` // MachineKey - Site MachineKey. @@ -15468,6 +15554,165 @@ type SiteConfig struct { ReservedInstanceCount *int32 `json:"reservedInstanceCount,omitempty"` } +// MarshalJSON is the custom marshaler for SiteConfig. +func (sc SiteConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if sc.NumberOfWorkers != nil { + objectMap["numberOfWorkers"] = sc.NumberOfWorkers + } + if sc.DefaultDocuments != nil { + objectMap["defaultDocuments"] = sc.DefaultDocuments + } + if sc.NetFrameworkVersion != nil { + objectMap["netFrameworkVersion"] = sc.NetFrameworkVersion + } + if sc.PhpVersion != nil { + objectMap["phpVersion"] = sc.PhpVersion + } + if sc.PythonVersion != nil { + objectMap["pythonVersion"] = sc.PythonVersion + } + if sc.NodeVersion != nil { + objectMap["nodeVersion"] = sc.NodeVersion + } + if sc.LinuxFxVersion != nil { + objectMap["linuxFxVersion"] = sc.LinuxFxVersion + } + if sc.WindowsFxVersion != nil { + objectMap["windowsFxVersion"] = sc.WindowsFxVersion + } + if sc.RequestTracingEnabled != nil { + objectMap["requestTracingEnabled"] = sc.RequestTracingEnabled + } + if sc.RequestTracingExpirationTime != nil { + objectMap["requestTracingExpirationTime"] = sc.RequestTracingExpirationTime + } + if sc.RemoteDebuggingEnabled != nil { + objectMap["remoteDebuggingEnabled"] = sc.RemoteDebuggingEnabled + } + if sc.RemoteDebuggingVersion != nil { + objectMap["remoteDebuggingVersion"] = sc.RemoteDebuggingVersion + } + if sc.HTTPLoggingEnabled != nil { + objectMap["httpLoggingEnabled"] = sc.HTTPLoggingEnabled + } + if sc.LogsDirectorySizeLimit != nil { + objectMap["logsDirectorySizeLimit"] = sc.LogsDirectorySizeLimit + } + if sc.DetailedErrorLoggingEnabled != nil { + objectMap["detailedErrorLoggingEnabled"] = sc.DetailedErrorLoggingEnabled + } + if sc.PublishingUsername != nil { + objectMap["publishingUsername"] = sc.PublishingUsername + } + if sc.AppSettings != nil { + objectMap["appSettings"] = sc.AppSettings + } + if sc.AzureStorageAccounts != nil { + objectMap["azureStorageAccounts"] = sc.AzureStorageAccounts + } + if sc.ConnectionStrings != nil { + objectMap["connectionStrings"] = sc.ConnectionStrings + } + if sc.MachineKey != nil { + objectMap["machineKey"] = sc.MachineKey + } + if sc.HandlerMappings != nil { + objectMap["handlerMappings"] = sc.HandlerMappings + } + if sc.DocumentRoot != nil { + objectMap["documentRoot"] = sc.DocumentRoot + } + if sc.ScmType != "" { + objectMap["scmType"] = sc.ScmType + } + if sc.Use32BitWorkerProcess != nil { + objectMap["use32BitWorkerProcess"] = sc.Use32BitWorkerProcess + } + if sc.WebSocketsEnabled != nil { + objectMap["webSocketsEnabled"] = sc.WebSocketsEnabled + } + if sc.AlwaysOn != nil { + objectMap["alwaysOn"] = sc.AlwaysOn + } + if sc.JavaVersion != nil { + objectMap["javaVersion"] = sc.JavaVersion + } + if sc.JavaContainer != nil { + objectMap["javaContainer"] = sc.JavaContainer + } + if sc.JavaContainerVersion != nil { + objectMap["javaContainerVersion"] = sc.JavaContainerVersion + } + if sc.AppCommandLine != nil { + objectMap["appCommandLine"] = sc.AppCommandLine + } + if sc.ManagedPipelineMode != "" { + objectMap["managedPipelineMode"] = sc.ManagedPipelineMode + } + if sc.VirtualApplications != nil { + objectMap["virtualApplications"] = sc.VirtualApplications + } + if sc.LoadBalancing != "" { + objectMap["loadBalancing"] = sc.LoadBalancing + } + if sc.Experiments != nil { + objectMap["experiments"] = sc.Experiments + } + if sc.Limits != nil { + objectMap["limits"] = sc.Limits + } + if sc.AutoHealEnabled != nil { + objectMap["autoHealEnabled"] = sc.AutoHealEnabled + } + if sc.AutoHealRules != nil { + objectMap["autoHealRules"] = sc.AutoHealRules + } + if sc.TracingOptions != nil { + objectMap["tracingOptions"] = sc.TracingOptions + } + if sc.VnetName != nil { + objectMap["vnetName"] = sc.VnetName + } + if sc.Cors != nil { + objectMap["cors"] = sc.Cors + } + if sc.Push != nil { + objectMap["push"] = sc.Push + } + if sc.APIDefinition != nil { + objectMap["apiDefinition"] = sc.APIDefinition + } + if sc.AutoSwapSlotName != nil { + objectMap["autoSwapSlotName"] = sc.AutoSwapSlotName + } + if sc.LocalMySQLEnabled != nil { + objectMap["localMySqlEnabled"] = sc.LocalMySQLEnabled + } + if sc.ManagedServiceIdentityID != nil { + objectMap["managedServiceIdentityId"] = sc.ManagedServiceIdentityID + } + if sc.XManagedServiceIdentityID != nil { + objectMap["xManagedServiceIdentityId"] = sc.XManagedServiceIdentityID + } + if sc.IPSecurityRestrictions != nil { + objectMap["ipSecurityRestrictions"] = sc.IPSecurityRestrictions + } + if sc.HTTP20Enabled != nil { + objectMap["http20Enabled"] = sc.HTTP20Enabled + } + if sc.MinTLSVersion != "" { + objectMap["minTlsVersion"] = sc.MinTLSVersion + } + if sc.FtpsState != "" { + objectMap["ftpsState"] = sc.FtpsState + } + if sc.ReservedInstanceCount != nil { + objectMap["reservedInstanceCount"] = sc.ReservedInstanceCount + } + return json.Marshal(objectMap) +} + // SiteConfigResource web app configuration ARM resource. type SiteConfigResource struct { autorest.Response `json:"-"` @@ -16970,14 +17215,17 @@ type SkuInfos struct { Skus *[]GlobalCsmSkuDescription `json:"skus,omitempty"` } -// SlotConfigNames names for connection strings and application settings to be marked as sticky to the deployment -// slot and not moved during a swap operation. +// SlotConfigNames names for connection strings, application settings, and external Azure storage account +// configuration +// identifiers to be marked as sticky to the deployment slot and not moved during a swap operation. // This is valid for all deployment slots in an app. type SlotConfigNames struct { // ConnectionStringNames - List of connection string names. ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` // AppSettingNames - List of application settings names. AppSettingNames *[]string `json:"appSettingNames,omitempty"` + // AzureStorageConfigNames - List of external Azure storage account identifiers. + AzureStorageConfigNames *[]string `json:"azureStorageConfigNames,omitempty"` } // SlotConfigNamesResource slot Config names azure resource.